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.



3580
3581
3582
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 3580

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



3585
3586
3587
3588
3589
3590
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 3585

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