Class: Dodopayments::Models::PaymentCreateResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/payment_create_response.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(client_secret: , customer: , metadata: , payment_id: , total_amount: , discount_id: nil, expires_on: nil, payment_link: nil, product_cart: nil) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::PaymentCreateResponse for more details.

Parameters:

  • client_secret (String) (defaults to: )

    Client secret used to load Dodo checkout SDK

  • customer (Dodopayments::Models::CustomerLimitedDetails) (defaults to: )

    Limited details about the customer making the payment

  • metadata (Hash{Symbol=>String}) (defaults to: )

    Additional metadata associated with the payment

  • payment_id (String) (defaults to: )

    Unique identifier for the payment

  • total_amount (Integer) (defaults to: )

    Total amount of the payment in smallest currency unit (e.g. cents)

  • discount_id (String, nil) (defaults to: nil)

    The discount id if discount is applied

  • expires_on (Time, nil) (defaults to: nil)

    Expiry timestamp of the payment link

  • payment_link (String, nil) (defaults to: nil)

    Optional URL to a hosted payment page

  • product_cart (Array<Dodopayments::Models::OneTimeProductCartItem>, nil) (defaults to: nil)

    Optional list of products included in the payment



# File 'lib/dodopayments/models/payment_create_response.rb', line 64

Instance Attribute Details

#client_secretString

Client secret used to load Dodo checkout SDK NOTE : Dodo checkout SDK will be coming soon

Returns:

  • (String)


12
# File 'lib/dodopayments/models/payment_create_response.rb', line 12

required :client_secret, String

#customerDodopayments::Models::CustomerLimitedDetails

Limited details about the customer making the payment



18
# File 'lib/dodopayments/models/payment_create_response.rb', line 18

required :customer, -> { Dodopayments::CustomerLimitedDetails }

#discount_idString?

The discount id if discount is applied

Returns:

  • (String, nil)


42
# File 'lib/dodopayments/models/payment_create_response.rb', line 42

optional :discount_id, String, nil?: true

#expires_onTime?

Expiry timestamp of the payment link

Returns:

  • (Time, nil)


48
# File 'lib/dodopayments/models/payment_create_response.rb', line 48

optional :expires_on, Time, nil?: true

#metadataHash{Symbol=>String}

Additional metadata associated with the payment

Returns:

  • (Hash{Symbol=>String})


24
# File 'lib/dodopayments/models/payment_create_response.rb', line 24

required :metadata, Dodopayments::Internal::Type::HashOf[String]

#payment_idString

Unique identifier for the payment

Returns:

  • (String)


30
# File 'lib/dodopayments/models/payment_create_response.rb', line 30

required :payment_id, String

Optional URL to a hosted payment page

Returns:

  • (String, nil)


54
# File 'lib/dodopayments/models/payment_create_response.rb', line 54

optional :payment_link, String, nil?: true

#product_cartArray<Dodopayments::Models::OneTimeProductCartItem>?

Optional list of products included in the payment



60
61
62
# File 'lib/dodopayments/models/payment_create_response.rb', line 60

optional :product_cart,
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::OneTimeProductCartItem] },
nil?: true

#total_amountInteger

Total amount of the payment in smallest currency unit (e.g. cents)

Returns:

  • (Integer)


36
# File 'lib/dodopayments/models/payment_create_response.rb', line 36

required :total_amount, Integer