Class: Io::Flow::V0::Clients::ChannelViesRegistrations
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::ChannelViesRegistrations
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
- #delete_by_key(channel_id, key) ⇒ Object
-
#initialize(client) ⇒ ChannelViesRegistrations
constructor
A new instance of ChannelViesRegistrations.
- #post(channel_id, channel_vies_registration_form) ⇒ Object
- #put_by_key(channel_id, key, channel_vies_registration_form) ⇒ Object
Constructor Details
#initialize(client) ⇒ ChannelViesRegistrations
Returns a new instance of ChannelViesRegistrations.
6154 6155 6156 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6154 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#delete_by_key(channel_id, key) ⇒ Object
6173 6174 6175 6176 6177 6178 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6173 def delete_by_key(channel_id, key) HttpClient::Preconditions.assert_class('channel_id', channel_id, String) HttpClient::Preconditions.assert_class('key', key, String) r = @client.request("/channel/#{CGI.escape(channel_id)}/vies/registrations/#{CGI.escape(key)}").delete nil end |
#post(channel_id, channel_vies_registration_form) ⇒ Object
6158 6159 6160 6161 6162 6163 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6158 def post(channel_id, channel_vies_registration_form) HttpClient::Preconditions.assert_class('channel_id', channel_id, String) (x = channel_vies_registration_form; x.is_a?(::Io::Flow::V0::Models::ChannelViesRegistrationForm) ? x : ::Io::Flow::V0::Models::ChannelViesRegistrationForm.new(x)) r = @client.request("/channel/#{CGI.escape(channel_id)}/vies/registrations").with_json(channel_vies_registration_form.to_json).post ::Io::Flow::V0::Models::ChannelViesRegistration.new(r) end |
#put_by_key(channel_id, key, channel_vies_registration_form) ⇒ Object
6165 6166 6167 6168 6169 6170 6171 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6165 def put_by_key(channel_id, key, channel_vies_registration_form) HttpClient::Preconditions.assert_class('channel_id', channel_id, String) HttpClient::Preconditions.assert_class('key', key, String) (x = channel_vies_registration_form; x.is_a?(::Io::Flow::V0::Models::ChannelViesRegistrationForm) ? x : ::Io::Flow::V0::Models::ChannelViesRegistrationForm.new(x)) r = @client.request("/channel/#{CGI.escape(channel_id)}/vies/registrations/#{CGI.escape(key)}").with_json(channel_vies_registration_form.to_json).put ::Io::Flow::V0::Models::ChannelViesRegistration.new(r) end |