Class: Stripe::V2::Billing::Contract::PricingOverride::OverwritePrice

Inherits:
StripeObject
  • Object
show all
Defined in:
lib/stripe/resources/v2/billing/contract.rb

Defined Under Namespace

Classes: 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

#priceObject (readonly)

The ID of the V1 price to overwrite.



768
769
770
# File 'lib/stripe/resources/v2/billing/contract.rb', line 768

def price
  @price
end

#tiering_modeObject (readonly)

Defines whether the tiered price should be graduated or volume-based.



770
771
772
# File 'lib/stripe/resources/v2/billing/contract.rb', line 770

def tiering_mode
  @tiering_mode
end

#tiersObject (readonly)

Each element represents a pricing tier.



772
773
774
# File 'lib/stripe/resources/v2/billing/contract.rb', line 772

def tiers
  @tiers
end

#unit_amountObject (readonly)

The per-unit amount to be charged, represented as a decimal string in minor currency units.



774
775
776
# File 'lib/stripe/resources/v2/billing/contract.rb', line 774

def unit_amount
  @unit_amount
end

Class Method Details

.field_encodingsObject



784
785
786
787
788
789
790
791
# File 'lib/stripe/resources/v2/billing/contract.rb', line 784

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

.field_remappingsObject



780
781
782
# File 'lib/stripe/resources/v2/billing/contract.rb', line 780

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



776
777
778
# File 'lib/stripe/resources/v2/billing/contract.rb', line 776

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