talon_one 2.2.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -12
  3. data/docs/AddLoyaltyPointsEffectProps.md +3 -1
  4. data/docs/Application.md +2 -0
  5. data/docs/ApplicationEvent.md +3 -1
  6. data/docs/Binding.md +2 -0
  7. data/docs/Campaign.md +11 -1
  8. data/docs/CartItem.md +1 -3
  9. data/docs/Change.md +2 -0
  10. data/docs/CustomerProfileIntegrationRequestV2.md +3 -1
  11. data/docs/DeductLoyaltyPointsEffectProps.md +3 -1
  12. data/docs/Effect.md +2 -0
  13. data/docs/EffectEntity.md +3 -1
  14. data/docs/Import.md +1 -1
  15. data/docs/InlineResponse20020.md +2 -2
  16. data/docs/InlineResponse20021.md +1 -1
  17. data/docs/InlineResponse20022.md +1 -1
  18. data/docs/InlineResponse20023.md +1 -1
  19. data/docs/InlineResponse20024.md +1 -1
  20. data/docs/InlineResponse20025.md +1 -1
  21. data/docs/InlineResponse20026.md +1 -1
  22. data/docs/InlineResponse20027.md +2 -4
  23. data/docs/InlineResponse20028.md +4 -2
  24. data/docs/InlineResponse20029.md +1 -1
  25. data/docs/IntegrationApi.md +27 -27
  26. data/docs/IntegrationRequest.md +1 -1
  27. data/docs/IntegrationStateV2.md +2 -0
  28. data/docs/LoyaltyProgramBalance.md +10 -2
  29. data/docs/LoyaltyProgramLedgers.md +3 -1
  30. data/docs/LoyaltySubLedger.md +1 -1
  31. data/docs/ManagementApi.md +623 -169
  32. data/docs/NewApplication.md +2 -0
  33. data/docs/NewCoupons.md +5 -5
  34. data/docs/NewCouponsForMultipleRecipients.md +31 -0
  35. data/docs/ProfileAudiencesChanges.md +19 -0
  36. data/docs/RejectCouponEffectProps.md +7 -1
  37. data/docs/RejectReferralEffectProps.md +7 -1
  38. data/docs/RollbackAddedLoyaltyPointsEffectProps.md +25 -0
  39. data/docs/RollbackDeductedLoyaltyPointsEffectProps.md +29 -0
  40. data/docs/RollbackReferralEffectProps.md +17 -0
  41. data/docs/RuleFailureReason.md +39 -0
  42. data/docs/UpdateApplication.md +2 -0
  43. data/lib/talon_one.rb +6 -3
  44. data/lib/talon_one/api/integration_api.rb +30 -30
  45. data/lib/talon_one/api/management_api.rb +816 -242
  46. data/lib/talon_one/models/add_loyalty_points_effect_props.rb +19 -4
  47. data/lib/talon_one/models/application.rb +23 -1
  48. data/lib/talon_one/models/application_api_key.rb +2 -2
  49. data/lib/talon_one/models/application_event.rb +16 -4
  50. data/lib/talon_one/models/binding.rb +11 -1
  51. data/lib/talon_one/models/campaign.rb +52 -2
  52. data/lib/talon_one/models/cart_item.rb +4 -13
  53. data/lib/talon_one/models/change.rb +11 -1
  54. data/lib/talon_one/models/code_generator_settings.rb +9 -0
  55. data/lib/talon_one/models/create_application_api_key.rb +2 -2
  56. data/lib/talon_one/models/customer_profile_integration_request_v2.rb +11 -2
  57. data/lib/talon_one/models/customer_session.rb +38 -0
  58. data/lib/talon_one/models/customer_session_v2.rb +15 -0
  59. data/lib/talon_one/models/deduct_loyalty_points_effect_props.rb +19 -4
  60. data/lib/talon_one/models/effect.rb +11 -1
  61. data/lib/talon_one/models/effect_entity.rb +14 -4
  62. data/lib/talon_one/models/import.rb +1 -35
  63. data/lib/talon_one/models/inline_response20020.rb +1 -6
  64. data/lib/talon_one/models/inline_response20021.rb +1 -1
  65. data/lib/talon_one/models/inline_response20022.rb +1 -1
  66. data/lib/talon_one/models/inline_response20023.rb +1 -1
  67. data/lib/talon_one/models/inline_response20024.rb +1 -1
  68. data/lib/talon_one/models/inline_response20025.rb +1 -1
  69. data/lib/talon_one/models/inline_response20026.rb +1 -1
  70. data/lib/talon_one/models/inline_response20027.rb +7 -11
  71. data/lib/talon_one/models/inline_response20028.rb +11 -7
  72. data/lib/talon_one/models/inline_response20029.rb +1 -1
  73. data/lib/talon_one/models/integration_request.rb +1 -1
  74. data/lib/talon_one/models/integration_state_v2.rb +12 -1
  75. data/lib/talon_one/models/limit_config.rb +0 -12
  76. data/lib/talon_one/models/loyalty_points.rb +28 -0
  77. data/lib/talon_one/models/loyalty_program_balance.rb +65 -4
  78. data/lib/talon_one/models/loyalty_program_ledgers.rb +16 -1
  79. data/lib/talon_one/models/loyalty_sub_ledger.rb +1 -1
  80. data/lib/talon_one/models/new_application.rb +23 -1
  81. data/lib/talon_one/models/new_application_api_key.rb +2 -2
  82. data/lib/talon_one/models/new_coupons.rb +36 -41
  83. data/lib/talon_one/models/new_coupons_for_multiple_recipients.rb +368 -0
  84. data/lib/talon_one/models/new_customer_session.rb +30 -0
  85. data/lib/talon_one/models/new_customer_session_v2.rb +15 -0
  86. data/lib/talon_one/models/{new_import.rb → profile_audiences_changes.rb} +32 -48
  87. data/lib/talon_one/models/reject_coupon_effect_props.rb +34 -4
  88. data/lib/talon_one/models/reject_referral_effect_props.rb +34 -4
  89. data/lib/talon_one/models/{cart_item_adjustment.rb → rollback_added_loyalty_points_effect_props.rb} +63 -61
  90. data/lib/talon_one/models/rollback_deducted_loyalty_points_effect_props.rb +293 -0
  91. data/lib/talon_one/models/{import_coupons.rb → rollback_referral_effect_props.rb} +15 -13
  92. data/lib/talon_one/models/rule_failure_reason.rb +343 -0
  93. data/lib/talon_one/models/update_application.rb +23 -1
  94. data/lib/talon_one/version.rb +1 -1
  95. data/spec/api/integration_api_spec.rb +15 -15
  96. data/spec/api/management_api_spec.rb +183 -68
  97. data/spec/models/add_loyalty_points_effect_props_spec.rb +6 -0
  98. data/spec/models/application_api_key_spec.rb +1 -1
  99. data/spec/models/application_event_spec.rb +6 -0
  100. data/spec/models/application_spec.rb +10 -0
  101. data/spec/models/binding_spec.rb +6 -0
  102. data/spec/models/campaign_spec.rb +30 -0
  103. data/spec/models/cart_item_spec.rb +0 -6
  104. data/spec/models/change_spec.rb +6 -0
  105. data/spec/models/create_application_api_key_spec.rb +1 -1
  106. data/spec/models/customer_profile_integration_request_v2_spec.rb +7 -1
  107. data/spec/models/deduct_loyalty_points_effect_props_spec.rb +6 -0
  108. data/spec/models/effect_entity_spec.rb +6 -0
  109. data/spec/models/effect_spec.rb +6 -0
  110. data/spec/models/import_spec.rb +0 -4
  111. data/spec/models/inline_response20027_spec.rb +0 -6
  112. data/spec/models/inline_response20028_spec.rb +6 -0
  113. data/spec/models/integration_request_spec.rb +1 -1
  114. data/spec/models/integration_state_v2_spec.rb +6 -0
  115. data/spec/models/limit_config_spec.rb +0 -4
  116. data/spec/models/loyalty_program_balance_spec.rb +24 -0
  117. data/spec/models/loyalty_program_ledgers_spec.rb +6 -0
  118. data/spec/models/new_application_api_key_spec.rb +1 -1
  119. data/spec/models/new_application_spec.rb +10 -0
  120. data/spec/models/new_coupons_for_multiple_recipients_spec.rb +83 -0
  121. data/spec/models/new_coupons_spec.rb +6 -6
  122. data/spec/models/{cart_item_adjustment_spec.rb → profile_audiences_changes_spec.rb} +8 -14
  123. data/spec/models/reject_coupon_effect_props_spec.rb +18 -0
  124. data/spec/models/reject_referral_effect_props_spec.rb +18 -0
  125. data/spec/models/rollback_added_loyalty_points_effect_props_spec.rb +65 -0
  126. data/spec/models/rollback_deducted_loyalty_points_effect_props_spec.rb +77 -0
  127. data/spec/models/{import_coupons_spec.rb → rollback_referral_effect_props_spec.rb} +7 -7
  128. data/spec/models/rule_failure_reason_spec.rb +107 -0
  129. data/spec/models/update_application_spec.rb +10 -0
  130. metadata +26 -14
  131. data/docs/CartItemAdjustment.md +0 -21
  132. data/docs/ImportCoupons.md +0 -17
  133. data/docs/NewImport.md +0 -17
  134. data/spec/models/new_import_spec.rb +0 -45
@@ -30,7 +30,7 @@ module TalonOne
30
30
  def self.openapi_types
31
31
  {
32
32
  :'total_result_size' => :'Integer',
33
- :'data' => :'Array<Attribute>'
33
+ :'data' => :'Array<Audience>'
34
34
  }
35
35
  end
36
36
 
@@ -70,10 +70,6 @@ module TalonOne
70
70
  # @return Array for valid properties with the reasons
71
71
  def list_invalid_properties
72
72
  invalid_properties = Array.new
73
- if @total_result_size.nil?
74
- invalid_properties.push('invalid value for "total_result_size", total_result_size cannot be nil.')
75
- end
76
-
77
73
  if @data.nil?
78
74
  invalid_properties.push('invalid value for "data", data cannot be nil.')
79
75
  end
@@ -84,7 +80,6 @@ module TalonOne
84
80
  # Check to see if the all the properties in the model are valid
85
81
  # @return true if the model is valid
86
82
  def valid?
87
- return false if @total_result_size.nil?
88
83
  return false if @data.nil?
89
84
  true
90
85
  end
@@ -30,7 +30,7 @@ module TalonOne
30
30
  def self.openapi_types
31
31
  {
32
32
  :'total_result_size' => :'Integer',
33
- :'data' => :'Array<AccountAdditionalCost>'
33
+ :'data' => :'Array<Attribute>'
34
34
  }
35
35
  end
36
36
 
@@ -30,7 +30,7 @@ module TalonOne
30
30
  def self.openapi_types
31
31
  {
32
32
  :'total_result_size' => :'Integer',
33
- :'data' => :'Array<Webhook>'
33
+ :'data' => :'Array<AccountAdditionalCost>'
34
34
  }
35
35
  end
36
36
 
@@ -30,7 +30,7 @@ module TalonOne
30
30
  def self.openapi_types
31
31
  {
32
32
  :'total_result_size' => :'Integer',
33
- :'data' => :'Array<WebhookActivationLogEntry>'
33
+ :'data' => :'Array<Webhook>'
34
34
  }
35
35
  end
36
36
 
@@ -30,7 +30,7 @@ module TalonOne
30
30
  def self.openapi_types
31
31
  {
32
32
  :'total_result_size' => :'Integer',
33
- :'data' => :'Array<WebhookLogEntry>'
33
+ :'data' => :'Array<WebhookActivationLogEntry>'
34
34
  }
35
35
  end
36
36
 
@@ -30,7 +30,7 @@ module TalonOne
30
30
  def self.openapi_types
31
31
  {
32
32
  :'total_result_size' => :'Integer',
33
- :'data' => :'Array<EventType>'
33
+ :'data' => :'Array<WebhookLogEntry>'
34
34
  }
35
35
  end
36
36
 
@@ -30,7 +30,7 @@ module TalonOne
30
30
  def self.openapi_types
31
31
  {
32
32
  :'total_result_size' => :'Integer',
33
- :'data' => :'Array<User>'
33
+ :'data' => :'Array<EventType>'
34
34
  }
35
35
  end
36
36
 
@@ -16,15 +16,12 @@ module TalonOne
16
16
  class InlineResponse20027
17
17
  attr_accessor :total_result_size
18
18
 
19
- attr_accessor :has_more
20
-
21
19
  attr_accessor :data
22
20
 
23
21
  # Attribute mapping from ruby-style variable name to JSON key.
24
22
  def self.attribute_map
25
23
  {
26
24
  :'total_result_size' => :'totalResultSize',
27
- :'has_more' => :'hasMore',
28
25
  :'data' => :'data'
29
26
  }
30
27
  end
@@ -33,8 +30,7 @@ module TalonOne
33
30
  def self.openapi_types
34
31
  {
35
32
  :'total_result_size' => :'Integer',
36
- :'has_more' => :'Boolean',
37
- :'data' => :'Array<Change>'
33
+ :'data' => :'Array<User>'
38
34
  }
39
35
  end
40
36
 
@@ -63,10 +59,6 @@ module TalonOne
63
59
  self.total_result_size = attributes[:'total_result_size']
64
60
  end
65
61
 
66
- if attributes.key?(:'has_more')
67
- self.has_more = attributes[:'has_more']
68
- end
69
-
70
62
  if attributes.key?(:'data')
71
63
  if (value = attributes[:'data']).is_a?(Array)
72
64
  self.data = value
@@ -78,6 +70,10 @@ module TalonOne
78
70
  # @return Array for valid properties with the reasons
79
71
  def list_invalid_properties
80
72
  invalid_properties = Array.new
73
+ if @total_result_size.nil?
74
+ invalid_properties.push('invalid value for "total_result_size", total_result_size cannot be nil.')
75
+ end
76
+
81
77
  if @data.nil?
82
78
  invalid_properties.push('invalid value for "data", data cannot be nil.')
83
79
  end
@@ -88,6 +84,7 @@ module TalonOne
88
84
  # Check to see if the all the properties in the model are valid
89
85
  # @return true if the model is valid
90
86
  def valid?
87
+ return false if @total_result_size.nil?
91
88
  return false if @data.nil?
92
89
  true
93
90
  end
@@ -98,7 +95,6 @@ module TalonOne
98
95
  return true if self.equal?(o)
99
96
  self.class == o.class &&
100
97
  total_result_size == o.total_result_size &&
101
- has_more == o.has_more &&
102
98
  data == o.data
103
99
  end
104
100
 
@@ -111,7 +107,7 @@ module TalonOne
111
107
  # Calculates hash code according to all attributes.
112
108
  # @return [Integer] Hash code
113
109
  def hash
114
- [total_result_size, has_more, data].hash
110
+ [total_result_size, data].hash
115
111
  end
116
112
 
117
113
  # Builds the object from hash
@@ -16,12 +16,15 @@ module TalonOne
16
16
  class InlineResponse20028
17
17
  attr_accessor :total_result_size
18
18
 
19
+ attr_accessor :has_more
20
+
19
21
  attr_accessor :data
20
22
 
21
23
  # Attribute mapping from ruby-style variable name to JSON key.
22
24
  def self.attribute_map
23
25
  {
24
26
  :'total_result_size' => :'totalResultSize',
27
+ :'has_more' => :'hasMore',
25
28
  :'data' => :'data'
26
29
  }
27
30
  end
@@ -30,7 +33,8 @@ module TalonOne
30
33
  def self.openapi_types
31
34
  {
32
35
  :'total_result_size' => :'Integer',
33
- :'data' => :'Array<Export>'
36
+ :'has_more' => :'Boolean',
37
+ :'data' => :'Array<Change>'
34
38
  }
35
39
  end
36
40
 
@@ -59,6 +63,10 @@ module TalonOne
59
63
  self.total_result_size = attributes[:'total_result_size']
60
64
  end
61
65
 
66
+ if attributes.key?(:'has_more')
67
+ self.has_more = attributes[:'has_more']
68
+ end
69
+
62
70
  if attributes.key?(:'data')
63
71
  if (value = attributes[:'data']).is_a?(Array)
64
72
  self.data = value
@@ -70,10 +78,6 @@ module TalonOne
70
78
  # @return Array for valid properties with the reasons
71
79
  def list_invalid_properties
72
80
  invalid_properties = Array.new
73
- if @total_result_size.nil?
74
- invalid_properties.push('invalid value for "total_result_size", total_result_size cannot be nil.')
75
- end
76
-
77
81
  if @data.nil?
78
82
  invalid_properties.push('invalid value for "data", data cannot be nil.')
79
83
  end
@@ -84,7 +88,6 @@ module TalonOne
84
88
  # Check to see if the all the properties in the model are valid
85
89
  # @return true if the model is valid
86
90
  def valid?
87
- return false if @total_result_size.nil?
88
91
  return false if @data.nil?
89
92
  true
90
93
  end
@@ -95,6 +98,7 @@ module TalonOne
95
98
  return true if self.equal?(o)
96
99
  self.class == o.class &&
97
100
  total_result_size == o.total_result_size &&
101
+ has_more == o.has_more &&
98
102
  data == o.data
99
103
  end
100
104
 
@@ -107,7 +111,7 @@ module TalonOne
107
111
  # Calculates hash code according to all attributes.
108
112
  # @return [Integer] Hash code
109
113
  def hash
110
- [total_result_size, data].hash
114
+ [total_result_size, has_more, data].hash
111
115
  end
112
116
 
113
117
  # Builds the object from hash
@@ -30,7 +30,7 @@ module TalonOne
30
30
  def self.openapi_types
31
31
  {
32
32
  :'total_result_size' => :'Integer',
33
- :'data' => :'Array<Import>'
33
+ :'data' => :'Array<Export>'
34
34
  }
35
35
  end
36
36
 
@@ -17,7 +17,7 @@ module TalonOne
17
17
  class IntegrationRequest
18
18
  attr_accessor :customer_session
19
19
 
20
- # Optional list of requested information to be present on the response related to the customer session update. Currently supported: \"customerSession\", \"customerProfile\", \"coupons\", \"triggeredCampaigns\", \"referral\", \"loyalty\" and \"event\".
20
+ # Optional list of requested information to be present on the response related to the customer session update. Currently supported: \"customerSession\", \"customerProfile\", \"coupons\", \"triggeredCampaigns\", \"referral\", \"loyalty\", \"event\" and \"ruleFailureReasons\".
21
21
  attr_accessor :response_content
22
22
 
23
23
  class EnumAttributeValidator
@@ -31,6 +31,8 @@ module TalonOne
31
31
 
32
32
  attr_accessor :effects
33
33
 
34
+ attr_accessor :rule_failure_reasons
35
+
34
36
  attr_accessor :created_coupons
35
37
 
36
38
  attr_accessor :created_referrals
@@ -46,6 +48,7 @@ module TalonOne
46
48
  :'coupons' => :'coupons',
47
49
  :'triggered_campaigns' => :'triggeredCampaigns',
48
50
  :'effects' => :'effects',
51
+ :'rule_failure_reasons' => :'ruleFailureReasons',
49
52
  :'created_coupons' => :'createdCoupons',
50
53
  :'created_referrals' => :'createdReferrals'
51
54
  }
@@ -62,6 +65,7 @@ module TalonOne
62
65
  :'coupons' => :'Array<Coupon>',
63
66
  :'triggered_campaigns' => :'Array<Campaign>',
64
67
  :'effects' => :'Array<Effect>',
68
+ :'rule_failure_reasons' => :'Array<RuleFailureReason>',
65
69
  :'created_coupons' => :'Array<Coupon>',
66
70
  :'created_referrals' => :'Array<Referral>'
67
71
  }
@@ -126,6 +130,12 @@ module TalonOne
126
130
  end
127
131
  end
128
132
 
133
+ if attributes.key?(:'rule_failure_reasons')
134
+ if (value = attributes[:'rule_failure_reasons']).is_a?(Array)
135
+ self.rule_failure_reasons = value
136
+ end
137
+ end
138
+
129
139
  if attributes.key?(:'created_coupons')
130
140
  if (value = attributes[:'created_coupons']).is_a?(Array)
131
141
  self.created_coupons = value
@@ -180,6 +190,7 @@ module TalonOne
180
190
  coupons == o.coupons &&
181
191
  triggered_campaigns == o.triggered_campaigns &&
182
192
  effects == o.effects &&
193
+ rule_failure_reasons == o.rule_failure_reasons &&
183
194
  created_coupons == o.created_coupons &&
184
195
  created_referrals == o.created_referrals
185
196
  end
@@ -193,7 +204,7 @@ module TalonOne
193
204
  # Calculates hash code according to all attributes.
194
205
  # @return [Integer] Hash code
195
206
  def hash
196
- [customer_session, customer_profile, event, loyalty, referral, coupons, triggered_campaigns, effects, created_coupons, created_referrals].hash
207
+ [customer_session, customer_profile, event, loyalty, referral, coupons, triggered_campaigns, effects, rule_failure_reasons, created_coupons, created_referrals].hash
197
208
  end
198
209
 
199
210
  # Builds the object from hash
@@ -126,24 +126,12 @@ module TalonOne
126
126
  # @return true if the model is valid
127
127
  def valid?
128
128
  return false if @action.nil?
129
- action_validator = EnumAttributeValidator.new('String', ["redeemCoupon", "redeemReferral", "setDiscount", "createCoupon", "setDiscountEffect"])
130
- return false unless action_validator.valid?(@action)
131
129
  return false if @limit.nil?
132
130
  return false if @limit < 0
133
131
  return false if @entities.nil?
134
132
  true
135
133
  end
136
134
 
137
- # Custom attribute writer method checking allowed values (enum).
138
- # @param [Object] action Object to be assigned
139
- def action=(action)
140
- validator = EnumAttributeValidator.new('String', ["redeemCoupon", "redeemReferral", "setDiscount", "createCoupon", "setDiscountEffect"])
141
- unless validator.valid?(action)
142
- fail ArgumentError, "invalid value for \"action\", must be one of #{validator.allowable_values}."
143
- end
144
- @action = action
145
- end
146
-
147
135
  # Custom attribute writer method with validation
148
136
  # @param [Object] limit Value to be assigned
149
137
  def limit=(limit)
@@ -102,6 +102,14 @@ module TalonOne
102
102
  invalid_properties.push('invalid value for "points", points cannot be nil.')
103
103
  end
104
104
 
105
+ if @points >= 1E+8
106
+ invalid_properties.push('invalid value for "points", must be smaller than 1E+8.')
107
+ end
108
+
109
+ if @points <= 0
110
+ invalid_properties.push('invalid value for "points", must be greater than 0.')
111
+ end
112
+
105
113
  invalid_properties
106
114
  end
107
115
 
@@ -109,9 +117,29 @@ module TalonOne
109
117
  # @return true if the model is valid
110
118
  def valid?
111
119
  return false if @points.nil?
120
+ return false if @points >= 1E+8
121
+ return false if @points <= 0
112
122
  true
113
123
  end
114
124
 
125
+ # Custom attribute writer method with validation
126
+ # @param [Object] points Value to be assigned
127
+ def points=(points)
128
+ if points.nil?
129
+ fail ArgumentError, 'points cannot be nil'
130
+ end
131
+
132
+ if points >= 1E+8
133
+ fail ArgumentError, 'invalid value for "points", must be smaller than 1E+8.'
134
+ end
135
+
136
+ if points <= 0
137
+ fail ArgumentError, 'invalid value for "points", must be greater than 0.'
138
+ end
139
+
140
+ @points = points
141
+ end
142
+
115
143
  # Checks equality by comparing each attribute.
116
144
  # @param [Object] Object to be compared
117
145
  def ==(o)
@@ -15,19 +15,40 @@ require 'date'
15
15
  module TalonOne
16
16
  # The balance in a Loyalty Program for some Customer.
17
17
  class LoyaltyProgramBalance
18
+ # Sum of current active points amounts
18
19
  attr_accessor :current_balance
19
20
 
21
+ # Sum of pending points amounts
22
+ attr_accessor :pending_balance
23
+
24
+ # Sum of expired points amounts
25
+ attr_accessor :expired_balance
26
+
27
+ # Sum of spent points amounts
28
+ attr_accessor :spent_balance
29
+
30
+ # Sum of current active points amounts, including additions and deductions on open sessions
31
+ attr_accessor :tentative_current_balance
32
+
20
33
  # Attribute mapping from ruby-style variable name to JSON key.
21
34
  def self.attribute_map
22
35
  {
23
- :'current_balance' => :'currentBalance'
36
+ :'current_balance' => :'currentBalance',
37
+ :'pending_balance' => :'pendingBalance',
38
+ :'expired_balance' => :'expiredBalance',
39
+ :'spent_balance' => :'spentBalance',
40
+ :'tentative_current_balance' => :'tentativeCurrentBalance'
24
41
  }
25
42
  end
26
43
 
27
44
  # Attribute type mapping.
28
45
  def self.openapi_types
29
46
  {
30
- :'current_balance' => :'Float'
47
+ :'current_balance' => :'Float',
48
+ :'pending_balance' => :'Float',
49
+ :'expired_balance' => :'Float',
50
+ :'spent_balance' => :'Float',
51
+ :'tentative_current_balance' => :'Float'
31
52
  }
32
53
  end
33
54
 
@@ -55,6 +76,22 @@ module TalonOne
55
76
  if attributes.key?(:'current_balance')
56
77
  self.current_balance = attributes[:'current_balance']
57
78
  end
79
+
80
+ if attributes.key?(:'pending_balance')
81
+ self.pending_balance = attributes[:'pending_balance']
82
+ end
83
+
84
+ if attributes.key?(:'expired_balance')
85
+ self.expired_balance = attributes[:'expired_balance']
86
+ end
87
+
88
+ if attributes.key?(:'spent_balance')
89
+ self.spent_balance = attributes[:'spent_balance']
90
+ end
91
+
92
+ if attributes.key?(:'tentative_current_balance')
93
+ self.tentative_current_balance = attributes[:'tentative_current_balance']
94
+ end
58
95
  end
59
96
 
60
97
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -65,6 +102,22 @@ module TalonOne
65
102
  invalid_properties.push('invalid value for "current_balance", current_balance cannot be nil.')
66
103
  end
67
104
 
105
+ if @pending_balance.nil?
106
+ invalid_properties.push('invalid value for "pending_balance", pending_balance cannot be nil.')
107
+ end
108
+
109
+ if @expired_balance.nil?
110
+ invalid_properties.push('invalid value for "expired_balance", expired_balance cannot be nil.')
111
+ end
112
+
113
+ if @spent_balance.nil?
114
+ invalid_properties.push('invalid value for "spent_balance", spent_balance cannot be nil.')
115
+ end
116
+
117
+ if @tentative_current_balance.nil?
118
+ invalid_properties.push('invalid value for "tentative_current_balance", tentative_current_balance cannot be nil.')
119
+ end
120
+
68
121
  invalid_properties
69
122
  end
70
123
 
@@ -72,6 +125,10 @@ module TalonOne
72
125
  # @return true if the model is valid
73
126
  def valid?
74
127
  return false if @current_balance.nil?
128
+ return false if @pending_balance.nil?
129
+ return false if @expired_balance.nil?
130
+ return false if @spent_balance.nil?
131
+ return false if @tentative_current_balance.nil?
75
132
  true
76
133
  end
77
134
 
@@ -80,7 +137,11 @@ module TalonOne
80
137
  def ==(o)
81
138
  return true if self.equal?(o)
82
139
  self.class == o.class &&
83
- current_balance == o.current_balance
140
+ current_balance == o.current_balance &&
141
+ pending_balance == o.pending_balance &&
142
+ expired_balance == o.expired_balance &&
143
+ spent_balance == o.spent_balance &&
144
+ tentative_current_balance == o.tentative_current_balance
84
145
  end
85
146
 
86
147
  # @see the `==` method
@@ -92,7 +153,7 @@ module TalonOne
92
153
  # Calculates hash code according to all attributes.
93
154
  # @return [Integer] Hash code
94
155
  def hash
95
- [current_balance].hash
156
+ [current_balance, pending_balance, expired_balance, spent_balance, tentative_current_balance].hash
96
157
  end
97
158
 
98
159
  # Builds the object from hash