Class: Stripe::V2::Billing::RateCardCustomPricingUnitOverageRate

Inherits:
APIResource show all
Defined in:
lib/stripe/resources/v2/billing/rate_card_custom_pricing_unit_overage_rate.rb

Overview

A rate card custom pricing unit overage rate defines the conversion rate from a custom pricing unit to fiat currency when credits are exhausted. This enables automatic overage charges at a configurable per-unit rate.

Constant Summary collapse

OBJECT_NAME =
"v2.billing.rate_card_custom_pricing_unit_overage_rate"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#createdObject (readonly)

Timestamp of when the object was created.



17
18
19
# File 'lib/stripe/resources/v2/billing/rate_card_custom_pricing_unit_overage_rate.rb', line 17

def created
  @created
end

#custom_pricing_unitObject (readonly)

The ID of the custom pricing unit this overage rate applies to.



19
20
21
# File 'lib/stripe/resources/v2/billing/rate_card_custom_pricing_unit_overage_rate.rb', line 19

def custom_pricing_unit
  @custom_pricing_unit
end

#idObject (readonly)

Unique identifier for the object.



21
22
23
# File 'lib/stripe/resources/v2/billing/rate_card_custom_pricing_unit_overage_rate.rb', line 21

def id
  @id
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



23
24
25
# File 'lib/stripe/resources/v2/billing/rate_card_custom_pricing_unit_overage_rate.rb', line 23

def livemode
  @livemode
end

#metadataObject (readonly)

Set of [key-value pairs](/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



25
26
27
# File 'lib/stripe/resources/v2/billing/rate_card_custom_pricing_unit_overage_rate.rb', line 25

def 
  @metadata
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value of the object field.



27
28
29
# File 'lib/stripe/resources/v2/billing/rate_card_custom_pricing_unit_overage_rate.rb', line 27

def object
  @object
end

#one_time_itemObject (readonly)

A one-time item represents a product that can be charged as a one-time line item, used for overage charges when custom pricing unit credits are exhausted.



30
31
32
# File 'lib/stripe/resources/v2/billing/rate_card_custom_pricing_unit_overage_rate.rb', line 30

def one_time_item
  @one_time_item
end

#rate_cardObject (readonly)

The ID of the Rate Card this overage rate belongs to.



32
33
34
# File 'lib/stripe/resources/v2/billing/rate_card_custom_pricing_unit_overage_rate.rb', line 32

def rate_card
  @rate_card
end

#rate_card_versionObject (readonly)

The ID of the Rate Card Version this overage rate was created on.



34
35
36
# File 'lib/stripe/resources/v2/billing/rate_card_custom_pricing_unit_overage_rate.rb', line 34

def rate_card_version
  @rate_card_version
end

#unit_amountObject (readonly)

The per-unit amount to charge for overages, represented as a decimal string in minor currency units with at most 12 decimal places.



36
37
38
# File 'lib/stripe/resources/v2/billing/rate_card_custom_pricing_unit_overage_rate.rb', line 36

def unit_amount
  @unit_amount
end

Class Method Details

.field_remappingsObject



42
43
44
# File 'lib/stripe/resources/v2/billing/rate_card_custom_pricing_unit_overage_rate.rb', line 42

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



38
39
40
# File 'lib/stripe/resources/v2/billing/rate_card_custom_pricing_unit_overage_rate.rb', line 38

def self.inner_class_types
  @inner_class_types = {}
end

.object_nameObject



12
13
14
# File 'lib/stripe/resources/v2/billing/rate_card_custom_pricing_unit_overage_rate.rb', line 12

def self.object_name
  "v2.billing.rate_card_custom_pricing_unit_overage_rate"
end