Class: OnlinePayments::SDK::Domain::MandateResponse
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::MandateResponse
- Defined in:
- lib/onlinepayments/sdk/domain/mandate_response.rb
Instance Attribute Summary collapse
-
#alias ⇒ String
The current value of alias.
-
#customer ⇒ OnlinePayments::SDK::Domain::MandateCustomerResponse
The current value of customer.
-
#customer_reference ⇒ String
The current value of customer_reference.
-
#mandate_pdf ⇒ String
The current value of mandate_pdf.
-
#recurrence_type ⇒ String
The current value of recurrence_type.
-
#status ⇒ String
The current value of status.
-
#unique_mandate_reference ⇒ String
The current value of unique_mandate_reference.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#alias ⇒ String
Returns the current value of alias.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/mandate_response.rb', line 17 def alias @alias end |
#customer ⇒ OnlinePayments::SDK::Domain::MandateCustomerResponse
Returns the current value of customer.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/mandate_response.rb', line 17 def customer @customer end |
#customer_reference ⇒ String
Returns the current value of customer_reference.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/mandate_response.rb', line 17 def customer_reference @customer_reference end |
#mandate_pdf ⇒ String
Returns the current value of mandate_pdf.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/mandate_response.rb', line 17 def mandate_pdf @mandate_pdf end |
#recurrence_type ⇒ String
Returns the current value of recurrence_type.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/mandate_response.rb', line 17 def recurrence_type @recurrence_type end |
#status ⇒ String
Returns the current value of status.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/mandate_response.rb', line 17 def status @status end |
#unique_mandate_reference ⇒ String
Returns the current value of unique_mandate_reference.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/mandate_response.rb', line 17 def unique_mandate_reference @unique_mandate_reference end |
Instance Method Details
#from_hash(hash) ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/onlinepayments/sdk/domain/mandate_response.rb', line 46 def from_hash(hash) super if hash.has_key? 'alias' @alias = hash['alias'] end if hash.has_key? 'customer' raise TypeError, "value '%s' is not a Hash" % [hash['customer']] unless hash['customer'].is_a? Hash @customer = OnlinePayments::SDK::Domain::MandateCustomerResponse.new_from_hash(hash['customer']) end if hash.has_key? 'customerReference' @customer_reference = hash['customerReference'] end if hash.has_key? 'mandatePdf' @mandate_pdf = hash['mandatePdf'] end if hash.has_key? 'recurrenceType' @recurrence_type = hash['recurrenceType'] end if hash.has_key? 'status' @status = hash['status'] end if hash.has_key? 'uniqueMandateReference' @unique_mandate_reference = hash['uniqueMandateReference'] end end |
#to_h ⇒ Hash
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/onlinepayments/sdk/domain/mandate_response.rb', line 34 def to_h hash = super hash['alias'] = @alias unless @alias.nil? hash['customer'] = @customer.to_h unless @customer.nil? hash['customerReference'] = @customer_reference unless @customer_reference.nil? hash['mandatePdf'] = @mandate_pdf unless @mandate_pdf.nil? hash['recurrenceType'] = @recurrence_type unless @recurrence_type.nil? hash['status'] = @status unless @status.nil? hash['uniqueMandateReference'] = @unique_mandate_reference unless @unique_mandate_reference.nil? hash end |