Class: Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant::Amount

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

Defined Under Namespace

Classes: CustomPricingUnit

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.



32
33
34
35
36
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 32

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_unitObject

The custom pricing unit amount of the credit grant. Required if ‘type` is `custom_pricing_unit`.



26
27
28
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 26

def custom_pricing_unit
  @custom_pricing_unit
end

#monetaryObject

The monetary amount of the credit grant. Required if ‘type` is `monetary`.



28
29
30
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 28

def monetary
  @monetary
end

#typeObject

The type of the credit grant amount. We currently support ‘monetary` and `custom_pricing_unit` billing credits.



30
31
32
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 30

def type
  @type
end

Class Method Details

.field_encodingsObject



38
39
40
41
42
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 38

def self.field_encodings
  @field_encodings = {
    custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } },
  }
end