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.



68852
68853
68854
68855
68856
68857
68858
68859
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68852

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)
  @key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
end

Instance Attribute Details

#account_idObject (readonly)

Returns the value of attribute account_id.



68850
68851
68852
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68850

def 
  @account_id
end

#keyObject (readonly)

Returns the value of attribute key.



68850
68851
68852
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68850

def key
  @key
end

#secret_keyObject (readonly)

Returns the value of attribute secret_key.



68850
68851
68852
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68850

def secret_key
  @secret_key
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



68865
68866
68867
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68865

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

#subtype_to_hashObject



68869
68870
68871
68872
68873
68874
68875
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68869

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

#to_jsonObject



68861
68862
68863
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68861

def to_json
  JSON.dump(to_hash)
end