Class: CyberSourceMergedSpec::TmsPaymentInstrumentProcessingInfo
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::TmsPaymentInstrumentProcessingInfo
- Defined in:
- lib/cyber_source_merged_spec/models/tms_payment_instrument_processing_info.rb
Overview
TmsPaymentInstrumentProcessingInfo Model.
Instance Attribute Summary collapse
-
#bank_transfer_options ⇒ BankTransferOptions4
Flag that indicates that this is a payment for a bill or for an existing contractual loan.
-
#bill_payment_program_enabled ⇒ TrueClass | FalseClass
Flag that indicates that this is a payment for a bill or for an existing contractual loan.
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(bill_payment_program_enabled: SKIP, bank_transfer_options: SKIP, additional_properties: nil) ⇒ TmsPaymentInstrumentProcessingInfo
constructor
A new instance of TmsPaymentInstrumentProcessingInfo.
-
#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(bill_payment_program_enabled: SKIP, bank_transfer_options: SKIP, additional_properties: nil) ⇒ TmsPaymentInstrumentProcessingInfo
Returns a new instance of TmsPaymentInstrumentProcessingInfo.
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/cyber_source_merged_spec/models/tms_payment_instrument_processing_info.rb', line 57 def initialize(bill_payment_program_enabled: SKIP, bank_transfer_options: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? unless bill_payment_program_enabled == SKIP @bill_payment_program_enabled = bill_payment_program_enabled end @bank_transfer_options = unless == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#bank_transfer_options ⇒ BankTransferOptions4
Flag that indicates that this is a payment for a bill or for an existing contractual loan. Possible Values:
true: Bill payment or loan payment.false(default): Not a bill payment or loan payment.
For processor-specific details, see the bill_payment field description
in [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svc s_SCMP_API/html/)
34 35 36 |
# File 'lib/cyber_source_merged_spec/models/tms_payment_instrument_processing_info.rb', line 34 def @bank_transfer_options end |
#bill_payment_program_enabled ⇒ TrueClass | FalseClass
Flag that indicates that this is a payment for a bill or for an existing contractual loan. Possible Values:
true: Bill payment or loan payment.false(default): Not a bill payment or loan payment.
For processor-specific details, see the bill_payment field description
in [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svc s_SCMP_API/html/)
22 23 24 |
# File 'lib/cyber_source_merged_spec/models/tms_payment_instrument_processing_info.rb', line 22 def bill_payment_program_enabled @bill_payment_program_enabled end |
Class Method Details
.from_element(root) ⇒ Object
93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/cyber_source_merged_spec/models/tms_payment_instrument_processing_info.rb', line 93 def self.from_element(root) bill_payment_program_enabled = XmlUtilities.from_element( root, 'billPaymentProgramEnabled', TrueClass ) = XmlUtilities.from_element(root, 'BankTransferOptions4', BankTransferOptions4) new(bill_payment_program_enabled: bill_payment_program_enabled, bank_transfer_options: , additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/cyber_source_merged_spec/models/tms_payment_instrument_processing_info.rb', line 71 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. bill_payment_program_enabled = hash.key?('billPaymentProgramEnabled') ? hash['billPaymentProgramEnabled'] : SKIP = BankTransferOptions4.from_hash(hash['bankTransferOptions']) if hash['bankTransferOptions'] # 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. TmsPaymentInstrumentProcessingInfo.new(bill_payment_program_enabled: bill_payment_program_enabled, bank_transfer_options: , additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 |
# File 'lib/cyber_source_merged_spec/models/tms_payment_instrument_processing_info.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['bill_payment_program_enabled'] = 'billPaymentProgramEnabled' @_hash['bank_transfer_options'] = 'bankTransferOptions' @_hash end |
.nullables ⇒ Object
An array for nullable fields
53 54 55 |
# File 'lib/cyber_source_merged_spec/models/tms_payment_instrument_processing_info.rb', line 53 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 48 49 50 |
# File 'lib/cyber_source_merged_spec/models/tms_payment_instrument_processing_info.rb', line 45 def self.optionals %w[ bill_payment_program_enabled bank_transfer_options ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
128 129 130 131 132 133 |
# File 'lib/cyber_source_merged_spec/models/tms_payment_instrument_processing_info.rb', line 128 def inspect class_name = self.class.name.split('::').last "<#{class_name} bill_payment_program_enabled: #{@bill_payment_program_enabled.inspect},"\ " bank_transfer_options: #{@bank_transfer_options.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
120 121 122 123 124 125 |
# File 'lib/cyber_source_merged_spec/models/tms_payment_instrument_processing_info.rb', line 120 def to_s class_name = self.class.name.split('::').last "<#{class_name} bill_payment_program_enabled: #{@bill_payment_program_enabled},"\ " bank_transfer_options: #{@bank_transfer_options}, additional_properties:"\ " #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/cyber_source_merged_spec/models/tms_payment_instrument_processing_info.rb', line 106 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'billPaymentProgramEnabled', bill_payment_program_enabled) XmlUtilities.add_as_subelement(doc, root, 'BankTransferOptions4', ) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |