Class: SwaggerClient::Contract
- Inherits:
-
Object
- Object
- SwaggerClient::Contract
- Defined in:
- lib/swagger_client/models/contract.rb
Instance Attribute Summary collapse
-
#action_upon_completion_of_autopays ⇒ Object
The renewal action to be taken when this AutoPay is completed.
-
#agreement_terms ⇒ Object
Business-defined terms and conditions for the contract.
-
#assigns_membership_id ⇒ Object
The ID of the membership that was assigned to the client when the client signed up for a contract.
-
#assigns_membership_name ⇒ Object
The name of the membership that was assigned to the client when the client signed up for this contract.
-
#autopay_enabled ⇒ Object
When ‘true`, this contract establishes an AutoPay on the client’s account.
-
#autopay_schedule ⇒ Object
Contains information about the AutoPay schedule.
-
#autopay_trigger_type ⇒ Object
Defines whether the AutoPay, if applicable to this contract, runs on a set schedule or when the pricing option runs out or expires.
-
#client_terminate_online ⇒ Object
When ‘true`, indicates that the client can terminate this contract on the Internet.
-
#clients_charged_on ⇒ Object
The value that indicates when clients are charged.
-
#clients_charged_on_specific_date ⇒ Object
If ‘ClientsChargedOn` is defined as a specific date, this property holds the value of that date.
-
#contract_items ⇒ Object
Contains information about the items in the contract.
-
#deposit_amount ⇒ Object
The amount of the deposit required for this contract.
-
#description ⇒ Object
A description of the contract.
-
#discount_amount ⇒ Object
The calculated discount applied to the items in this contract.
-
#first_autopay_free ⇒ Object
When ‘true`, indicates that the first payment for the AutoPay is free.
-
#first_payment_amount_subtotal ⇒ Object
The subtotal of the amount that the client is to be charged when signing up for the contract.
-
#first_payment_amount_tax ⇒ Object
The amount of tax that the client is to be charged when signing up for the contract.
-
#first_payment_amount_total ⇒ Object
The total amount that the client is to be charged when signing up for the contract.
-
#id ⇒ Object
The contract’s ID at the subscriber’s business.
-
#intro_offer ⇒ Object
Defines whether this contract is treated as an introductory offer.
-
#last_autopay_free ⇒ Object
When ‘true`, indicates that the last payment for the AutoPay is free.
-
#location_purchase_restriction_ids ⇒ Object
The IDs of the locations where this contract may be sold.
-
#location_purchase_restriction_names ⇒ Object
Location names where the contract may be purchased.
-
#membership_type_restrictions ⇒ Object
Contains information about the memberships that can purchase this contract.
-
#name ⇒ Object
The name of the contract.
-
#number_of_autopays ⇒ Object
The number of times that the AutoPay is to be run.
-
#recurring_payment_amount_subtotal ⇒ Object
The subtotal amount that the client is to be charged on an ongoing basis.
-
#recurring_payment_amount_tax ⇒ Object
The amount of tax the client is to be charged on an ongoing basis.
-
#recurring_payment_amount_total ⇒ Object
The total amount that the client is to be charged on an ongoing basis.
-
#requires_electronic_confirmation ⇒ Object
When ‘true`, clients who purchase the contract are prompted to agree to the terms of the contract the next time that they log in.
-
#sold_online ⇒ Object
When ‘true`, indicates that this membership is intended to be shown to clients in client experiences.<br /> When `false`, this contract should only be shown to staff members.
-
#total_contract_amount_subtotal ⇒ Object
The subtotal amount that the client is to be charged over the lifespan of the contract.
-
#total_contract_amount_tax ⇒ Object
The total amount of tax the client is to be charged over the lifespan of the contract.
-
#total_contract_amount_total ⇒ Object
The total amount the client is to be charged over the lifespan of the contract.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Contract
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Contract
Initializes the object
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/swagger_client/models/contract.rb', line 201 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'Id') self.id = attributes[:'Id'] end if attributes.has_key?(:'Name') self.name = attributes[:'Name'] end if attributes.has_key?(:'Description') self.description = attributes[:'Description'] end if attributes.has_key?(:'AssignsMembershipId') self.assigns_membership_id = attributes[:'AssignsMembershipId'] end if attributes.has_key?(:'AssignsMembershipName') self.assigns_membership_name = attributes[:'AssignsMembershipName'] end if attributes.has_key?(:'SoldOnline') self.sold_online = attributes[:'SoldOnline'] end if attributes.has_key?(:'ContractItems') if (value = attributes[:'ContractItems']).is_a?(Array) self.contract_items = value end end if attributes.has_key?(:'IntroOffer') self.intro_offer = attributes[:'IntroOffer'] end if attributes.has_key?(:'AutopaySchedule') self.autopay_schedule = attributes[:'AutopaySchedule'] end if attributes.has_key?(:'NumberOfAutopays') self.number_of_autopays = attributes[:'NumberOfAutopays'] end if attributes.has_key?(:'AutopayTriggerType') self.autopay_trigger_type = attributes[:'AutopayTriggerType'] end if attributes.has_key?(:'ActionUponCompletionOfAutopays') self.action_upon_completion_of_autopays = attributes[:'ActionUponCompletionOfAutopays'] end if attributes.has_key?(:'ClientsChargedOn') self.clients_charged_on = attributes[:'ClientsChargedOn'] end if attributes.has_key?(:'ClientsChargedOnSpecificDate') self.clients_charged_on_specific_date = attributes[:'ClientsChargedOnSpecificDate'] end if attributes.has_key?(:'DiscountAmount') self.discount_amount = attributes[:'DiscountAmount'] end if attributes.has_key?(:'DepositAmount') self.deposit_amount = attributes[:'DepositAmount'] end if attributes.has_key?(:'FirstAutopayFree') self.first_autopay_free = attributes[:'FirstAutopayFree'] end if attributes.has_key?(:'LastAutopayFree') self.last_autopay_free = attributes[:'LastAutopayFree'] end if attributes.has_key?(:'ClientTerminateOnline') self.client_terminate_online = attributes[:'ClientTerminateOnline'] end if attributes.has_key?(:'MembershipTypeRestrictions') if (value = attributes[:'MembershipTypeRestrictions']).is_a?(Array) self.membership_type_restrictions = value end end if attributes.has_key?(:'LocationPurchaseRestrictionIds') if (value = attributes[:'LocationPurchaseRestrictionIds']).is_a?(Array) self.location_purchase_restriction_ids = value end end if attributes.has_key?(:'LocationPurchaseRestrictionNames') if (value = attributes[:'LocationPurchaseRestrictionNames']).is_a?(Array) self.location_purchase_restriction_names = value end end if attributes.has_key?(:'AgreementTerms') self.agreement_terms = attributes[:'AgreementTerms'] end if attributes.has_key?(:'RequiresElectronicConfirmation') self.requires_electronic_confirmation = attributes[:'RequiresElectronicConfirmation'] end if attributes.has_key?(:'AutopayEnabled') self.autopay_enabled = attributes[:'AutopayEnabled'] end if attributes.has_key?(:'FirstPaymentAmountSubtotal') self.first_payment_amount_subtotal = attributes[:'FirstPaymentAmountSubtotal'] end if attributes.has_key?(:'FirstPaymentAmountTax') self.first_payment_amount_tax = attributes[:'FirstPaymentAmountTax'] end if attributes.has_key?(:'FirstPaymentAmountTotal') self.first_payment_amount_total = attributes[:'FirstPaymentAmountTotal'] end if attributes.has_key?(:'RecurringPaymentAmountSubtotal') self.recurring_payment_amount_subtotal = attributes[:'RecurringPaymentAmountSubtotal'] end if attributes.has_key?(:'RecurringPaymentAmountTax') self.recurring_payment_amount_tax = attributes[:'RecurringPaymentAmountTax'] end if attributes.has_key?(:'RecurringPaymentAmountTotal') self.recurring_payment_amount_total = attributes[:'RecurringPaymentAmountTotal'] end if attributes.has_key?(:'TotalContractAmountSubtotal') self.total_contract_amount_subtotal = attributes[:'TotalContractAmountSubtotal'] end if attributes.has_key?(:'TotalContractAmountTax') self.total_contract_amount_tax = attributes[:'TotalContractAmountTax'] end if attributes.has_key?(:'TotalContractAmountTotal') self.total_contract_amount_total = attributes[:'TotalContractAmountTotal'] end end |
Instance Attribute Details
#action_upon_completion_of_autopays ⇒ Object
The renewal action to be taken when this AutoPay is completed. Possible values are: * ContractExpires * ContractAutomaticallyRenews
51 52 53 |
# File 'lib/swagger_client/models/contract.rb', line 51 def action_upon_completion_of_autopays @action_upon_completion_of_autopays end |
#agreement_terms ⇒ Object
Business-defined terms and conditions for the contract.
84 85 86 |
# File 'lib/swagger_client/models/contract.rb', line 84 def agreement_terms @agreement_terms end |
#assigns_membership_id ⇒ Object
The ID of the membership that was assigned to the client when the client signed up for a contract.
27 28 29 |
# File 'lib/swagger_client/models/contract.rb', line 27 def assigns_membership_id @assigns_membership_id end |
#assigns_membership_name ⇒ Object
The name of the membership that was assigned to the client when the client signed up for this contract.
30 31 32 |
# File 'lib/swagger_client/models/contract.rb', line 30 def assigns_membership_name @assigns_membership_name end |
#autopay_enabled ⇒ Object
When ‘true`, this contract establishes an AutoPay on the client’s account.
90 91 92 |
# File 'lib/swagger_client/models/contract.rb', line 90 def autopay_enabled @autopay_enabled end |
#autopay_schedule ⇒ Object
Contains information about the AutoPay schedule. This parameter is null if ‘AutopayTriggerType` has a value of `PricingOptionRunsOutOrExpires`.
42 43 44 |
# File 'lib/swagger_client/models/contract.rb', line 42 def autopay_schedule @autopay_schedule end |
#autopay_trigger_type ⇒ Object
Defines whether the AutoPay, if applicable to this contract, runs on a set schedule or when the pricing option runs out or expires. Possible values are: * OnSetSchedule * PricingOptionRunsOutOrExpires
48 49 50 |
# File 'lib/swagger_client/models/contract.rb', line 48 def autopay_trigger_type @autopay_trigger_type end |
#client_terminate_online ⇒ Object
When ‘true`, indicates that the client can terminate this contract on the Internet.
72 73 74 |
# File 'lib/swagger_client/models/contract.rb', line 72 def client_terminate_online @client_terminate_online end |
#clients_charged_on ⇒ Object
The value that indicates when clients are charged. Possible values are: * OnSaleDate * FirstOfTheMonth * FifteenthOfTheMonth * LastDayOfTheMonth * FirstOrFifteenthOfTheMonth * FirstOrSixteenthOfTheMonth * FifteenthOrEndOfTheMonth * SpecificDate
54 55 56 |
# File 'lib/swagger_client/models/contract.rb', line 54 def clients_charged_on @clients_charged_on end |
#clients_charged_on_specific_date ⇒ Object
If ‘ClientsChargedOn` is defined as a specific date, this property holds the value of that date. Otherwise, this property is null.
57 58 59 |
# File 'lib/swagger_client/models/contract.rb', line 57 def clients_charged_on_specific_date @clients_charged_on_specific_date end |
#contract_items ⇒ Object
Contains information about the items in the contract.
36 37 38 |
# File 'lib/swagger_client/models/contract.rb', line 36 def contract_items @contract_items end |
#deposit_amount ⇒ Object
The amount of the deposit required for this contract.
63 64 65 |
# File 'lib/swagger_client/models/contract.rb', line 63 def deposit_amount @deposit_amount end |
#description ⇒ Object
A description of the contract.
24 25 26 |
# File 'lib/swagger_client/models/contract.rb', line 24 def description @description end |
#discount_amount ⇒ Object
The calculated discount applied to the items in this contract.
60 61 62 |
# File 'lib/swagger_client/models/contract.rb', line 60 def discount_amount @discount_amount end |
#first_autopay_free ⇒ Object
When ‘true`, indicates that the first payment for the AutoPay is free.
66 67 68 |
# File 'lib/swagger_client/models/contract.rb', line 66 def first_autopay_free @first_autopay_free end |
#first_payment_amount_subtotal ⇒ Object
The subtotal of the amount that the client is to be charged when signing up for the contract.
93 94 95 |
# File 'lib/swagger_client/models/contract.rb', line 93 def first_payment_amount_subtotal @first_payment_amount_subtotal end |
#first_payment_amount_tax ⇒ Object
The amount of tax that the client is to be charged when signing up for the contract.
96 97 98 |
# File 'lib/swagger_client/models/contract.rb', line 96 def first_payment_amount_tax @first_payment_amount_tax end |
#first_payment_amount_total ⇒ Object
The total amount that the client is to be charged when signing up for the contract.
99 100 101 |
# File 'lib/swagger_client/models/contract.rb', line 99 def first_payment_amount_total @first_payment_amount_total end |
#id ⇒ Object
The contract’s ID at the subscriber’s business.
18 19 20 |
# File 'lib/swagger_client/models/contract.rb', line 18 def id @id end |
#intro_offer ⇒ Object
Defines whether this contract is treated as an introductory offer. If this is an introductory offer, then clients are always charged a set number of times rather than month to month, using their AutoPays. Possible values are: * None * NewConsumer * NewAndReturningConsumer
39 40 41 |
# File 'lib/swagger_client/models/contract.rb', line 39 def intro_offer @intro_offer end |
#last_autopay_free ⇒ Object
When ‘true`, indicates that the last payment for the AutoPay is free.
69 70 71 |
# File 'lib/swagger_client/models/contract.rb', line 69 def last_autopay_free @last_autopay_free end |
#location_purchase_restriction_ids ⇒ Object
The IDs of the locations where this contract may be sold. If there are no restrictions, this value is null.
78 79 80 |
# File 'lib/swagger_client/models/contract.rb', line 78 def location_purchase_restriction_ids @location_purchase_restriction_ids end |
#location_purchase_restriction_names ⇒ Object
Location names where the contract may be purchased. If this value is null, there are no restrictions.
81 82 83 |
# File 'lib/swagger_client/models/contract.rb', line 81 def location_purchase_restriction_names @location_purchase_restriction_names end |
#membership_type_restrictions ⇒ Object
Contains information about the memberships that can purchase this contract. If null, then no membership restrictions exist, and anyone can purchase the contract.
75 76 77 |
# File 'lib/swagger_client/models/contract.rb', line 75 def membership_type_restrictions @membership_type_restrictions end |
#name ⇒ Object
The name of the contract.
21 22 23 |
# File 'lib/swagger_client/models/contract.rb', line 21 def name @name end |
#number_of_autopays ⇒ Object
The number of times that the AutoPay is to be run. This value is null if ‘FrequencyType` is `MonthToMonth`.
45 46 47 |
# File 'lib/swagger_client/models/contract.rb', line 45 def number_of_autopays @number_of_autopays end |
#recurring_payment_amount_subtotal ⇒ Object
The subtotal amount that the client is to be charged on an ongoing basis.
102 103 104 |
# File 'lib/swagger_client/models/contract.rb', line 102 def recurring_payment_amount_subtotal @recurring_payment_amount_subtotal end |
#recurring_payment_amount_tax ⇒ Object
The amount of tax the client is to be charged on an ongoing basis.
105 106 107 |
# File 'lib/swagger_client/models/contract.rb', line 105 def recurring_payment_amount_tax @recurring_payment_amount_tax end |
#recurring_payment_amount_total ⇒ Object
The total amount that the client is to be charged on an ongoing basis.
108 109 110 |
# File 'lib/swagger_client/models/contract.rb', line 108 def recurring_payment_amount_total @recurring_payment_amount_total end |
#requires_electronic_confirmation ⇒ Object
When ‘true`, clients who purchase the contract are prompted to agree to the terms of the contract the next time that they log in.
87 88 89 |
# File 'lib/swagger_client/models/contract.rb', line 87 def requires_electronic_confirmation @requires_electronic_confirmation end |
#sold_online ⇒ Object
When ‘true`, indicates that this membership is intended to be shown to clients in client experiences.<br /> When `false`, this contract should only be shown to staff members.
33 34 35 |
# File 'lib/swagger_client/models/contract.rb', line 33 def sold_online @sold_online end |
#total_contract_amount_subtotal ⇒ Object
The subtotal amount that the client is to be charged over the lifespan of the contract.
111 112 113 |
# File 'lib/swagger_client/models/contract.rb', line 111 def total_contract_amount_subtotal @total_contract_amount_subtotal end |
#total_contract_amount_tax ⇒ Object
The total amount of tax the client is to be charged over the lifespan of the contract.
114 115 116 |
# File 'lib/swagger_client/models/contract.rb', line 114 def total_contract_amount_tax @total_contract_amount_tax end |
#total_contract_amount_total ⇒ Object
The total amount the client is to be charged over the lifespan of the contract.
117 118 119 |
# File 'lib/swagger_client/models/contract.rb', line 117 def total_contract_amount_total @total_contract_amount_total end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
120 121 122 123 124 125 126 127 128 129 130 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 |
# File 'lib/swagger_client/models/contract.rb', line 120 def self.attribute_map { :'id' => :'Id', :'name' => :'Name', :'description' => :'Description', :'assigns_membership_id' => :'AssignsMembershipId', :'assigns_membership_name' => :'AssignsMembershipName', :'sold_online' => :'SoldOnline', :'contract_items' => :'ContractItems', :'intro_offer' => :'IntroOffer', :'autopay_schedule' => :'AutopaySchedule', :'number_of_autopays' => :'NumberOfAutopays', :'autopay_trigger_type' => :'AutopayTriggerType', :'action_upon_completion_of_autopays' => :'ActionUponCompletionOfAutopays', :'clients_charged_on' => :'ClientsChargedOn', :'clients_charged_on_specific_date' => :'ClientsChargedOnSpecificDate', :'discount_amount' => :'DiscountAmount', :'deposit_amount' => :'DepositAmount', :'first_autopay_free' => :'FirstAutopayFree', :'last_autopay_free' => :'LastAutopayFree', :'client_terminate_online' => :'ClientTerminateOnline', :'membership_type_restrictions' => :'MembershipTypeRestrictions', :'location_purchase_restriction_ids' => :'LocationPurchaseRestrictionIds', :'location_purchase_restriction_names' => :'LocationPurchaseRestrictionNames', :'agreement_terms' => :'AgreementTerms', :'requires_electronic_confirmation' => :'RequiresElectronicConfirmation', :'autopay_enabled' => :'AutopayEnabled', :'first_payment_amount_subtotal' => :'FirstPaymentAmountSubtotal', :'first_payment_amount_tax' => :'FirstPaymentAmountTax', :'first_payment_amount_total' => :'FirstPaymentAmountTotal', :'recurring_payment_amount_subtotal' => :'RecurringPaymentAmountSubtotal', :'recurring_payment_amount_tax' => :'RecurringPaymentAmountTax', :'recurring_payment_amount_total' => :'RecurringPaymentAmountTotal', :'total_contract_amount_subtotal' => :'TotalContractAmountSubtotal', :'total_contract_amount_tax' => :'TotalContractAmountTax', :'total_contract_amount_total' => :'TotalContractAmountTotal' } end |
.swagger_types ⇒ Object
Attribute type mapping.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/swagger_client/models/contract.rb', line 160 def self.swagger_types { :'id' => :'Integer', :'name' => :'String', :'description' => :'String', :'assigns_membership_id' => :'Integer', :'assigns_membership_name' => :'String', :'sold_online' => :'BOOLEAN', :'contract_items' => :'Array<ContractItem>', :'intro_offer' => :'String', :'autopay_schedule' => :'AutopaySchedule', :'number_of_autopays' => :'Integer', :'autopay_trigger_type' => :'String', :'action_upon_completion_of_autopays' => :'String', :'clients_charged_on' => :'String', :'clients_charged_on_specific_date' => :'DateTime', :'discount_amount' => :'Float', :'deposit_amount' => :'Float', :'first_autopay_free' => :'BOOLEAN', :'last_autopay_free' => :'BOOLEAN', :'client_terminate_online' => :'BOOLEAN', :'membership_type_restrictions' => :'Array<MembershipTypeRestriction>', :'location_purchase_restriction_ids' => :'Array<Integer>', :'location_purchase_restriction_names' => :'Array<String>', :'agreement_terms' => :'String', :'requires_electronic_confirmation' => :'BOOLEAN', :'autopay_enabled' => :'BOOLEAN', :'first_payment_amount_subtotal' => :'Float', :'first_payment_amount_tax' => :'Float', :'first_payment_amount_total' => :'Float', :'recurring_payment_amount_subtotal' => :'Float', :'recurring_payment_amount_tax' => :'Float', :'recurring_payment_amount_total' => :'Float', :'total_contract_amount_subtotal' => :'Float', :'total_contract_amount_tax' => :'Float', :'total_contract_amount_total' => :'Float' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
# File 'lib/swagger_client/models/contract.rb', line 367 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && name == o.name && description == o.description && assigns_membership_id == o.assigns_membership_id && assigns_membership_name == o.assigns_membership_name && sold_online == o.sold_online && contract_items == o.contract_items && intro_offer == o.intro_offer && autopay_schedule == o.autopay_schedule && number_of_autopays == o.number_of_autopays && autopay_trigger_type == o.autopay_trigger_type && action_upon_completion_of_autopays == o.action_upon_completion_of_autopays && clients_charged_on == o.clients_charged_on && clients_charged_on_specific_date == o.clients_charged_on_specific_date && discount_amount == o.discount_amount && deposit_amount == o.deposit_amount && first_autopay_free == o.first_autopay_free && last_autopay_free == o.last_autopay_free && client_terminate_online == o.client_terminate_online && membership_type_restrictions == o.membership_type_restrictions && location_purchase_restriction_ids == o.location_purchase_restriction_ids && location_purchase_restriction_names == o.location_purchase_restriction_names && agreement_terms == o.agreement_terms && requires_electronic_confirmation == o.requires_electronic_confirmation && autopay_enabled == o.autopay_enabled && first_payment_amount_subtotal == o.first_payment_amount_subtotal && first_payment_amount_tax == o.first_payment_amount_tax && first_payment_amount_total == o.first_payment_amount_total && recurring_payment_amount_subtotal == o.recurring_payment_amount_subtotal && recurring_payment_amount_tax == o.recurring_payment_amount_tax && recurring_payment_amount_total == o.recurring_payment_amount_total && total_contract_amount_subtotal == o.total_contract_amount_subtotal && total_contract_amount_tax == o.total_contract_amount_tax && total_contract_amount_total == o.total_contract_amount_total end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 |
# File 'lib/swagger_client/models/contract.rb', line 442 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = SwaggerClient.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
508 509 510 511 512 513 514 515 516 517 518 519 520 |
# File 'lib/swagger_client/models/contract.rb', line 508 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 |
# File 'lib/swagger_client/models/contract.rb', line 421 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
408 409 410 |
# File 'lib/swagger_client/models/contract.rb', line 408 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
414 415 416 |
# File 'lib/swagger_client/models/contract.rb', line 414 def hash [id, name, description, assigns_membership_id, assigns_membership_name, sold_online, contract_items, intro_offer, autopay_schedule, number_of_autopays, autopay_trigger_type, action_upon_completion_of_autopays, clients_charged_on, clients_charged_on_specific_date, discount_amount, deposit_amount, first_autopay_free, last_autopay_free, client_terminate_online, membership_type_restrictions, location_purchase_restriction_ids, location_purchase_restriction_names, agreement_terms, requires_electronic_confirmation, autopay_enabled, first_payment_amount_subtotal, first_payment_amount_tax, first_payment_amount_total, recurring_payment_amount_subtotal, recurring_payment_amount_tax, recurring_payment_amount_total, total_contract_amount_subtotal, total_contract_amount_tax, total_contract_amount_total].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
354 355 356 357 |
# File 'lib/swagger_client/models/contract.rb', line 354 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
488 489 490 |
# File 'lib/swagger_client/models/contract.rb', line 488 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
494 495 496 497 498 499 500 501 502 |
# File 'lib/swagger_client/models/contract.rb', line 494 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
482 483 484 |
# File 'lib/swagger_client/models/contract.rb', line 482 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
361 362 363 |
# File 'lib/swagger_client/models/contract.rb', line 361 def valid? true end |