voucherify 7.0.0 → 8.0.1
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/EXAMPLES.md +3 -3
- data/Gemfile.lock +2 -2
- data/README.md +12 -5
- data/docs/CampaignsCreateRequestBody.md +1 -1
- data/docs/CampaignsImportVoucherItem.md +1 -1
- data/docs/CampaignsUpdateRequestBody.md +1 -1
- data/docs/ClientValidationsValidateResponseBodyRedeemablesItem.md +3 -1
- data/docs/ClientValidationsValidateResponseBodyRedeemablesItemResultDetails.md +1 -1
- data/docs/Discount.md +1 -1
- data/docs/DiscountProduct.md +10 -0
- data/docs/EarningRuleLoyalty.md +1 -1
- data/docs/ExportParameters.md +1 -1
- data/docs/ExportsCreateRequestBodyParameters.md +1 -1
- data/docs/ExportsCreateResponseBodyParameters.md +1 -1
- data/docs/ExportsGetResponseBodyParameters.md +1 -1
- data/docs/LoyaltiesEarningRulesCreateRequestBodyItem.md +1 -1
- data/docs/LoyaltiesEarningRulesCreateRequestBodyItemLoyalty.md +2 -2
- data/docs/LoyaltiesEarningRulesCreateResponseBodyLoyalty.md +1 -1
- data/docs/LoyaltiesEarningRulesDisableResponseBodyLoyalty.md +1 -1
- data/docs/LoyaltiesEarningRulesEnableResponseBodyLoyalty.md +1 -1
- data/docs/LoyaltiesEarningRulesGetResponseBodyLoyalty.md +1 -1
- data/docs/LoyaltiesEarningRulesUpdateRequestBodyLoyalty.md +1 -1
- data/docs/LoyaltiesEarningRulesUpdateResponseBodyLoyalty.md +1 -1
- data/docs/ProductCollectionsProductsListResponseBodyDataItem.md +1 -1
- data/docs/PublicationsCreateRequestBody.md +1 -1
- data/docs/PublicationsCreateResponseBody.md +1 -1
- data/docs/RedemptionEntry.md +1 -1
- data/docs/RedemptionEntryCustomer.md +1 -1
- data/docs/RedemptionEntryOrder.md +2 -2
- data/docs/RedemptionEntryPromotionTier.md +1 -1
- data/docs/RedemptionEntryVoucher.md +1 -1
- data/docs/RedemptionsGetResponseBody.md +1 -1
- data/docs/RedemptionsGetResponseBodyCustomer.md +1 -1
- data/docs/RedemptionsGetResponseBodyOrder.md +2 -2
- data/docs/RedemptionsGetResponseBodyPromotionTier.md +1 -1
- data/docs/RedemptionsGetResponseBodyVoucher.md +1 -1
- data/docs/RedemptionsListResponseBodyRedemptionsItem.md +1 -1
- data/docs/RedemptionsListResponseBodyRedemptionsItemCustomer.md +1 -1
- data/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md +2 -2
- data/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTier.md +1 -1
- data/docs/RedemptionsListResponseBodyRedemptionsItemVoucher.md +1 -1
- data/docs/RewardsCreateRequestBody.md +1 -1
- data/docs/RewardsUpdateRequestBody.md +1 -1
- data/docs/ValidationsRedeemableInapplicable.md +2 -0
- data/docs/ValidationsRedeemableSkipped.md +2 -0
- data/docs/ValidationsValidateResponseBodyRedeemablesItem.md +3 -1
- data/docs/ValidationsValidateResponseBodyRedeemablesItemResultDetails.md +1 -1
- data/docs/VouchersApi.md +2 -2
- data/docs/VouchersCreateRequestBody.md +27 -0
- data/docs/VouchersCreateRequestBodyRedemption.md +8 -0
- data/docs/VouchersCreateWithSpecificCodeRequestBody.md +1 -1
- data/docs/VouchersImportCreateItemRequestBody.md +1 -1
- data/docs/VouchersUpdateRequestBody.md +1 -1
- data/lib/VoucherifySdk/api/vouchers_api.rb +3 -3
- data/lib/VoucherifySdk/models/campaigns_create_request_body.rb +1 -0
- data/lib/VoucherifySdk/models/campaigns_import_voucher_item.rb +1 -0
- data/lib/VoucherifySdk/models/campaigns_update_request_body.rb +1 -0
- data/lib/VoucherifySdk/models/client_validations_validate_response_body_redeemables_item.rb +29 -5
- data/lib/VoucherifySdk/models/client_validations_validate_response_body_redeemables_item_result_details.rb +13 -13
- data/lib/VoucherifySdk/models/discount.rb +2 -1
- data/lib/VoucherifySdk/models/{export_parameters_filters.rb → discount_product.rb} +26 -51
- data/lib/VoucherifySdk/models/earning_rule_loyalty.rb +17 -17
- data/lib/VoucherifySdk/models/export_parameters.rb +3 -2
- data/lib/VoucherifySdk/models/exports_create_request_body_parameters.rb +3 -2
- data/lib/VoucherifySdk/models/exports_create_response_body_parameters.rb +3 -2
- data/lib/VoucherifySdk/models/exports_get_response_body_parameters.rb +3 -2
- data/lib/VoucherifySdk/models/loyalties_earning_rules_create_request_body_item.rb +2 -0
- data/lib/VoucherifySdk/models/loyalties_earning_rules_create_request_body_item_loyalty.rb +22 -22
- data/lib/VoucherifySdk/models/loyalties_earning_rules_create_response_body_loyalty.rb +17 -17
- data/lib/VoucherifySdk/models/loyalties_earning_rules_disable_response_body_loyalty.rb +17 -17
- data/lib/VoucherifySdk/models/loyalties_earning_rules_enable_response_body_loyalty.rb +17 -17
- data/lib/VoucherifySdk/models/loyalties_earning_rules_get_response_body_loyalty.rb +17 -17
- data/lib/VoucherifySdk/models/loyalties_earning_rules_update_request_body_loyalty.rb +17 -17
- data/lib/VoucherifySdk/models/loyalties_earning_rules_update_response_body_loyalty.rb +17 -17
- data/lib/VoucherifySdk/models/product_collections_products_list_response_body_data_item.rb +1 -0
- data/lib/VoucherifySdk/models/publications_create_request_body.rb +1 -0
- data/lib/VoucherifySdk/models/publications_create_response_body.rb +1 -0
- data/lib/VoucherifySdk/models/redemption_entry.rb +1 -0
- data/lib/VoucherifySdk/models/redemption_entry_customer.rb +1 -0
- data/lib/VoucherifySdk/models/redemption_entry_order.rb +5 -2
- data/lib/VoucherifySdk/models/redemption_entry_promotion_tier.rb +1 -0
- data/lib/VoucherifySdk/models/redemption_entry_voucher.rb +1 -0
- data/lib/VoucherifySdk/models/redemptions_get_response_body.rb +1 -0
- data/lib/VoucherifySdk/models/redemptions_get_response_body_customer.rb +1 -0
- data/lib/VoucherifySdk/models/redemptions_get_response_body_order.rb +5 -2
- data/lib/VoucherifySdk/models/redemptions_get_response_body_promotion_tier.rb +1 -0
- data/lib/VoucherifySdk/models/redemptions_get_response_body_voucher.rb +1 -0
- data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item.rb +2 -0
- data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_customer.rb +2 -0
- data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_order.rb +7 -2
- data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_promotion_tier.rb +2 -0
- data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_voucher.rb +2 -0
- data/lib/VoucherifySdk/models/rewards_create_request_body.rb +1 -0
- data/lib/VoucherifySdk/models/rewards_update_request_body.rb +1 -0
- data/lib/VoucherifySdk/models/validations_redeemable_inapplicable.rb +27 -5
- data/lib/VoucherifySdk/models/validations_redeemable_skipped.rb +27 -5
- data/lib/VoucherifySdk/models/validations_validate_response_body_redeemables_item.rb +29 -5
- data/lib/VoucherifySdk/models/validations_validate_response_body_redeemables_item_result_details.rb +13 -13
- data/lib/VoucherifySdk/models/vouchers_create_request_body.rb +431 -0
- data/lib/VoucherifySdk/models/{exports_get_response_body_parameters_filters.rb → vouchers_create_request_body_redemption.rb} +10 -57
- data/lib/VoucherifySdk/models/vouchers_create_with_specific_code_request_body.rb +1 -0
- data/lib/VoucherifySdk/models/vouchers_import_create_item_request_body.rb +1 -0
- data/lib/VoucherifySdk/models/vouchers_update_request_body.rb +1 -0
- data/lib/VoucherifySdk/version.rb +1 -1
- data/lib/VoucherifySdk.rb +3 -4
- metadata +8 -10
- data/docs/ExportParametersFilters.md +0 -11
- data/docs/ExportsCreateRequestBodyParametersFilters.md +0 -11
- data/docs/ExportsCreateResponseBodyParametersFilters.md +0 -11
- data/docs/ExportsGetResponseBodyParametersFilters.md +0 -11
- data/lib/VoucherifySdk/models/exports_create_request_body_parameters_filters.rb +0 -256
- data/lib/VoucherifySdk/models/exports_create_response_body_parameters_filters.rb +0 -256
@@ -20,6 +20,7 @@ module VoucherifySdk
|
|
20
20
|
# Array of strings containing the data in the export. These fields define the headers in the CSV file.
|
21
21
|
attr_accessor :fields
|
22
22
|
|
23
|
+
# Allowed additional properties must start with \"metadata.\" or \"redemption.\" and Allowed additional properties must start with \"metadata.\" and Allowed additional properties must start with \"metadata.\" or \"address.\" or \"summary.\" or \"loyalty.\" or \"loyalty_tier.\" or \"loyalty_points.\" or \"system_metadata.\"
|
23
24
|
attr_accessor :filters
|
24
25
|
|
25
26
|
class EnumAttributeValidator
|
@@ -63,7 +64,7 @@ module VoucherifySdk
|
|
63
64
|
{
|
64
65
|
:'order' => :'String',
|
65
66
|
:'fields' => :'Array<String>',
|
66
|
-
:'filters' => :'
|
67
|
+
:'filters' => :'Object'
|
67
68
|
}
|
68
69
|
end
|
69
70
|
|
@@ -111,7 +112,7 @@ module VoucherifySdk
|
|
111
112
|
# @return true if the model is valid
|
112
113
|
def valid?
|
113
114
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
114
|
-
order_validator = EnumAttributeValidator.new('String', ["-created_at", "created_at", "-updated_at", "updated_at", "-code", "code", "-id", "id", "-voucher_code", "voucher_code", "-tracking_id", "tracking_id", "-customer_id", "customer_id"])
|
115
|
+
order_validator = EnumAttributeValidator.new('String', ["-created_at", "created_at", "-updated_at", "updated_at", "-code", "code", "-id", "id", "-voucher_code", "voucher_code", "-tracking_id", "tracking_id", "-customer_id", "customer_id", "-name", "name", "-email", "email", "-source_id", "source_id", "-channel", "channel", "-status", "status", "-expires_at", "expires_at"])
|
115
116
|
return false unless order_validator.valid?(@order)
|
116
117
|
true
|
117
118
|
end
|
@@ -20,6 +20,7 @@ module VoucherifySdk
|
|
20
20
|
# Array of strings containing the data in the export. These fields define the headers in the CSV file.
|
21
21
|
attr_accessor :fields
|
22
22
|
|
23
|
+
# Allowed additional properties must start with \"metadata.\" or \"redemption.\" and Allowed additional properties must start with \"metadata.\" and Allowed additional properties must start with \"metadata.\" or \"address.\" or \"summary.\" or \"loyalty.\" or \"loyalty_tier.\" or \"loyalty_points.\" or \"system_metadata.\"
|
23
24
|
attr_accessor :filters
|
24
25
|
|
25
26
|
class EnumAttributeValidator
|
@@ -63,7 +64,7 @@ module VoucherifySdk
|
|
63
64
|
{
|
64
65
|
:'order' => :'String',
|
65
66
|
:'fields' => :'Array<String>',
|
66
|
-
:'filters' => :'
|
67
|
+
:'filters' => :'Object'
|
67
68
|
}
|
68
69
|
end
|
69
70
|
|
@@ -111,7 +112,7 @@ module VoucherifySdk
|
|
111
112
|
# @return true if the model is valid
|
112
113
|
def valid?
|
113
114
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
114
|
-
order_validator = EnumAttributeValidator.new('String', ["-created_at", "created_at", "-updated_at", "updated_at", "-code", "code", "-id", "id", "-voucher_code", "voucher_code", "-tracking_id", "tracking_id", "-customer_id", "customer_id"])
|
115
|
+
order_validator = EnumAttributeValidator.new('String', ["-created_at", "created_at", "-updated_at", "updated_at", "-code", "code", "-id", "id", "-voucher_code", "voucher_code", "-tracking_id", "tracking_id", "-customer_id", "customer_id", "-name", "name", "-email", "email", "-source_id", "source_id", "-channel", "channel", "-status", "status", "-expires_at", "expires_at"])
|
115
116
|
return false unless order_validator.valid?(@order)
|
116
117
|
true
|
117
118
|
end
|
@@ -20,6 +20,7 @@ module VoucherifySdk
|
|
20
20
|
# Array of strings containing the data in the export. These fields define the headers in the CSV file.
|
21
21
|
attr_accessor :fields
|
22
22
|
|
23
|
+
# Allowed additional properties must start with \"metadata.\" or \"redemption.\" and Allowed additional properties must start with \"metadata.\" and Allowed additional properties must start with \"metadata.\" or \"address.\" or \"summary.\" or \"loyalty.\" or \"loyalty_tier.\" or \"loyalty_points.\" or \"system_metadata.\"
|
23
24
|
attr_accessor :filters
|
24
25
|
|
25
26
|
class EnumAttributeValidator
|
@@ -63,7 +64,7 @@ module VoucherifySdk
|
|
63
64
|
{
|
64
65
|
:'order' => :'String',
|
65
66
|
:'fields' => :'Array<String>',
|
66
|
-
:'filters' => :'
|
67
|
+
:'filters' => :'Object'
|
67
68
|
}
|
68
69
|
end
|
69
70
|
|
@@ -111,7 +112,7 @@ module VoucherifySdk
|
|
111
112
|
# @return true if the model is valid
|
112
113
|
def valid?
|
113
114
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
114
|
-
order_validator = EnumAttributeValidator.new('String', ["-created_at", "created_at", "-updated_at", "updated_at", "-code", "code", "-id", "id", "-voucher_code", "voucher_code", "-tracking_id", "tracking_id", "-customer_id", "customer_id"])
|
115
|
+
order_validator = EnumAttributeValidator.new('String', ["-created_at", "created_at", "-updated_at", "updated_at", "-code", "code", "-id", "id", "-voucher_code", "voucher_code", "-tracking_id", "tracking_id", "-customer_id", "customer_id", "-name", "name", "-email", "email", "-source_id", "source_id", "-channel", "channel", "-status", "status", "-expires_at", "expires_at"])
|
115
116
|
return false unless order_validator.valid?(@order)
|
116
117
|
true
|
117
118
|
end
|
@@ -40,6 +40,7 @@ module VoucherifySdk
|
|
40
40
|
|
41
41
|
attr_accessor :validity_hours
|
42
42
|
|
43
|
+
# The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format.
|
43
44
|
attr_accessor :metadata
|
44
45
|
|
45
46
|
attr_accessor :segment
|
@@ -122,6 +123,7 @@ module VoucherifySdk
|
|
122
123
|
:'active',
|
123
124
|
:'start_date',
|
124
125
|
:'expiration_date',
|
126
|
+
:'metadata',
|
125
127
|
:'segment',
|
126
128
|
:'custom_event',
|
127
129
|
:'loyalty_tier'
|
@@ -22,14 +22,14 @@ module VoucherifySdk
|
|
22
22
|
|
23
23
|
attr_accessor :calculation_type
|
24
24
|
|
25
|
-
attr_accessor :
|
25
|
+
attr_accessor :order
|
26
26
|
|
27
27
|
attr_accessor :order_items
|
28
28
|
|
29
|
-
attr_accessor :order
|
30
|
-
|
31
29
|
attr_accessor :customer
|
32
30
|
|
31
|
+
attr_accessor :custom_event
|
32
|
+
|
33
33
|
class EnumAttributeValidator
|
34
34
|
attr_reader :datatype
|
35
35
|
attr_reader :allowable_values
|
@@ -58,10 +58,10 @@ module VoucherifySdk
|
|
58
58
|
:'type' => :'type',
|
59
59
|
:'points' => :'points',
|
60
60
|
:'calculation_type' => :'calculation_type',
|
61
|
-
:'custom_event' => :'custom_event',
|
62
|
-
:'order_items' => :'order_items',
|
63
61
|
:'order' => :'order',
|
64
|
-
:'
|
62
|
+
:'order_items' => :'order_items',
|
63
|
+
:'customer' => :'customer',
|
64
|
+
:'custom_event' => :'custom_event'
|
65
65
|
}
|
66
66
|
end
|
67
67
|
|
@@ -76,10 +76,10 @@ module VoucherifySdk
|
|
76
76
|
:'type' => :'String',
|
77
77
|
:'points' => :'Integer',
|
78
78
|
:'calculation_type' => :'String',
|
79
|
-
:'custom_event' => :'LoyaltiesEarningRulesCreateRequestBodyItemLoyaltyCustomEvent',
|
80
|
-
:'order_items' => :'LoyaltiesEarningRulesCreateRequestBodyItemLoyaltyOrderItems',
|
81
79
|
:'order' => :'LoyaltiesEarningRulesCreateRequestBodyItemLoyaltyOrder',
|
82
|
-
:'
|
80
|
+
:'order_items' => :'LoyaltiesEarningRulesCreateRequestBodyItemLoyaltyOrderItems',
|
81
|
+
:'customer' => :'LoyaltiesEarningRulesCreateRequestBodyItemLoyaltyCustomer',
|
82
|
+
:'custom_event' => :'LoyaltiesEarningRulesCreateRequestBodyItemLoyaltyCustomEvent'
|
83
83
|
}
|
84
84
|
end
|
85
85
|
|
@@ -87,8 +87,8 @@ module VoucherifySdk
|
|
87
87
|
def self.openapi_nullable
|
88
88
|
Set.new([
|
89
89
|
:'points',
|
90
|
-
:'
|
91
|
-
:'
|
90
|
+
:'customer',
|
91
|
+
:'custom_event'
|
92
92
|
])
|
93
93
|
end
|
94
94
|
|
@@ -112,21 +112,21 @@ module VoucherifySdk
|
|
112
112
|
self.calculation_type = attributes[:'calculation_type']
|
113
113
|
end
|
114
114
|
|
115
|
-
if attributes.key?(:'
|
116
|
-
self.
|
115
|
+
if attributes.key?(:'order')
|
116
|
+
self.order = attributes[:'order']
|
117
117
|
end
|
118
118
|
|
119
119
|
if attributes.key?(:'order_items')
|
120
120
|
self.order_items = attributes[:'order_items']
|
121
121
|
end
|
122
122
|
|
123
|
-
if attributes.key?(:'order')
|
124
|
-
self.order = attributes[:'order']
|
125
|
-
end
|
126
|
-
|
127
123
|
if attributes.key?(:'customer')
|
128
124
|
self.customer = attributes[:'customer']
|
129
125
|
end
|
126
|
+
|
127
|
+
if attributes.key?(:'custom_event')
|
128
|
+
self.custom_event = attributes[:'custom_event']
|
129
|
+
end
|
130
130
|
end
|
131
131
|
|
132
132
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -143,7 +143,7 @@ module VoucherifySdk
|
|
143
143
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
144
144
|
type_validator = EnumAttributeValidator.new('String', ["FIXED", "PROPORTIONAL"])
|
145
145
|
return false unless type_validator.valid?(@type)
|
146
|
-
calculation_type_validator = EnumAttributeValidator.new('String', ["
|
146
|
+
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"])
|
147
147
|
return false unless calculation_type_validator.valid?(@calculation_type)
|
148
148
|
true
|
149
149
|
end
|
@@ -156,10 +156,10 @@ module VoucherifySdk
|
|
156
156
|
type == o.type &&
|
157
157
|
points == o.points &&
|
158
158
|
calculation_type == o.calculation_type &&
|
159
|
-
custom_event == o.custom_event &&
|
160
|
-
order_items == o.order_items &&
|
161
159
|
order == o.order &&
|
162
|
-
|
160
|
+
order_items == o.order_items &&
|
161
|
+
customer == o.customer &&
|
162
|
+
custom_event == o.custom_event
|
163
163
|
end
|
164
164
|
|
165
165
|
# @see the `==` method
|
@@ -171,7 +171,7 @@ module VoucherifySdk
|
|
171
171
|
# Calculates hash code according to all attributes.
|
172
172
|
# @return [Integer] Hash code
|
173
173
|
def hash
|
174
|
-
[type, points, calculation_type,
|
174
|
+
[type, points, calculation_type, order, order_items, customer, custom_event].hash
|
175
175
|
end
|
176
176
|
|
177
177
|
# Builds the object from hash
|
@@ -17,6 +17,9 @@ module VoucherifySdk
|
|
17
17
|
class LoyaltiesEarningRulesCreateResponseBodyLoyalty
|
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' => :'LoyaltiesEarningRulesCreateResponseBodyLoyaltyOrder',
|
79
80
|
:'order_items' => :'LoyaltiesEarningRulesCreateResponseBodyLoyaltyOrderItems',
|
80
81
|
:'customer' => :'LoyaltiesEarningRulesCreateResponseBodyLoyaltyCustomer',
|
81
|
-
:'custom_event' => :'LoyaltiesEarningRulesCreateResponseBodyLoyaltyCustomEvent'
|
82
|
-
:'points' => :'Integer'
|
82
|
+
:'custom_event' => :'LoyaltiesEarningRulesCreateResponseBodyLoyaltyCustomEvent'
|
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', ["
|
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
|
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 LoyaltiesEarningRulesDisableResponseBodyLoyalty
|
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' => :'LoyaltiesEarningRulesDisableResponseBodyLoyaltyOrder',
|
79
80
|
:'order_items' => :'LoyaltiesEarningRulesDisableResponseBodyLoyaltyOrderItems',
|
80
81
|
:'customer' => :'LoyaltiesEarningRulesDisableResponseBodyLoyaltyCustomer',
|
81
|
-
:'custom_event' => :'LoyaltiesEarningRulesDisableResponseBodyLoyaltyCustomEvent'
|
82
|
-
:'points' => :'Integer'
|
82
|
+
:'custom_event' => :'LoyaltiesEarningRulesDisableResponseBodyLoyaltyCustomEvent'
|
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', ["
|
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
|
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 LoyaltiesEarningRulesEnableResponseBodyLoyalty
|
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' => :'LoyaltiesEarningRulesEnableResponseBodyLoyaltyOrder',
|
79
80
|
:'order_items' => :'LoyaltiesEarningRulesEnableResponseBodyLoyaltyOrderItems',
|
80
81
|
:'customer' => :'LoyaltiesEarningRulesEnableResponseBodyLoyaltyCustomer',
|
81
|
-
:'custom_event' => :'LoyaltiesEarningRulesEnableResponseBodyLoyaltyCustomEvent'
|
82
|
-
:'points' => :'Integer'
|
82
|
+
:'custom_event' => :'LoyaltiesEarningRulesEnableResponseBodyLoyaltyCustomEvent'
|
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', ["
|
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
|
178
|
+
[type, points, calculation_type, order, order_items, customer, custom_event].hash
|
179
179
|
end
|
180
180
|
|
181
181
|
# Builds the object from hash
|