Class: Io::Flow::V0::Models::CustomerPurgeSettings
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CustomerPurgeSettings
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Represent settings for when to purge customer data
Instance Attribute Summary collapse
-
#days_until_purge_unused ⇒ Object
readonly
Returns the value of attribute days_until_purge_unused.
-
#days_until_purge_used ⇒ Object
readonly
Returns the value of attribute days_until_purge_used.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CustomerPurgeSettings
constructor
A new instance of CustomerPurgeSettings.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CustomerPurgeSettings
Returns a new instance of CustomerPurgeSettings.
38538 38539 38540 38541 38542 38543 38544 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38538 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :days_until_purge_unused, :days_until_purge_used], 'CustomerPurgeSettings') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @days_until_purge_unused = HttpClient::Preconditions.assert_class('days_until_purge_unused', opts.delete(:days_until_purge_unused), Integer) @days_until_purge_used = HttpClient::Preconditions.assert_class('days_until_purge_used', opts.delete(:days_until_purge_used), Integer) end |
Instance Attribute Details
#days_until_purge_unused ⇒ Object (readonly)
Returns the value of attribute days_until_purge_unused.
38536 38537 38538 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38536 def days_until_purge_unused @days_until_purge_unused end |
#days_until_purge_used ⇒ Object (readonly)
Returns the value of attribute days_until_purge_used.
38536 38537 38538 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38536 def days_until_purge_used @days_until_purge_used end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
38536 38537 38538 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38536 def id @id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
38550 38551 38552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38550 def copy(incoming={}) CustomerPurgeSettings.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
38554 38555 38556 38557 38558 38559 38560 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38554 def to_hash { :id => id, :days_until_purge_unused => days_until_purge_unused, :days_until_purge_used => days_until_purge_used } end |
#to_json ⇒ Object
38546 38547 38548 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38546 def to_json JSON.dump(to_hash) end |