Class: Io::Flow::V0::Clients::OrganizationOnboardingStates
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::OrganizationOnboardingStates
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
- #get(organization) ⇒ Object
-
#initialize(client) ⇒ OrganizationOnboardingStates
constructor
A new instance of OrganizationOnboardingStates.
- #put_activation(organization, activation_put_form) ⇒ Object
Constructor Details
#initialize(client) ⇒ OrganizationOnboardingStates
Returns a new instance of OrganizationOnboardingStates.
7724 7725 7726 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7724 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#get(organization) ⇒ Object
7728 7729 7730 7731 7732 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7728 def get(organization) HttpClient::Preconditions.assert_class('organization', organization, String) r = @client.request("/#{CGI.escape(organization)}/onboarding/state").get ::Io::Flow::V0::Models::OrganizationOnboardingState.new(r) end |
#put_activation(organization, activation_put_form) ⇒ Object
7734 7735 7736 7737 7738 7739 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7734 def put_activation(organization, activation_put_form) HttpClient::Preconditions.assert_class('organization', organization, String) (x = activation_put_form; x.is_a?(::Io::Flow::V0::Models::ActivationPutForm) ? x : ::Io::Flow::V0::Models::ActivationPutForm.new(x)) r = @client.request("/#{CGI.escape(organization)}/onboarding/state/activation").with_json(activation_put_form.to_json).put ::Io::Flow::V0::Models::OrganizationOnboardingState.new(r) end |