Class: CyberSourceMergedSpec::PaymentInformation26
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::PaymentInformation26
- Defined in:
- lib/cyber_source_merged_spec/models/payment_information26.rb
Overview
PaymentInformation26 Model.
Instance Attribute Summary collapse
-
#e_wallet ⇒ EWallet13
Indicates the industry type.
-
#industry_type ⇒ String
Indicates the industry type.
-
#payment_type ⇒ PaymentType19
TODO: Write general description for this method.
-
#tokenized_payment_method ⇒ TokenizedPaymentMethod2
TODO: Write general description for this method.
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(payment_type: SKIP, tokenized_payment_method: SKIP, industry_type: SKIP, e_wallet: SKIP, additional_properties: nil) ⇒ PaymentInformation26
constructor
A new instance of PaymentInformation26.
-
#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(payment_type: SKIP, tokenized_payment_method: SKIP, industry_type: SKIP, e_wallet: SKIP, additional_properties: nil) ⇒ PaymentInformation26
Returns a new instance of PaymentInformation26.
99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/cyber_source_merged_spec/models/payment_information26.rb', line 99 def initialize(payment_type: SKIP, tokenized_payment_method: SKIP, industry_type: SKIP, e_wallet: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @payment_type = payment_type unless payment_type == SKIP @tokenized_payment_method = tokenized_payment_method unless tokenized_payment_method == SKIP @industry_type = industry_type unless industry_type == SKIP @e_wallet = e_wallet unless e_wallet == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#e_wallet ⇒ EWallet13
Indicates the industry type. Possible Values:
- “Events”
- "Ticketing"
- "Fuel"
- "GAMING"
- "DIGITAL GOODS"
- "TELCO"
- "Token Service Providers"
- "Gambling"
- "CFDs"
- "car rental"
- "hotel"
- "transportation"
- "travel package"
- "Cruise Line"
- "P2P"
- "Retail"
- "Food"
- "Groceries"
- "Ride Sharing"
- "Taxi"
- "Remittance"
- "Crypto"
- "Marketplaces"
72 73 74 |
# File 'lib/cyber_source_merged_spec/models/payment_information26.rb', line 72 def e_wallet @e_wallet end |
#industry_type ⇒ String
Indicates the industry type. Possible Values:
- “Events”
- "Ticketing"
- "Fuel"
- "GAMING"
- "DIGITAL GOODS"
- "TELCO"
- "Token Service Providers"
- "Gambling"
- "CFDs"
- "car rental"
- "hotel"
- "transportation"
- "travel package"
- "Cruise Line"
- "P2P"
- "Retail"
- "Food"
- "Groceries"
- "Ride Sharing"
- "Taxi"
- "Remittance"
- "Crypto"
- "Marketplaces"
45 46 47 |
# File 'lib/cyber_source_merged_spec/models/payment_information26.rb', line 45 def industry_type @industry_type end |
#payment_type ⇒ PaymentType19
TODO: Write general description for this method
14 15 16 |
# File 'lib/cyber_source_merged_spec/models/payment_information26.rb', line 14 def payment_type @payment_type end |
#tokenized_payment_method ⇒ TokenizedPaymentMethod2
TODO: Write general description for this method
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/payment_information26.rb', line 18 def tokenized_payment_method @tokenized_payment_method end |
Class Method Details
.from_element(root) ⇒ Object
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/cyber_source_merged_spec/models/payment_information26.rb', line 139 def self.from_element(root) payment_type = XmlUtilities.from_element(root, 'PaymentType19', PaymentType19) tokenized_payment_method = XmlUtilities.from_element( root, 'TokenizedPaymentMethod2', TokenizedPaymentMethod2 ) industry_type = XmlUtilities.from_element(root, 'industryType', String) e_wallet = XmlUtilities.from_element(root, 'EWallet13', EWallet13) new(payment_type: payment_type, tokenized_payment_method: tokenized_payment_method, industry_type: industry_type, e_wallet: e_wallet, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/cyber_source_merged_spec/models/payment_information26.rb', line 113 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. payment_type = PaymentType19.from_hash(hash['paymentType']) if hash['paymentType'] if hash['tokenizedPaymentMethod'] tokenized_payment_method = TokenizedPaymentMethod2.from_hash(hash['tokenizedPaymentMethod']) end industry_type = hash.key?('industryType') ? hash['industryType'] : SKIP e_wallet = EWallet13.from_hash(hash['eWallet']) if hash['eWallet'] # 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. PaymentInformation26.new(payment_type: payment_type, tokenized_payment_method: tokenized_payment_method, industry_type: industry_type, e_wallet: e_wallet, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
75 76 77 78 79 80 81 82 |
# File 'lib/cyber_source_merged_spec/models/payment_information26.rb', line 75 def self.names @_hash = {} if @_hash.nil? @_hash['payment_type'] = 'paymentType' @_hash['tokenized_payment_method'] = 'tokenizedPaymentMethod' @_hash['industry_type'] = 'industryType' @_hash['e_wallet'] = 'eWallet' @_hash end |
.nullables ⇒ Object
An array for nullable fields
95 96 97 |
# File 'lib/cyber_source_merged_spec/models/payment_information26.rb', line 95 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
85 86 87 88 89 90 91 92 |
# File 'lib/cyber_source_merged_spec/models/payment_information26.rb', line 85 def self.optionals %w[ payment_type tokenized_payment_method industry_type e_wallet ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
178 179 180 181 182 183 |
# File 'lib/cyber_source_merged_spec/models/payment_information26.rb', line 178 def inspect class_name = self.class.name.split('::').last "<#{class_name} payment_type: #{@payment_type.inspect}, tokenized_payment_method:"\ " #{@tokenized_payment_method.inspect}, industry_type: #{@industry_type.inspect}, e_wallet:"\ " #{@e_wallet.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
170 171 172 173 174 175 |
# File 'lib/cyber_source_merged_spec/models/payment_information26.rb', line 170 def to_s class_name = self.class.name.split('::').last "<#{class_name} payment_type: #{@payment_type}, tokenized_payment_method:"\ " #{@tokenized_payment_method}, industry_type: #{@industry_type}, e_wallet: #{@e_wallet},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/cyber_source_merged_spec/models/payment_information26.rb', line 155 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'PaymentType19', payment_type) XmlUtilities.add_as_subelement(doc, root, 'TokenizedPaymentMethod2', tokenized_payment_method) XmlUtilities.add_as_subelement(doc, root, 'industryType', industry_type) XmlUtilities.add_as_subelement(doc, root, 'EWallet13', e_wallet) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |