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.



6526
6527
6528
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6526

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

Instance Method Details

#delete(organization) ⇒ Object



6543
6544
6545
6546
6547
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6543

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



6530
6531
6532
6533
6534
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6530

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



6536
6537
6538
6539
6540
6541
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6536

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