Class: Io::Flow::V0::Models::StripeAuthenticationDataForm

Inherits:
GatewayAuthenticationDataForm show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Overview

Used to specify Stripe API secret key.

Instance Attribute Summary collapse

Attributes inherited from GatewayAuthenticationDataForm

#discriminator

Instance Method Summary collapse

Methods inherited from GatewayAuthenticationDataForm

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ StripeAuthenticationDataForm

Returns a new instance of StripeAuthenticationDataForm.



39222
39223
39224
39225
39226
39227
39228
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39222

def initialize(incoming={})
  super(:discriminator => GatewayAuthenticationDataForm::Types::STRIPE_AUTHENTICATION_DATA_FORM)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:account_id, :secret_key], 'StripeAuthenticationDataForm')
  @account_id = HttpClient::Preconditions.assert_class('account_id', opts.delete(:account_id), String)
  @secret_key = HttpClient::Preconditions.assert_class('secret_key', opts.delete(:secret_key), String)
end

Instance Attribute Details

#account_idObject (readonly)

Returns the value of attribute account_id.



39220
39221
39222
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39220

def 
  @account_id
end

#secret_keyObject (readonly)

Returns the value of attribute secret_key.



39220
39221
39222
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39220

def secret_key
  @secret_key
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



39234
39235
39236
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39234

def copy(incoming={})
  StripeAuthenticationDataForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



39238
39239
39240
39241
39242
39243
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39238

def subtype_to_hash
  {
    :account_id => ,
    :secret_key => secret_key
  }
end

#to_jsonObject



39230
39231
39232
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39230

def to_json
  JSON.dump(to_hash)
end