Class: Stripe::V2::Billing::RateCard

Inherits:
APIResource show all
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.

Constant Summary collapse

OBJECT_NAME =
"v2.billing.rate_card"

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?, #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

#activeObject (readonly)

Whether this RateCard is active. Inactive RateCards cannot be used in new activations or have new rates added.



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

def active
  @active
end

#createdObject (readonly)

Timestamp of when the object was created.



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

def created
  @created
end

#currencyObject (readonly)

Three-letter ISO currency code, in lowercase. Must be a supported currency.



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

def currency
  @currency
end

#display_nameObject (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.



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

def display_name
  @display_name
end

#idObject (readonly)

Unique identifier for the object.



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

def id
  @id
end

#latest_versionObject (readonly)

The ID of this rate card’s most recently created version.



29
30
31
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 29

def latest_version
  @latest_version
end

#live_versionObject (readonly)

The ID of the Rate Card Version that will be used by all subscriptions when no specific version is specified.



31
32
33
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 31

def live_version
  @live_version
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.



49
50
51
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 49

def livemode
  @livemode
end

#lookup_keyObject (readonly)

An internal key you can use to search for a particular RateCard. Maximum length of 200 characters.



33
34
35
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 33

def lookup_key
  @lookup_key
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.



35
36
37
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 35

def 
  @metadata
end

#objectObject (readonly)

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



37
38
39
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 37

def object
  @object
end

#service_intervalObject (readonly)

The interval for assessing service. For example, a monthly Rate Card with a rate of $1 for the first 10 “workloads” and $2 thereafter means “$1 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.



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

def service_interval
  @service_interval
end

#service_interval_countObject (readonly)

The length of the interval for assessing service. For example, set this to 3 and ‘service_interval` to `“month”` in order to specify quarterly service.



45
46
47
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 45

def service_interval_count
  @service_interval_count
end

#tax_behaviorObject (readonly)

The Stripe Tax tax behavior - whether the rates are inclusive or exclusive of tax.



47
48
49
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 47

def tax_behavior
  @tax_behavior
end

Class Method Details

.field_remappingsObject



55
56
57
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 55

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



51
52
53
# File 'lib/stripe/resources/v2/billing/rate_card.rb', line 51

def self.inner_class_types
  @inner_class_types = {}
end

.object_nameObject



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

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