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.



5925
5926
5927
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5925

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

Instance Method Details

#delete(organization) ⇒ Object



5942
5943
5944
5945
5946
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5942

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



5929
5930
5931
5932
5933
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5929

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



5935
5936
5937
5938
5939
5940
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5935

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