Class: StickyIoRestfulApiV2025731::DataCreateContactPaymentSource
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- StickyIoRestfulApiV2025731::DataCreateContactPaymentSource
- Defined in:
- lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb
Overview
DataCreateContactPaymentSource Model.
Instance Attribute Summary collapse
-
#address ⇒ AddressData
TODO: Write general description for this method.
-
#created_at ⇒ String
TODO: Write general description for this method.
-
#creator ⇒ Creator
TODO: Write general description for this method.
-
#expiry ⇒ String
TODO: Write general description for this method.
-
#expiry_month ⇒ String
TODO: Write general description for this method.
-
#expiry_year ⇒ String
TODO: Write general description for this method.
-
#first_6 ⇒ String
TODO: Write general description for this method.
-
#id ⇒ Integer
TODO: Write general description for this method.
-
#is_default ⇒ Integer
TODO: Write general description for this method.
-
#last_4 ⇒ String
TODO: Write general description for this method.
-
#malias ⇒ String
TODO: Write general description for this method.
-
#payment_method ⇒ PaymentMethodData
TODO: Write general description for this method.
-
#payment_type ⇒ PaymentType
TODO: Write general description for this method.
-
#updated_at ⇒ String
TODO: Write general description for this method.
-
#updator ⇒ String
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(is_default:, malias:, expiry:, first_6:, last_4:, updated_at:, created_at:, id:, address:, payment_type:, payment_method:, creator:, updator:, expiry_month:, expiry_year:, additional_properties: nil) ⇒ DataCreateContactPaymentSource
constructor
A new instance of DataCreateContactPaymentSource.
-
#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(is_default:, malias:, expiry:, first_6:, last_4:, updated_at:, created_at:, id:, address:, payment_type:, payment_method:, creator:, updator:, expiry_month:, expiry_year:, additional_properties: nil) ⇒ DataCreateContactPaymentSource
Returns a new instance of DataCreateContactPaymentSource.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 105 def initialize(is_default:, malias:, expiry:, first_6:, last_4:, updated_at:, created_at:, id:, address:, payment_type:, payment_method:, creator:, updator:, expiry_month:, expiry_year:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @is_default = is_default @malias = malias @expiry = expiry @first_6 = first_6 @last_4 = last_4 @updated_at = updated_at @created_at = created_at @id = id @address = address @payment_type = payment_type @payment_method = payment_method @creator = creator @updator = updator @expiry_month = expiry_month @expiry_year = expiry_year @additional_properties = additional_properties end |
Instance Attribute Details
#address ⇒ AddressData
TODO: Write general description for this method
46 47 48 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 46 def address @address end |
#created_at ⇒ String
TODO: Write general description for this method
38 39 40 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 38 def created_at @created_at end |
#creator ⇒ Creator
TODO: Write general description for this method
58 59 60 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 58 def creator @creator end |
#expiry ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 22 def expiry @expiry end |
#expiry_month ⇒ String
TODO: Write general description for this method
66 67 68 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 66 def expiry_month @expiry_month end |
#expiry_year ⇒ String
TODO: Write general description for this method
70 71 72 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 70 def expiry_year @expiry_year end |
#first_6 ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 26 def first_6 @first_6 end |
#id ⇒ Integer
TODO: Write general description for this method
42 43 44 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 42 def id @id end |
#is_default ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 14 def is_default @is_default end |
#last_4 ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 30 def last_4 @last_4 end |
#malias ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 18 def malias @malias end |
#payment_method ⇒ PaymentMethodData
TODO: Write general description for this method
54 55 56 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 54 def payment_method @payment_method end |
#payment_type ⇒ PaymentType
TODO: Write general description for this method
50 51 52 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 50 def payment_type @payment_type end |
#updated_at ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 34 def updated_at @updated_at end |
#updator ⇒ String
TODO: Write general description for this method
62 63 64 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 62 def updator @updator end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 131 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. is_default = hash.key?('is_default') ? hash['is_default'] : nil malias = hash.key?('alias') ? hash['alias'] : nil expiry = hash.key?('expiry') ? hash['expiry'] : nil first_6 = hash.key?('first_6') ? hash['first_6'] : nil last_4 = hash.key?('last_4') ? hash['last_4'] : nil updated_at = hash.key?('updated_at') ? hash['updated_at'] : nil created_at = hash.key?('created_at') ? hash['created_at'] : nil id = hash.key?('id') ? hash['id'] : nil address = AddressData.from_hash(hash['address']) if hash['address'] payment_type = PaymentType.from_hash(hash['payment_type']) if hash['payment_type'] payment_method = PaymentMethodData.from_hash(hash['payment_method']) if hash['payment_method'] creator = Creator.from_hash(hash['creator']) if hash['creator'] updator = hash.key?('updator') ? hash['updator'] : nil expiry_month = hash.key?('expiry_month') ? hash['expiry_month'] : nil expiry_year = hash.key?('expiry_year') ? hash['expiry_year'] : 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. DataCreateContactPaymentSource.new(is_default: is_default, malias: malias, expiry: expiry, first_6: first_6, last_4: last_4, updated_at: updated_at, created_at: created_at, id: id, address: address, payment_type: payment_type, payment_method: payment_method, creator: creator, updator: updator, expiry_month: expiry_month, expiry_year: expiry_year, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 73 def self.names @_hash = {} if @_hash.nil? @_hash['is_default'] = 'is_default' @_hash['malias'] = 'alias' @_hash['expiry'] = 'expiry' @_hash['first_6'] = 'first_6' @_hash['last_4'] = 'last_4' @_hash['updated_at'] = 'updated_at' @_hash['created_at'] = 'created_at' @_hash['id'] = 'id' @_hash['address'] = 'address' @_hash['payment_type'] = 'payment_type' @_hash['payment_method'] = 'payment_method' @_hash['creator'] = 'creator' @_hash['updator'] = 'updator' @_hash['expiry_month'] = 'expiry_month' @_hash['expiry_year'] = 'expiry_year' @_hash end |
.nullables ⇒ Object
An array for nullable fields
99 100 101 102 103 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 99 def self.nullables %w[ updator ] end |
.optionals ⇒ Object
An array for optional fields
94 95 96 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 94 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
190 191 192 193 194 195 196 197 198 199 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 190 def inspect class_name = self.class.name.split('::').last "<#{class_name} is_default: #{@is_default.inspect}, malias: #{@malias.inspect}, expiry:"\ " #{@expiry.inspect}, first_6: #{@first_6.inspect}, last_4: #{@last_4.inspect}, updated_at:"\ " #{@updated_at.inspect}, created_at: #{@created_at.inspect}, id: #{@id.inspect}, address:"\ " #{@address.inspect}, payment_type: #{@payment_type.inspect}, payment_method:"\ " #{@payment_method.inspect}, creator: #{@creator.inspect}, updator: #{@updator.inspect},"\ " expiry_month: #{@expiry_month.inspect}, expiry_year: #{@expiry_year.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
179 180 181 182 183 184 185 186 187 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_create_contact_payment_source.rb', line 179 def to_s class_name = self.class.name.split('::').last "<#{class_name} is_default: #{@is_default}, malias: #{@malias}, expiry: #{@expiry},"\ " first_6: #{@first_6}, last_4: #{@last_4}, updated_at: #{@updated_at}, created_at:"\ " #{@created_at}, id: #{@id}, address: #{@address}, payment_type: #{@payment_type},"\ " payment_method: #{@payment_method}, creator: #{@creator}, updator: #{@updator},"\ " expiry_month: #{@expiry_month}, expiry_year: #{@expiry_year}, additional_properties:"\ " #{@additional_properties}>" end |