Class: Stripe::V2::Billing::RateCard
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::V2::Billing::RateCard
- Defined in:
- lib/stripe/resources/v2/billing/rate_card.rb
Overview
A Rate Card represents a versioned set of usage-based prices (rates). Each rate is associated with one Metered Item and defines how much to charge for usage of that item. After you’ve set up a RateCard, you can subscribe customers to it by creating a Rate Card Subscription.
Defined Under Namespace
Classes: ServiceCycle
Constant Summary collapse
- OBJECT_NAME =
"v2.billing.rate_card"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
Whether this RateCard is active.
-
#created ⇒ Object
readonly
Timestamp of when the object was created.
-
#currency ⇒ Object
readonly
Three-letter ISO currency code, in lowercase.
-
#display_name ⇒ Object
readonly
A customer-facing name for the Rate Card.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#latest_version ⇒ Object
readonly
The ID of this rate card’s most recently created version.
-
#live_version ⇒ Object
readonly
The ID of the Rate Card Version used by all subscriptions when no specific version is specified.
-
#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.
-
#lookup_key ⇒ Object
readonly
An internal key you can use to search for a particular RateCard.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](/docs/api/metadata) that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#service_cycle ⇒ Object
readonly
The service cycle configuration for this Rate Card.
-
#service_interval ⇒ Object
readonly
The interval for assessing service.
-
#service_interval_count ⇒ Object
readonly
The length of the interval for assessing service.
-
#tax_behavior ⇒ Object
readonly
The tax behavior for Stripe Tax — whether the rate card price includes or excludes tax.
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
#==, #[], #[]=, #_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
#active ⇒ Object (readonly)
Whether this RateCard is active. Inactive RateCards cannot be used in new activations or have new rates added.
32 33 34 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 32 def active @active end |
#created ⇒ Object (readonly)
Timestamp of when the object was created.
34 35 36 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 34 def created @created end |
#currency ⇒ Object (readonly)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
36 37 38 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 36 def currency @currency end |
#display_name ⇒ Object (readonly)
A customer-facing name for the Rate Card. This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices. Maximum length of 250 characters.
40 41 42 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 40 def display_name @display_name end |
#id ⇒ Object (readonly)
Unique identifier for the object.
42 43 44 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 42 def id @id end |
#latest_version ⇒ Object (readonly)
The ID of this rate card’s most recently created version.
44 45 46 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 44 def latest_version @latest_version end |
#live_version ⇒ Object (readonly)
The ID of the Rate Card Version used by all subscriptions when no specific version is specified.
46 47 48 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 46 def live_version @live_version 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.
48 49 50 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 48 def livemode @livemode end |
#lookup_key ⇒ Object (readonly)
An internal key you can use to search for a particular RateCard. Maximum length of 200 characters.
50 51 52 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 50 def lookup_key @lookup_key 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.
52 53 54 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 52 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value of the object field.
54 55 56 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 54 def object @object end |
#service_cycle ⇒ Object (readonly)
The service cycle configuration for this Rate Card. For example, a monthly Rate Card with a rate of 1 USD for the first 10 “workloads” and 2 USD thereafter means “1 USD per workload up to 10 workloads during a month of service.” This is similar to but distinct from billing interval; the service interval deals with the rate at which the customer accumulates fees, while the billing interval in Cadence deals with the rate the customer is billed.
59 60 61 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 59 def service_cycle @service_cycle end |
#service_interval ⇒ Object (readonly)
The interval for assessing service. For example, a monthly Rate Card with a rate of 1 USD for the first 10 “workloads” and 2 USD thereafter means “1 USD per workload up to 10 workloads during a month of service.” This is similar to but distinct from billing interval; the service interval deals with the rate at which the customer accumulates fees, while the billing interval in Cadence deals with the rate the customer is billed.
64 65 66 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 64 def service_interval @service_interval end |
#service_interval_count ⇒ Object (readonly)
The length of the interval for assessing service. For example, set this to 3 and ‘service_interval` to `“month”` to specify quarterly service.
67 68 69 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 67 def service_interval_count @service_interval_count end |
#tax_behavior ⇒ Object (readonly)
The tax behavior for Stripe Tax — whether the rate card price includes or excludes tax.
69 70 71 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 69 def tax_behavior @tax_behavior end |
Class Method Details
.field_remappings ⇒ Object
75 76 77 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 75 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
71 72 73 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 71 def self.inner_class_types @inner_class_types = { service_cycle: ServiceCycle } end |
.object_name ⇒ Object
12 13 14 |
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 12 def self.object_name "v2.billing.rate_card" end |