Class: Ingenico::Connect::SDK::Domain::Payment::Seller
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Payment::Seller
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/seller.rb
Instance Attribute Summary collapse
-
#address ⇒ Ingenico::Connect::SDK::Domain::Definitions::Address
The current value of address.
-
#channel_code ⇒ String
The current value of channel_code.
-
#description ⇒ String
The current value of description.
-
#geocode ⇒ String
The current value of geocode.
-
#id ⇒ String
The current value of id.
-
#invoice_number ⇒ String
The current value of invoice_number.
-
#mcc ⇒ String
The current value of mcc.
-
#name ⇒ String
The current value of name.
-
#type ⇒ String
The current value of type.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#address ⇒ Ingenico::Connect::SDK::Domain::Definitions::Address
Returns the current value of address.
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/seller.rb', line 21 def address @address end |
#channel_code ⇒ String
Returns the current value of channel_code.
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/seller.rb', line 21 def channel_code @channel_code end |
#description ⇒ String
Returns the current value of description.
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/seller.rb', line 21 def description @description end |
#geocode ⇒ String
Returns the current value of geocode.
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/seller.rb', line 21 def geocode @geocode end |
#id ⇒ String
Returns the current value of id.
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/seller.rb', line 21 def id @id end |
#invoice_number ⇒ String
Returns the current value of invoice_number.
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/seller.rb', line 21 def invoice_number @invoice_number end |
#mcc ⇒ String
Returns the current value of mcc.
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/seller.rb', line 21 def mcc @mcc end |
#name ⇒ String
Returns the current value of name.
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/seller.rb', line 21 def name @name end |
#type ⇒ String
Returns the current value of type.
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/payment/seller.rb', line 21 def type @type end |
Instance Method Details
#from_hash(hash) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/ingenico/connect/sdk/domain/payment/seller.rb', line 56 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 = Ingenico::Connect::SDK::Domain::Definitions::Address.new_from_hash(hash['address']) end if hash.has_key? 'channelCode' @channel_code = hash['channelCode'] end if hash.has_key? 'description' @description = hash['description'] end if hash.has_key? 'geocode' @geocode = hash['geocode'] end if hash.has_key? 'id' @id = hash['id'] end if hash.has_key? 'invoiceNumber' @invoice_number = hash['invoiceNumber'] end if hash.has_key? 'mcc' @mcc = hash['mcc'] end if hash.has_key? 'name' @name = hash['name'] end if hash.has_key? 'type' @type = hash['type'] end end |
#to_h ⇒ Hash
42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/ingenico/connect/sdk/domain/payment/seller.rb', line 42 def to_h hash = super hash['address'] = @address.to_h unless @address.nil? hash['channelCode'] = @channel_code unless @channel_code.nil? hash['description'] = @description unless @description.nil? hash['geocode'] = @geocode unless @geocode.nil? hash['id'] = @id unless @id.nil? hash['invoiceNumber'] = @invoice_number unless @invoice_number.nil? hash['mcc'] = @mcc unless @mcc.nil? hash['name'] = @name unless @name.nil? hash['type'] = @type unless @type.nil? hash end |