Class: Stripe::GiftCards::CardService::CreateParams

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/gift_cards/card_service.rb

Defined Under Namespace

Classes: CreatedBy

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(active: nil, created_by: nil, currency: nil, expand: nil, initial_amount: nil, metadata: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/stripe/services/gift_cards/card_service.rb', line 67

def initialize(
  active: nil,
  created_by: nil,
  currency: nil,
  expand: nil,
  initial_amount: nil,
  metadata: nil
)
  @active = active
  @created_by = created_by
  @currency = currency
  @expand = expand
  @initial_amount = initial_amount
  @metadata = 
end

Instance Attribute Details

#activeObject

The active state for the new gift card, defaults to false. The active state can be updated after creation.



50
51
52
# File 'lib/stripe/services/gift_cards/card_service.rb', line 50

def active
  @active
end

#created_byObject

Related objects which created this gift card.



53
54
55
# File 'lib/stripe/services/gift_cards/card_service.rb', line 53

def created_by
  @created_by
end

#currencyObject

Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).



56
57
58
# File 'lib/stripe/services/gift_cards/card_service.rb', line 56

def currency
  @currency
end

#expandObject

Specifies which fields in the response should be expanded.



59
60
61
# File 'lib/stripe/services/gift_cards/card_service.rb', line 59

def expand
  @expand
end

#initial_amountObject

The initial amount to load onto the new gift card, defaults to 0.



62
63
64
# File 'lib/stripe/services/gift_cards/card_service.rb', line 62

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



65
66
67
# File 'lib/stripe/services/gift_cards/card_service.rb', line 65

def 
  @metadata
end