class Ingenico::Connect::SDK::Domain::Payment::Seller
@attr [Ingenico::Connect::SDK::Domain::Definitions::Address] address @attr [String] channel_code
@attr [String] description @attr [String] geocode @attr [String] id @attr [String] invoice_number
@attr [String] mcc @attr [String] name @attr [String] type
Attributes
address[RW]
channel_code[RW]
description[RW]
geocode[RW]
id[RW]
invoice_number[RW]
mcc[RW]
name[RW]
type[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Connect::SDK::DataObject#from_hash
# 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()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Connect::SDK::DataObject#to_h
# 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