voucherify 8.0.1 → 8.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Dockerfile +1 -1
- data/ENDPOINTS-COVERAGE.md +64 -60
- data/Gemfile.lock +4 -4
- data/README.md +11 -0
- data/docs/Campaign.md +2 -2
- data/docs/CampaignBase.md +2 -2
- data/docs/CampaignsApi.md +3 -3
- data/docs/CampaignsCreateRequestBody.md +1 -1
- data/docs/CampaignsCreateResponseBody.md +2 -2
- data/docs/CampaignsGetResponseBody.md +2 -2
- data/docs/CampaignsUpdateRequestBody.md +2 -2
- data/docs/CampaignsUpdateResponseBody.md +2 -2
- data/docs/ClientValidationsValidateResponseBodyRedeemablesItem.md +3 -2
- data/docs/Error.md +1 -0
- data/docs/ErrorError.md +8 -0
- data/docs/LoyaltiesCreateCampaignRequestBody.md +1 -1
- data/docs/LoyaltiesMembersBalanceUpdateResponseBody.md +1 -1
- data/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md +9 -9
- data/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md +1 -1
- data/docs/LoyaltiesUpdateCampaignRequestBody.md +2 -2
- data/docs/LoyaltyCardTransaction.md +2 -2
- data/docs/LoyaltyCardTransactionDetailsBalance.md +5 -4
- data/docs/LoyaltyCardTransactionDetailsBalanceRelatedObject.md +1 -1
- data/docs/LoyaltyPointsBucket.md +16 -0
- data/docs/LoyaltyPointsBucketBucket.md +8 -0
- data/docs/Order.md +1 -1
- data/docs/OrderCalculated.md +1 -1
- data/docs/OrderCalculatedItem.md +1 -1
- data/docs/OrderCalculatedItemProduct.md +1 -1
- data/docs/OrderCalculatedItemSku.md +1 -0
- data/docs/OrderItem.md +1 -1
- data/docs/OrderItemProduct.md +1 -1
- data/docs/OrderItemSku.md +1 -0
- data/docs/OrdersCreateRequestBody.md +1 -1
- data/docs/OrdersCreateResponseBody.md +1 -1
- data/docs/OrdersGetResponseBody.md +1 -1
- data/docs/OrdersImportCreateRequestBodyItem.md +1 -1
- data/docs/OrdersUpdateRequestBody.md +1 -1
- data/docs/OrdersUpdateResponseBody.md +1 -1
- data/docs/Product.md +1 -1
- data/docs/ProductCollectionsProductsListResponseBodyDataItem.md +1 -1
- data/docs/ProductWithoutSkus.md +1 -1
- data/docs/ProductsCreateResponseBody.md +1 -1
- data/docs/ProductsGetResponseBody.md +1 -1
- data/docs/ProductsSkusCreateResponseBody.md +1 -1
- data/docs/ProductsSkusUpdateResponseBody.md +1 -1
- data/docs/ProductsUpdateResponseBody.md +1 -1
- data/docs/RedemptionEntryOrder.md +1 -1
- data/docs/RedemptionsGetResponseBodyOrder.md +1 -1
- data/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md +1 -1
- data/docs/Sku.md +1 -1
- data/docs/SkusGetResponseBody.md +1 -1
- data/docs/TemplatesCampaignsCampaignSetupCreateRequestBody.md +1 -1
- data/docs/ValidationsRedeemableInapplicable.md +3 -2
- data/docs/ValidationsRedeemableSkipped.md +3 -2
- data/docs/ValidationsValidateResponseBodyRedeemablesItem.md +3 -2
- data/docs/VoucherBalance.md +14 -0
- data/docs/VoucherBalanceRelatedObject.md +9 -0
- data/docs/VoucherTransaction.md +2 -2
- data/docs/VoucherTransactionDetailsBalance.md +5 -4
- data/docs/VoucherTransactionDetailsBalanceRelatedObject.md +1 -1
- data/docs/VouchersApi.md +6 -6
- data/docs/VouchersBalanceUpdateResponseBody.md +1 -1
- data/lib/VoucherifySdk/api/campaigns_api.rb +4 -4
- data/lib/VoucherifySdk/api/vouchers_api.rb +10 -10
- data/lib/VoucherifySdk/models/access_settings_campaign_assignments_list.rb +1 -1
- data/lib/VoucherifySdk/models/campaign.rb +3 -3
- data/lib/VoucherifySdk/models/campaign_base.rb +3 -3
- data/lib/VoucherifySdk/models/campaigns_create_request_body.rb +1 -1
- data/lib/VoucherifySdk/models/campaigns_create_response_body.rb +3 -3
- data/lib/VoucherifySdk/models/campaigns_get_response_body.rb +3 -3
- data/lib/VoucherifySdk/models/campaigns_update_request_body.rb +2 -2
- data/lib/VoucherifySdk/models/campaigns_update_response_body.rb +3 -3
- data/lib/VoucherifySdk/models/client_validations_validate_response_body_redeemables_item.rb +18 -7
- data/lib/VoucherifySdk/models/error.rb +15 -5
- data/lib/VoucherifySdk/models/error_error.rb +210 -0
- data/lib/VoucherifySdk/models/loyalties_create_campaign_request_body.rb +1 -1
- data/lib/VoucherifySdk/models/loyalties_members_balance_update_response_body.rb +1 -0
- data/lib/VoucherifySdk/models/loyalties_members_points_expiration_list_response_body_data_item.rb +27 -77
- data/lib/VoucherifySdk/models/loyalties_members_points_expiration_list_response_body_data_item_bucket.rb +3 -9
- data/lib/VoucherifySdk/models/loyalties_update_campaign_request_body.rb +2 -2
- data/lib/VoucherifySdk/models/loyalty_card_transaction.rb +24 -31
- data/lib/VoucherifySdk/models/loyalty_card_transaction_details.rb +0 -1
- data/lib/VoucherifySdk/models/loyalty_card_transaction_details_balance.rb +18 -19
- data/lib/VoucherifySdk/models/loyalty_card_transaction_details_balance_related_object.rb +1 -7
- data/lib/VoucherifySdk/models/loyalty_points_bucket.rb +323 -0
- data/lib/VoucherifySdk/models/loyalty_points_bucket_bucket.rb +210 -0
- data/lib/VoucherifySdk/models/order.rb +1 -1
- data/lib/VoucherifySdk/models/order_calculated.rb +1 -1
- data/lib/VoucherifySdk/models/order_calculated_item.rb +1 -1
- data/lib/VoucherifySdk/models/order_calculated_item_product.rb +1 -1
- data/lib/VoucherifySdk/models/order_calculated_item_sku.rb +16 -5
- data/lib/VoucherifySdk/models/order_item.rb +1 -1
- data/lib/VoucherifySdk/models/order_item_product.rb +1 -1
- data/lib/VoucherifySdk/models/order_item_sku.rb +16 -5
- data/lib/VoucherifySdk/models/orders_create_request_body.rb +1 -1
- data/lib/VoucherifySdk/models/orders_create_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/orders_get_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/orders_import_create_request_body_item.rb +1 -1
- data/lib/VoucherifySdk/models/orders_update_request_body.rb +1 -1
- data/lib/VoucherifySdk/models/orders_update_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/parameter_expand_list_campaigns.rb +2 -1
- data/lib/VoucherifySdk/models/product.rb +1 -1
- data/lib/VoucherifySdk/models/product_collections_products_list_response_body_data_item.rb +1 -1
- data/lib/VoucherifySdk/models/product_without_skus.rb +1 -1
- data/lib/VoucherifySdk/models/products_create_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/products_get_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/products_skus_create_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/products_skus_update_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/products_update_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/redemption_entry_order.rb +1 -1
- data/lib/VoucherifySdk/models/redemptions_get_response_body_order.rb +1 -1
- data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_order.rb +1 -1
- data/lib/VoucherifySdk/models/sku.rb +1 -1
- data/lib/VoucherifySdk/models/skus_get_response_body.rb +1 -1
- data/lib/VoucherifySdk/models/templates_campaigns_campaign_setup_create_request_body.rb +1 -1
- data/lib/VoucherifySdk/models/validations_redeemable_inapplicable.rb +18 -7
- data/lib/VoucherifySdk/models/validations_redeemable_skipped.rb +18 -7
- data/lib/VoucherifySdk/models/validations_validate_response_body_redeemables_item.rb +18 -7
- data/lib/VoucherifySdk/models/voucher_balance.rb +305 -0
- data/lib/VoucherifySdk/models/voucher_balance_related_object.rb +247 -0
- data/lib/VoucherifySdk/models/voucher_transaction.rb +27 -31
- data/lib/VoucherifySdk/models/voucher_transaction_details.rb +0 -1
- data/lib/VoucherifySdk/models/voucher_transaction_details_balance.rb +18 -19
- data/lib/VoucherifySdk/models/voucher_transaction_details_balance_related_object.rb +1 -7
- data/lib/VoucherifySdk/models/vouchers_balance_update_response_body.rb +1 -0
- data/lib/VoucherifySdk/version.rb +1 -1
- data/lib/VoucherifySdk.rb +5 -0
- metadata +12 -2
@@ -19,18 +19,21 @@ module VoucherifySdk
|
|
19
19
|
# The type of voucher whose balance is being adjusted due to the transaction.
|
20
20
|
attr_accessor :type
|
21
21
|
|
22
|
-
# The number of all points accumulated on the card as affected by add or subtract operations.
|
22
|
+
# The number of all points or credits accumulated on the card as affected by add or subtract operations.
|
23
23
|
attr_accessor :total
|
24
24
|
|
25
25
|
# The type of the object represented by the JSON.
|
26
26
|
attr_accessor :object
|
27
27
|
|
28
|
-
# Points added or subtracted in the transaction.
|
28
|
+
# Points added or subtracted in the transaction of a loyalty card.
|
29
29
|
attr_accessor :points
|
30
30
|
|
31
|
-
# The available points on the card after the transaction as affected by redemption or rollback.
|
31
|
+
# The available points or credits on the card after the transaction as affected by redemption or rollback.
|
32
32
|
attr_accessor :balance
|
33
33
|
|
34
|
+
# The type of the operation being performed. The operation type is `AUTOMATIC` if it is an automatic redemption.
|
35
|
+
attr_accessor :operation_type
|
36
|
+
|
34
37
|
attr_accessor :related_object
|
35
38
|
|
36
39
|
class EnumAttributeValidator
|
@@ -63,6 +66,7 @@ module VoucherifySdk
|
|
63
66
|
:'object' => :'object',
|
64
67
|
:'points' => :'points',
|
65
68
|
:'balance' => :'balance',
|
69
|
+
:'operation_type' => :'operation_type',
|
66
70
|
:'related_object' => :'related_object'
|
67
71
|
}
|
68
72
|
end
|
@@ -80,6 +84,7 @@ module VoucherifySdk
|
|
80
84
|
:'object' => :'String',
|
81
85
|
:'points' => :'Integer',
|
82
86
|
:'balance' => :'Integer',
|
87
|
+
:'operation_type' => :'String',
|
83
88
|
:'related_object' => :'VoucherTransactionDetailsBalanceRelatedObject'
|
84
89
|
}
|
85
90
|
end
|
@@ -92,6 +97,7 @@ module VoucherifySdk
|
|
92
97
|
:'object',
|
93
98
|
:'points',
|
94
99
|
:'balance',
|
100
|
+
:'operation_type',
|
95
101
|
:'related_object'
|
96
102
|
])
|
97
103
|
end
|
@@ -106,8 +112,6 @@ module VoucherifySdk
|
|
106
112
|
|
107
113
|
if attributes.key?(:'type')
|
108
114
|
self.type = attributes[:'type']
|
109
|
-
else
|
110
|
-
self.type = 'loyalty_card'
|
111
115
|
end
|
112
116
|
|
113
117
|
if attributes.key?(:'total')
|
@@ -128,6 +132,10 @@ module VoucherifySdk
|
|
128
132
|
self.balance = attributes[:'balance']
|
129
133
|
end
|
130
134
|
|
135
|
+
if attributes.key?(:'operation_type')
|
136
|
+
self.operation_type = attributes[:'operation_type']
|
137
|
+
end
|
138
|
+
|
131
139
|
if attributes.key?(:'related_object')
|
132
140
|
self.related_object = attributes[:'related_object']
|
133
141
|
end
|
@@ -138,16 +146,6 @@ module VoucherifySdk
|
|
138
146
|
def list_invalid_properties
|
139
147
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
140
148
|
invalid_properties = Array.new
|
141
|
-
pattern = Regexp.new(/loyalty_card/)
|
142
|
-
if !@type.nil? && @type !~ pattern
|
143
|
-
invalid_properties.push("invalid value for \"type\", must conform to the pattern #{pattern}.")
|
144
|
-
end
|
145
|
-
|
146
|
-
pattern = Regexp.new(/balance/)
|
147
|
-
if !@object.nil? && @object !~ pattern
|
148
|
-
invalid_properties.push("invalid value for \"object\", must conform to the pattern #{pattern}.")
|
149
|
-
end
|
150
|
-
|
151
149
|
invalid_properties
|
152
150
|
end
|
153
151
|
|
@@ -155,12 +153,12 @@ module VoucherifySdk
|
|
155
153
|
# @return true if the model is valid
|
156
154
|
def valid?
|
157
155
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
158
|
-
type_validator = EnumAttributeValidator.new('String', ["loyalty_card"])
|
156
|
+
type_validator = EnumAttributeValidator.new('String', ["loyalty_card", "gift_voucher"])
|
159
157
|
return false unless type_validator.valid?(@type)
|
160
|
-
return false if !@type.nil? && @type !~ Regexp.new(/loyalty_card/)
|
161
158
|
object_validator = EnumAttributeValidator.new('String', ["balance"])
|
162
159
|
return false unless object_validator.valid?(@object)
|
163
|
-
|
160
|
+
operation_type_validator = EnumAttributeValidator.new('String', ["MANUAL", "AUTOMATIC"])
|
161
|
+
return false unless operation_type_validator.valid?(@operation_type)
|
164
162
|
true
|
165
163
|
end
|
166
164
|
|
@@ -174,6 +172,7 @@ module VoucherifySdk
|
|
174
172
|
object == o.object &&
|
175
173
|
points == o.points &&
|
176
174
|
balance == o.balance &&
|
175
|
+
operation_type == o.operation_type &&
|
177
176
|
related_object == o.related_object
|
178
177
|
end
|
179
178
|
|
@@ -186,7 +185,7 @@ module VoucherifySdk
|
|
186
185
|
# Calculates hash code according to all attributes.
|
187
186
|
# @return [Integer] Hash code
|
188
187
|
def hash
|
189
|
-
[type, total, object, points, balance, related_object].hash
|
188
|
+
[type, total, object, points, balance, operation_type, related_object].hash
|
190
189
|
end
|
191
190
|
|
192
191
|
# Builds the object from hash
|
@@ -16,7 +16,7 @@ require 'time'
|
|
16
16
|
module VoucherifySdk
|
17
17
|
# Defines the resource that is being modified with the values that are returned in the balance object.
|
18
18
|
class VoucherTransactionDetailsBalanceRelatedObject
|
19
|
-
# Identifies the voucher that is being modified
|
19
|
+
# Identifies the voucher that is being modified. The ID is assigned by the Voucherify API.
|
20
20
|
attr_accessor :id
|
21
21
|
|
22
22
|
# The object being modified, i.e. voucher.
|
@@ -97,11 +97,6 @@ module VoucherifySdk
|
|
97
97
|
def list_invalid_properties
|
98
98
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
99
99
|
invalid_properties = Array.new
|
100
|
-
pattern = Regexp.new(/voucher/)
|
101
|
-
if !@type.nil? && @type !~ pattern
|
102
|
-
invalid_properties.push("invalid value for \"type\", must conform to the pattern #{pattern}.")
|
103
|
-
end
|
104
|
-
|
105
100
|
invalid_properties
|
106
101
|
end
|
107
102
|
|
@@ -111,7 +106,6 @@ module VoucherifySdk
|
|
111
106
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
112
107
|
type_validator = EnumAttributeValidator.new('String', ["voucher"])
|
113
108
|
return false unless type_validator.valid?(@type)
|
114
|
-
return false if !@type.nil? && @type !~ Regexp.new(/voucher/)
|
115
109
|
true
|
116
110
|
end
|
117
111
|
|
data/lib/VoucherifySdk.rb
CHANGED
@@ -166,6 +166,7 @@ require 'VoucherifySdk/models/earning_rule_loyalty_tier'
|
|
166
166
|
require 'VoucherifySdk/models/earning_rule_segment'
|
167
167
|
require 'VoucherifySdk/models/earning_rule_source'
|
168
168
|
require 'VoucherifySdk/models/error'
|
169
|
+
require 'VoucherifySdk/models/error_error'
|
169
170
|
require 'VoucherifySdk/models/events_create_request_body'
|
170
171
|
require 'VoucherifySdk/models/events_create_request_body_loyalty'
|
171
172
|
require 'VoucherifySdk/models/events_create_request_body_referral'
|
@@ -451,6 +452,8 @@ require 'VoucherifySdk/models/loyalty_member'
|
|
451
452
|
require 'VoucherifySdk/models/loyalty_member_loyalty_card'
|
452
453
|
require 'VoucherifySdk/models/loyalty_member_publish'
|
453
454
|
require 'VoucherifySdk/models/loyalty_member_redemption'
|
455
|
+
require 'VoucherifySdk/models/loyalty_points_bucket'
|
456
|
+
require 'VoucherifySdk/models/loyalty_points_bucket_bucket'
|
454
457
|
require 'VoucherifySdk/models/loyalty_tier'
|
455
458
|
require 'VoucherifySdk/models/loyalty_tier_base'
|
456
459
|
require 'VoucherifySdk/models/loyalty_tier_base_points'
|
@@ -1068,6 +1071,8 @@ require 'VoucherifySdk/models/voucher'
|
|
1068
1071
|
require 'VoucherifySdk/models/voucher_assets'
|
1069
1072
|
require 'VoucherifySdk/models/voucher_assets_barcode'
|
1070
1073
|
require 'VoucherifySdk/models/voucher_assets_qr'
|
1074
|
+
require 'VoucherifySdk/models/voucher_balance'
|
1075
|
+
require 'VoucherifySdk/models/voucher_balance_related_object'
|
1071
1076
|
require 'VoucherifySdk/models/voucher_gift'
|
1072
1077
|
require 'VoucherifySdk/models/voucher_loyalty_card'
|
1073
1078
|
require 'VoucherifySdk/models/voucher_publish'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: voucherify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.0.
|
4
|
+
version: 8.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawelrychlik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -286,6 +286,7 @@ files:
|
|
286
286
|
- docs/EarningRuleSegment.md
|
287
287
|
- docs/EarningRuleSource.md
|
288
288
|
- docs/Error.md
|
289
|
+
- docs/ErrorError.md
|
289
290
|
- docs/EventsApi.md
|
290
291
|
- docs/EventsCreateRequestBody.md
|
291
292
|
- docs/EventsCreateRequestBodyLoyalty.md
|
@@ -575,6 +576,8 @@ files:
|
|
575
576
|
- docs/LoyaltyMemberLoyaltyCard.md
|
576
577
|
- docs/LoyaltyMemberPublish.md
|
577
578
|
- docs/LoyaltyMemberRedemption.md
|
579
|
+
- docs/LoyaltyPointsBucket.md
|
580
|
+
- docs/LoyaltyPointsBucketBucket.md
|
578
581
|
- docs/LoyaltyTier.md
|
579
582
|
- docs/LoyaltyTierBase.md
|
580
583
|
- docs/LoyaltyTierBasePoints.md
|
@@ -1207,6 +1210,8 @@ files:
|
|
1207
1210
|
- docs/VoucherAssets.md
|
1208
1211
|
- docs/VoucherAssetsBarcode.md
|
1209
1212
|
- docs/VoucherAssetsQr.md
|
1213
|
+
- docs/VoucherBalance.md
|
1214
|
+
- docs/VoucherBalanceRelatedObject.md
|
1210
1215
|
- docs/VoucherGift.md
|
1211
1216
|
- docs/VoucherLoyaltyCard.md
|
1212
1217
|
- docs/VoucherPublish.md
|
@@ -1464,6 +1469,7 @@ files:
|
|
1464
1469
|
- lib/VoucherifySdk/models/earning_rule_segment.rb
|
1465
1470
|
- lib/VoucherifySdk/models/earning_rule_source.rb
|
1466
1471
|
- lib/VoucherifySdk/models/error.rb
|
1472
|
+
- lib/VoucherifySdk/models/error_error.rb
|
1467
1473
|
- lib/VoucherifySdk/models/events_create_request_body.rb
|
1468
1474
|
- lib/VoucherifySdk/models/events_create_request_body_loyalty.rb
|
1469
1475
|
- lib/VoucherifySdk/models/events_create_request_body_referral.rb
|
@@ -1749,6 +1755,8 @@ files:
|
|
1749
1755
|
- lib/VoucherifySdk/models/loyalty_member_loyalty_card.rb
|
1750
1756
|
- lib/VoucherifySdk/models/loyalty_member_publish.rb
|
1751
1757
|
- lib/VoucherifySdk/models/loyalty_member_redemption.rb
|
1758
|
+
- lib/VoucherifySdk/models/loyalty_points_bucket.rb
|
1759
|
+
- lib/VoucherifySdk/models/loyalty_points_bucket_bucket.rb
|
1752
1760
|
- lib/VoucherifySdk/models/loyalty_tier.rb
|
1753
1761
|
- lib/VoucherifySdk/models/loyalty_tier_base.rb
|
1754
1762
|
- lib/VoucherifySdk/models/loyalty_tier_base_points.rb
|
@@ -2366,6 +2374,8 @@ files:
|
|
2366
2374
|
- lib/VoucherifySdk/models/voucher_assets.rb
|
2367
2375
|
- lib/VoucherifySdk/models/voucher_assets_barcode.rb
|
2368
2376
|
- lib/VoucherifySdk/models/voucher_assets_qr.rb
|
2377
|
+
- lib/VoucherifySdk/models/voucher_balance.rb
|
2378
|
+
- lib/VoucherifySdk/models/voucher_balance_related_object.rb
|
2369
2379
|
- lib/VoucherifySdk/models/voucher_gift.rb
|
2370
2380
|
- lib/VoucherifySdk/models/voucher_loyalty_card.rb
|
2371
2381
|
- lib/VoucherifySdk/models/voucher_publish.rb
|