Class: Io::Flow::V0::Clients::TokenValidations

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ TokenValidations

Returns a new instance of TokenValidations.



8980
8981
8982
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8980

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

Instance Method Details

#post(token_validation_form) ⇒ Object



8984
8985
8986
8987
8988
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8984

def post(token_validation_form)
  (x = token_validation_form; x.is_a?(::Io::Flow::V0::Models::TokenValidationForm) ? x : ::Io::Flow::V0::Models::TokenValidationForm.new(x))
  r = @client.request("/token-validations").with_json(token_validation_form.to_json).post
  ::Io::Flow::V0::Models::TokenValidation.new(r)
end