Class: Io::Flow::V0::Models::ReturnDeletedV2
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#return_ ⇒ Object
readonly
Returns the value of attribute return_.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ReturnDeletedV2
constructor
A new instance of ReturnDeletedV2.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ ReturnDeletedV2
Returns a new instance of ReturnDeletedV2.
56778 56779 56780 56781 56782 56783 56784 56785 56786 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56778 def initialize(incoming={}) super(:discriminator => Event::Types::RETURN_DELETED_V2) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :return_], 'ReturnDeletedV2') @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String) = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime) @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String) @return_ = (x = opts.delete(:return); x.is_a?(::Io::Flow::V0::Models::Return) ? x : ::Io::Flow::V0::Models::Return.new(x)) end |
Instance Attribute Details
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
56776 56777 56778 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56776 def event_id @event_id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
56776 56777 56778 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56776 def organization @organization end |
#return_ ⇒ Object (readonly)
Returns the value of attribute return_.
56776 56777 56778 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56776 def return_ @return_ end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
56776 56777 56778 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56776 def end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
56792 56793 56794 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56792 def copy(incoming={}) ReturnDeletedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
56796 56797 56798 56799 56800 56801 56802 56803 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56796 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :return => return_.to_hash } end |
#to_json ⇒ Object
56788 56789 56790 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56788 def to_json JSON.dump(to_hash) end |