class Io::Flow::V0::Clients::GatewayAuthenticationData

Public Class Methods

new(client) click to toggle source
# 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

Public Instance Methods

post(organization, gateway_authentication_data_form) click to toggle source

Specify authentication data for payment processor

# 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