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.



40006
40007
40008
40009
40010
40011
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40006

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.



40004
40005
40006
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40004

def secret_key_reference
  @secret_key_reference
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



40017
40018
40019
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40017

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

#subtype_to_hashObject



40021
40022
40023
40024
40025
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40021

def subtype_to_hash
  {
    :secret_key_reference => secret_key_reference
  }
end

#to_jsonObject



40013
40014
40015
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40013

def to_json
  JSON.dump(to_hash)
end