Class: Worldline::Connect::SDK::V1::Domain::Seller

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/seller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#addressWorldline::Connect::SDK::V1::Domain::Address

Returns the current value of address.

Returns:



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/seller.rb', line 25

def address
  @address
end

#channel_codeString

Returns the current value of channel_code.

Returns:

  • (String)

    the current value of channel_code



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/seller.rb', line 25

def channel_code
  @channel_code
end

#descriptionString

Returns the current value of description.

Returns:

  • (String)

    the current value of description



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/seller.rb', line 25

def description
  @description
end

#external_reference_idString

Returns the current value of external_reference_id.

Returns:

  • (String)

    the current value of external_reference_id



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/seller.rb', line 25

def external_reference_id
  @external_reference_id
end

#geocodeString

Returns the current value of geocode.

Returns:

  • (String)

    the current value of geocode



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/seller.rb', line 25

def geocode
  @geocode
end

#idString

Returns the current value of id.

Returns:

  • (String)

    the current value of id



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/seller.rb', line 25

def id
  @id
end

#invoice_numberString

Returns the current value of invoice_number.

Returns:

  • (String)

    the current value of invoice_number



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/seller.rb', line 25

def invoice_number
  @invoice_number
end

#is_foreign_retailertrue/false

Returns the current value of is_foreign_retailer.

Returns:

  • (true/false)

    the current value of is_foreign_retailer



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/seller.rb', line 25

def is_foreign_retailer
  @is_foreign_retailer
end

#mccString

Returns the current value of mcc.

Returns:

  • (String)

    the current value of mcc



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/seller.rb', line 25

def mcc
  @mcc
end

#nameString

Returns the current value of name.

Returns:

  • (String)

    the current value of name



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/seller.rb', line 25

def name
  @name
end

#phone_numberString

Returns the current value of phone_number.

Returns:

  • (String)

    the current value of phone_number



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/seller.rb', line 25

def phone_number
  @phone_number
end

#typeString

Returns the current value of type.

Returns:

  • (String)

    the current value of type



25
26
27
# File 'lib/worldline/connect/sdk/v1/domain/seller.rb', line 25

def type
  @type
end

Instance Method Details

#from_hash(hash) ⇒ Object



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/worldline/connect/sdk/v1/domain/seller.rb', line 69

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 = Worldline::Connect::SDK::V1::Domain::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? 'externalReferenceId'
    @external_reference_id = hash['externalReferenceId']
  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? 'isForeignRetailer'
    @is_foreign_retailer = hash['isForeignRetailer']
  end
  if hash.has_key? 'mcc'
    @mcc = hash['mcc']
  end
  if hash.has_key? 'name'
    @name = hash['name']
  end
  if hash.has_key? 'phoneNumber'
    @phone_number = hash['phoneNumber']
  end
  if hash.has_key? 'type'
    @type = hash['type']
  end
end

#to_hHash

Returns:

  • (Hash)


52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/worldline/connect/sdk/v1/domain/seller.rb', line 52

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['externalReferenceId'] = @external_reference_id unless @external_reference_id.nil?
  hash['geocode'] = @geocode unless @geocode.nil?
  hash['id'] = @id unless @id.nil?
  hash['invoiceNumber'] = @invoice_number unless @invoice_number.nil?
  hash['isForeignRetailer'] = @is_foreign_retailer unless @is_foreign_retailer.nil?
  hash['mcc'] = @mcc unless @mcc.nil?
  hash['name'] = @name unless @name.nil?
  hash['phoneNumber'] = @phone_number unless @phone_number.nil?
  hash['type'] = @type unless @type.nil?
  hash
end