Class: Stripe::V2::Billing::RateCardRate
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::V2::Billing::RateCardRate
- Defined in:
- lib/stripe/resources/v2/billing/rate_card_rate.rb
Defined Under Namespace
Classes: CustomPricingUnitAmount, Tier, TransformQuantity
Constant Summary collapse
- OBJECT_NAME =
"v2.billing.rate_card_rate"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#created ⇒ Object
readonly
Timestamp of when the object was created.
-
#custom_pricing_unit_amount ⇒ Object
readonly
The custom pricing unit that this rate binds to.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](/docs/api/metadata) that you can attach to an object.
-
#metered_item ⇒ Object
readonly
The Metered Item that this rate binds to.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#rate_card ⇒ Object
readonly
The ID of the Rate Card it belongs to.
-
#rate_card_version ⇒ Object
readonly
The ID of the Rate Card Version it was created on.
-
#tiering_mode ⇒ Object
readonly
Defines whether the tiering price should be graduated or volume-based.
-
#tiers ⇒ Object
readonly
Each element represents a pricing tier.
-
#transform_quantity ⇒ Object
readonly
Apply a transformation to the reported usage or set quantity before computing the amount billed.
-
#unit_amount ⇒ Object
readonly
The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal places.
Attributes inherited from APIResource
Attributes inherited from StripeObject
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
Methods inherited from StripeObject
#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #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
#created ⇒ Object (readonly)
Timestamp of when the object was created.
40 41 42 |
# File 'lib/stripe/resources/v2/billing/rate_card_rate.rb', line 40 def created @created end |
#custom_pricing_unit_amount ⇒ Object (readonly)
The custom pricing unit that this rate binds to.
42 43 44 |
# File 'lib/stripe/resources/v2/billing/rate_card_rate.rb', line 42 def custom_pricing_unit_amount @custom_pricing_unit_amount end |
#id ⇒ Object (readonly)
Unique identifier for the object.
44 45 46 |
# File 'lib/stripe/resources/v2/billing/rate_card_rate.rb', line 44 def id @id end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
67 68 69 |
# File 'lib/stripe/resources/v2/billing/rate_card_rate.rb', line 67 def livemode @livemode end |
#metadata ⇒ Object (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.
46 47 48 |
# File 'lib/stripe/resources/v2/billing/rate_card_rate.rb', line 46 def @metadata end |
#metered_item ⇒ Object (readonly)
The Metered Item that this rate binds to.
48 49 50 |
# File 'lib/stripe/resources/v2/billing/rate_card_rate.rb', line 48 def metered_item @metered_item end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value of the object field.
50 51 52 |
# File 'lib/stripe/resources/v2/billing/rate_card_rate.rb', line 50 def object @object end |
#rate_card ⇒ Object (readonly)
The ID of the Rate Card it belongs to.
52 53 54 |
# File 'lib/stripe/resources/v2/billing/rate_card_rate.rb', line 52 def rate_card @rate_card end |
#rate_card_version ⇒ Object (readonly)
The ID of the Rate Card Version it was created on.
54 55 56 |
# File 'lib/stripe/resources/v2/billing/rate_card_rate.rb', line 54 def rate_card_version @rate_card_version end |
#tiering_mode ⇒ Object (readonly)
Defines whether the tiering price should be graduated or volume-based. In volume-based tiering, the maximum quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity grows into new tiers. Can only be set if ‘tiers` is set.
58 59 60 |
# File 'lib/stripe/resources/v2/billing/rate_card_rate.rb', line 58 def tiering_mode @tiering_mode end |
#tiers ⇒ Object (readonly)
Each element represents a pricing tier. Cannot be set if ‘unit_amount` is provided.
60 61 62 |
# File 'lib/stripe/resources/v2/billing/rate_card_rate.rb', line 60 def tiers @tiers end |
#transform_quantity ⇒ Object (readonly)
Apply a transformation to the reported usage or set quantity before computing the amount billed.
62 63 64 |
# File 'lib/stripe/resources/v2/billing/rate_card_rate.rb', line 62 def transform_quantity @transform_quantity end |
#unit_amount ⇒ Object (readonly)
The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal places. Cannot be set if ‘tiers` is provided.
65 66 67 |
# File 'lib/stripe/resources/v2/billing/rate_card_rate.rb', line 65 def unit_amount @unit_amount end |
Class Method Details
.object_name ⇒ Object
9 10 11 |
# File 'lib/stripe/resources/v2/billing/rate_card_rate.rb', line 9 def self.object_name "v2.billing.rate_card_rate" end |