Class: Io::Flow::V0::Models::AuthorizationResultActionPost

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

Overview

Provides details for how to acquire additional information from the customer using POST (e.g. redirecting to the issuer for online payment method or 3D Secure).

Instance Attribute Summary collapse

Attributes inherited from AuthorizationResultAction

#discriminator

Instance Method Summary collapse

Methods inherited from AuthorizationResultAction

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ AuthorizationResultActionPost

Returns a new instance of AuthorizationResultActionPost.



29064
29065
29066
29067
29068
29069
29070
29071
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29064

def initialize(incoming={})
  super(:discriminator => AuthorizationResultAction::Types::AUTHORIZATION_RESULT_ACTION_POST)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:type, :url, :parameters], 'AuthorizationResultActionPost')
  @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::AuthorizationResultActionType) ? x : ::Io::Flow::V0::Models::AuthorizationResultActionType.apply(x))
  @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
  @parameters = HttpClient::Preconditions.assert_class('parameters', HttpClient::Helper.to_object(opts.delete(:parameters)), Hash)
end

Instance Attribute Details

#parametersObject (readonly)

Returns the value of attribute parameters.



29062
29063
29064
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29062

def parameters
  @parameters
end

#typeObject (readonly)

Returns the value of attribute type.



29062
29063
29064
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29062

def type
  @type
end

#urlObject (readonly)

Returns the value of attribute url.



29062
29063
29064
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29062

def url
  @url
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



29077
29078
29079
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29077

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

#subtype_to_hashObject



29081
29082
29083
29084
29085
29086
29087
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29081

def subtype_to_hash
  {
    :type => type.value,
    :url => url,
    :parameters => parameters
  }
end

#to_jsonObject



29073
29074
29075
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29073

def to_json
  JSON.dump(to_hash)
end