Class: Stripe::Coupon::UpdateParams

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

Defined Under Namespace

Classes: CurrencyOptions

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(currency_options: nil, expand: nil, metadata: nil, name: nil) ⇒ UpdateParams

Returns a new instance of UpdateParams.



82
83
84
85
86
87
# File 'lib/stripe/resources/coupon.rb', line 82

def initialize(currency_options: nil, expand: nil, metadata: nil, name: nil)
  @currency_options = currency_options
  @expand = expand
  @metadata = 
  @name = name
end

Instance Attribute Details

#currency_optionsObject

Coupons defined in each available currency option (only supported if the coupon is amount-based). 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).



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

def currency_options
  @currency_options
end

#expandObject

Specifies which fields in the response should be expanded.



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

def expand
  @expand
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`.



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

def 
  @metadata
end

#nameObject

Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the ‘id` is shown if `name` is not set.



80
81
82
# File 'lib/stripe/resources/coupon.rb', line 80

def name
  @name
end