Class: Io::Flow::V0::Clients::ChannelAuthorizations
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::ChannelAuthorizations
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ ChannelAuthorizations
constructor
A new instance of ChannelAuthorizations.
- #post(channel_authorization_form) ⇒ Object
Constructor Details
#initialize(client) ⇒ ChannelAuthorizations
Returns a new instance of ChannelAuthorizations.
5855 5856 5857 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5855 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#post(channel_authorization_form) ⇒ Object
5859 5860 5861 5862 5863 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5859 def post() (x = ; x.is_a?(::Io::Flow::V0::Models::ChannelAuthorizationForm) ? x : ::Io::Flow::V0::Models::ChannelAuthorizationForm.new(x)) r = @client.request("/channel/authorizations").with_json(.to_json).post ::Io::Flow::V0::Models::ChannelAuthorization.new(r) end |