Class: CyberSourceMergedSpec::EWallet8
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::EWallet8
- Defined in:
- lib/cyber_source_merged_spec/models/e_wallet8.rb
Overview
EWallet8 Model.
Instance Attribute Summary collapse
-
#account_id ⇒ String
The ID of the customer, passed in the return_url field by PayPal after customer approval.
-
#funding_source ⇒ String
Payment mode for the authorization or order transaction.
-
#funding_source_sale ⇒ String
Payment method for the unit purchase.
-
#user_name ⇒ String
The Venmo user name chosen by the user, also known as a Venmo handle.
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(account_id: SKIP, funding_source: SKIP, funding_source_sale: SKIP, user_name: SKIP, additional_properties: nil) ⇒ EWallet8
constructor
A new instance of EWallet8.
-
#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(account_id: SKIP, funding_source: SKIP, funding_source_sale: SKIP, user_name: SKIP, additional_properties: nil) ⇒ EWallet8
Returns a new instance of EWallet8.
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/cyber_source_merged_spec/models/e_wallet8.rb', line 62 def initialize(account_id: SKIP, funding_source: SKIP, funding_source_sale: SKIP, user_name: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_id = account_id unless account_id == SKIP @funding_source = funding_source unless funding_source == SKIP @funding_source_sale = funding_source_sale unless funding_source_sale == SKIP @user_name = user_name unless user_name == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
The ID of the customer, passed in the return_url field by PayPal after customer approval.
15 16 17 |
# File 'lib/cyber_source_merged_spec/models/e_wallet8.rb', line 15 def account_id @account_id end |
#funding_source ⇒ String
Payment mode for the authorization or order transaction. INSTANT_TRANSFER MANUAL_BANK_TRANSFER DELAYED_TRANSFER ECHECK UNRESTRICTED (default)—this value is available only when configured by PayPal for the merchant. INSTANT
22 23 24 |
# File 'lib/cyber_source_merged_spec/models/e_wallet8.rb', line 22 def funding_source @funding_source end |
#funding_source_sale ⇒ String
Payment method for the unit purchase. Possible values:
UNRESTRICTED (default)—this value is only available if configured by PayPal for the merchant.INSTANT
31 32 33 |
# File 'lib/cyber_source_merged_spec/models/e_wallet8.rb', line 31 def funding_source_sale @funding_source_sale end |
#user_name ⇒ String
The Venmo user name chosen by the user, also known as a Venmo handle.
35 36 37 |
# File 'lib/cyber_source_merged_spec/models/e_wallet8.rb', line 35 def user_name @user_name end |
Class Method Details
.from_element(root) ⇒ Object
101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/cyber_source_merged_spec/models/e_wallet8.rb', line 101 def self.from_element(root) account_id = XmlUtilities.from_element(root, 'accountId', String) funding_source = XmlUtilities.from_element(root, 'fundingSource', String) funding_source_sale = XmlUtilities.from_element(root, 'fundingSourceSale', String) user_name = XmlUtilities.from_element(root, 'userName', String) new(account_id: account_id, funding_source: funding_source, funding_source_sale: funding_source_sale, user_name: user_name, additional_properties: additional_properties) end |
.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 |
# File 'lib/cyber_source_merged_spec/models/e_wallet8.rb', line 76 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = hash.key?('accountId') ? hash['accountId'] : SKIP funding_source = hash.key?('fundingSource') ? hash['fundingSource'] : SKIP funding_source_sale = hash.key?('fundingSourceSale') ? hash['fundingSourceSale'] : SKIP user_name = hash.key?('userName') ? hash['userName'] : 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. EWallet8.new(account_id: account_id, funding_source: funding_source, funding_source_sale: funding_source_sale, user_name: user_name, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 |
# File 'lib/cyber_source_merged_spec/models/e_wallet8.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['account_id'] = 'accountId' @_hash['funding_source'] = 'fundingSource' @_hash['funding_source_sale'] = 'fundingSourceSale' @_hash['user_name'] = 'userName' @_hash end |
.nullables ⇒ Object
An array for nullable fields
58 59 60 |
# File 'lib/cyber_source_merged_spec/models/e_wallet8.rb', line 58 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
48 49 50 51 52 53 54 55 |
# File 'lib/cyber_source_merged_spec/models/e_wallet8.rb', line 48 def self.optionals %w[ account_id funding_source funding_source_sale user_name ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
138 139 140 141 142 143 |
# File 'lib/cyber_source_merged_spec/models/e_wallet8.rb', line 138 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id.inspect}, funding_source:"\ " #{@funding_source.inspect}, funding_source_sale: #{@funding_source_sale.inspect},"\ " user_name: #{@user_name.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
130 131 132 133 134 135 |
# File 'lib/cyber_source_merged_spec/models/e_wallet8.rb', line 130 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id}, funding_source: #{@funding_source},"\ " funding_source_sale: #{@funding_source_sale}, user_name: #{@user_name},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/cyber_source_merged_spec/models/e_wallet8.rb', line 115 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'accountId', account_id) XmlUtilities.add_as_subelement(doc, root, 'fundingSource', funding_source) XmlUtilities.add_as_subelement(doc, root, 'fundingSourceSale', funding_source_sale) XmlUtilities.add_as_subelement(doc, root, 'userName', user_name) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |