Class: Io::Flow::V0::Clients::GatewayAuthenticationData

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ GatewayAuthenticationData

Returns a new instance of GatewayAuthenticationData.



3080
3081
3082
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 3080

def initialize(client)
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
end

Instance Method Details

#post(organization, gateway_authentication_data_form) ⇒ Object

Specify authentication data for payment processor



3085
3086
3087
3088
3089
3090
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 3085

def post(organization, gateway_authentication_data_form)
  HttpClient::Preconditions.assert_class('organization', organization, String)
  (x = gateway_authentication_data_form; x.is_a?(::Io::Flow::V0::Models::GatewayAuthenticationDataForm) ? x : ::Io::Flow::V0::Models::GatewayAuthenticationDataForm.from_json(x))
  r = @client.request("/#{CGI.escape(organization)}/gateways/authentication").with_json(gateway_authentication_data_form.to_json).post
  ::Io::Flow::V0::Models::GatewayAuthenticationData.from_json(r)
end