class Io::Flow::V0::Models::FtpOrganizationSettings

The FTP Organization Settings allows you to enable an FTP Drop Point for an organization, creating the standard set of FTP Folders, credentials, and associated webhooks.

Attributes

account[R]
emails[R]
enabled[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 43759
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:enabled, :emails], 'FtpOrganizationSettings')
  @enabled = HttpClient::Preconditions.assert_boolean('enabled', opts.delete(:enabled))
  @emails = HttpClient::Preconditions.assert_class('emails', opts.delete(:emails), Array).map { |v| HttpClient::Preconditions.assert_class('emails', v, String) }
  @account = (x = opts.delete(:account); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::FtpAccount) ? x : ::Io::Flow::V0::Models::FtpAccount.new(x)))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 43771
def copy(incoming={})
  FtpOrganizationSettings.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 43775
def to_hash
  {
    :enabled => enabled,
    :emails => emails,
    :account => account.nil? ? nil : account.to_hash
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 43767
def to_json
  JSON.dump(to_hash)
end