Class: Io::Flow::V0::Clients::OrganizationTokenV2
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::OrganizationTokenV2
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ OrganizationTokenV2
constructor
A new instance of OrganizationTokenV2.
-
#post(organization_token_form_v2) ⇒ Object
Creates an organization token.
Constructor Details
#initialize(client) ⇒ OrganizationTokenV2
Returns a new instance of OrganizationTokenV2.
7806 7807 7808 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7806 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#post(organization_token_form_v2) ⇒ Object
Creates an organization token
7811 7812 7813 7814 7815 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7811 def post(organization_token_form_v2) (x = organization_token_form_v2; x.is_a?(::Io::Flow::V0::Models::OrganizationTokenFormV2) ? x : ::Io::Flow::V0::Models::OrganizationTokenFormV2.new(x)) r = @client.request("/tokens/channel/organization").with_json(organization_token_form_v2.to_json).post ::Io::Flow::V0::Models::OrganizationTokenV2.new(r) end |