Class: CyberSourceMergedSpec::InvoiceSettingsInformation1
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::InvoiceSettingsInformation1
- Defined in:
- lib/cyber_source_merged_spec/models/invoice_settings_information1.rb
Overview
InvoiceSettingsInformation1 Model.
Instance Attribute Summary collapse
-
#custom_email_message ⇒ String
The content of the email message that we send to your customers.
-
#custom_labels ⇒ Array[CustomLabel]
A list of custom labels that allows you to override (rename) default field names and control the visibility of specific fields on invoices and items.
-
#custom_redirect_urls ⇒ CustomRedirectUrls
Object containing custom redirect URLs for different payment outcomes.
-
#default_currency_code ⇒ String
Currency used for the order.
-
#delivery_language ⇒ String
The language of the email that we send to your customers.
-
#email ⇒ TrueClass | FalseClass
Collect the payers email address when the email address is not known or confirm it if it is known at the time of invoice creation.
-
#enable_merchant_email_notifications ⇒ TrueClass | FalseClass
Whether you would like to receive payment notification for successful transaction.
-
#enable_reminders ⇒ TrueClass | FalseClass
Whether you would like us to send an auto-generated reminder email to your invoice recipients.
-
#header_style ⇒ HeaderStyle
Whether you would like us to send an auto-generated reminder email to your invoice recipients.
-
#merchant_display_name ⇒ String
The merchant's display name shown on the invoice.
-
#merchant_logo ⇒ String
The image file, which must be encoded in Base64 format.
-
#payer_authentication3_ds_version ⇒ TrueClass | FalseClass
The 3D Secure payer authentication status for a merchant's invoice payments.
-
#phone_number ⇒ TrueClass | FalseClass
Collect the payers phone number.
-
#ship_to ⇒ TrueClass | FalseClass
Collect the payers shipping address.
-
#show_vat_number ⇒ TrueClass | FalseClass
Display VAT number on Invoice.
-
#vat_registration_number ⇒ String
Your government-assigned tax identification number.
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.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(merchant_logo: SKIP, merchant_display_name: SKIP, custom_email_message: SKIP, enable_reminders: SKIP, header_style: SKIP, delivery_language: SKIP, default_currency_code: SKIP, payer_authentication3_ds_version: false, show_vat_number: false, vat_registration_number: SKIP, ship_to: false, phone_number: false, email: false, enable_merchant_email_notifications: false, custom_labels: SKIP, custom_redirect_urls: SKIP, additional_properties: nil) ⇒ InvoiceSettingsInformation1
constructor
A new instance of InvoiceSettingsInformation1.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ 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(merchant_logo: SKIP, merchant_display_name: SKIP, custom_email_message: SKIP, enable_reminders: SKIP, header_style: SKIP, delivery_language: SKIP, default_currency_code: SKIP, payer_authentication3_ds_version: false, show_vat_number: false, vat_registration_number: SKIP, ship_to: false, phone_number: false, email: false, enable_merchant_email_notifications: false, custom_labels: SKIP, custom_redirect_urls: SKIP, additional_properties: nil) ⇒ InvoiceSettingsInformation1
Returns a new instance of InvoiceSettingsInformation1.
180 181 182 183 184 185 186 187 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 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 180 def initialize(merchant_logo: SKIP, merchant_display_name: SKIP, custom_email_message: SKIP, enable_reminders: SKIP, header_style: SKIP, delivery_language: SKIP, default_currency_code: SKIP, payer_authentication3_ds_version: false, show_vat_number: false, vat_registration_number: SKIP, ship_to: false, phone_number: false, email: false, enable_merchant_email_notifications: false, custom_labels: SKIP, custom_redirect_urls: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @merchant_logo = merchant_logo unless merchant_logo == SKIP @merchant_display_name = merchant_display_name unless merchant_display_name == SKIP @custom_email_message = unless == SKIP @enable_reminders = enable_reminders unless enable_reminders == SKIP @header_style = header_style unless header_style == SKIP @delivery_language = delivery_language unless delivery_language == SKIP @default_currency_code = default_currency_code unless default_currency_code == SKIP unless payer_authentication3_ds_version == SKIP @payer_authentication3_ds_version = payer_authentication3_ds_version end @show_vat_number = show_vat_number unless show_vat_number == SKIP @vat_registration_number = vat_registration_number unless vat_registration_number == SKIP @ship_to = ship_to unless ship_to == SKIP @phone_number = phone_number unless phone_number == SKIP @email = email unless email == SKIP unless enable_merchant_email_notifications == SKIP @enable_merchant_email_notifications = enable_merchant_email_notifications end @custom_labels = custom_labels unless custom_labels == SKIP @custom_redirect_urls = custom_redirect_urls unless custom_redirect_urls == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#custom_email_message ⇒ String
The content of the email message that we send to your customers.
24 25 26 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 24 def @custom_email_message end |
#custom_labels ⇒ Array[CustomLabel]
A list of custom labels that allows you to override (rename) default field names and control the visibility of specific fields on invoices and items. If the list is empty, the labels will not be overwritten.
121 122 123 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 121 def custom_labels @custom_labels end |
#custom_redirect_urls ⇒ CustomRedirectUrls
Object containing custom redirect URLs for different payment outcomes. Each property allows specifying a URL to which the customer will be redirected after a payment event.
127 128 129 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 127 def custom_redirect_urls @custom_redirect_urls end |
#default_currency_code ⇒ String
Currency used for the order. Use the three-character [ISO Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/cur rencies.pdf)
Used by
Authorization
Required field.
Authorization Reversal
For an authorization reversal (reversalInformation) or a capture
(processingOptions.capture is set to true), you must use the same
currency that you used in your payment authorization request.
PIN Debit
Currency for the amount you requested for the PIN debit purchase. This value is returned for partial authorizations. The issuing bank can approve a partial amount if the balance on the debit card is less than the requested transaction amount. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickre f/currencies.pdf). Returned by PIN debit purchase. For PIN debit reversal requests, you must use the same currency that was used for the PIN debit purchase or PIN debit credit that you are reversing. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickre f/currencies.pdf). Required field for PIN Debit purchase and PIN Debit credit requests. Optional field for PIN Debit reversal requests.
GPX
This field is optional for reversing an authorization or credit.
DCC for First Data
Your local currency.
Tax Calculation
Required for international tax and value added tax only. Optional for U.S. and Canadian taxes. Your local currency.
81 82 83 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 81 def default_currency_code @default_currency_code end |
#delivery_language ⇒ String
The language of the email that we send to your customers. Possible values
are zh-CN, zh-TW, en-US, fr-FR, de-DE, ja-JP, pt-BR, ru-RU
and es-419.
42 43 44 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 42 def delivery_language @delivery_language end |
#email ⇒ TrueClass | FalseClass
Collect the payers email address when the email address is not known or confirm it if it is known at the time of invoice creation.
110 111 112 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 110 def email @email end |
#enable_merchant_email_notifications ⇒ TrueClass | FalseClass
Whether you would like to receive payment notification for successful transaction
115 116 117 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 115 def enable_merchant_email_notifications @enable_merchant_email_notifications end |
#enable_reminders ⇒ TrueClass | FalseClass
Whether you would like us to send an auto-generated reminder email to your invoice recipients. Currently, this reminder email is sent five days before the invoice is due and one day after it is past due.
30 31 32 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 30 def enable_reminders @enable_reminders end |
#header_style ⇒ HeaderStyle
Whether you would like us to send an auto-generated reminder email to your invoice recipients. Currently, this reminder email is sent five days before the invoice is due and one day after it is past due.
36 37 38 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 36 def header_style @header_style end |
#merchant_display_name ⇒ String
The merchant's display name shown on the invoice.
20 21 22 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 20 def merchant_display_name @merchant_display_name end |
#merchant_logo ⇒ String
The image file, which must be encoded in Base64 format. Supported file
formats are png, jpg, and gif. The image file size restriction is 1
MB.
16 17 18 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 16 def merchant_logo @merchant_logo end |
#payer_authentication3_ds_version ⇒ TrueClass | FalseClass
The 3D Secure payer authentication status for a merchant's invoice payments.
86 87 88 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 86 def payer_authentication3_ds_version @payer_authentication3_ds_version end |
#phone_number ⇒ TrueClass | FalseClass
Collect the payers phone number.
105 106 107 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 105 def phone_number @phone_number end |
#ship_to ⇒ TrueClass | FalseClass
Collect the payers shipping address.
101 102 103 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 101 def ship_to @ship_to end |
#show_vat_number ⇒ TrueClass | FalseClass
Display VAT number on Invoice.
90 91 92 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 90 def show_vat_number @show_vat_number end |
#vat_registration_number ⇒ String
Your government-assigned tax identification number.
Tax Calculation
Required field for value added tax only. Not applicable to U.S. and Canadian taxes.
97 98 99 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 97 def vat_registration_number @vat_registration_number end |
Class Method Details
.from_element(root) ⇒ Object
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 285 def self.from_element(root) merchant_logo = XmlUtilities.from_element(root, 'merchantLogo', String) merchant_display_name = XmlUtilities.from_element(root, 'merchantDisplayName', String) = XmlUtilities.from_element(root, 'customEmailMessage', String) enable_reminders = XmlUtilities.from_element(root, 'enableReminders', TrueClass) header_style = XmlUtilities.from_element(root, 'HeaderStyle', HeaderStyle) delivery_language = XmlUtilities.from_element(root, 'deliveryLanguage', String) default_currency_code = XmlUtilities.from_element(root, 'defaultCurrencyCode', String) payer_authentication3_ds_version = XmlUtilities.from_element( root, 'payerAuthentication3DSVersion', TrueClass ) show_vat_number = XmlUtilities.from_element(root, 'showVatNumber', TrueClass) vat_registration_number = XmlUtilities.from_element( root, 'vatRegistrationNumber', String ) ship_to = XmlUtilities.from_element(root, 'shipTo', TrueClass) phone_number = XmlUtilities.from_element(root, 'phoneNumber', TrueClass) email = XmlUtilities.from_element(root, 'email', TrueClass) enable_merchant_email_notifications = XmlUtilities.from_element( root, 'enableMerchantEmailNotifications', TrueClass ) custom_labels = XmlUtilities.from_element_to_array(root, 'CustomLabel', CustomLabel) custom_redirect_urls = XmlUtilities.from_element(root, 'CustomRedirectUrls', CustomRedirectUrls) new(merchant_logo: merchant_logo, merchant_display_name: merchant_display_name, custom_email_message: , enable_reminders: enable_reminders, header_style: header_style, delivery_language: delivery_language, default_currency_code: default_currency_code, payer_authentication3_ds_version: payer_authentication3_ds_version, show_vat_number: show_vat_number, vat_registration_number: vat_registration_number, ship_to: ship_to, phone_number: phone_number, email: email, enable_merchant_email_notifications: enable_merchant_email_notifications, custom_labels: custom_labels, custom_redirect_urls: custom_redirect_urls, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 219 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. merchant_logo = hash.key?('merchantLogo') ? hash['merchantLogo'] : SKIP merchant_display_name = hash.key?('merchantDisplayName') ? hash['merchantDisplayName'] : SKIP = hash.key?('customEmailMessage') ? hash['customEmailMessage'] : SKIP enable_reminders = hash.key?('enableReminders') ? hash['enableReminders'] : SKIP header_style = HeaderStyle.from_hash(hash['headerStyle']) if hash['headerStyle'] delivery_language = hash.key?('deliveryLanguage') ? hash['deliveryLanguage'] : SKIP default_currency_code = hash.key?('defaultCurrencyCode') ? hash['defaultCurrencyCode'] : SKIP payer_authentication3_ds_version = hash['payerAuthentication3DSVersion'] ||= false show_vat_number = hash['showVatNumber'] ||= false vat_registration_number = hash.key?('vatRegistrationNumber') ? hash['vatRegistrationNumber'] : SKIP ship_to = hash['shipTo'] ||= false phone_number = hash['phoneNumber'] ||= false email = hash['email'] ||= false enable_merchant_email_notifications = hash['enableMerchantEmailNotifications'] ||= false # Parameter is an array, so we need to iterate through it custom_labels = nil unless hash['customLabels'].nil? custom_labels = [] hash['customLabels'].each do |structure| custom_labels << (CustomLabel.from_hash(structure) if structure) end end custom_labels = SKIP unless hash.key?('customLabels') custom_redirect_urls = CustomRedirectUrls.from_hash(hash['customRedirectUrls']) if hash['customRedirectUrls'] # 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. InvoiceSettingsInformation1.new(merchant_logo: merchant_logo, merchant_display_name: merchant_display_name, custom_email_message: , enable_reminders: enable_reminders, header_style: header_style, delivery_language: delivery_language, default_currency_code: default_currency_code, payer_authentication3_ds_version: payer_authentication3_ds_version, show_vat_number: show_vat_number, vat_registration_number: vat_registration_number, ship_to: ship_to, phone_number: phone_number, email: email, enable_merchant_email_notifications: enable_merchant_email_notifications, custom_labels: custom_labels, custom_redirect_urls: custom_redirect_urls, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 130 def self.names @_hash = {} if @_hash.nil? @_hash['merchant_logo'] = 'merchantLogo' @_hash['merchant_display_name'] = 'merchantDisplayName' @_hash['custom_email_message'] = 'customEmailMessage' @_hash['enable_reminders'] = 'enableReminders' @_hash['header_style'] = 'headerStyle' @_hash['delivery_language'] = 'deliveryLanguage' @_hash['default_currency_code'] = 'defaultCurrencyCode' @_hash['payer_authentication3_ds_version'] = 'payerAuthentication3DSVersion' @_hash['show_vat_number'] = 'showVatNumber' @_hash['vat_registration_number'] = 'vatRegistrationNumber' @_hash['ship_to'] = 'shipTo' @_hash['phone_number'] = 'phoneNumber' @_hash['email'] = 'email' @_hash['enable_merchant_email_notifications'] = 'enableMerchantEmailNotifications' @_hash['custom_labels'] = 'customLabels' @_hash['custom_redirect_urls'] = 'customRedirectUrls' @_hash end |
.nullables ⇒ Object
An array for nullable fields
176 177 178 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 176 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 154 def self.optionals %w[ merchant_logo merchant_display_name custom_email_message enable_reminders header_style delivery_language default_currency_code payer_authentication3_ds_version show_vat_number vat_registration_number ship_to phone_number email enable_merchant_email_notifications custom_labels custom_redirect_urls ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 393 def inspect class_name = self.class.name.split('::').last "<#{class_name} merchant_logo: #{@merchant_logo.inspect}, merchant_display_name:"\ " #{@merchant_display_name.inspect}, custom_email_message: #{@custom_email_message.inspect},"\ " enable_reminders: #{@enable_reminders.inspect}, header_style: #{@header_style.inspect},"\ " delivery_language: #{@delivery_language.inspect}, default_currency_code:"\ " #{@default_currency_code.inspect}, payer_authentication3_ds_version:"\ " #{@payer_authentication3_ds_version.inspect}, show_vat_number:"\ " #{@show_vat_number.inspect}, vat_registration_number: #{@vat_registration_number.inspect},"\ " ship_to: #{@ship_to.inspect}, phone_number: #{@phone_number.inspect}, email:"\ " #{@email.inspect}, enable_merchant_email_notifications:"\ " #{@enable_merchant_email_notifications.inspect}, custom_labels: #{@custom_labels.inspect},"\ " custom_redirect_urls: #{@custom_redirect_urls.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 378 def to_s class_name = self.class.name.split('::').last "<#{class_name} merchant_logo: #{@merchant_logo}, merchant_display_name:"\ " #{@merchant_display_name}, custom_email_message: #{@custom_email_message},"\ " enable_reminders: #{@enable_reminders}, header_style: #{@header_style}, delivery_language:"\ " #{@delivery_language}, default_currency_code: #{@default_currency_code},"\ " payer_authentication3_ds_version: #{@payer_authentication3_ds_version}, show_vat_number:"\ " #{@show_vat_number}, vat_registration_number: #{@vat_registration_number}, ship_to:"\ " #{@ship_to}, phone_number: #{@phone_number}, email: #{@email},"\ " enable_merchant_email_notifications: #{@enable_merchant_email_notifications},"\ " custom_labels: #{@custom_labels}, custom_redirect_urls: #{@custom_redirect_urls},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/cyber_source_merged_spec/models/invoice_settings_information1.rb', line 340 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'merchantLogo', merchant_logo) XmlUtilities.add_as_subelement(doc, root, 'merchantDisplayName', merchant_display_name) XmlUtilities.add_as_subelement(doc, root, 'customEmailMessage', ) XmlUtilities.add_as_subelement(doc, root, 'enableReminders', enable_reminders) XmlUtilities.add_as_subelement(doc, root, 'HeaderStyle', header_style) XmlUtilities.add_as_subelement(doc, root, 'deliveryLanguage', delivery_language) XmlUtilities.add_as_subelement(doc, root, 'defaultCurrencyCode', default_currency_code) XmlUtilities.add_as_subelement(doc, root, 'payerAuthentication3DSVersion', payer_authentication3_ds_version) XmlUtilities.add_as_subelement(doc, root, 'showVatNumber', show_vat_number) XmlUtilities.add_as_subelement(doc, root, 'vatRegistrationNumber', vat_registration_number) XmlUtilities.add_as_subelement(doc, root, 'shipTo', ship_to) XmlUtilities.add_as_subelement(doc, root, 'phoneNumber', phone_number) XmlUtilities.add_as_subelement(doc, root, 'email', email) XmlUtilities.add_as_subelement(doc, root, 'enableMerchantEmailNotifications', enable_merchant_email_notifications) XmlUtilities.add_array_as_subelement(doc, root, 'CustomLabel', custom_labels) XmlUtilities.add_as_subelement(doc, root, 'CustomRedirectUrls', custom_redirect_urls) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |