Class: PaysecureApiDocumentationLive::UpdateMerchantRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/paysecure_api_documentation_live/models/update_merchant_request.rb

Overview

UpdateMerchantRequest Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(legal_name:, reg_no:, website_url:, iec_no:, trading_start_date:, date_of_incorporation:, trading_address:, trading_country:, trading_state:, trading_postal:, corporate_address:, corporate_country:, corporate_state:, corporate_postal:, business_phone:, contact_phone:, contact_name:, officer_title:, officer_name:, default_currency:, default_timezone:, allowed_payment_methods:, allowed_currencies:, is_live_transaction_allowed:, additional_properties: nil) ⇒ UpdateMerchantRequest

Returns a new instance of UpdateMerchantRequest.



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 148

def initialize(legal_name:, reg_no:, website_url:, iec_no:,
               trading_start_date:, date_of_incorporation:,
               trading_address:, trading_country:, trading_state:,
               trading_postal:, corporate_address:, corporate_country:,
               corporate_state:, corporate_postal:, business_phone:,
               contact_phone:, contact_name:, officer_title:, officer_name:,
               default_currency:, default_timezone:,
               allowed_payment_methods:, allowed_currencies:,
               is_live_transaction_allowed:, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @legal_name = legal_name
  @reg_no = reg_no
  @website_url = website_url
  @iec_no = iec_no
  @trading_start_date = trading_start_date
  @date_of_incorporation = date_of_incorporation
  @trading_address = trading_address
  @trading_country = trading_country
  @trading_state = trading_state
  @trading_postal = trading_postal
  @corporate_address = corporate_address
  @corporate_country = corporate_country
  @corporate_state = corporate_state
  @corporate_postal = corporate_postal
  @business_phone = business_phone
  @contact_phone = contact_phone
  @contact_name = contact_name
  @officer_title = officer_title
  @officer_name = officer_name
  @default_currency = default_currency
  @default_timezone = default_timezone
  @allowed_payment_methods = allowed_payment_methods
  @allowed_currencies = allowed_currencies
  @is_live_transaction_allowed = is_live_transaction_allowed
  @additional_properties = additional_properties
end

Instance Attribute Details

#allowed_currenciesArray[String]

TODO: Write general description for this method

Returns:

  • (Array[String])


102
103
104
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 102

def allowed_currencies
  @allowed_currencies
end

#allowed_payment_methodsArray[String]

TODO: Write general description for this method

Returns:

  • (Array[String])


98
99
100
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 98

def allowed_payment_methods
  @allowed_payment_methods
end

#business_phoneString

TODO: Write general description for this method

Returns:

  • (String)


70
71
72
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 70

def business_phone
  @business_phone
end

#contact_nameString

TODO: Write general description for this method

Returns:

  • (String)


78
79
80
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 78

def contact_name
  @contact_name
end

#contact_phoneString

TODO: Write general description for this method

Returns:

  • (String)


74
75
76
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 74

def contact_phone
  @contact_phone
end

#corporate_addressString

TODO: Write general description for this method

Returns:

  • (String)


54
55
56
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 54

def corporate_address
  @corporate_address
end

#corporate_countryString

TODO: Write general description for this method

Returns:

  • (String)


58
59
60
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 58

def corporate_country
  @corporate_country
end

#corporate_postalString

TODO: Write general description for this method

Returns:

  • (String)


66
67
68
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 66

def corporate_postal
  @corporate_postal
end

#corporate_stateString

TODO: Write general description for this method

Returns:

  • (String)


62
63
64
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 62

def corporate_state
  @corporate_state
end

#date_of_incorporationString

TODO: Write general description for this method

Returns:

  • (String)


34
35
36
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 34

def date_of_incorporation
  @date_of_incorporation
end

#default_currencyString

TODO: Write general description for this method

Returns:

  • (String)


90
91
92
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 90

def default_currency
  @default_currency
end

#default_timezoneString

TODO: Write general description for this method

Returns:

  • (String)


94
95
96
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 94

def default_timezone
  @default_timezone
end

#iec_noString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 26

def iec_no
  @iec_no
end

#is_live_transaction_allowedTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


106
107
108
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 106

def is_live_transaction_allowed
  @is_live_transaction_allowed
end

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 14

def legal_name
  @legal_name
end

#officer_nameString

TODO: Write general description for this method

Returns:

  • (String)


86
87
88
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 86

def officer_name
  @officer_name
end

#officer_titleString

TODO: Write general description for this method

Returns:

  • (String)


82
83
84
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 82

def officer_title
  @officer_title
end

#reg_noString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 18

def reg_no
  @reg_no
end

#trading_addressString

TODO: Write general description for this method

Returns:

  • (String)


38
39
40
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 38

def trading_address
  @trading_address
end

#trading_countryString

TODO: Write general description for this method

Returns:

  • (String)


42
43
44
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 42

def trading_country
  @trading_country
end

#trading_postalString

TODO: Write general description for this method

Returns:

  • (String)


50
51
52
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 50

def trading_postal
  @trading_postal
end

#trading_start_dateString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 30

def trading_start_date
  @trading_start_date
end

#trading_stateString

TODO: Write general description for this method

Returns:

  • (String)


46
47
48
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 46

def trading_state
  @trading_state
end

#website_urlString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 22

def website_url
  @website_url
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 188

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  legal_name = hash.key?('legalName') ? hash['legalName'] : nil
  reg_no = hash.key?('regNo') ? hash['regNo'] : nil
  website_url = hash.key?('websiteUrl') ? hash['websiteUrl'] : nil
  iec_no = hash.key?('iecNo') ? hash['iecNo'] : nil
  trading_start_date =
    hash.key?('tradingStartDate') ? hash['tradingStartDate'] : nil
  date_of_incorporation =
    hash.key?('dateOfIncorporation') ? hash['dateOfIncorporation'] : nil
  trading_address =
    hash.key?('tradingAddress') ? hash['tradingAddress'] : nil
  trading_country =
    hash.key?('tradingCountry') ? hash['tradingCountry'] : nil
  trading_state = hash.key?('tradingState') ? hash['tradingState'] : nil
  trading_postal = hash.key?('tradingPostal') ? hash['tradingPostal'] : nil
  corporate_address =
    hash.key?('corporateAddress') ? hash['corporateAddress'] : nil
  corporate_country =
    hash.key?('corporateCountry') ? hash['corporateCountry'] : nil
  corporate_state =
    hash.key?('corporateState') ? hash['corporateState'] : nil
  corporate_postal =
    hash.key?('corporatePostal') ? hash['corporatePostal'] : nil
  business_phone = hash.key?('businessPhone') ? hash['businessPhone'] : nil
  contact_phone = hash.key?('contactPhone') ? hash['contactPhone'] : nil
  contact_name = hash.key?('contactName') ? hash['contactName'] : nil
  officer_title = hash.key?('officerTitle') ? hash['officerTitle'] : nil
  officer_name = hash.key?('officerName') ? hash['officerName'] : nil
  default_currency =
    hash.key?('defaultCurrency') ? hash['defaultCurrency'] : nil
  default_timezone =
    hash.key?('defaultTimezone') ? hash['defaultTimezone'] : nil
  allowed_payment_methods =
    hash.key?('allowedPaymentMethods') ? hash['allowedPaymentMethods'] : nil
  allowed_currencies =
    hash.key?('allowedCurrencies') ? hash['allowedCurrencies'] : nil
  is_live_transaction_allowed =
    hash.key?('isLiveTransactionAllowed') ? hash['isLiveTransactionAllowed'] : nil

  # 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.
  UpdateMerchantRequest.new(legal_name: legal_name,
                            reg_no: reg_no,
                            website_url: website_url,
                            iec_no: iec_no,
                            trading_start_date: trading_start_date,
                            date_of_incorporation: date_of_incorporation,
                            trading_address: trading_address,
                            trading_country: trading_country,
                            trading_state: trading_state,
                            trading_postal: trading_postal,
                            corporate_address: corporate_address,
                            corporate_country: corporate_country,
                            corporate_state: corporate_state,
                            corporate_postal: corporate_postal,
                            business_phone: business_phone,
                            contact_phone: contact_phone,
                            contact_name: contact_name,
                            officer_title: officer_title,
                            officer_name: officer_name,
                            default_currency: default_currency,
                            default_timezone: default_timezone,
                            allowed_payment_methods: allowed_payment_methods,
                            allowed_currencies: allowed_currencies,
                            is_live_transaction_allowed: is_live_transaction_allowed,
                            additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 109

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['legal_name'] = 'legalName'
  @_hash['reg_no'] = 'regNo'
  @_hash['website_url'] = 'websiteUrl'
  @_hash['iec_no'] = 'iecNo'
  @_hash['trading_start_date'] = 'tradingStartDate'
  @_hash['date_of_incorporation'] = 'dateOfIncorporation'
  @_hash['trading_address'] = 'tradingAddress'
  @_hash['trading_country'] = 'tradingCountry'
  @_hash['trading_state'] = 'tradingState'
  @_hash['trading_postal'] = 'tradingPostal'
  @_hash['corporate_address'] = 'corporateAddress'
  @_hash['corporate_country'] = 'corporateCountry'
  @_hash['corporate_state'] = 'corporateState'
  @_hash['corporate_postal'] = 'corporatePostal'
  @_hash['business_phone'] = 'businessPhone'
  @_hash['contact_phone'] = 'contactPhone'
  @_hash['contact_name'] = 'contactName'
  @_hash['officer_title'] = 'officerTitle'
  @_hash['officer_name'] = 'officerName'
  @_hash['default_currency'] = 'defaultCurrency'
  @_hash['default_timezone'] = 'defaultTimezone'
  @_hash['allowed_payment_methods'] = 'allowedPaymentMethods'
  @_hash['allowed_currencies'] = 'allowedCurrencies'
  @_hash['is_live_transaction_allowed'] = 'isLiveTransactionAllowed'
  @_hash
end

.nullablesObject

An array for nullable fields



144
145
146
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 144

def self.nullables
  []
end

.optionalsObject

An array for optional fields



139
140
141
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 139

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 283

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} legal_name: #{@legal_name.inspect}, reg_no: #{@reg_no.inspect},"\
  " website_url: #{@website_url.inspect}, iec_no: #{@iec_no.inspect}, trading_start_date:"\
  " #{@trading_start_date.inspect}, date_of_incorporation: #{@date_of_incorporation.inspect},"\
  " trading_address: #{@trading_address.inspect}, trading_country:"\
  " #{@trading_country.inspect}, trading_state: #{@trading_state.inspect}, trading_postal:"\
  " #{@trading_postal.inspect}, corporate_address: #{@corporate_address.inspect},"\
  " corporate_country: #{@corporate_country.inspect}, corporate_state:"\
  " #{@corporate_state.inspect}, corporate_postal: #{@corporate_postal.inspect},"\
  " business_phone: #{@business_phone.inspect}, contact_phone: #{@contact_phone.inspect},"\
  " contact_name: #{@contact_name.inspect}, officer_title: #{@officer_title.inspect},"\
  " officer_name: #{@officer_name.inspect}, default_currency: #{@default_currency.inspect},"\
  " default_timezone: #{@default_timezone.inspect}, allowed_payment_methods:"\
  " #{@allowed_payment_methods.inspect}, allowed_currencies: #{@allowed_currencies.inspect},"\
  " is_live_transaction_allowed: #{@is_live_transaction_allowed.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/paysecure_api_documentation_live/models/update_merchant_request.rb', line 266

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} legal_name: #{@legal_name}, reg_no: #{@reg_no}, website_url:"\
  " #{@website_url}, iec_no: #{@iec_no}, trading_start_date: #{@trading_start_date},"\
  " date_of_incorporation: #{@date_of_incorporation}, trading_address: #{@trading_address},"\
  " trading_country: #{@trading_country}, trading_state: #{@trading_state}, trading_postal:"\
  " #{@trading_postal}, corporate_address: #{@corporate_address}, corporate_country:"\
  " #{@corporate_country}, corporate_state: #{@corporate_state}, corporate_postal:"\
  " #{@corporate_postal}, business_phone: #{@business_phone}, contact_phone:"\
  " #{@contact_phone}, contact_name: #{@contact_name}, officer_title: #{@officer_title},"\
  " officer_name: #{@officer_name}, default_currency: #{@default_currency}, default_timezone:"\
  " #{@default_timezone}, allowed_payment_methods: #{@allowed_payment_methods},"\
  " allowed_currencies: #{@allowed_currencies}, is_live_transaction_allowed:"\
  " #{@is_live_transaction_allowed}, additional_properties: #{@additional_properties}>"
end