Class: FdxV660Api::MerchantForUpdateEntity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::MerchantForUpdateEntity
- Defined in:
- lib/fdx_v660_api/models/merchant_for_update_entity.rb
Overview
Merchant's primary demographic information; name, location, contact phone. Japanese participants should send 'Kana' values in name fields using the character set defined by Zengin (Japanese Banks' Payment Clearing Network)
Instance Attribute Summary collapse
-
#address ⇒ DeliveryAddress2
Address of the merchant used to execute the payment.
-
#display_name ⇒ String
User defined name for the merchant.
-
#merchant_account_ids ⇒ Array[String]
Account identifier(s) the customer has with the merchant.
-
#name ⇒ CustomerNameEntity2
Name of the merchant used to execute the payment.
-
#phone ⇒ TelephoneNumber2
Phone number of the merchant used to execute the payment.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(display_name: SKIP, name: SKIP, address: SKIP, phone: SKIP, merchant_account_ids: SKIP, additional_properties: nil) ⇒ MerchantForUpdateEntity
constructor
A new instance of MerchantForUpdateEntity.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(display_name: SKIP, name: SKIP, address: SKIP, phone: SKIP, merchant_account_ids: SKIP, additional_properties: nil) ⇒ MerchantForUpdateEntity
Returns a new instance of MerchantForUpdateEntity.
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/fdx_v660_api/models/merchant_for_update_entity.rb', line 62 def initialize(display_name: SKIP, name: SKIP, address: SKIP, phone: SKIP, merchant_account_ids: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @display_name = display_name unless display_name == SKIP @name = name unless name == SKIP @address = address unless address == SKIP @phone = phone unless phone == SKIP @merchant_account_ids = merchant_account_ids unless merchant_account_ids == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#address ⇒ DeliveryAddress2
Address of the merchant used to execute the payment
25 26 27 |
# File 'lib/fdx_v660_api/models/merchant_for_update_entity.rb', line 25 def address @address end |
#display_name ⇒ String
User defined name for the merchant. Used by the customer to identify the merchant. Not used by the system to process payments
17 18 19 |
# File 'lib/fdx_v660_api/models/merchant_for_update_entity.rb', line 17 def display_name @display_name end |
#merchant_account_ids ⇒ Array[String]
Account identifier(s) the customer has with the merchant
33 34 35 |
# File 'lib/fdx_v660_api/models/merchant_for_update_entity.rb', line 33 def merchant_account_ids @merchant_account_ids end |
#name ⇒ CustomerNameEntity2
Name of the merchant used to execute the payment
21 22 23 |
# File 'lib/fdx_v660_api/models/merchant_for_update_entity.rb', line 21 def name @name end |
#phone ⇒ TelephoneNumber2
Phone number of the merchant used to execute the payment
29 30 31 |
# File 'lib/fdx_v660_api/models/merchant_for_update_entity.rb', line 29 def phone @phone end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/fdx_v660_api/models/merchant_for_update_entity.rb', line 76 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. display_name = hash.key?('displayName') ? hash['displayName'] : SKIP name = CustomerNameEntity2.from_hash(hash['name']) if hash['name'] address = DeliveryAddress2.from_hash(hash['address']) if hash['address'] phone = TelephoneNumber2.from_hash(hash['phone']) if hash['phone'] merchant_account_ids = hash.key?('merchantAccountIds') ? hash['merchantAccountIds'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. MerchantForUpdateEntity.new(display_name: display_name, name: name, address: address, phone: phone, merchant_account_ids: merchant_account_ids, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
36 37 38 39 40 41 42 43 44 |
# File 'lib/fdx_v660_api/models/merchant_for_update_entity.rb', line 36 def self.names @_hash = {} if @_hash.nil? @_hash['display_name'] = 'displayName' @_hash['name'] = 'name' @_hash['address'] = 'address' @_hash['phone'] = 'phone' @_hash['merchant_account_ids'] = 'merchantAccountIds' @_hash end |
.nullables ⇒ Object
An array for nullable fields
58 59 60 |
# File 'lib/fdx_v660_api/models/merchant_for_update_entity.rb', line 58 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
47 48 49 50 51 52 53 54 55 |
# File 'lib/fdx_v660_api/models/merchant_for_update_entity.rb', line 47 def self.optionals %w[ display_name name address phone merchant_account_ids ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
112 113 114 115 116 117 |
# File 'lib/fdx_v660_api/models/merchant_for_update_entity.rb', line 112 def inspect class_name = self.class.name.split('::').last "<#{class_name} display_name: #{@display_name.inspect}, name: #{@name.inspect}, address:"\ " #{@address.inspect}, phone: #{@phone.inspect}, merchant_account_ids:"\ " #{@merchant_account_ids.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
104 105 106 107 108 109 |
# File 'lib/fdx_v660_api/models/merchant_for_update_entity.rb', line 104 def to_s class_name = self.class.name.split('::').last "<#{class_name} display_name: #{@display_name}, name: #{@name}, address: #{@address},"\ " phone: #{@phone}, merchant_account_ids: #{@merchant_account_ids}, additional_properties:"\ " #{@additional_properties}>" end |