Class: Inttegro::PurchaseIntent::CreateRequest

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/inttegro/purchase_intent/create_request.rb

Overview

Typed representation of the create request object in the Inttegro API.

This generated model is immutable. Construct it with .new, or decode a string-keyed API payload with .from_hash. #serialize produces a string-keyed hash using the original wire field names and serialized enum values.

Instance Attribute Summary collapse

Instance Attribute Details

#expires_at ⇒ Time? (readonly)

Future RFC3339 timestamp after which the Buy link stops accepting purchases

Optional in the API payload; omitted values default to nil. Wire name: expires_at.

Returns:

  • (Time, nil)


73
74
75
76
77
78
79
80
81
82
# File 'lib/inttegro/purchase_intent/create_request.rb', line 73

class CreateRequest < T::Struct
  const :product, T.nilable(Inttegro::PurchaseIntent::CreateRequestProduct), default: nil
  const :product_id, T.nilable(String), default: nil
  const :price, T.nilable(Inttegro::PurchaseIntent::CreateRequestPrice), default: nil
  const :price_id, T.nilable(String), default: nil
  const :quantity, Inttegro::PurchaseIntent::CreateRequestQuantity
  const :usage, T.nilable(Inttegro::PurchaseIntent::CreateRequestUsage), default: nil
  const :expires_at, T.nilable(Time), default: nil
  const :presentation, T.nilable(Inttegro::PurchaseIntent::CreatePresentation), default: nil
end

#presentation ⇒ Inttegro::PurchaseIntent::CreatePresentation? (readonly)

Optional merchant-authored copy for the hosted Buy page. Omit it to use product-aware defaults.

Optional in the API payload; omitted values default to nil. Wire name: presentation.



73
74
75
76
77
78
79
80
81
82
# File 'lib/inttegro/purchase_intent/create_request.rb', line 73

class CreateRequest < T::Struct
  const :product, T.nilable(Inttegro::PurchaseIntent::CreateRequestProduct), default: nil
  const :product_id, T.nilable(String), default: nil
  const :price, T.nilable(Inttegro::PurchaseIntent::CreateRequestPrice), default: nil
  const :price_id, T.nilable(String), default: nil
  const :quantity, Inttegro::PurchaseIntent::CreateRequestQuantity
  const :usage, T.nilable(Inttegro::PurchaseIntent::CreateRequestUsage), default: nil
  const :expires_at, T.nilable(Time), default: nil
  const :presentation, T.nilable(Inttegro::PurchaseIntent::CreatePresentation), default: nil
end

#price ⇒ Inttegro::PurchaseIntent::CreateRequestPrice? (readonly)

Price selection for the Buy link. Send exactly one of id or nominal and at most one of original or original_id.

Optional in the API payload; omitted values default to nil. Wire name: price.



73
74
75
76
77
78
79
80
81
82
# File 'lib/inttegro/purchase_intent/create_request.rb', line 73

class CreateRequest < T::Struct
  const :product, T.nilable(Inttegro::PurchaseIntent::CreateRequestProduct), default: nil
  const :product_id, T.nilable(String), default: nil
  const :price, T.nilable(Inttegro::PurchaseIntent::CreateRequestPrice), default: nil
  const :price_id, T.nilable(String), default: nil
  const :quantity, Inttegro::PurchaseIntent::CreateRequestQuantity
  const :usage, T.nilable(Inttegro::PurchaseIntent::CreateRequestUsage), default: nil
  const :expires_at, T.nilable(Time), default: nil
  const :presentation, T.nilable(Inttegro::PurchaseIntent::CreatePresentation), default: nil
end

#price_id ⇒ String? (readonly)

Active, unarchived app-owned price ID that belongs to the selected product

Optional in the API payload; omitted values default to nil. Wire name: price_id.

Returns:

  • (String, nil)


73
74
75
76
77
78
79
80
81
82
# File 'lib/inttegro/purchase_intent/create_request.rb', line 73

class CreateRequest < T::Struct
  const :product, T.nilable(Inttegro::PurchaseIntent::CreateRequestProduct), default: nil
  const :product_id, T.nilable(String), default: nil
  const :price, T.nilable(Inttegro::PurchaseIntent::CreateRequestPrice), default: nil
  const :price_id, T.nilable(String), default: nil
  const :quantity, Inttegro::PurchaseIntent::CreateRequestQuantity
  const :usage, T.nilable(Inttegro::PurchaseIntent::CreateRequestUsage), default: nil
  const :expires_at, T.nilable(Time), default: nil
  const :presentation, T.nilable(Inttegro::PurchaseIntent::CreatePresentation), default: nil
end

#product ⇒ Inttegro::PurchaseIntent::CreateRequestProduct? (readonly)

Product selection with optional variant-set configuration. Use this instead of product_id.

Optional in the API payload; omitted values default to nil. Wire name: product.



73
74
75
76
77
78
79
80
81
82
# File 'lib/inttegro/purchase_intent/create_request.rb', line 73

class CreateRequest < T::Struct
  const :product, T.nilable(Inttegro::PurchaseIntent::CreateRequestProduct), default: nil
  const :product_id, T.nilable(String), default: nil
  const :price, T.nilable(Inttegro::PurchaseIntent::CreateRequestPrice), default: nil
  const :price_id, T.nilable(String), default: nil
  const :quantity, Inttegro::PurchaseIntent::CreateRequestQuantity
  const :usage, T.nilable(Inttegro::PurchaseIntent::CreateRequestUsage), default: nil
  const :expires_at, T.nilable(Time), default: nil
  const :presentation, T.nilable(Inttegro::PurchaseIntent::CreatePresentation), default: nil
end

#product_id ⇒ String? (readonly)

App-owned product ID to sell through the Buy link when not using product

Optional in the API payload; omitted values default to nil. Wire name: product_id.

Returns:

  • (String, nil)


73
74
75
76
77
78
79
80
81
82
# File 'lib/inttegro/purchase_intent/create_request.rb', line 73

class CreateRequest < T::Struct
  const :product, T.nilable(Inttegro::PurchaseIntent::CreateRequestProduct), default: nil
  const :product_id, T.nilable(String), default: nil
  const :price, T.nilable(Inttegro::PurchaseIntent::CreateRequestPrice), default: nil
  const :price_id, T.nilable(String), default: nil
  const :quantity, Inttegro::PurchaseIntent::CreateRequestQuantity
  const :usage, T.nilable(Inttegro::PurchaseIntent::CreateRequestUsage), default: nil
  const :expires_at, T.nilable(Time), default: nil
  const :presentation, T.nilable(Inttegro::PurchaseIntent::CreatePresentation), default: nil
end

#quantity ⇒ Inttegro::PurchaseIntent::CreateRequestQuantity (readonly)

Quantity bounds the Buy link should enforce. Omit max when the Buy link has no upper quantity bound. When present, max must be greater than or equal to min.

Required in the API payload. Wire name: quantity.



73
74
75
76
77
78
79
80
81
82
# File 'lib/inttegro/purchase_intent/create_request.rb', line 73

class CreateRequest < T::Struct
  const :product, T.nilable(Inttegro::PurchaseIntent::CreateRequestProduct), default: nil
  const :product_id, T.nilable(String), default: nil
  const :price, T.nilable(Inttegro::PurchaseIntent::CreateRequestPrice), default: nil
  const :price_id, T.nilable(String), default: nil
  const :quantity, Inttegro::PurchaseIntent::CreateRequestQuantity
  const :usage, T.nilable(Inttegro::PurchaseIntent::CreateRequestUsage), default: nil
  const :expires_at, T.nilable(Time), default: nil
  const :presentation, T.nilable(Inttegro::PurchaseIntent::CreatePresentation), default: nil
end

#usage ⇒ Inttegro::PurchaseIntent::CreateRequestUsage? (readonly)

Optional link-use policy. Omit to create a reusable Buy link.

Optional in the API payload; omitted values default to nil. Wire name: usage.



73
74
75
76
77
78
79
80
81
82
# File 'lib/inttegro/purchase_intent/create_request.rb', line 73

class CreateRequest < T::Struct
  const :product, T.nilable(Inttegro::PurchaseIntent::CreateRequestProduct), default: nil
  const :product_id, T.nilable(String), default: nil
  const :price, T.nilable(Inttegro::PurchaseIntent::CreateRequestPrice), default: nil
  const :price_id, T.nilable(String), default: nil
  const :quantity, Inttegro::PurchaseIntent::CreateRequestQuantity
  const :usage, T.nilable(Inttegro::PurchaseIntent::CreateRequestUsage), default: nil
  const :expires_at, T.nilable(Time), default: nil
  const :presentation, T.nilable(Inttegro::PurchaseIntent::CreatePresentation), default: nil
end