Class: Stripe::Billing::CreditGrantCreateParams::Amount
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Billing::CreditGrantCreateParams::Amount
- Defined in:
- lib/stripe/params/billing/credit_grant_create_params.rb
Defined Under Namespace
Classes: CustomPricingUnit, Monetary
Instance Attribute Summary collapse
-
#custom_pricing_unit ⇒ Object
The custom pricing unit amount.
-
#monetary ⇒ Object
The monetary amount.
-
#type ⇒ Object
The type of this amount.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(custom_pricing_unit: nil, monetary: nil, type: nil) ⇒ Amount
constructor
A new instance of Amount.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(custom_pricing_unit: nil, monetary: nil, type: nil) ⇒ Amount
Returns a new instance of Amount.
42 43 44 45 46 |
# File 'lib/stripe/params/billing/credit_grant_create_params.rb', line 42 def initialize(custom_pricing_unit: nil, monetary: nil, type: nil) @custom_pricing_unit = custom_pricing_unit @monetary = monetary @type = type end |
Instance Attribute Details
#custom_pricing_unit ⇒ Object
The custom pricing unit amount.
36 37 38 |
# File 'lib/stripe/params/billing/credit_grant_create_params.rb', line 36 def custom_pricing_unit @custom_pricing_unit end |
#monetary ⇒ Object
The monetary amount.
38 39 40 |
# File 'lib/stripe/params/billing/credit_grant_create_params.rb', line 38 def monetary @monetary end |
#type ⇒ Object
The type of this amount. We currently only support ‘monetary` billing credits.
40 41 42 |
# File 'lib/stripe/params/billing/credit_grant_create_params.rb', line 40 def type @type end |
Class Method Details
.field_encodings ⇒ Object
48 49 50 51 52 |
# File 'lib/stripe/params/billing/credit_grant_create_params.rb', line 48 def self.field_encodings @field_encodings = { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, } end |