Class: Stripe::Price::UpdateParams

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

Defined Under Namespace

Classes: CurrencyOptions, MigrateTo

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(active: nil, currency_options: nil, expand: nil, lookup_key: nil, metadata: nil, migrate_to: nil, nickname: nil, tax_behavior: nil, transfer_lookup_key: nil) ⇒ UpdateParams

Returns a new instance of UpdateParams.



584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
# File 'lib/stripe/resources/price.rb', line 584

def initialize(
  active: nil,
  currency_options: nil,
  expand: nil,
  lookup_key: nil,
  metadata: nil,
  migrate_to: nil,
  nickname: nil,
  tax_behavior: nil,
  transfer_lookup_key: nil
)
  @active = active
  @currency_options = currency_options
  @expand = expand
  @lookup_key = lookup_key
  @metadata = 
  @migrate_to = migrate_to
  @nickname = nickname
  @tax_behavior = tax_behavior
  @transfer_lookup_key = transfer_lookup_key
end

Instance Attribute Details

#activeObject

Whether the price can be used for new purchases. Defaults to ‘true`.



566
567
568
# File 'lib/stripe/resources/price.rb', line 566

def active
  @active
end

#currency_optionsObject

Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html) and a [supported currency](stripe.com/docs/currencies).



568
569
570
# File 'lib/stripe/resources/price.rb', line 568

def currency_options
  @currency_options
end

#expandObject

Specifies which fields in the response should be expanded.



570
571
572
# File 'lib/stripe/resources/price.rb', line 570

def expand
  @expand
end

#lookup_keyObject

A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.



572
573
574
# File 'lib/stripe/resources/price.rb', line 572

def lookup_key
  @lookup_key
end

#metadataObject

Set of [key-value pairs](stripe.com/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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to ‘metadata`.



574
575
576
# File 'lib/stripe/resources/price.rb', line 574

def 
  @metadata
end

#migrate_toObject

If specified, subscriptions using this price will be updated to use the new referenced price.



576
577
578
# File 'lib/stripe/resources/price.rb', line 576

def migrate_to
  @migrate_to
end

#nicknameObject

A brief description of the price, hidden from customers.



578
579
580
# File 'lib/stripe/resources/price.rb', line 578

def nickname
  @nickname
end

#tax_behaviorObject

Only required if a [default tax behavior](stripe.com/docs/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.



580
581
582
# File 'lib/stripe/resources/price.rb', line 580

def tax_behavior
  @tax_behavior
end

#transfer_lookup_keyObject

If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.



582
583
584
# File 'lib/stripe/resources/price.rb', line 582

def transfer_lookup_key
  @transfer_lookup_key
end