Class: Stripe::V2::Billing::ServiceActionCreateParams::CreditGrantPerTenant::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.



136
137
138
139
140
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 136

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`.



130
131
132
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 130

def custom_pricing_unit
  @custom_pricing_unit
end

#monetaryObject

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



132
133
134
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 132

def monetary
  @monetary
end

#typeObject

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



134
135
136
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 134

def type
  @type
end

Class Method Details

.field_encodingsObject



142
143
144
145
146
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 142

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