Class: Stripe::V2::Payments::OffSessionPaymentCreateParams::AmountDetails::Shipping

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/v2/payments/off_session_payment_create_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h

Constructor Details

#initialize(amount: nil, from_postal_code: nil, to_postal_code: nil) ⇒ Shipping

Returns a new instance of Shipping.



61
62
63
64
65
# File 'lib/stripe/params/v2/payments/off_session_payment_create_params.rb', line 61

def initialize(amount: nil, from_postal_code: nil, to_postal_code: nil)
  @amount = amount
  @from_postal_code = from_postal_code
  @to_postal_code = to_postal_code
end

Instance Attribute Details

#amountObject

Portion of the amount that is for shipping.



55
56
57
# File 'lib/stripe/params/v2/payments/off_session_payment_create_params.rb', line 55

def amount
  @amount
end

#from_postal_codeObject

The postal code that represents the shipping source.



57
58
59
# File 'lib/stripe/params/v2/payments/off_session_payment_create_params.rb', line 57

def from_postal_code
  @from_postal_code
end

#to_postal_codeObject

The postal code that represents the shipping destination.



59
60
61
# File 'lib/stripe/params/v2/payments/off_session_payment_create_params.rb', line 59

def to_postal_code
  @to_postal_code
end