Class: StickyIoRestfulApiV2025731::CreateContactPaymentSourceRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- StickyIoRestfulApiV2025731::CreateContactPaymentSourceRequest
- Defined in:
- lib/sticky_io_restful_api_v2025731/models/create_contact_payment_source_request.rb
Overview
CreateContactPaymentSourceRequest Model.
Instance Attribute Summary collapse
-
#account_number ⇒ String
TODO: Write general description for this method.
-
#address_id ⇒ Integer
TODO: Write general description for this method.
-
#expiry ⇒ String
TODO: Write general description for this method.
-
#is_default ⇒ Integer
TODO: Write general description for this method.
-
#malias ⇒ String
TODO: Write general description for this method.
-
#payment_type_id ⇒ Integer
TODO: Write general description for this method.
Class Method Summary collapse
-
.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(malias:, account_number:, expiry:, is_default:, payment_type_id:, address_id:, additional_properties: nil) ⇒ CreateContactPaymentSourceRequest
constructor
A new instance of CreateContactPaymentSourceRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the 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(malias:, account_number:, expiry:, is_default:, payment_type_id:, address_id:, additional_properties: nil) ⇒ CreateContactPaymentSourceRequest
Returns a new instance of CreateContactPaymentSourceRequest.
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/sticky_io_restful_api_v2025731/models/create_contact_payment_source_request.rb', line 58 def initialize(malias:, account_number:, expiry:, is_default:, payment_type_id:, address_id:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @malias = malias @account_number = account_number @expiry = expiry @is_default = is_default @payment_type_id = payment_type_id @address_id = address_id @additional_properties = additional_properties end |
Instance Attribute Details
#account_number ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/sticky_io_restful_api_v2025731/models/create_contact_payment_source_request.rb', line 18 def account_number @account_number end |
#address_id ⇒ Integer
TODO: Write general description for this method
34 35 36 |
# File 'lib/sticky_io_restful_api_v2025731/models/create_contact_payment_source_request.rb', line 34 def address_id @address_id end |
#expiry ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/sticky_io_restful_api_v2025731/models/create_contact_payment_source_request.rb', line 22 def expiry @expiry end |
#is_default ⇒ Integer
TODO: Write general description for this method
26 27 28 |
# File 'lib/sticky_io_restful_api_v2025731/models/create_contact_payment_source_request.rb', line 26 def is_default @is_default end |
#malias ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/sticky_io_restful_api_v2025731/models/create_contact_payment_source_request.rb', line 14 def malias @malias end |
#payment_type_id ⇒ Integer
TODO: Write general description for this method
30 31 32 |
# File 'lib/sticky_io_restful_api_v2025731/models/create_contact_payment_source_request.rb', line 30 def payment_type_id @payment_type_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/sticky_io_restful_api_v2025731/models/create_contact_payment_source_request.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. malias = hash.key?('alias') ? hash['alias'] : nil account_number = hash.key?('account_number') ? hash['account_number'] : nil expiry = hash.key?('expiry') ? hash['expiry'] : nil is_default = hash.key?('is_default') ? hash['is_default'] : nil payment_type_id = hash.key?('payment_type_id') ? hash['payment_type_id'] : nil address_id = hash.key?('address_id') ? hash['address_id'] : 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. CreateContactPaymentSourceRequest.new(malias: malias, account_number: account_number, expiry: expiry, is_default: is_default, payment_type_id: payment_type_id, address_id: address_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/sticky_io_restful_api_v2025731/models/create_contact_payment_source_request.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['malias'] = 'alias' @_hash['account_number'] = 'account_number' @_hash['expiry'] = 'expiry' @_hash['is_default'] = 'is_default' @_hash['payment_type_id'] = 'payment_type_id' @_hash['address_id'] = 'address_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
54 55 56 |
# File 'lib/sticky_io_restful_api_v2025731/models/create_contact_payment_source_request.rb', line 54 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 |
# File 'lib/sticky_io_restful_api_v2025731/models/create_contact_payment_source_request.rb', line 49 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
112 113 114 115 116 117 118 |
# File 'lib/sticky_io_restful_api_v2025731/models/create_contact_payment_source_request.rb', line 112 def inspect class_name = self.class.name.split('::').last "<#{class_name} malias: #{@malias.inspect}, account_number: #{@account_number.inspect},"\ " expiry: #{@expiry.inspect}, is_default: #{@is_default.inspect}, payment_type_id:"\ " #{@payment_type_id.inspect}, address_id: #{@address_id.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
104 105 106 107 108 109 |
# File 'lib/sticky_io_restful_api_v2025731/models/create_contact_payment_source_request.rb', line 104 def to_s class_name = self.class.name.split('::').last "<#{class_name} malias: #{@malias}, account_number: #{@account_number}, expiry: #{@expiry},"\ " is_default: #{@is_default}, payment_type_id: #{@payment_type_id}, address_id:"\ " #{@address_id}, additional_properties: #{@additional_properties}>" end |