Class: Stripe::Price::CurrencyOptions

Inherits:
StripeObject show all
Defined in:
lib/stripe/resources/price.rb

Defined Under Namespace

Classes: CustomUnitAmount, Tier

Constant Summary

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

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

#custom_unit_amountObject (readonly)

When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.



68
69
70
# File 'lib/stripe/resources/price.rb', line 68

def custom_unit_amount
  @custom_unit_amount
end

#tax_behaviorObject (readonly)

Only required if a [default tax behavior](docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of ‘inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.



70
71
72
# File 'lib/stripe/resources/price.rb', line 70

def tax_behavior
  @tax_behavior
end

#tiersObject (readonly)

Each element represents a pricing tier. This parameter requires ‘billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.



72
73
74
# File 'lib/stripe/resources/price.rb', line 72

def tiers
  @tiers
end

#unit_amountObject (readonly)

The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if ‘billing_scheme=per_unit`.



74
75
76
# File 'lib/stripe/resources/price.rb', line 74

def unit_amount
  @unit_amount
end

#unit_amount_decimalObject (readonly)

The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if ‘billing_scheme=per_unit`.



76
77
78
# File 'lib/stripe/resources/price.rb', line 76

def unit_amount_decimal
  @unit_amount_decimal
end

Class Method Details

.field_encodingsObject



86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/stripe/resources/price.rb', line 86

def self.field_encodings
  @field_encodings = {
    tiers: {
      kind: :array,
      element: {
        kind: :object,
        fields: { flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string },
      },
    },
    unit_amount_decimal: :decimal_string,
  }
end

.field_remappingsObject



82
83
84
# File 'lib/stripe/resources/price.rb', line 82

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



78
79
80
# File 'lib/stripe/resources/price.rb', line 78

def self.inner_class_types
  @inner_class_types = { custom_unit_amount: CustomUnitAmount, tiers: Tier }
end