Class: Stripe::ShippingRateService::CreateParams::FixedAmount

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/shipping_rate_service.rb

Defined Under Namespace

Classes: CurrencyOptions

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount: nil, currency: nil, currency_options: nil) ⇒ FixedAmount

Returns a new instance of FixedAmount.



113
114
115
116
117
# File 'lib/stripe/services/shipping_rate_service.rb', line 113

def initialize(amount: nil, currency: nil, currency_options: nil)
  @amount = amount
  @currency = currency
  @currency_options = currency_options
end

Instance Attribute Details

#amountObject

A non-negative integer in cents representing how much to charge.



107
108
109
# File 'lib/stripe/services/shipping_rate_service.rb', line 107

def amount
  @amount
end

#currencyObject

Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).



109
110
111
# File 'lib/stripe/services/shipping_rate_service.rb', line 109

def currency
  @currency
end

#currency_optionsObject

Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html) and a [supported currency](stripe.com/docs/currencies).



111
112
113
# File 'lib/stripe/services/shipping_rate_service.rb', line 111

def currency_options
  @currency_options
end