Class: Io::Flow::V0::Models::StripeAuthenticationData

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

Overview

Stripe authentication data.

Instance Attribute Summary collapse

Attributes inherited from GatewayAuthenticationData

#discriminator

Instance Method Summary collapse

Methods inherited from GatewayAuthenticationData

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ StripeAuthenticationData

Returns a new instance of StripeAuthenticationData.



46498
46499
46500
46501
46502
46503
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46498

def initialize(incoming={})
  super(:discriminator => GatewayAuthenticationData::Types::STRIPE_AUTHENTICATION_DATA)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:secret_key_reference], 'StripeAuthenticationData')
  @secret_key_reference = HttpClient::Preconditions.assert_class('secret_key_reference', opts.delete(:secret_key_reference), String)
end

Instance Attribute Details

#secret_key_referenceObject (readonly)

Returns the value of attribute secret_key_reference.



46496
46497
46498
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46496

def secret_key_reference
  @secret_key_reference
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



46509
46510
46511
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46509

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

#subtype_to_hashObject



46513
46514
46515
46516
46517
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46513

def subtype_to_hash
  {
    :secret_key_reference => secret_key_reference
  }
end

#to_jsonObject



46505
46506
46507
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46505

def to_json
  JSON.dump(to_hash)
end