Class: Io::Flow::V0::Clients::FtpOrganizationSettings

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ FtpOrganizationSettings

Returns a new instance of FtpOrganizationSettings.



7063
7064
7065
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7063

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

Instance Method Details

#delete(organization) ⇒ Object



7080
7081
7082
7083
7084
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7080

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

#get(organization) ⇒ Object



7067
7068
7069
7070
7071
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7067

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

#put(organization, ftp_organization_settings_form) ⇒ Object



7073
7074
7075
7076
7077
7078
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7073

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