Class: Io::Flow::V0::Clients::SessionAuthorizations
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::SessionAuthorizations
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ SessionAuthorizations
constructor
A new instance of SessionAuthorizations.
- #post(session_authorization_form) ⇒ Object
Constructor Details
#initialize(client) ⇒ SessionAuthorizations
Returns a new instance of SessionAuthorizations.
8317 8318 8319 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8317 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#post(session_authorization_form) ⇒ Object
8321 8322 8323 8324 8325 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8321 def post() (x = ; x.is_a?(::Io::Flow::V0::Models::SessionAuthorizationForm) ? x : ::Io::Flow::V0::Models::SessionAuthorizationForm.new(x)) r = @client.request("/authorizations/sessions").with_json(.to_json).post ::Io::Flow::V0::Models::SessionAuthorization.from_json(r) end |