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
@@ -153,17 +153,47 @@ module TalonOne
153
153
  # @return Array for valid properties with the reasons
154
154
  def list_invalid_properties
155
155
  invalid_properties = Array.new
156
+ if !@coupon.nil? && @coupon.to_s.length > 100
157
+ invalid_properties.push('invalid value for "coupon", the character length must be smaller than or equal to 100.')
158
+ end
159
+
160
+ if !@referral.nil? && @referral.to_s.length > 100
161
+ invalid_properties.push('invalid value for "referral", the character length must be smaller than or equal to 100.')
162
+ end
163
+
156
164
  invalid_properties
157
165
  end
158
166
 
159
167
  # Check to see if the all the properties in the model are valid
160
168
  # @return true if the model is valid
161
169
  def valid?
170
+ return false if !@coupon.nil? && @coupon.to_s.length > 100
171
+ return false if !@referral.nil? && @referral.to_s.length > 100
162
172
  state_validator = EnumAttributeValidator.new('String', ["open", "closed", "cancelled"])
163
173
  return false unless state_validator.valid?(@state)
164
174
  true
165
175
  end
166
176
 
177
+ # Custom attribute writer method with validation
178
+ # @param [Object] coupon Value to be assigned
179
+ def coupon=(coupon)
180
+ if !coupon.nil? && coupon.to_s.length > 100
181
+ fail ArgumentError, 'invalid value for "coupon", the character length must be smaller than or equal to 100.'
182
+ end
183
+
184
+ @coupon = coupon
185
+ end
186
+
187
+ # Custom attribute writer method with validation
188
+ # @param [Object] referral Value to be assigned
189
+ def referral=(referral)
190
+ if !referral.nil? && referral.to_s.length > 100
191
+ fail ArgumentError, 'invalid value for "referral", the character length must be smaller than or equal to 100.'
192
+ end
193
+
194
+ @referral = referral
195
+ end
196
+
167
197
  # Custom attribute writer method checking allowed values (enum).
168
198
  # @param [Object] state Object to be assigned
169
199
  def state=(state)
@@ -157,17 +157,32 @@ module TalonOne
157
157
  # @return Array for valid properties with the reasons
158
158
  def list_invalid_properties
159
159
  invalid_properties = Array.new
160
+ if !@referral_code.nil? && @referral_code.to_s.length > 100
161
+ invalid_properties.push('invalid value for "referral_code", the character length must be smaller than or equal to 100.')
162
+ end
163
+
160
164
  invalid_properties
161
165
  end
162
166
 
163
167
  # Check to see if the all the properties in the model are valid
164
168
  # @return true if the model is valid
165
169
  def valid?
170
+ return false if !@referral_code.nil? && @referral_code.to_s.length > 100
166
171
  state_validator = EnumAttributeValidator.new('String', ["open", "closed", "cancelled"])
167
172
  return false unless state_validator.valid?(@state)
168
173
  true
169
174
  end
170
175
 
176
+ # Custom attribute writer method with validation
177
+ # @param [Object] referral_code Value to be assigned
178
+ def referral_code=(referral_code)
179
+ if !referral_code.nil? && referral_code.to_s.length > 100
180
+ fail ArgumentError, 'invalid value for "referral_code", the character length must be smaller than or equal to 100.'
181
+ end
182
+
183
+ @referral_code = referral_code
184
+ end
185
+
171
186
  # Custom attribute writer method checking allowed values (enum).
172
187
  # @param [Object] state Object to be assigned
173
188
  def state=(state)
@@ -13,44 +13,26 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module TalonOne
16
- #
17
- class NewImport
18
- # The name of the entity that was imported.
19
- attr_accessor :entity
20
-
21
- class EnumAttributeValidator
22
- attr_reader :datatype
23
- attr_reader :allowable_values
24
-
25
- def initialize(datatype, allowable_values)
26
- @allowable_values = allowable_values.map do |value|
27
- case datatype.to_s
28
- when /Integer/i
29
- value.to_i
30
- when /Float/i
31
- value.to_f
32
- else
33
- value
34
- end
35
- end
36
- end
16
+ class ProfileAudiencesChanges
17
+ # The IDs of the audiences for the customer to join.
18
+ attr_accessor :adds
37
19
 
38
- def valid?(value)
39
- !value || allowable_values.include?(value)
40
- end
41
- end
20
+ # The IDs of the audiences for the customer to leave.
21
+ attr_accessor :deletes
42
22
 
43
23
  # Attribute mapping from ruby-style variable name to JSON key.
44
24
  def self.attribute_map
45
25
  {
46
- :'entity' => :'entity'
26
+ :'adds' => :'adds',
27
+ :'deletes' => :'deletes'
47
28
  }
48
29
  end
49
30
 
50
31
  # Attribute type mapping.
51
32
  def self.openapi_types
52
33
  {
53
- :'entity' => :'String'
34
+ :'adds' => :'Array<Integer>',
35
+ :'deletes' => :'Array<Integer>'
54
36
  }
55
37
  end
56
38
 
@@ -64,19 +46,27 @@ module TalonOne
64
46
  # @param [Hash] attributes Model attributes in the form of hash
65
47
  def initialize(attributes = {})
66
48
  if (!attributes.is_a?(Hash))
67
- fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::NewImport` initialize method"
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::ProfileAudiencesChanges` initialize method"
68
50
  end
69
51
 
70
52
  # check to see if the attribute exists and convert string to symbol for hash key
71
53
  attributes = attributes.each_with_object({}) { |(k, v), h|
72
54
  if (!self.class.attribute_map.key?(k.to_sym))
73
- fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::NewImport`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::ProfileAudiencesChanges`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
56
  end
75
57
  h[k.to_sym] = v
76
58
  }
77
59
 
78
- if attributes.key?(:'entity')
79
- self.entity = attributes[:'entity']
60
+ if attributes.key?(:'adds')
61
+ if (value = attributes[:'adds']).is_a?(Array)
62
+ self.adds = value
63
+ end
64
+ end
65
+
66
+ if attributes.key?(:'deletes')
67
+ if (value = attributes[:'deletes']).is_a?(Array)
68
+ self.deletes = value
69
+ end
80
70
  end
81
71
  end
82
72
 
@@ -84,8 +74,12 @@ module TalonOne
84
74
  # @return Array for valid properties with the reasons
85
75
  def list_invalid_properties
86
76
  invalid_properties = Array.new
87
- if @entity.nil?
88
- invalid_properties.push('invalid value for "entity", entity cannot be nil.')
77
+ if @adds.nil?
78
+ invalid_properties.push('invalid value for "adds", adds cannot be nil.')
79
+ end
80
+
81
+ if @deletes.nil?
82
+ invalid_properties.push('invalid value for "deletes", deletes cannot be nil.')
89
83
  end
90
84
 
91
85
  invalid_properties
@@ -94,28 +88,18 @@ module TalonOne
94
88
  # Check to see if the all the properties in the model are valid
95
89
  # @return true if the model is valid
96
90
  def valid?
97
- return false if @entity.nil?
98
- entity_validator = EnumAttributeValidator.new('String', ["Coupon"])
99
- return false unless entity_validator.valid?(@entity)
91
+ return false if @adds.nil?
92
+ return false if @deletes.nil?
100
93
  true
101
94
  end
102
95
 
103
- # Custom attribute writer method checking allowed values (enum).
104
- # @param [Object] entity Object to be assigned
105
- def entity=(entity)
106
- validator = EnumAttributeValidator.new('String', ["Coupon"])
107
- unless validator.valid?(entity)
108
- fail ArgumentError, "invalid value for \"entity\", must be one of #{validator.allowable_values}."
109
- end
110
- @entity = entity
111
- end
112
-
113
96
  # Checks equality by comparing each attribute.
114
97
  # @param [Object] Object to be compared
115
98
  def ==(o)
116
99
  return true if self.equal?(o)
117
100
  self.class == o.class &&
118
- entity == o.entity
101
+ adds == o.adds &&
102
+ deletes == o.deletes
119
103
  end
120
104
 
121
105
  # @see the `==` method
@@ -127,7 +111,7 @@ module TalonOne
127
111
  # Calculates hash code according to all attributes.
128
112
  # @return [Integer] Hash code
129
113
  def hash
130
- [entity].hash
114
+ [adds, deletes].hash
131
115
  end
132
116
 
133
117
  # Builds the object from hash
@@ -21,11 +21,23 @@ module TalonOne
21
21
  # The reason why this coupon was rejected
22
22
  attr_accessor :rejection_reason
23
23
 
24
+ # The index of the condition that caused the rejection of the coupon
25
+ attr_accessor :condition_index
26
+
27
+ # The index of the effect that caused the rejection of the coupon
28
+ attr_accessor :effect_index
29
+
30
+ # More details about the failure
31
+ attr_accessor :details
32
+
24
33
  # Attribute mapping from ruby-style variable name to JSON key.
25
34
  def self.attribute_map
26
35
  {
27
36
  :'value' => :'value',
28
- :'rejection_reason' => :'rejectionReason'
37
+ :'rejection_reason' => :'rejectionReason',
38
+ :'condition_index' => :'conditionIndex',
39
+ :'effect_index' => :'effectIndex',
40
+ :'details' => :'details'
29
41
  }
30
42
  end
31
43
 
@@ -33,7 +45,10 @@ module TalonOne
33
45
  def self.openapi_types
34
46
  {
35
47
  :'value' => :'String',
36
- :'rejection_reason' => :'String'
48
+ :'rejection_reason' => :'String',
49
+ :'condition_index' => :'Integer',
50
+ :'effect_index' => :'Integer',
51
+ :'details' => :'String'
37
52
  }
38
53
  end
39
54
 
@@ -65,6 +80,18 @@ module TalonOne
65
80
  if attributes.key?(:'rejection_reason')
66
81
  self.rejection_reason = attributes[:'rejection_reason']
67
82
  end
83
+
84
+ if attributes.key?(:'condition_index')
85
+ self.condition_index = attributes[:'condition_index']
86
+ end
87
+
88
+ if attributes.key?(:'effect_index')
89
+ self.effect_index = attributes[:'effect_index']
90
+ end
91
+
92
+ if attributes.key?(:'details')
93
+ self.details = attributes[:'details']
94
+ end
68
95
  end
69
96
 
70
97
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -96,7 +123,10 @@ module TalonOne
96
123
  return true if self.equal?(o)
97
124
  self.class == o.class &&
98
125
  value == o.value &&
99
- rejection_reason == o.rejection_reason
126
+ rejection_reason == o.rejection_reason &&
127
+ condition_index == o.condition_index &&
128
+ effect_index == o.effect_index &&
129
+ details == o.details
100
130
  end
101
131
 
102
132
  # @see the `==` method
@@ -108,7 +138,7 @@ module TalonOne
108
138
  # Calculates hash code according to all attributes.
109
139
  # @return [Integer] Hash code
110
140
  def hash
111
- [value, rejection_reason].hash
141
+ [value, rejection_reason, condition_index, effect_index, details].hash
112
142
  end
113
143
 
114
144
  # Builds the object from hash
@@ -21,11 +21,23 @@ module TalonOne
21
21
  # The reason why this referral code was rejected
22
22
  attr_accessor :rejection_reason
23
23
 
24
+ # The index of the condition that caused the rejection of the referral
25
+ attr_accessor :condition_index
26
+
27
+ # The index of the effect that caused the rejection of the referral
28
+ attr_accessor :effect_index
29
+
30
+ # More details about the failure
31
+ attr_accessor :details
32
+
24
33
  # Attribute mapping from ruby-style variable name to JSON key.
25
34
  def self.attribute_map
26
35
  {
27
36
  :'value' => :'value',
28
- :'rejection_reason' => :'rejectionReason'
37
+ :'rejection_reason' => :'rejectionReason',
38
+ :'condition_index' => :'conditionIndex',
39
+ :'effect_index' => :'effectIndex',
40
+ :'details' => :'details'
29
41
  }
30
42
  end
31
43
 
@@ -33,7 +45,10 @@ module TalonOne
33
45
  def self.openapi_types
34
46
  {
35
47
  :'value' => :'String',
36
- :'rejection_reason' => :'String'
48
+ :'rejection_reason' => :'String',
49
+ :'condition_index' => :'Integer',
50
+ :'effect_index' => :'Integer',
51
+ :'details' => :'String'
37
52
  }
38
53
  end
39
54
 
@@ -65,6 +80,18 @@ module TalonOne
65
80
  if attributes.key?(:'rejection_reason')
66
81
  self.rejection_reason = attributes[:'rejection_reason']
67
82
  end
83
+
84
+ if attributes.key?(:'condition_index')
85
+ self.condition_index = attributes[:'condition_index']
86
+ end
87
+
88
+ if attributes.key?(:'effect_index')
89
+ self.effect_index = attributes[:'effect_index']
90
+ end
91
+
92
+ if attributes.key?(:'details')
93
+ self.details = attributes[:'details']
94
+ end
68
95
  end
69
96
 
70
97
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -96,7 +123,10 @@ module TalonOne
96
123
  return true if self.equal?(o)
97
124
  self.class == o.class &&
98
125
  value == o.value &&
99
- rejection_reason == o.rejection_reason
126
+ rejection_reason == o.rejection_reason &&
127
+ condition_index == o.condition_index &&
128
+ effect_index == o.effect_index &&
129
+ details == o.details
100
130
  end
101
131
 
102
132
  # @see the `==` method
@@ -108,7 +138,7 @@ module TalonOne
108
138
  # Calculates hash code according to all attributes.
109
139
  # @return [Integer] Hash code
110
140
  def hash
111
- [value, rejection_reason].hash
141
+ [value, rejection_reason, condition_index, effect_index, details].hash
112
142
  end
113
143
 
114
144
  # Builds the object from hash
@@ -13,31 +13,42 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module TalonOne
16
- class CartItemAdjustment
17
- # Loyalty Program to be used for payment
18
- attr_accessor :pay_from_loyalty_program
16
+ # The properties specific to the \"rollbackAddedLoyaltyPoints\" effect. This gets triggered whenever previously a closed session with an addLoyaltyPoints effect is cancelled.
17
+ class RollbackAddedLoyaltyPointsEffectProps
18
+ # The ID of the loyalty program where the points were originally added
19
+ attr_accessor :program_id
19
20
 
20
- # Amount of points to be spend
21
- attr_accessor :point_payment
21
+ # The ID of the subledger within the loyalty program where these points were originally added
22
+ attr_accessor :sub_ledger_id
22
23
 
23
- # Remaining price in currency after payment in points has been made
24
- attr_accessor :remaining_price
24
+ # The amount of points that were rolled back
25
+ attr_accessor :value
26
+
27
+ # The user for whom these points were originally added
28
+ attr_accessor :recipient_integration_id
29
+
30
+ # The identifier of 'deduction' entry added to the ledger as the `addLoyaltyPoints` effect is rolled back.
31
+ attr_accessor :transaction_uuid
25
32
 
26
33
  # Attribute mapping from ruby-style variable name to JSON key.
27
34
  def self.attribute_map
28
35
  {
29
- :'pay_from_loyalty_program' => :'payFromLoyaltyProgram',
30
- :'point_payment' => :'pointPayment',
31
- :'remaining_price' => :'remainingPrice'
36
+ :'program_id' => :'programId',
37
+ :'sub_ledger_id' => :'subLedgerId',
38
+ :'value' => :'value',
39
+ :'recipient_integration_id' => :'recipientIntegrationId',
40
+ :'transaction_uuid' => :'transactionUUID'
32
41
  }
33
42
  end
34
43
 
35
44
  # Attribute type mapping.
36
45
  def self.openapi_types
37
46
  {
38
- :'pay_from_loyalty_program' => :'Integer',
39
- :'point_payment' => :'Integer',
40
- :'remaining_price' => :'Float'
47
+ :'program_id' => :'Integer',
48
+ :'sub_ledger_id' => :'String',
49
+ :'value' => :'Float',
50
+ :'recipient_integration_id' => :'String',
51
+ :'transaction_uuid' => :'String'
41
52
  }
42
53
  end
43
54
 
@@ -51,27 +62,35 @@ module TalonOne
51
62
  # @param [Hash] attributes Model attributes in the form of hash
52
63
  def initialize(attributes = {})
53
64
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::CartItemAdjustment` initialize method"
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::RollbackAddedLoyaltyPointsEffectProps` initialize method"
55
66
  end
56
67
 
57
68
  # check to see if the attribute exists and convert string to symbol for hash key
58
69
  attributes = attributes.each_with_object({}) { |(k, v), h|
59
70
  if (!self.class.attribute_map.key?(k.to_sym))
60
- fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::CartItemAdjustment`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::RollbackAddedLoyaltyPointsEffectProps`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
72
  end
62
73
  h[k.to_sym] = v
63
74
  }
64
75
 
65
- if attributes.key?(:'pay_from_loyalty_program')
66
- self.pay_from_loyalty_program = attributes[:'pay_from_loyalty_program']
76
+ if attributes.key?(:'program_id')
77
+ self.program_id = attributes[:'program_id']
67
78
  end
68
79
 
69
- if attributes.key?(:'point_payment')
70
- self.point_payment = attributes[:'point_payment']
80
+ if attributes.key?(:'sub_ledger_id')
81
+ self.sub_ledger_id = attributes[:'sub_ledger_id']
71
82
  end
72
83
 
73
- if attributes.key?(:'remaining_price')
74
- self.remaining_price = attributes[:'remaining_price']
84
+ if attributes.key?(:'value')
85
+ self.value = attributes[:'value']
86
+ end
87
+
88
+ if attributes.key?(:'recipient_integration_id')
89
+ self.recipient_integration_id = attributes[:'recipient_integration_id']
90
+ end
91
+
92
+ if attributes.key?(:'transaction_uuid')
93
+ self.transaction_uuid = attributes[:'transaction_uuid']
75
94
  end
76
95
  end
77
96
 
@@ -79,20 +98,24 @@ module TalonOne
79
98
  # @return Array for valid properties with the reasons
80
99
  def list_invalid_properties
81
100
  invalid_properties = Array.new
82
- if @pay_from_loyalty_program.nil?
83
- invalid_properties.push('invalid value for "pay_from_loyalty_program", pay_from_loyalty_program cannot be nil.')
101
+ if @program_id.nil?
102
+ invalid_properties.push('invalid value for "program_id", program_id cannot be nil.')
103
+ end
104
+
105
+ if @sub_ledger_id.nil?
106
+ invalid_properties.push('invalid value for "sub_ledger_id", sub_ledger_id cannot be nil.')
84
107
  end
85
108
 
86
- if @point_payment.nil?
87
- invalid_properties.push('invalid value for "point_payment", point_payment cannot be nil.')
109
+ if @value.nil?
110
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
88
111
  end
89
112
 
90
- if @point_payment < 1
91
- invalid_properties.push('invalid value for "point_payment", must be greater than or equal to 1.')
113
+ if @recipient_integration_id.nil?
114
+ invalid_properties.push('invalid value for "recipient_integration_id", recipient_integration_id cannot be nil.')
92
115
  end
93
116
 
94
- if !@remaining_price.nil? && @remaining_price < 0
95
- invalid_properties.push('invalid value for "remaining_price", must be greater than or equal to 0.')
117
+ if @transaction_uuid.nil?
118
+ invalid_properties.push('invalid value for "transaction_uuid", transaction_uuid cannot be nil.')
96
119
  end
97
120
 
98
121
  invalid_properties
@@ -101,45 +124,24 @@ module TalonOne
101
124
  # Check to see if the all the properties in the model are valid
102
125
  # @return true if the model is valid
103
126
  def valid?
104
- return false if @pay_from_loyalty_program.nil?
105
- return false if @point_payment.nil?
106
- return false if @point_payment < 1
107
- return false if !@remaining_price.nil? && @remaining_price < 0
127
+ return false if @program_id.nil?
128
+ return false if @sub_ledger_id.nil?
129
+ return false if @value.nil?
130
+ return false if @recipient_integration_id.nil?
131
+ return false if @transaction_uuid.nil?
108
132
  true
109
133
  end
110
134
 
111
- # Custom attribute writer method with validation
112
- # @param [Object] point_payment Value to be assigned
113
- def point_payment=(point_payment)
114
- if point_payment.nil?
115
- fail ArgumentError, 'point_payment cannot be nil'
116
- end
117
-
118
- if point_payment < 1
119
- fail ArgumentError, 'invalid value for "point_payment", must be greater than or equal to 1.'
120
- end
121
-
122
- @point_payment = point_payment
123
- end
124
-
125
- # Custom attribute writer method with validation
126
- # @param [Object] remaining_price Value to be assigned
127
- def remaining_price=(remaining_price)
128
- if !remaining_price.nil? && remaining_price < 0
129
- fail ArgumentError, 'invalid value for "remaining_price", must be greater than or equal to 0.'
130
- end
131
-
132
- @remaining_price = remaining_price
133
- end
134
-
135
135
  # Checks equality by comparing each attribute.
136
136
  # @param [Object] Object to be compared
137
137
  def ==(o)
138
138
  return true if self.equal?(o)
139
139
  self.class == o.class &&
140
- pay_from_loyalty_program == o.pay_from_loyalty_program &&
141
- point_payment == o.point_payment &&
142
- remaining_price == o.remaining_price
140
+ program_id == o.program_id &&
141
+ sub_ledger_id == o.sub_ledger_id &&
142
+ value == o.value &&
143
+ recipient_integration_id == o.recipient_integration_id &&
144
+ transaction_uuid == o.transaction_uuid
143
145
  end
144
146
 
145
147
  # @see the `==` method
@@ -151,7 +153,7 @@ module TalonOne
151
153
  # Calculates hash code according to all attributes.
152
154
  # @return [Integer] Hash code
153
155
  def hash
154
- [pay_from_loyalty_program, point_payment, remaining_price].hash
156
+ [program_id, sub_ledger_id, value, recipient_integration_id, transaction_uuid].hash
155
157
  end
156
158
 
157
159
  # Builds the object from hash