Class: OnlinePayments::SDK::Domain::SubMerchant
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::SubMerchant
- Defined in:
- lib/onlinepayments/sdk/domain/sub_merchant.rb
Instance Attribute Summary collapse
-
#address ⇒ OnlinePayments::SDK::Domain::Address?
The current value of address.
-
#company_identification_number ⇒ String?
The current value of company_identification_number.
-
#company_name ⇒ String?
The current value of company_name.
-
#merchant_category_code ⇒ String?
The current value of merchant_category_code.
-
#merchant_id ⇒ String?
The current value of merchant_id.
-
#website ⇒ String?
The current value of website.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#address ⇒ OnlinePayments::SDK::Domain::Address?
Returns the current value of address.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/sub_merchant.rb', line 16 def address @address end |
#company_identification_number ⇒ String?
Returns the current value of company_identification_number.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/sub_merchant.rb', line 16 def company_identification_number @company_identification_number end |
#company_name ⇒ String?
Returns the current value of company_name.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/sub_merchant.rb', line 16 def company_name @company_name end |
#merchant_category_code ⇒ String?
Returns the current value of merchant_category_code.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/sub_merchant.rb', line 16 def merchant_category_code @merchant_category_code end |
#merchant_id ⇒ String?
Returns the current value of merchant_id.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/sub_merchant.rb', line 16 def merchant_id @merchant_id end |
#website ⇒ String?
Returns the current value of website.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/sub_merchant.rb', line 16 def website @website end |
Instance Method Details
#from_hash(hash) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/onlinepayments/sdk/domain/sub_merchant.rb', line 42 def from_hash(hash) super if hash.has_key? 'address' raise TypeError, "value '%s' is not a Hash" % [hash['address']] unless hash['address'].is_a? Hash @address = OnlinePayments::SDK::Domain::Address.new_from_hash(hash['address']) end if hash.has_key? 'companyIdentificationNumber' @company_identification_number = hash['companyIdentificationNumber'] end if hash.has_key? 'companyName' @company_name = hash['companyName'] end if hash.has_key? 'merchantCategoryCode' @merchant_category_code = hash['merchantCategoryCode'] end if hash.has_key? 'merchantId' @merchant_id = hash['merchantId'] end if hash.has_key? 'website' @website = hash['website'] end end |
#to_h ⇒ Hash
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/onlinepayments/sdk/domain/sub_merchant.rb', line 31 def to_h hash = super hash['address'] = @address.to_h unless @address.nil? hash['companyIdentificationNumber'] = @company_identification_number unless @company_identification_number.nil? hash['companyName'] = @company_name unless @company_name.nil? hash['merchantCategoryCode'] = @merchant_category_code unless @merchant_category_code.nil? hash['merchantId'] = @merchant_id unless @merchant_id.nil? hash['website'] = @website unless @website.nil? hash end |