Class: Io::Flow::V0::Models::StripeAuthorizationResultActionDetails

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

Overview

Provides details for Stripe authorizations (e.g. client secret to be used for 3D Secure).

Instance Attribute Summary collapse

Attributes inherited from AuthorizationResultActionDetails

#discriminator

Instance Method Summary collapse

Methods inherited from AuthorizationResultActionDetails

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ StripeAuthorizationResultActionDetails

Returns a new instance of StripeAuthorizationResultActionDetails.



52615
52616
52617
52618
52619
52620
52621
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52615

def initialize(incoming={})
  super(:discriminator => AuthorizationResultActionDetails::Types::STRIPE_AUTHORIZATION_RESULT_ACTION_DETAILS)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @client_secret = (x = opts.delete(:client_secret); x.nil? ? nil : HttpClient::Preconditions.assert_class('client_secret', x, String))
  @payment_method_id = (x = opts.delete(:payment_method_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('payment_method_id', x, String))
  @publishable_key = (x = opts.delete(:publishable_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('publishable_key', x, String))
end

Instance Attribute Details

#client_secretObject (readonly)

Returns the value of attribute client_secret.



52613
52614
52615
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52613

def client_secret
  @client_secret
end

#payment_method_idObject (readonly)

Returns the value of attribute payment_method_id.



52613
52614
52615
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52613

def payment_method_id
  @payment_method_id
end

#publishable_keyObject (readonly)

Returns the value of attribute publishable_key.



52613
52614
52615
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52613

def publishable_key
  @publishable_key
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



52627
52628
52629
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52627

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

#subtype_to_hashObject



52631
52632
52633
52634
52635
52636
52637
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52631

def subtype_to_hash
  {
    :client_secret => client_secret,
    :payment_method_id => payment_method_id,
    :publishable_key => publishable_key
  }
end

#to_jsonObject



52623
52624
52625
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52623

def to_json
  JSON.dump(to_hash)
end