Class: Io::Flow::V0::Models::PaymentRequestUpserted
- 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.
-
#payment_request ⇒ Object
readonly
Returns the value of attribute payment_request.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentRequestUpserted
constructor
A new instance of PaymentRequestUpserted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ PaymentRequestUpserted
Returns a new instance of PaymentRequestUpserted.
51971 51972 51973 51974 51975 51976 51977 51978 51979 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51971 def initialize(incoming={}) super(:discriminator => Event::Types::PAYMENT_REQUEST_UPSERTED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :payment_request], 'PaymentRequestUpserted') @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String) @timestamp = 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) @payment_request = (x = opts.delete(:payment_request); x.is_a?(::Io::Flow::V0::Models::PaymentRequest) ? x : ::Io::Flow::V0::Models::PaymentRequest.new(x)) end |
Instance Attribute Details
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
51969 51970 51971 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51969 def event_id @event_id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
51969 51970 51971 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51969 def organization @organization end |
#payment_request ⇒ Object (readonly)
Returns the value of attribute payment_request.
51969 51970 51971 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51969 def payment_request @payment_request end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
51969 51970 51971 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51969 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
51985 51986 51987 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51985 def copy(incoming={}) PaymentRequestUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
51989 51990 51991 51992 51993 51994 51995 51996 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51989 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :payment_request => payment_request.to_hash } end |
#to_json ⇒ Object
51981 51982 51983 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51981 def to_json JSON.dump(to_hash) end |