Class: Worldline::Connect::SDK::V1::Domain::OrderReferences
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::OrderReferences
- Defined in:
- lib/worldline/connect/sdk/v1/domain/order_references.rb
Instance Attribute Summary collapse
-
#descriptor ⇒ String
The current value of descriptor.
-
#invoice_data ⇒ Worldline::Connect::SDK::V1::Domain::OrderInvoiceData
The current value of invoice_data.
-
#merchant_order_id ⇒ Integer
The current value of merchant_order_id.
-
#merchant_reference ⇒ String
The current value of merchant_reference.
-
#provider_id ⇒ String
The current value of provider_id.
-
#provider_merchant_id ⇒ String
The current value of provider_merchant_id.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#descriptor ⇒ String
Returns the current value of descriptor.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/order_references.rb', line 19 def descriptor @descriptor end |
#invoice_data ⇒ Worldline::Connect::SDK::V1::Domain::OrderInvoiceData
Returns the current value of invoice_data.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/order_references.rb', line 19 def invoice_data @invoice_data end |
#merchant_order_id ⇒ Integer
Returns the current value of merchant_order_id.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/order_references.rb', line 19 def merchant_order_id @merchant_order_id end |
#merchant_reference ⇒ String
Returns the current value of merchant_reference.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/order_references.rb', line 19 def merchant_reference @merchant_reference end |
#provider_id ⇒ String
Returns the current value of provider_id.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/order_references.rb', line 19 def provider_id @provider_id end |
#provider_merchant_id ⇒ String
Returns the current value of provider_merchant_id.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/order_references.rb', line 19 def provider_merchant_id @provider_merchant_id end |
Instance Method Details
#from_hash(hash) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/worldline/connect/sdk/v1/domain/order_references.rb', line 45 def from_hash(hash) super if hash.has_key? 'descriptor' @descriptor = hash['descriptor'] end if hash.has_key? 'invoiceData' raise TypeError, "value '%s' is not a Hash" % [hash['invoiceData']] unless hash['invoiceData'].is_a? Hash @invoice_data = Worldline::Connect::SDK::V1::Domain::OrderInvoiceData.new_from_hash(hash['invoiceData']) end if hash.has_key? 'merchantOrderId' @merchant_order_id = hash['merchantOrderId'] end if hash.has_key? 'merchantReference' @merchant_reference = hash['merchantReference'] end if hash.has_key? 'providerId' @provider_id = hash['providerId'] end if hash.has_key? 'providerMerchantId' @provider_merchant_id = hash['providerMerchantId'] end end |
#to_h ⇒ Hash
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/worldline/connect/sdk/v1/domain/order_references.rb', line 34 def to_h hash = super hash['descriptor'] = @descriptor unless @descriptor.nil? hash['invoiceData'] = @invoice_data.to_h unless @invoice_data.nil? hash['merchantOrderId'] = @merchant_order_id unless @merchant_order_id.nil? hash['merchantReference'] = @merchant_reference unless @merchant_reference.nil? hash['providerId'] = @provider_id unless @provider_id.nil? hash['providerMerchantId'] = @provider_merchant_id unless @provider_merchant_id.nil? hash end |