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.



5901
5902
5903
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5901

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

Instance Method Details

#delete(organization) ⇒ Object



5918
5919
5920
5921
5922
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5918

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



5905
5906
5907
5908
5909
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5905

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



5911
5912
5913
5914
5915
5916
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5911

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