voucherify 7.0.0 → 8.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +1 -1
  3. data/EXAMPLES.md +3 -3
  4. data/Gemfile.lock +2 -2
  5. data/README.md +12 -5
  6. data/docs/CampaignsCreateRequestBody.md +1 -1
  7. data/docs/CampaignsImportVoucherItem.md +1 -1
  8. data/docs/CampaignsUpdateRequestBody.md +1 -1
  9. data/docs/ClientValidationsValidateResponseBodyRedeemablesItem.md +3 -1
  10. data/docs/ClientValidationsValidateResponseBodyRedeemablesItemResultDetails.md +1 -1
  11. data/docs/Discount.md +1 -1
  12. data/docs/DiscountProduct.md +10 -0
  13. data/docs/EarningRuleLoyalty.md +1 -1
  14. data/docs/ExportParameters.md +1 -1
  15. data/docs/ExportsCreateRequestBodyParameters.md +1 -1
  16. data/docs/ExportsCreateResponseBodyParameters.md +1 -1
  17. data/docs/ExportsGetResponseBodyParameters.md +1 -1
  18. data/docs/LoyaltiesEarningRulesCreateRequestBodyItem.md +1 -1
  19. data/docs/LoyaltiesEarningRulesCreateRequestBodyItemLoyalty.md +2 -2
  20. data/docs/LoyaltiesEarningRulesCreateResponseBodyLoyalty.md +1 -1
  21. data/docs/LoyaltiesEarningRulesDisableResponseBodyLoyalty.md +1 -1
  22. data/docs/LoyaltiesEarningRulesEnableResponseBodyLoyalty.md +1 -1
  23. data/docs/LoyaltiesEarningRulesGetResponseBodyLoyalty.md +1 -1
  24. data/docs/LoyaltiesEarningRulesUpdateRequestBodyLoyalty.md +1 -1
  25. data/docs/LoyaltiesEarningRulesUpdateResponseBodyLoyalty.md +1 -1
  26. data/docs/ProductCollectionsProductsListResponseBodyDataItem.md +1 -1
  27. data/docs/PublicationsCreateRequestBody.md +1 -1
  28. data/docs/PublicationsCreateResponseBody.md +1 -1
  29. data/docs/RedemptionEntry.md +1 -1
  30. data/docs/RedemptionEntryCustomer.md +1 -1
  31. data/docs/RedemptionEntryOrder.md +2 -2
  32. data/docs/RedemptionEntryPromotionTier.md +1 -1
  33. data/docs/RedemptionEntryVoucher.md +1 -1
  34. data/docs/RedemptionsGetResponseBody.md +1 -1
  35. data/docs/RedemptionsGetResponseBodyCustomer.md +1 -1
  36. data/docs/RedemptionsGetResponseBodyOrder.md +2 -2
  37. data/docs/RedemptionsGetResponseBodyPromotionTier.md +1 -1
  38. data/docs/RedemptionsGetResponseBodyVoucher.md +1 -1
  39. data/docs/RedemptionsListResponseBodyRedemptionsItem.md +1 -1
  40. data/docs/RedemptionsListResponseBodyRedemptionsItemCustomer.md +1 -1
  41. data/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md +2 -2
  42. data/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTier.md +1 -1
  43. data/docs/RedemptionsListResponseBodyRedemptionsItemVoucher.md +1 -1
  44. data/docs/RewardsCreateRequestBody.md +1 -1
  45. data/docs/RewardsUpdateRequestBody.md +1 -1
  46. data/docs/ValidationsRedeemableInapplicable.md +2 -0
  47. data/docs/ValidationsRedeemableSkipped.md +2 -0
  48. data/docs/ValidationsValidateResponseBodyRedeemablesItem.md +3 -1
  49. data/docs/ValidationsValidateResponseBodyRedeemablesItemResultDetails.md +1 -1
  50. data/docs/VouchersApi.md +2 -2
  51. data/docs/VouchersCreateRequestBody.md +27 -0
  52. data/docs/VouchersCreateRequestBodyRedemption.md +8 -0
  53. data/docs/VouchersCreateWithSpecificCodeRequestBody.md +1 -1
  54. data/docs/VouchersImportCreateItemRequestBody.md +1 -1
  55. data/docs/VouchersUpdateRequestBody.md +1 -1
  56. data/lib/VoucherifySdk/api/vouchers_api.rb +3 -3
  57. data/lib/VoucherifySdk/models/campaigns_create_request_body.rb +1 -0
  58. data/lib/VoucherifySdk/models/campaigns_import_voucher_item.rb +1 -0
  59. data/lib/VoucherifySdk/models/campaigns_update_request_body.rb +1 -0
  60. data/lib/VoucherifySdk/models/client_validations_validate_response_body_redeemables_item.rb +29 -5
  61. data/lib/VoucherifySdk/models/client_validations_validate_response_body_redeemables_item_result_details.rb +13 -13
  62. data/lib/VoucherifySdk/models/discount.rb +2 -1
  63. data/lib/VoucherifySdk/models/{export_parameters_filters.rb → discount_product.rb} +26 -51
  64. data/lib/VoucherifySdk/models/earning_rule_loyalty.rb +17 -17
  65. data/lib/VoucherifySdk/models/export_parameters.rb +3 -2
  66. data/lib/VoucherifySdk/models/exports_create_request_body_parameters.rb +3 -2
  67. data/lib/VoucherifySdk/models/exports_create_response_body_parameters.rb +3 -2
  68. data/lib/VoucherifySdk/models/exports_get_response_body_parameters.rb +3 -2
  69. data/lib/VoucherifySdk/models/loyalties_earning_rules_create_request_body_item.rb +2 -0
  70. data/lib/VoucherifySdk/models/loyalties_earning_rules_create_request_body_item_loyalty.rb +22 -22
  71. data/lib/VoucherifySdk/models/loyalties_earning_rules_create_response_body_loyalty.rb +17 -17
  72. data/lib/VoucherifySdk/models/loyalties_earning_rules_disable_response_body_loyalty.rb +17 -17
  73. data/lib/VoucherifySdk/models/loyalties_earning_rules_enable_response_body_loyalty.rb +17 -17
  74. data/lib/VoucherifySdk/models/loyalties_earning_rules_get_response_body_loyalty.rb +17 -17
  75. data/lib/VoucherifySdk/models/loyalties_earning_rules_update_request_body_loyalty.rb +17 -17
  76. data/lib/VoucherifySdk/models/loyalties_earning_rules_update_response_body_loyalty.rb +17 -17
  77. data/lib/VoucherifySdk/models/product_collections_products_list_response_body_data_item.rb +1 -0
  78. data/lib/VoucherifySdk/models/publications_create_request_body.rb +1 -0
  79. data/lib/VoucherifySdk/models/publications_create_response_body.rb +1 -0
  80. data/lib/VoucherifySdk/models/redemption_entry.rb +1 -0
  81. data/lib/VoucherifySdk/models/redemption_entry_customer.rb +1 -0
  82. data/lib/VoucherifySdk/models/redemption_entry_order.rb +5 -2
  83. data/lib/VoucherifySdk/models/redemption_entry_promotion_tier.rb +1 -0
  84. data/lib/VoucherifySdk/models/redemption_entry_voucher.rb +1 -0
  85. data/lib/VoucherifySdk/models/redemptions_get_response_body.rb +1 -0
  86. data/lib/VoucherifySdk/models/redemptions_get_response_body_customer.rb +1 -0
  87. data/lib/VoucherifySdk/models/redemptions_get_response_body_order.rb +5 -2
  88. data/lib/VoucherifySdk/models/redemptions_get_response_body_promotion_tier.rb +1 -0
  89. data/lib/VoucherifySdk/models/redemptions_get_response_body_voucher.rb +1 -0
  90. data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item.rb +2 -0
  91. data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_customer.rb +2 -0
  92. data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_order.rb +7 -2
  93. data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_promotion_tier.rb +2 -0
  94. data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_voucher.rb +2 -0
  95. data/lib/VoucherifySdk/models/rewards_create_request_body.rb +1 -0
  96. data/lib/VoucherifySdk/models/rewards_update_request_body.rb +1 -0
  97. data/lib/VoucherifySdk/models/validations_redeemable_inapplicable.rb +27 -5
  98. data/lib/VoucherifySdk/models/validations_redeemable_skipped.rb +27 -5
  99. data/lib/VoucherifySdk/models/validations_validate_response_body_redeemables_item.rb +29 -5
  100. data/lib/VoucherifySdk/models/validations_validate_response_body_redeemables_item_result_details.rb +13 -13
  101. data/lib/VoucherifySdk/models/vouchers_create_request_body.rb +431 -0
  102. data/lib/VoucherifySdk/models/{exports_get_response_body_parameters_filters.rb → vouchers_create_request_body_redemption.rb} +10 -57
  103. data/lib/VoucherifySdk/models/vouchers_create_with_specific_code_request_body.rb +1 -0
  104. data/lib/VoucherifySdk/models/vouchers_import_create_item_request_body.rb +1 -0
  105. data/lib/VoucherifySdk/models/vouchers_update_request_body.rb +1 -0
  106. data/lib/VoucherifySdk/version.rb +1 -1
  107. data/lib/VoucherifySdk.rb +3 -4
  108. metadata +8 -10
  109. data/docs/ExportParametersFilters.md +0 -11
  110. data/docs/ExportsCreateRequestBodyParametersFilters.md +0 -11
  111. data/docs/ExportsCreateResponseBodyParametersFilters.md +0 -11
  112. data/docs/ExportsGetResponseBodyParametersFilters.md +0 -11
  113. data/lib/VoucherifySdk/models/exports_create_request_body_parameters_filters.rb +0 -256
  114. data/lib/VoucherifySdk/models/exports_create_response_body_parameters_filters.rb +0 -256
@@ -17,6 +17,9 @@ module VoucherifySdk
17
17
  class LoyaltiesEarningRulesGetResponseBodyLoyalty
18
18
  attr_accessor :type
19
19
 
20
+ # Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points.
21
+ attr_accessor :points
22
+
20
23
  attr_accessor :calculation_type
21
24
 
22
25
  attr_accessor :order
@@ -27,9 +30,6 @@ module VoucherifySdk
27
30
 
28
31
  attr_accessor :custom_event
29
32
 
30
- # Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points.
31
- attr_accessor :points
32
-
33
33
  class EnumAttributeValidator
34
34
  attr_reader :datatype
35
35
  attr_reader :allowable_values
@@ -56,12 +56,12 @@ module VoucherifySdk
56
56
  def self.attribute_map
57
57
  {
58
58
  :'type' => :'type',
59
+ :'points' => :'points',
59
60
  :'calculation_type' => :'calculation_type',
60
61
  :'order' => :'order',
61
62
  :'order_items' => :'order_items',
62
63
  :'customer' => :'customer',
63
- :'custom_event' => :'custom_event',
64
- :'points' => :'points'
64
+ :'custom_event' => :'custom_event'
65
65
  }
66
66
  end
67
67
 
@@ -74,12 +74,12 @@ module VoucherifySdk
74
74
  def self.openapi_types
75
75
  {
76
76
  :'type' => :'String',
77
+ :'points' => :'Integer',
77
78
  :'calculation_type' => :'String',
78
79
  :'order' => :'LoyaltiesEarningRulesGetResponseBodyLoyaltyOrder',
79
80
  :'order_items' => :'LoyaltiesEarningRulesGetResponseBodyLoyaltyOrderItems',
80
81
  :'customer' => :'LoyaltiesEarningRulesGetResponseBodyLoyaltyCustomer',
81
- :'custom_event' => :'LoyaltiesEarningRulesGetResponseBodyLoyaltyCustomEvent',
82
- :'points' => :'Integer'
82
+ :'custom_event' => :'LoyaltiesEarningRulesGetResponseBodyLoyaltyCustomEvent'
83
83
  }
84
84
  end
85
85
 
@@ -87,12 +87,12 @@ module VoucherifySdk
87
87
  def self.openapi_nullable
88
88
  Set.new([
89
89
  :'type',
90
+ :'points',
90
91
  :'calculation_type',
91
92
  :'order',
92
93
  :'order_items',
93
94
  :'customer',
94
- :'custom_event',
95
- :'points'
95
+ :'custom_event'
96
96
  ])
97
97
  end
98
98
 
@@ -108,6 +108,10 @@ module VoucherifySdk
108
108
  self.type = attributes[:'type']
109
109
  end
110
110
 
111
+ if attributes.key?(:'points')
112
+ self.points = attributes[:'points']
113
+ end
114
+
111
115
  if attributes.key?(:'calculation_type')
112
116
  self.calculation_type = attributes[:'calculation_type']
113
117
  end
@@ -127,10 +131,6 @@ module VoucherifySdk
127
131
  if attributes.key?(:'custom_event')
128
132
  self.custom_event = attributes[:'custom_event']
129
133
  end
130
-
131
- if attributes.key?(:'points')
132
- self.points = attributes[:'points']
133
- end
134
134
  end
135
135
 
136
136
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -145,7 +145,7 @@ module VoucherifySdk
145
145
  # @return true if the model is valid
146
146
  def valid?
147
147
  warn '[DEPRECATED] the `valid?` method is obsolete'
148
- type_validator = EnumAttributeValidator.new('String', ["PROPORTIONAL", "FIXED"])
148
+ type_validator = EnumAttributeValidator.new('String', ["FIXED", "PROPORTIONAL"])
149
149
  return false unless type_validator.valid?(@type)
150
150
  calculation_type_validator = EnumAttributeValidator.new('String', ["ORDER_AMOUNT", "ORDER_TOTAL_AMOUNT", "ORDER_METADATA", "ORDER_ITEMS_QUANTITY", "ORDER_ITEMS_AMOUNT", "ORDER_ITEMS_SUBTOTAL_AMOUNT", "CUSTOMER_METADATA", "CUSTOM_EVENT_METADATA"])
151
151
  return false unless calculation_type_validator.valid?(@calculation_type)
@@ -158,12 +158,12 @@ module VoucherifySdk
158
158
  return true if self.equal?(o)
159
159
  self.class == o.class &&
160
160
  type == o.type &&
161
+ points == o.points &&
161
162
  calculation_type == o.calculation_type &&
162
163
  order == o.order &&
163
164
  order_items == o.order_items &&
164
165
  customer == o.customer &&
165
- custom_event == o.custom_event &&
166
- points == o.points
166
+ custom_event == o.custom_event
167
167
  end
168
168
 
169
169
  # @see the `==` method
@@ -175,7 +175,7 @@ module VoucherifySdk
175
175
  # Calculates hash code according to all attributes.
176
176
  # @return [Integer] Hash code
177
177
  def hash
178
- [type, calculation_type, order, order_items, customer, custom_event, points].hash
178
+ [type, points, calculation_type, order, order_items, customer, custom_event].hash
179
179
  end
180
180
 
181
181
  # Builds the object from hash
@@ -17,6 +17,9 @@ module VoucherifySdk
17
17
  class LoyaltiesEarningRulesUpdateRequestBodyLoyalty
18
18
  attr_accessor :type
19
19
 
20
+ # Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points.
21
+ attr_accessor :points
22
+
20
23
  attr_accessor :calculation_type
21
24
 
22
25
  attr_accessor :order
@@ -27,9 +30,6 @@ module VoucherifySdk
27
30
 
28
31
  attr_accessor :custom_event
29
32
 
30
- # Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points.
31
- attr_accessor :points
32
-
33
33
  class EnumAttributeValidator
34
34
  attr_reader :datatype
35
35
  attr_reader :allowable_values
@@ -56,12 +56,12 @@ module VoucherifySdk
56
56
  def self.attribute_map
57
57
  {
58
58
  :'type' => :'type',
59
+ :'points' => :'points',
59
60
  :'calculation_type' => :'calculation_type',
60
61
  :'order' => :'order',
61
62
  :'order_items' => :'order_items',
62
63
  :'customer' => :'customer',
63
- :'custom_event' => :'custom_event',
64
- :'points' => :'points'
64
+ :'custom_event' => :'custom_event'
65
65
  }
66
66
  end
67
67
 
@@ -74,12 +74,12 @@ module VoucherifySdk
74
74
  def self.openapi_types
75
75
  {
76
76
  :'type' => :'String',
77
+ :'points' => :'Integer',
77
78
  :'calculation_type' => :'String',
78
79
  :'order' => :'LoyaltiesEarningRulesUpdateRequestBodyLoyaltyOrder',
79
80
  :'order_items' => :'LoyaltiesEarningRulesUpdateRequestBodyLoyaltyOrderItems',
80
81
  :'customer' => :'LoyaltiesEarningRulesUpdateRequestBodyLoyaltyCustomer',
81
- :'custom_event' => :'LoyaltiesEarningRulesUpdateRequestBodyLoyaltyCustomEvent',
82
- :'points' => :'Integer'
82
+ :'custom_event' => :'LoyaltiesEarningRulesUpdateRequestBodyLoyaltyCustomEvent'
83
83
  }
84
84
  end
85
85
 
@@ -87,12 +87,12 @@ module VoucherifySdk
87
87
  def self.openapi_nullable
88
88
  Set.new([
89
89
  :'type',
90
+ :'points',
90
91
  :'calculation_type',
91
92
  :'order',
92
93
  :'order_items',
93
94
  :'customer',
94
- :'custom_event',
95
- :'points'
95
+ :'custom_event'
96
96
  ])
97
97
  end
98
98
 
@@ -108,6 +108,10 @@ module VoucherifySdk
108
108
  self.type = attributes[:'type']
109
109
  end
110
110
 
111
+ if attributes.key?(:'points')
112
+ self.points = attributes[:'points']
113
+ end
114
+
111
115
  if attributes.key?(:'calculation_type')
112
116
  self.calculation_type = attributes[:'calculation_type']
113
117
  end
@@ -127,10 +131,6 @@ module VoucherifySdk
127
131
  if attributes.key?(:'custom_event')
128
132
  self.custom_event = attributes[:'custom_event']
129
133
  end
130
-
131
- if attributes.key?(:'points')
132
- self.points = attributes[:'points']
133
- end
134
134
  end
135
135
 
136
136
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -145,7 +145,7 @@ module VoucherifySdk
145
145
  # @return true if the model is valid
146
146
  def valid?
147
147
  warn '[DEPRECATED] the `valid?` method is obsolete'
148
- type_validator = EnumAttributeValidator.new('String', ["PROPORTIONAL", "FIXED"])
148
+ type_validator = EnumAttributeValidator.new('String', ["FIXED", "PROPORTIONAL"])
149
149
  return false unless type_validator.valid?(@type)
150
150
  calculation_type_validator = EnumAttributeValidator.new('String', ["ORDER_AMOUNT", "ORDER_TOTAL_AMOUNT", "ORDER_METADATA", "ORDER_ITEMS_QUANTITY", "ORDER_ITEMS_AMOUNT", "ORDER_ITEMS_SUBTOTAL_AMOUNT", "CUSTOMER_METADATA", "CUSTOM_EVENT_METADATA"])
151
151
  return false unless calculation_type_validator.valid?(@calculation_type)
@@ -158,12 +158,12 @@ module VoucherifySdk
158
158
  return true if self.equal?(o)
159
159
  self.class == o.class &&
160
160
  type == o.type &&
161
+ points == o.points &&
161
162
  calculation_type == o.calculation_type &&
162
163
  order == o.order &&
163
164
  order_items == o.order_items &&
164
165
  customer == o.customer &&
165
- custom_event == o.custom_event &&
166
- points == o.points
166
+ custom_event == o.custom_event
167
167
  end
168
168
 
169
169
  # @see the `==` method
@@ -175,7 +175,7 @@ module VoucherifySdk
175
175
  # Calculates hash code according to all attributes.
176
176
  # @return [Integer] Hash code
177
177
  def hash
178
- [type, calculation_type, order, order_items, customer, custom_event, points].hash
178
+ [type, points, calculation_type, order, order_items, customer, custom_event].hash
179
179
  end
180
180
 
181
181
  # Builds the object from hash
@@ -17,6 +17,9 @@ module VoucherifySdk
17
17
  class LoyaltiesEarningRulesUpdateResponseBodyLoyalty
18
18
  attr_accessor :type
19
19
 
20
+ # Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points.
21
+ attr_accessor :points
22
+
20
23
  attr_accessor :calculation_type
21
24
 
22
25
  attr_accessor :order
@@ -27,9 +30,6 @@ module VoucherifySdk
27
30
 
28
31
  attr_accessor :custom_event
29
32
 
30
- # Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points.
31
- attr_accessor :points
32
-
33
33
  class EnumAttributeValidator
34
34
  attr_reader :datatype
35
35
  attr_reader :allowable_values
@@ -56,12 +56,12 @@ module VoucherifySdk
56
56
  def self.attribute_map
57
57
  {
58
58
  :'type' => :'type',
59
+ :'points' => :'points',
59
60
  :'calculation_type' => :'calculation_type',
60
61
  :'order' => :'order',
61
62
  :'order_items' => :'order_items',
62
63
  :'customer' => :'customer',
63
- :'custom_event' => :'custom_event',
64
- :'points' => :'points'
64
+ :'custom_event' => :'custom_event'
65
65
  }
66
66
  end
67
67
 
@@ -74,12 +74,12 @@ module VoucherifySdk
74
74
  def self.openapi_types
75
75
  {
76
76
  :'type' => :'String',
77
+ :'points' => :'Integer',
77
78
  :'calculation_type' => :'String',
78
79
  :'order' => :'LoyaltiesEarningRulesUpdateResponseBodyLoyaltyOrder',
79
80
  :'order_items' => :'LoyaltiesEarningRulesUpdateResponseBodyLoyaltyOrderItems',
80
81
  :'customer' => :'LoyaltiesEarningRulesUpdateResponseBodyLoyaltyCustomer',
81
- :'custom_event' => :'LoyaltiesEarningRulesUpdateResponseBodyLoyaltyCustomEvent',
82
- :'points' => :'Integer'
82
+ :'custom_event' => :'LoyaltiesEarningRulesUpdateResponseBodyLoyaltyCustomEvent'
83
83
  }
84
84
  end
85
85
 
@@ -87,12 +87,12 @@ module VoucherifySdk
87
87
  def self.openapi_nullable
88
88
  Set.new([
89
89
  :'type',
90
+ :'points',
90
91
  :'calculation_type',
91
92
  :'order',
92
93
  :'order_items',
93
94
  :'customer',
94
- :'custom_event',
95
- :'points'
95
+ :'custom_event'
96
96
  ])
97
97
  end
98
98
 
@@ -108,6 +108,10 @@ module VoucherifySdk
108
108
  self.type = attributes[:'type']
109
109
  end
110
110
 
111
+ if attributes.key?(:'points')
112
+ self.points = attributes[:'points']
113
+ end
114
+
111
115
  if attributes.key?(:'calculation_type')
112
116
  self.calculation_type = attributes[:'calculation_type']
113
117
  end
@@ -127,10 +131,6 @@ module VoucherifySdk
127
131
  if attributes.key?(:'custom_event')
128
132
  self.custom_event = attributes[:'custom_event']
129
133
  end
130
-
131
- if attributes.key?(:'points')
132
- self.points = attributes[:'points']
133
- end
134
134
  end
135
135
 
136
136
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -145,7 +145,7 @@ module VoucherifySdk
145
145
  # @return true if the model is valid
146
146
  def valid?
147
147
  warn '[DEPRECATED] the `valid?` method is obsolete'
148
- type_validator = EnumAttributeValidator.new('String', ["PROPORTIONAL", "FIXED"])
148
+ type_validator = EnumAttributeValidator.new('String', ["FIXED", "PROPORTIONAL"])
149
149
  return false unless type_validator.valid?(@type)
150
150
  calculation_type_validator = EnumAttributeValidator.new('String', ["ORDER_AMOUNT", "ORDER_TOTAL_AMOUNT", "ORDER_METADATA", "ORDER_ITEMS_QUANTITY", "ORDER_ITEMS_AMOUNT", "ORDER_ITEMS_SUBTOTAL_AMOUNT", "CUSTOMER_METADATA", "CUSTOM_EVENT_METADATA"])
151
151
  return false unless calculation_type_validator.valid?(@calculation_type)
@@ -158,12 +158,12 @@ module VoucherifySdk
158
158
  return true if self.equal?(o)
159
159
  self.class == o.class &&
160
160
  type == o.type &&
161
+ points == o.points &&
161
162
  calculation_type == o.calculation_type &&
162
163
  order == o.order &&
163
164
  order_items == o.order_items &&
164
165
  customer == o.customer &&
165
- custom_event == o.custom_event &&
166
- points == o.points
166
+ custom_event == o.custom_event
167
167
  end
168
168
 
169
169
  # @see the `==` method
@@ -175,7 +175,7 @@ module VoucherifySdk
175
175
  # Calculates hash code according to all attributes.
176
176
  # @return [Integer] Hash code
177
177
  def hash
178
- [type, calculation_type, order, order_items, customer, custom_event, points].hash
178
+ [type, points, calculation_type, order, order_items, customer, custom_event].hash
179
179
  end
180
180
 
181
181
  # Builds the object from hash
@@ -28,6 +28,7 @@ module VoucherifySdk
28
28
  # A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute.
29
29
  attr_accessor :attributes
30
30
 
31
+ # The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. and The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format.
31
32
  attr_accessor :metadata
32
33
 
33
34
  attr_accessor :image_url
@@ -23,6 +23,7 @@ module VoucherifySdk
23
23
 
24
24
  attr_accessor :customer
25
25
 
26
+ # The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format.
26
27
  attr_accessor :metadata
27
28
 
28
29
  # Specify the distribution channel.
@@ -30,6 +30,7 @@ module VoucherifySdk
30
30
  # Customer's `source_id`.
31
31
  attr_accessor :tracking_id
32
32
 
33
+ # The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format.
33
34
  attr_accessor :metadata
34
35
 
35
36
  # How the publication was originated. It can be your own custom channel or an example value provided here.
@@ -28,6 +28,7 @@ module VoucherifySdk
28
28
  # Hashed customer source ID.
29
29
  attr_accessor :tracking_id
30
30
 
31
+ # The metadata object stores all custom attributes assigned to the redemption.
31
32
  attr_accessor :metadata
32
33
 
33
34
  # For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer.
@@ -27,6 +27,7 @@ module VoucherifySdk
27
27
  # A unique identifier of the customer. It can be a customer ID or email from a CRM system, database, or a third-party service.
28
28
  attr_accessor :source_id
29
29
 
30
+ # A set of custom key/value pairs that are attached to the customer. It stores all custom attributes assigned to the customer.
30
31
  attr_accessor :metadata
31
32
 
32
33
  # The type of the object represented by JSON.
@@ -54,6 +54,7 @@ module VoucherifySdk
54
54
  # Array of items applied to the order. It can include up 500 items.
55
55
  attr_accessor :items
56
56
 
57
+ # A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
57
58
  attr_accessor :metadata
58
59
 
59
60
  # The type of the object represented by JSON.
@@ -156,7 +157,7 @@ module VoucherifySdk
156
157
  :'referrer_id' => :'String',
157
158
  :'customer' => :'RedemptionEntryOrderCustomer',
158
159
  :'referrer' => :'RedemptionEntryOrderReferrer',
159
- :'redemptions' => :'Object'
160
+ :'redemptions' => :'Hash<String, OrderRedemptionsEntry>'
160
161
  }
161
162
  end
162
163
 
@@ -285,7 +286,9 @@ module VoucherifySdk
285
286
  end
286
287
 
287
288
  if attributes.key?(:'redemptions')
288
- self.redemptions = attributes[:'redemptions']
289
+ if (value = attributes[:'redemptions']).is_a?(Hash)
290
+ self.redemptions = value
291
+ end
289
292
  end
290
293
  end
291
294
 
@@ -32,6 +32,7 @@ module VoucherifySdk
32
32
 
33
33
  attr_accessor :action
34
34
 
35
+ # The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.
35
36
  attr_accessor :metadata
36
37
 
37
38
  # The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.
@@ -61,6 +61,7 @@ module VoucherifySdk
61
61
  # An optional field to keep any extra textual information about the code such as a code description and details.
62
62
  attr_accessor :additional_info
63
63
 
64
+ # The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format.
64
65
  attr_accessor :metadata
65
66
 
66
67
  attr_accessor :assets
@@ -28,6 +28,7 @@ module VoucherifySdk
28
28
  # Hashed customer source ID.
29
29
  attr_accessor :tracking_id
30
30
 
31
+ # The metadata object stores all custom attributes assigned to the redemption.
31
32
  attr_accessor :metadata
32
33
 
33
34
  # For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer.
@@ -27,6 +27,7 @@ module VoucherifySdk
27
27
  # A unique identifier of the customer. It can be a customer ID or email from a CRM system, database, or a third-party service.
28
28
  attr_accessor :source_id
29
29
 
30
+ # A set of custom key/value pairs that are attached to the customer. It stores all custom attributes assigned to the customer.
30
31
  attr_accessor :metadata
31
32
 
32
33
  # The type of the object represented by JSON.
@@ -54,6 +54,7 @@ module VoucherifySdk
54
54
  # Array of items applied to the order. It can include up 500 items.
55
55
  attr_accessor :items
56
56
 
57
+ # A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
57
58
  attr_accessor :metadata
58
59
 
59
60
  # The type of the object represented by JSON.
@@ -156,7 +157,7 @@ module VoucherifySdk
156
157
  :'referrer_id' => :'String',
157
158
  :'customer' => :'RedemptionsGetResponseBodyOrderCustomer',
158
159
  :'referrer' => :'RedemptionsGetResponseBodyOrderReferrer',
159
- :'redemptions' => :'Object'
160
+ :'redemptions' => :'Hash<String, OrderRedemptionsEntry>'
160
161
  }
161
162
  end
162
163
 
@@ -285,7 +286,9 @@ module VoucherifySdk
285
286
  end
286
287
 
287
288
  if attributes.key?(:'redemptions')
288
- self.redemptions = attributes[:'redemptions']
289
+ if (value = attributes[:'redemptions']).is_a?(Hash)
290
+ self.redemptions = value
291
+ end
289
292
  end
290
293
  end
291
294
 
@@ -32,6 +32,7 @@ module VoucherifySdk
32
32
 
33
33
  attr_accessor :action
34
34
 
35
+ # The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.
35
36
  attr_accessor :metadata
36
37
 
37
38
  # The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.
@@ -61,6 +61,7 @@ module VoucherifySdk
61
61
  # An optional field to keep any extra textual information about the code such as a code description and details.
62
62
  attr_accessor :additional_info
63
63
 
64
+ # The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format.
64
65
  attr_accessor :metadata
65
66
 
66
67
  attr_accessor :assets
@@ -28,6 +28,7 @@ module VoucherifySdk
28
28
  # Hashed customer source ID.
29
29
  attr_accessor :tracking_id
30
30
 
31
+ # The metadata object stores all custom attributes assigned to the redemption.
31
32
  attr_accessor :metadata
32
33
 
33
34
  # For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer.
@@ -166,6 +167,7 @@ module VoucherifySdk
166
167
  :'date',
167
168
  :'customer_id',
168
169
  :'tracking_id',
170
+ :'metadata',
169
171
  :'redemption',
170
172
  :'result',
171
173
  :'failure_code',
@@ -27,6 +27,7 @@ module VoucherifySdk
27
27
  # A unique identifier of the customer. It can be a customer ID or email from a CRM system, database, or a third-party service.
28
28
  attr_accessor :source_id
29
29
 
30
+ # A set of custom key/value pairs that are attached to the customer. It stores all custom attributes assigned to the customer.
30
31
  attr_accessor :metadata
31
32
 
32
33
  # The type of the object represented by JSON.
@@ -90,6 +91,7 @@ module VoucherifySdk
90
91
  :'name',
91
92
  :'email',
92
93
  :'source_id',
94
+ :'metadata',
93
95
  :'object'
94
96
  ])
95
97
  end
@@ -54,6 +54,7 @@ module VoucherifySdk
54
54
  # Array of items applied to the order. It can include up 500 items.
55
55
  attr_accessor :items
56
56
 
57
+ # A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
57
58
  attr_accessor :metadata
58
59
 
59
60
  # The type of the object represented by JSON.
@@ -156,7 +157,7 @@ module VoucherifySdk
156
157
  :'referrer_id' => :'String',
157
158
  :'customer' => :'RedemptionsListResponseBodyRedemptionsItemOrderCustomer',
158
159
  :'referrer' => :'RedemptionsListResponseBodyRedemptionsItemOrderReferrer',
159
- :'redemptions' => :'Object'
160
+ :'redemptions' => :'Hash<String, OrderRedemptionsEntry>'
160
161
  }
161
162
  end
162
163
 
@@ -176,11 +177,13 @@ module VoucherifySdk
176
177
  :'items_applied_discount_amount',
177
178
  :'total_applied_discount_amount',
178
179
  :'items',
180
+ :'metadata',
179
181
  :'object',
180
182
  :'created_at',
181
183
  :'updated_at',
182
184
  :'customer_id',
183
185
  :'referrer_id',
186
+ :'redemptions'
184
187
  ])
185
188
  end
186
189
 
@@ -281,7 +284,9 @@ module VoucherifySdk
281
284
  end
282
285
 
283
286
  if attributes.key?(:'redemptions')
284
- self.redemptions = attributes[:'redemptions']
287
+ if (value = attributes[:'redemptions']).is_a?(Hash)
288
+ self.redemptions = value
289
+ end
285
290
  end
286
291
  end
287
292
 
@@ -32,6 +32,7 @@ module VoucherifySdk
32
32
 
33
33
  attr_accessor :action
34
34
 
35
+ # The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.
35
36
  attr_accessor :metadata
36
37
 
37
38
  # The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.
@@ -164,6 +165,7 @@ module VoucherifySdk
164
165
  :'updated_at',
165
166
  :'name',
166
167
  :'banner',
168
+ :'metadata',
167
169
  :'hierarchy',
168
170
  :'promotion_id',
169
171
  :'campaign_id',
@@ -61,6 +61,7 @@ module VoucherifySdk
61
61
  # An optional field to keep any extra textual information about the code such as a code description and details.
62
62
  attr_accessor :additional_info
63
63
 
64
+ # The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format.
64
65
  attr_accessor :metadata
65
66
 
66
67
  attr_accessor :assets
@@ -207,6 +208,7 @@ module VoucherifySdk
207
208
  :'expiration_date',
208
209
  :'active',
209
210
  :'additional_info',
211
+ :'metadata',
210
212
  :'is_referral_code',
211
213
  :'created_at',
212
214
  :'updated_at',
@@ -20,6 +20,7 @@ module VoucherifySdk
20
20
 
21
21
  attr_accessor :parameters
22
22
 
23
+ # The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format.
23
24
  attr_accessor :metadata
24
25
 
25
26
  # The number of units of the product that you want to share as a reward.
@@ -20,6 +20,7 @@ module VoucherifySdk
20
20
 
21
21
  attr_accessor :parameters
22
22
 
23
+ # The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format.
23
24
  attr_accessor :metadata
24
25
 
25
26
  # The number of units of the product that you want to share as a reward.