Class: Io::Flow::V0::Models::PaymentPaymentRequestReference

Inherits:
PaymentOrderReference show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Attributes inherited from PaymentOrderReference

#discriminator

Instance Method Summary collapse

Methods inherited from PaymentOrderReference

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ PaymentPaymentRequestReference

Returns a new instance of PaymentPaymentRequestReference.



58265
58266
58267
58268
58269
58270
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58265

def initialize(incoming={})
  super(:discriminator => PaymentOrderReference::Types::PAYMENT_PAYMENT_REQUEST_REFERENCE)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:payment_request_id], 'PaymentPaymentRequestReference')
  @payment_request_id = HttpClient::Preconditions.assert_class('payment_request_id', opts.delete(:payment_request_id), String)
end

Instance Attribute Details

#payment_request_idObject (readonly)

Returns the value of attribute payment_request_id.



58263
58264
58265
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58263

def payment_request_id
  @payment_request_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



58276
58277
58278
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58276

def copy(incoming={})
  PaymentPaymentRequestReference.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



58280
58281
58282
58283
58284
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58280

def subtype_to_hash
  {
    :payment_request_id => payment_request_id
  }
end

#to_jsonObject



58272
58273
58274
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58272

def to_json
  JSON.dump(to_hash)
end