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.



63817
63818
63819
63820
63821
63822
63823
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63817

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.



63815
63816
63817
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63815

def client_secret
  @client_secret
end

#payment_method_idObject (readonly)

Returns the value of attribute payment_method_id.



63815
63816
63817
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63815

def payment_method_id
  @payment_method_id
end

#publishable_keyObject (readonly)

Returns the value of attribute publishable_key.



63815
63816
63817
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63815

def publishable_key
  @publishable_key
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



63829
63830
63831
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63829

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

#subtype_to_hashObject



63833
63834
63835
63836
63837
63838
63839
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63833

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

#to_jsonObject



63825
63826
63827
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 63825

def to_json
  JSON.dump(to_hash)
end