Method: ProcessOut::Token#initialize

Defined in:
lib/processout/token.rb

#initialize(client, data = {}) ⇒ Token

Initializes the Token object Params:

client

ProcessOut client instance

data

data that can be used to fill the object



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/processout/token.rb', line 181

def initialize(client, data = {})
  @client = client

  self.id = data.fetch(:id, nil)
  self.customer = data.fetch(:customer, nil)
  self.customer_id = data.fetch(:customer_id, nil)
  self.gateway_configuration = data.fetch(:gateway_configuration, nil)
  self.gateway_configuration_id = data.fetch(:gateway_configuration_id, nil)
  self.card = data.fetch(:card, nil)
  self.card_id = data.fetch(:card_id, nil)
  self.type = data.fetch(:type, nil)
  self. = data.fetch(:metadata, nil)
  self.is_subscription_only = data.fetch(:is_subscription_only, nil)
  self.is_default = data.fetch(:is_default, nil)
  self.return_url = data.fetch(:return_url, nil)
  self.cancel_url = data.fetch(:cancel_url, nil)
  self.summary = data.fetch(:summary, nil)
  self.is_chargeable = data.fetch(:is_chargeable, nil)
  self.created_at = data.fetch(:created_at, nil)
  self.description = data.fetch(:description, nil)
  self.invoice = data.fetch(:invoice, nil)
  self.invoice_id = data.fetch(:invoice_id, nil)
  self.manual_invoice_cancellation = data.fetch(:manual_invoice_cancellation, nil)
  self.verification_status = data.fetch(:verification_status, nil)
  self.can_get_balance = data.fetch(:can_get_balance, nil)
  self.webhook_url = data.fetch(:webhook_url, nil)
  
end