Class: Io::Flow::V0::Models::FtpOrganizationSettings
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::FtpOrganizationSettings
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
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.
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#emails ⇒ Object
readonly
Returns the value of attribute emails.
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ FtpOrganizationSettings
constructor
A new instance of FtpOrganizationSettings.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ FtpOrganizationSettings
Returns a new instance of FtpOrganizationSettings.
43759 43760 43761 43762 43763 43764 43765 |
# 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 |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
43757 43758 43759 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43757 def account @account end |
#emails ⇒ Object (readonly)
Returns the value of attribute emails.
43757 43758 43759 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43757 def emails @emails end |
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
43757 43758 43759 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43757 def enabled @enabled end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
43771 43772 43773 |
# 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 ⇒ Object
43775 43776 43777 43778 43779 43780 43781 |
# 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 ⇒ Object
43767 43768 43769 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43767 def to_json JSON.dump(to_hash) end |