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
@@ -31,6 +31,12 @@ module VoucherifySdk
31
31
 
32
32
  attr_accessor :categories
33
33
 
34
+ # Campaign name
35
+ attr_accessor :campaign_name
36
+
37
+ # Unique campaign ID assigned by Voucherify.
38
+ attr_accessor :campaign_id
39
+
34
40
  class EnumAttributeValidator
35
41
  attr_reader :datatype
36
42
  attr_reader :allowable_values
@@ -61,7 +67,9 @@ module VoucherifySdk
61
67
  :'object' => :'object',
62
68
  :'result' => :'result',
63
69
  :'metadata' => :'metadata',
64
- :'categories' => :'categories'
70
+ :'categories' => :'categories',
71
+ :'campaign_name' => :'campaign_name',
72
+ :'campaign_id' => :'campaign_id'
65
73
  }
66
74
  end
67
75
 
@@ -78,7 +86,9 @@ module VoucherifySdk
78
86
  :'object' => :'String',
79
87
  :'result' => :'ValidationsRedeemableInapplicableResult',
80
88
  :'metadata' => :'Object',
81
- :'categories' => :'Array<CategoryWithStackingRulesType>'
89
+ :'categories' => :'Array<CategoryWithStackingRulesType>',
90
+ :'campaign_name' => :'String',
91
+ :'campaign_id' => :'String'
82
92
  }
83
93
  end
84
94
 
@@ -90,7 +100,9 @@ module VoucherifySdk
90
100
  :'object',
91
101
  :'result',
92
102
  :'metadata',
93
- :'categories'
103
+ :'categories',
104
+ :'campaign_name',
105
+ :'campaign_id'
94
106
  ])
95
107
  end
96
108
 
@@ -129,6 +141,14 @@ module VoucherifySdk
129
141
  self.categories = value
130
142
  end
131
143
  end
144
+
145
+ if attributes.key?(:'campaign_name')
146
+ self.campaign_name = attributes[:'campaign_name']
147
+ end
148
+
149
+ if attributes.key?(:'campaign_id')
150
+ self.campaign_id = attributes[:'campaign_id']
151
+ end
132
152
  end
133
153
 
134
154
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -160,7 +180,9 @@ module VoucherifySdk
160
180
  object == o.object &&
161
181
  result == o.result &&
162
182
  metadata == o.metadata &&
163
- categories == o.categories
183
+ categories == o.categories &&
184
+ campaign_name == o.campaign_name &&
185
+ campaign_id == o.campaign_id
164
186
  end
165
187
 
166
188
  # @see the `==` method
@@ -172,7 +194,7 @@ module VoucherifySdk
172
194
  # Calculates hash code according to all attributes.
173
195
  # @return [Integer] Hash code
174
196
  def hash
175
- [status, id, object, result, metadata, categories].hash
197
+ [status, id, object, result, metadata, categories, campaign_name, campaign_id].hash
176
198
  end
177
199
 
178
200
  # Builds the object from hash
@@ -31,6 +31,12 @@ module VoucherifySdk
31
31
 
32
32
  attr_accessor :categories
33
33
 
34
+ # Campaign name
35
+ attr_accessor :campaign_name
36
+
37
+ # Unique campaign ID assigned by Voucherify.
38
+ attr_accessor :campaign_id
39
+
34
40
  class EnumAttributeValidator
35
41
  attr_reader :datatype
36
42
  attr_reader :allowable_values
@@ -61,7 +67,9 @@ module VoucherifySdk
61
67
  :'object' => :'object',
62
68
  :'result' => :'result',
63
69
  :'metadata' => :'metadata',
64
- :'categories' => :'categories'
70
+ :'categories' => :'categories',
71
+ :'campaign_name' => :'campaign_name',
72
+ :'campaign_id' => :'campaign_id'
65
73
  }
66
74
  end
67
75
 
@@ -78,7 +86,9 @@ module VoucherifySdk
78
86
  :'object' => :'String',
79
87
  :'result' => :'ValidationsRedeemableSkippedResult',
80
88
  :'metadata' => :'Object',
81
- :'categories' => :'Array<CategoryWithStackingRulesType>'
89
+ :'categories' => :'Array<CategoryWithStackingRulesType>',
90
+ :'campaign_name' => :'String',
91
+ :'campaign_id' => :'String'
82
92
  }
83
93
  end
84
94
 
@@ -90,7 +100,9 @@ module VoucherifySdk
90
100
  :'object',
91
101
  :'result',
92
102
  :'metadata',
93
- :'categories'
103
+ :'categories',
104
+ :'campaign_name',
105
+ :'campaign_id'
94
106
  ])
95
107
  end
96
108
 
@@ -129,6 +141,14 @@ module VoucherifySdk
129
141
  self.categories = value
130
142
  end
131
143
  end
144
+
145
+ if attributes.key?(:'campaign_name')
146
+ self.campaign_name = attributes[:'campaign_name']
147
+ end
148
+
149
+ if attributes.key?(:'campaign_id')
150
+ self.campaign_id = attributes[:'campaign_id']
151
+ end
132
152
  end
133
153
 
134
154
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -160,7 +180,9 @@ module VoucherifySdk
160
180
  object == o.object &&
161
181
  result == o.result &&
162
182
  metadata == o.metadata &&
163
- categories == o.categories
183
+ categories == o.categories &&
184
+ campaign_name == o.campaign_name &&
185
+ campaign_id == o.campaign_id
164
186
  end
165
187
 
166
188
  # @see the `==` method
@@ -172,7 +194,7 @@ module VoucherifySdk
172
194
  # Calculates hash code according to all attributes.
173
195
  # @return [Integer] Hash code
174
196
  def hash
175
- [status, id, object, result, metadata, categories].hash
197
+ [status, id, object, result, metadata, categories, campaign_name, campaign_id].hash
176
198
  end
177
199
 
178
200
  # Builds the object from hash
@@ -31,10 +31,17 @@ module VoucherifySdk
31
31
 
32
32
  attr_accessor :result
33
33
 
34
+ # The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.
34
35
  attr_accessor :metadata
35
36
 
36
37
  attr_accessor :categories
37
38
 
39
+ # Campaign name
40
+ attr_accessor :campaign_name
41
+
42
+ # Unique campaign ID assigned by Voucherify.
43
+ attr_accessor :campaign_id
44
+
38
45
  class EnumAttributeValidator
39
46
  attr_reader :datatype
40
47
  attr_reader :allowable_values
@@ -68,7 +75,9 @@ module VoucherifySdk
68
75
  :'inapplicable_to' => :'inapplicable_to',
69
76
  :'result' => :'result',
70
77
  :'metadata' => :'metadata',
71
- :'categories' => :'categories'
78
+ :'categories' => :'categories',
79
+ :'campaign_name' => :'campaign_name',
80
+ :'campaign_id' => :'campaign_id'
72
81
  }
73
82
  end
74
83
 
@@ -88,7 +97,9 @@ module VoucherifySdk
88
97
  :'inapplicable_to' => :'InapplicableToResultList',
89
98
  :'result' => :'ValidationsValidateResponseBodyRedeemablesItemResult',
90
99
  :'metadata' => :'Object',
91
- :'categories' => :'Array<CategoryWithStackingRulesType>'
100
+ :'categories' => :'Array<CategoryWithStackingRulesType>',
101
+ :'campaign_name' => :'String',
102
+ :'campaign_id' => :'String'
92
103
  }
93
104
  end
94
105
 
@@ -97,7 +108,10 @@ module VoucherifySdk
97
108
  Set.new([
98
109
  :'id',
99
110
  :'object',
100
- :'categories'
111
+ :'metadata',
112
+ :'categories',
113
+ :'campaign_name',
114
+ :'campaign_id'
101
115
  ])
102
116
  end
103
117
 
@@ -146,6 +160,14 @@ module VoucherifySdk
146
160
  self.categories = value
147
161
  end
148
162
  end
163
+
164
+ if attributes.key?(:'campaign_name')
165
+ self.campaign_name = attributes[:'campaign_name']
166
+ end
167
+
168
+ if attributes.key?(:'campaign_id')
169
+ self.campaign_id = attributes[:'campaign_id']
170
+ end
149
171
  end
150
172
 
151
173
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -180,7 +202,9 @@ module VoucherifySdk
180
202
  inapplicable_to == o.inapplicable_to &&
181
203
  result == o.result &&
182
204
  metadata == o.metadata &&
183
- categories == o.categories
205
+ categories == o.categories &&
206
+ campaign_name == o.campaign_name &&
207
+ campaign_id == o.campaign_id
184
208
  end
185
209
 
186
210
  # @see the `==` method
@@ -192,7 +216,7 @@ module VoucherifySdk
192
216
  # Calculates hash code according to all attributes.
193
217
  # @return [Integer] Hash code
194
218
  def hash
195
- [status, id, object, order, applicable_to, inapplicable_to, result, metadata, categories].hash
219
+ [status, id, object, order, applicable_to, inapplicable_to, result, metadata, categories, campaign_name, campaign_id].hash
196
220
  end
197
221
 
198
222
  # Builds the object from hash
@@ -15,15 +15,15 @@ require 'time'
15
15
 
16
16
  module VoucherifySdk
17
17
  class ValidationsValidateResponseBodyRedeemablesItemResultDetails
18
- attr_accessor :key
19
-
20
18
  attr_accessor :message
21
19
 
20
+ attr_accessor :key
21
+
22
22
  # Attribute mapping from ruby-style variable name to JSON key.
23
23
  def self.attribute_map
24
24
  {
25
- :'key' => :'key',
26
- :'message' => :'message'
25
+ :'message' => :'message',
26
+ :'key' => :'key'
27
27
  }
28
28
  end
29
29
 
@@ -35,8 +35,8 @@ module VoucherifySdk
35
35
  # Attribute type mapping.
36
36
  def self.openapi_types
37
37
  {
38
- :'key' => :'String',
39
- :'message' => :'String'
38
+ :'message' => :'String',
39
+ :'key' => :'String'
40
40
  }
41
41
  end
42
42
 
@@ -54,13 +54,13 @@ module VoucherifySdk
54
54
  h[k.to_sym] = v
55
55
  }
56
56
 
57
- if attributes.key?(:'key')
58
- self.key = attributes[:'key']
59
- end
60
-
61
57
  if attributes.key?(:'message')
62
58
  self.message = attributes[:'message']
63
59
  end
60
+
61
+ if attributes.key?(:'key')
62
+ self.key = attributes[:'key']
63
+ end
64
64
  end
65
65
 
66
66
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -83,8 +83,8 @@ module VoucherifySdk
83
83
  def ==(o)
84
84
  return true if self.equal?(o)
85
85
  self.class == o.class &&
86
- key == o.key &&
87
- message == o.message
86
+ message == o.message &&
87
+ key == o.key
88
88
  end
89
89
 
90
90
  # @see the `==` method
@@ -96,7 +96,7 @@ module VoucherifySdk
96
96
  # Calculates hash code according to all attributes.
97
97
  # @return [Integer] Hash code
98
98
  def hash
99
- [key, message].hash
99
+ [message, key].hash
100
100
  end
101
101
 
102
102
  # Builds the object from hash