Class: Io::Flow::V0::Clients::CustomerPurgeSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ CustomerPurgeSettings

Returns a new instance of CustomerPurgeSettings.



5684
5685
5686
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5684

def initialize(client)
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
end

Instance Method Details

#delete(organization) ⇒ Object



5701
5702
5703
5704
5705
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5701

def delete(organization)
  HttpClient::Preconditions.assert_class('organization', organization, String)
  r = @client.request("/#{CGI.escape(organization)}/customer/purge/settings").delete
  nil
end

#get(organization) ⇒ Object



5688
5689
5690
5691
5692
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5688

def get(organization)
  HttpClient::Preconditions.assert_class('organization', organization, String)
  r = @client.request("/#{CGI.escape(organization)}/customer/purge/settings").get
  ::Io::Flow::V0::Models::CustomerPurgeSettings.new(r)
end

#put(organization, customer_purge_settings_form) ⇒ Object



5694
5695
5696
5697
5698
5699
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5694

def put(organization, customer_purge_settings_form)
  HttpClient::Preconditions.assert_class('organization', organization, String)
  (x = customer_purge_settings_form; x.is_a?(::Io::Flow::V0::Models::CustomerPurgeSettingsForm) ? x : ::Io::Flow::V0::Models::CustomerPurgeSettingsForm.new(x))
  r = @client.request("/#{CGI.escape(organization)}/customer/purge/settings").with_json(customer_purge_settings_form.to_json).put
  ::Io::Flow::V0::Models::CustomerPurgeSettings.new(r)
end