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.



37794
37795
37796
37797
37798
37799
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37794

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.



37792
37793
37794
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37792

def secret_key_reference
  @secret_key_reference
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



37805
37806
37807
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37805

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

#subtype_to_hashObject



37809
37810
37811
37812
37813
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37809

def subtype_to_hash
  {
    :secret_key_reference => secret_key_reference
  }
end

#to_jsonObject



37801
37802
37803
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37801

def to_json
  JSON.dump(to_hash)
end