voucherify 8.0.1 → 8.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Dockerfile +1 -1
- data/ENDPOINTS-COVERAGE.md +69 -60
- data/Gemfile.lock +9 -7
- data/README.md +55 -2
- data/__tests__/spec/12_validation_rules_spec.rb +1 -15
- data/docs/AccessSettings.md +9 -0
- data/docs/AccessSettingsAssign.md +10 -0
- data/docs/AccessSettingsUnassign.md +10 -0
- data/docs/ApplicableTo.md +3 -2
- data/docs/ApplicableToOrderItemUnitsItem.md +9 -0
- data/docs/ApplicationDetailsItem.md +14 -0
- data/docs/AreaStoreCampaignAssignment.md +1 -0
- data/docs/BinApi.md +4 -4
- data/docs/Campaign.md +3 -3
- data/docs/CampaignBase.md +3 -2
- data/docs/CampaignsApi.md +3 -3
- data/docs/CampaignsCreateRequestBody.md +2 -1
- data/docs/CampaignsCreateResponseBody.md +3 -3
- data/docs/CampaignsGetResponseBody.md +3 -3
- data/docs/CampaignsUpdateRequestBody.md +3 -2
- data/docs/CampaignsUpdateResponseBody.md +3 -3
- data/docs/CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md +2 -1
- data/docs/CampaignsVouchersCreateResponseBodyLoyaltyCard.md +2 -1
- data/docs/ClientValidationsValidateResponseBodyRedeemablesItem.md +3 -2
- data/docs/ClientValidationsValidateResponseBodyRedeemablesItemResultDiscount.md +1 -1
- data/docs/CustomerLoyalty.md +1 -1
- data/docs/Discount.md +1 -1
- data/docs/DiscountUnitMultipleOneUnit.md +1 -1
- data/docs/EarningRule.md +1 -0
- data/docs/EarningRulePendingPoints.md +9 -0
- data/docs/Error.md +1 -0
- data/docs/ErrorError.md +8 -0
- data/docs/EventSource.md +10 -0
- data/docs/EventSourceApiKey.md +9 -0
- data/docs/EventSourceUser.md +8 -0
- data/docs/InapplicableTo.md +3 -2
- data/docs/InapplicableToOrderItemUnitsItem.md +9 -0
- data/docs/LoyaltiesApi.md +334 -10
- data/docs/LoyaltiesCreateCampaignRequestBody.md +2 -1
- data/docs/LoyaltiesEarningRulesCreateResponseBody.md +1 -0
- data/docs/LoyaltiesEarningRulesCreateResponseBodyPendingPoints.md +9 -0
- data/docs/LoyaltiesEarningRulesDisableResponseBody.md +1 -0
- data/docs/LoyaltiesEarningRulesDisableResponseBodyPendingPoints.md +9 -0
- data/docs/LoyaltiesEarningRulesEnableResponseBody.md +1 -0
- data/docs/LoyaltiesEarningRulesEnableResponseBodyPendingPoints.md +9 -0
- data/docs/LoyaltiesEarningRulesGetResponseBody.md +1 -0
- data/docs/LoyaltiesEarningRulesGetResponseBodyPendingPoints.md +9 -0
- data/docs/LoyaltiesEarningRulesUpdateResponseBody.md +1 -0
- data/docs/LoyaltiesEarningRulesUpdateResponseBodyPendingPoints.md +9 -0
- data/docs/LoyaltiesMembersBalanceUpdateResponseBody.md +1 -1
- data/docs/LoyaltiesMembersCreateResponseBodyLoyaltyCard.md +2 -1
- data/docs/LoyaltiesMembersGetResponseBodyLoyaltyCard.md +2 -1
- data/docs/LoyaltiesMembersPendingPointsActivateResponseBody.md +14 -0
- data/docs/LoyaltiesMembersPendingPointsActivateResponseBodyRelatedObject.md +9 -0
- data/docs/LoyaltiesMembersPendingPointsListResponseBody.md +12 -0
- data/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md +9 -9
- data/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md +1 -1
- data/docs/LoyaltiesMembersRedemptionRedeemResponseBodyVoucherLoyaltyCard.md +2 -1
- data/docs/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md +2 -1
- data/docs/LoyaltiesPendingPointsListResponseBody.md +12 -0
- data/docs/LoyaltiesUpdateCampaignRequestBody.md +3 -2
- data/docs/LoyaltyCardTransaction.md +2 -2
- data/docs/LoyaltyCardTransactionDetails.md +2 -0
- data/docs/LoyaltyCardTransactionDetailsBalance.md +5 -4
- data/docs/LoyaltyCardTransactionDetailsBalanceRelatedObject.md +1 -1
- data/docs/LoyaltyCardTransactionDetailsEarningRule.md +1 -1
- data/docs/LoyaltyCardTransactionDetailsHolderLoyaltyTier.md +9 -0
- data/docs/LoyaltyCardTransactionDetailsLoyaltyTier.md +2 -2
- data/docs/LoyaltyMemberLoyaltyCard.md +2 -1
- data/docs/LoyaltyPendingPoints.md +17 -0
- data/docs/LoyaltyPendingPointsDetails.md +12 -0
- data/docs/LoyaltyPendingPointsDetailsEarningRule.md +9 -0
- data/docs/LoyaltyPendingPointsDetailsEarningRuleSource.md +8 -0
- data/docs/LoyaltyPendingPointsDetailsEvent.md +14 -0
- data/docs/LoyaltyPendingPointsDetailsHolderLoyaltyTier.md +9 -0
- data/docs/LoyaltyPendingPointsDetailsLoyaltyTier.md +9 -0
- data/docs/LoyaltyPendingPointsDetailsOrder.md +9 -0
- data/docs/LoyaltyPointsBucket.md +16 -0
- data/docs/LoyaltyPointsBucketBucket.md +8 -0
- data/docs/LoyaltyTierExpiration.md +1 -1
- data/docs/Order.md +3 -3
- data/docs/OrderCalculated.md +12 -12
- data/docs/OrderCalculatedItem.md +2 -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/OrderRedemptionsEntry.md +1 -1
- data/docs/OrdersCreateRequestBody.md +3 -3
- data/docs/OrdersCreateResponseBody.md +12 -12
- data/docs/OrdersGetResponseBody.md +12 -12
- data/docs/OrdersImportCreateRequestBodyItem.md +3 -3
- data/docs/OrdersUpdateRequestBody.md +3 -3
- data/docs/OrdersUpdateResponseBody.md +12 -12
- data/docs/ParameterOrderListPendingPoints.md +7 -0
- 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/RedeemableLoyaltyCard.md +1 -1
- data/docs/RedeemableVoucherLoyaltyCard.md +2 -1
- data/docs/RedemptionEntryOrder.md +12 -12
- data/docs/RedemptionEntryVoucherLoyaltyCard.md +2 -1
- data/docs/RedemptionVoucherLoyaltyCard.md +2 -1
- data/docs/RedemptionsGetResponseBodyOrder.md +12 -12
- data/docs/RedemptionsGetResponseBodyVoucherLoyaltyCard.md +2 -1
- data/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md +12 -12
- data/docs/RedemptionsListResponseBodyRedemptionsItemVoucherLoyaltyCard.md +2 -1
- data/docs/SimpleLoyaltyCard.md +2 -1
- data/docs/Sku.md +1 -1
- data/docs/SkusGetResponseBody.md +1 -1
- data/docs/TemplatesCampaignsCampaignSetupCreateRequestBody.md +2 -1
- data/docs/ValidationsRedeemableInapplicable.md +3 -2
- data/docs/ValidationsRedeemableSkipped.md +3 -2
- data/docs/ValidationsValidateResponseBodyRedeemablesItem.md +3 -2
- data/docs/ValidationsValidateResponseBodyRedeemablesItemResultDiscount.md +1 -1
- data/docs/VoucherBalance.md +14 -0
- data/docs/VoucherBalanceRelatedObject.md +9 -0
- data/docs/VoucherLoyaltyCard.md +2 -1
- data/docs/VoucherTransaction.md +2 -2
- data/docs/VoucherTransactionDetails.md +2 -0
- data/docs/VoucherTransactionDetailsBalance.md +5 -4
- data/docs/VoucherTransactionDetailsBalanceRelatedObject.md +1 -1
- data/docs/VoucherTransactionDetailsCustomEvent.md +2 -2
- data/docs/VoucherTransactionDetailsEarningRule.md +1 -1
- data/docs/VoucherTransactionDetailsEventSchema.md +2 -2
- data/docs/VoucherTransactionDetailsHolderLoyaltyTier.md +9 -0
- data/docs/VoucherTransactionDetailsLoyaltyTier.md +2 -2
- data/docs/VoucherTransactionDetailsRollback.md +1 -1
- data/docs/VoucherTransactionDetailsSegment.md +2 -2
- data/docs/VoucherWithCategoriesLoyaltyCard.md +2 -1
- data/docs/VouchersApi.md +6 -6
- data/docs/VouchersBalanceUpdateResponseBody.md +1 -1
- data/docs/VouchersCreateResponseBodyLoyaltyCard.md +2 -1
- data/docs/VouchersDisableResponseBodyLoyaltyCard.md +2 -1
- data/docs/VouchersEnableResponseBodyLoyaltyCard.md +2 -1
- data/docs/VouchersGetResponseBodyLoyaltyCard.md +2 -1
- data/docs/VouchersUpdateResponseBodyLoyaltyCard.md +2 -1
- data/lib/VoucherifySdk/api/bin_api.rb +4 -4
- data/lib/VoucherifySdk/api/campaigns_api.rb +4 -4
- data/lib/VoucherifySdk/api/loyalties_api.rb +334 -8
- data/lib/VoucherifySdk/api/vouchers_api.rb +10 -10
- data/lib/VoucherifySdk/models/access_settings.rb +219 -0
- data/lib/VoucherifySdk/models/access_settings_assign.rb +238 -0
- data/lib/VoucherifySdk/models/access_settings_campaign_assignments_list.rb +1 -1
- data/lib/VoucherifySdk/models/access_settings_unassign.rb +238 -0
- data/lib/VoucherifySdk/models/applicable_to.rb +16 -3
- data/lib/VoucherifySdk/models/applicable_to_order_item_units_item.rb +220 -0
- data/lib/VoucherifySdk/models/application_details_item.rb +284 -0
- data/lib/VoucherifySdk/models/area_store_campaign_assignment.rb +12 -1
- data/lib/VoucherifySdk/models/campaign.rb +16 -16
- data/lib/VoucherifySdk/models/campaign_base.rb +16 -7
- data/lib/VoucherifySdk/models/campaigns_create_request_body.rb +11 -2
- data/lib/VoucherifySdk/models/campaigns_create_response_body.rb +16 -16
- data/lib/VoucherifySdk/models/campaigns_get_response_body.rb +16 -16
- data/lib/VoucherifySdk/models/campaigns_update_request_body.rb +12 -3
- data/lib/VoucherifySdk/models/campaigns_update_response_body.rb +16 -16
- data/lib/VoucherifySdk/models/campaigns_vouchers_create_combined_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/campaigns_vouchers_create_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/client_validations_validate_response_body_redeemables_item.rb +18 -7
- data/lib/VoucherifySdk/models/client_validations_validate_response_body_redeemables_item_result_discount.rb +1 -0
- data/lib/VoucherifySdk/models/customer_loyalty.rb +1 -1
- data/lib/VoucherifySdk/models/discount.rb +1 -0
- data/lib/VoucherifySdk/models/discount_unit_multiple_one_unit.rb +1 -0
- data/lib/VoucherifySdk/models/earning_rule.rb +11 -1
- data/lib/VoucherifySdk/models/earning_rule_pending_points.rb +257 -0
- data/lib/VoucherifySdk/models/error.rb +15 -5
- data/lib/VoucherifySdk/models/error_error.rb +210 -0
- data/lib/VoucherifySdk/models/event_source.rb +254 -0
- data/lib/VoucherifySdk/models/event_source_api_key.rb +221 -0
- data/lib/VoucherifySdk/models/event_source_user.rb +210 -0
- data/lib/VoucherifySdk/models/inapplicable_to.rb +16 -3
- data/lib/VoucherifySdk/models/inapplicable_to_order_item_units_item.rb +220 -0
- data/lib/VoucherifySdk/models/loyalties_create_campaign_request_body.rb +11 -2
- data/lib/VoucherifySdk/models/loyalties_earning_rules_create_response_body.rb +11 -1
- data/lib/VoucherifySdk/models/loyalties_earning_rules_create_response_body_pending_points.rb +257 -0
- data/lib/VoucherifySdk/models/loyalties_earning_rules_disable_response_body.rb +11 -1
- data/lib/VoucherifySdk/models/loyalties_earning_rules_disable_response_body_pending_points.rb +257 -0
- data/lib/VoucherifySdk/models/loyalties_earning_rules_enable_response_body.rb +11 -1
- data/lib/VoucherifySdk/models/loyalties_earning_rules_enable_response_body_pending_points.rb +257 -0
- data/lib/VoucherifySdk/models/loyalties_earning_rules_get_response_body.rb +11 -1
- data/lib/VoucherifySdk/models/loyalties_earning_rules_get_response_body_pending_points.rb +257 -0
- data/lib/VoucherifySdk/models/loyalties_earning_rules_update_response_body.rb +11 -1
- data/lib/VoucherifySdk/models/loyalties_earning_rules_update_response_body_pending_points.rb +257 -0
- data/lib/VoucherifySdk/models/loyalties_members_balance_update_response_body.rb +1 -0
- data/lib/VoucherifySdk/models/loyalties_members_create_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/loyalties_members_get_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/loyalties_members_pending_points_activate_response_body.rb +309 -0
- data/lib/VoucherifySdk/models/loyalties_members_pending_points_activate_response_body_related_object.rb +247 -0
- data/lib/VoucherifySdk/models/loyalties_members_pending_points_list_response_body.rb +286 -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_members_redemption_redeem_response_body_voucher_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/loyalties_members_transfers_create_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/loyalties_pending_points_list_response_body.rb +286 -0
- data/lib/VoucherifySdk/models/loyalties_update_campaign_request_body.rb +12 -3
- data/lib/VoucherifySdk/models/loyalty_card_transaction.rb +24 -31
- data/lib/VoucherifySdk/models/loyalty_card_transaction_details.rb +20 -2
- 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_card_transaction_details_earning_rule.rb +1 -1
- data/lib/VoucherifySdk/models/loyalty_card_transaction_details_holder_loyalty_tier.rb +221 -0
- data/lib/VoucherifySdk/models/loyalty_card_transaction_details_loyalty_tier.rb +3 -1
- data/lib/VoucherifySdk/models/loyalty_card_transactions_type.rb +2 -1
- data/lib/VoucherifySdk/models/loyalty_member_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/loyalty_pending_points.rb +314 -0
- data/lib/VoucherifySdk/models/loyalty_pending_points_details.rb +249 -0
- data/lib/VoucherifySdk/models/loyalty_pending_points_details_earning_rule.rb +220 -0
- data/lib/VoucherifySdk/models/loyalty_pending_points_details_earning_rule_source.rb +210 -0
- data/lib/VoucherifySdk/models/loyalty_pending_points_details_event.rb +302 -0
- data/lib/VoucherifySdk/models/loyalty_pending_points_details_holder_loyalty_tier.rb +221 -0
- data/lib/VoucherifySdk/models/loyalty_pending_points_details_loyalty_tier.rb +221 -0
- data/lib/VoucherifySdk/models/loyalty_pending_points_details_order.rb +221 -0
- 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/loyalty_tier_expiration.rb +1 -1
- data/lib/VoucherifySdk/models/order.rb +3 -3
- data/lib/VoucherifySdk/models/order_calculated.rb +29 -29
- data/lib/VoucherifySdk/models/order_calculated_item.rb +18 -6
- 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/order_redemptions_entry.rb +1 -1
- data/lib/VoucherifySdk/models/orders_create_request_body.rb +3 -3
- data/lib/VoucherifySdk/models/orders_create_response_body.rb +29 -29
- data/lib/VoucherifySdk/models/orders_get_response_body.rb +29 -29
- data/lib/VoucherifySdk/models/orders_import_create_request_body_item.rb +3 -3
- data/lib/VoucherifySdk/models/orders_update_request_body.rb +3 -3
- data/lib/VoucherifySdk/models/orders_update_response_body.rb +29 -29
- data/lib/VoucherifySdk/models/parameter_expand_list_campaigns.rb +2 -1
- data/lib/VoucherifySdk/models/parameter_order_list_pending_points.rb +40 -0
- 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/qualifications_option.rb +3 -3
- data/lib/VoucherifySdk/models/redeemable_loyalty_card.rb +1 -1
- data/lib/VoucherifySdk/models/redeemable_voucher_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/redemption_entry_order.rb +29 -29
- data/lib/VoucherifySdk/models/redemption_entry_voucher_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/redemption_voucher_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/redemptions_get_response_body_order.rb +29 -29
- data/lib/VoucherifySdk/models/redemptions_get_response_body_voucher_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_order.rb +28 -29
- data/lib/VoucherifySdk/models/redemptions_list_response_body_redemptions_item_voucher_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/simple_loyalty_card.rb +17 -6
- 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 +11 -2
- 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/validations_validate_response_body_redeemables_item_result_discount.rb +1 -0
- 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_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/voucher_transaction.rb +27 -31
- data/lib/VoucherifySdk/models/voucher_transaction_details.rb +20 -2
- 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/voucher_transaction_details_custom_event.rb +2 -2
- data/lib/VoucherifySdk/models/voucher_transaction_details_earning_rule.rb +1 -1
- data/lib/VoucherifySdk/models/voucher_transaction_details_event_schema.rb +2 -2
- data/lib/VoucherifySdk/models/voucher_transaction_details_holder_loyalty_tier.rb +221 -0
- data/lib/VoucherifySdk/models/voucher_transaction_details_loyalty_tier.rb +3 -1
- data/lib/VoucherifySdk/models/voucher_transaction_details_rollback.rb +1 -1
- data/lib/VoucherifySdk/models/voucher_transaction_details_segment.rb +2 -0
- data/lib/VoucherifySdk/models/voucher_with_categories_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/vouchers_balance_update_response_body.rb +1 -0
- data/lib/VoucherifySdk/models/vouchers_create_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/vouchers_disable_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/vouchers_enable_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/vouchers_get_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/models/vouchers_update_response_body_loyalty_card.rb +17 -6
- data/lib/VoucherifySdk/version.rb +1 -1
- data/lib/VoucherifySdk.rb +35 -0
- metadata +106 -36
@@ -0,0 +1,286 @@
|
|
1
|
+
=begin
|
2
|
+
#Voucherify API
|
3
|
+
|
4
|
+
#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v2018-08-01
|
7
|
+
Contact: support@voucherify.io
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.0.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module VoucherifySdk
|
17
|
+
# Response body schema for **GET** `/loyalties/{campaignId}/pending-points`.
|
18
|
+
class LoyaltiesPendingPointsListResponseBody
|
19
|
+
# The type of the object represented by JSON.
|
20
|
+
attr_accessor :object
|
21
|
+
|
22
|
+
# Identifies the name of the attribute that contains the array of pending point objects.
|
23
|
+
attr_accessor :data_ref
|
24
|
+
|
25
|
+
# A dictionary that contains an array of pending point entries. Each entry in the array is a separate pending point object.
|
26
|
+
attr_accessor :data
|
27
|
+
|
28
|
+
# As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request to get more records returned in the results.
|
29
|
+
attr_accessor :has_more
|
30
|
+
|
31
|
+
# Returns an ID that can be used to return another page of results. Use the pending point entry ID in the `starting_after_id` query parameter to display another page of the results starting after the entry with that ID.
|
32
|
+
attr_accessor :more_starting_after
|
33
|
+
|
34
|
+
class EnumAttributeValidator
|
35
|
+
attr_reader :datatype
|
36
|
+
attr_reader :allowable_values
|
37
|
+
|
38
|
+
def initialize(datatype, allowable_values)
|
39
|
+
@allowable_values = allowable_values.map do |value|
|
40
|
+
case datatype.to_s
|
41
|
+
when /Integer/i
|
42
|
+
value.to_i
|
43
|
+
when /Float/i
|
44
|
+
value.to_f
|
45
|
+
else
|
46
|
+
value
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def valid?(value)
|
52
|
+
!value || allowable_values.include?(value)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
57
|
+
def self.attribute_map
|
58
|
+
{
|
59
|
+
:'object' => :'object',
|
60
|
+
:'data_ref' => :'data_ref',
|
61
|
+
:'data' => :'data',
|
62
|
+
:'has_more' => :'has_more',
|
63
|
+
:'more_starting_after' => :'more_starting_after'
|
64
|
+
}
|
65
|
+
end
|
66
|
+
|
67
|
+
# Returns all the JSON keys this model knows about
|
68
|
+
def self.acceptable_attributes
|
69
|
+
attribute_map.values
|
70
|
+
end
|
71
|
+
|
72
|
+
# Attribute type mapping.
|
73
|
+
def self.openapi_types
|
74
|
+
{
|
75
|
+
:'object' => :'String',
|
76
|
+
:'data_ref' => :'String',
|
77
|
+
:'data' => :'Array<LoyaltyPendingPoints>',
|
78
|
+
:'has_more' => :'Boolean',
|
79
|
+
:'more_starting_after' => :'String'
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
83
|
+
# List of attributes with nullable: true
|
84
|
+
def self.openapi_nullable
|
85
|
+
Set.new([
|
86
|
+
:'object',
|
87
|
+
:'data_ref',
|
88
|
+
:'data',
|
89
|
+
:'has_more',
|
90
|
+
:'more_starting_after'
|
91
|
+
])
|
92
|
+
end
|
93
|
+
|
94
|
+
# Initializes the object
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
96
|
+
def initialize(attributes = {})
|
97
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
98
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
99
|
+
h[k.to_sym] = v
|
100
|
+
}
|
101
|
+
|
102
|
+
if attributes.key?(:'object')
|
103
|
+
self.object = attributes[:'object']
|
104
|
+
else
|
105
|
+
self.object = 'list'
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.key?(:'data_ref')
|
109
|
+
self.data_ref = attributes[:'data_ref']
|
110
|
+
else
|
111
|
+
self.data_ref = 'data'
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'data')
|
115
|
+
if (value = attributes[:'data']).is_a?(Array)
|
116
|
+
self.data = value
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'has_more')
|
121
|
+
self.has_more = attributes[:'has_more']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'more_starting_after')
|
125
|
+
self.more_starting_after = attributes[:'more_starting_after']
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
130
|
+
# @return Array for valid properties with the reasons
|
131
|
+
def list_invalid_properties
|
132
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
133
|
+
invalid_properties = Array.new
|
134
|
+
invalid_properties
|
135
|
+
end
|
136
|
+
|
137
|
+
# Check to see if the all the properties in the model are valid
|
138
|
+
# @return true if the model is valid
|
139
|
+
def valid?
|
140
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
141
|
+
object_validator = EnumAttributeValidator.new('String', ["list"])
|
142
|
+
return false unless object_validator.valid?(@object)
|
143
|
+
data_ref_validator = EnumAttributeValidator.new('String', ["data"])
|
144
|
+
return false unless data_ref_validator.valid?(@data_ref)
|
145
|
+
true
|
146
|
+
end
|
147
|
+
|
148
|
+
# Checks equality by comparing each attribute.
|
149
|
+
# @param [Object] Object to be compared
|
150
|
+
def ==(o)
|
151
|
+
return true if self.equal?(o)
|
152
|
+
self.class == o.class &&
|
153
|
+
object == o.object &&
|
154
|
+
data_ref == o.data_ref &&
|
155
|
+
data == o.data &&
|
156
|
+
has_more == o.has_more &&
|
157
|
+
more_starting_after == o.more_starting_after
|
158
|
+
end
|
159
|
+
|
160
|
+
# @see the `==` method
|
161
|
+
# @param [Object] Object to be compared
|
162
|
+
def eql?(o)
|
163
|
+
self == o
|
164
|
+
end
|
165
|
+
|
166
|
+
# Calculates hash code according to all attributes.
|
167
|
+
# @return [Integer] Hash code
|
168
|
+
def hash
|
169
|
+
[object, data_ref, data, has_more, more_starting_after].hash
|
170
|
+
end
|
171
|
+
|
172
|
+
# Builds the object from hash
|
173
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
174
|
+
# @return [Object] Returns the model itself
|
175
|
+
def self.build_from_hash(attributes)
|
176
|
+
return nil unless attributes.is_a?(Hash)
|
177
|
+
attributes = attributes.transform_keys(&:to_sym)
|
178
|
+
transformed_hash = {}
|
179
|
+
openapi_types.each_pair do |key, type|
|
180
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
181
|
+
transformed_hash["#{key}"] = nil
|
182
|
+
elsif type =~ /\AArray<(.*)>/i
|
183
|
+
# check to ensure the input is an array given that the attribute
|
184
|
+
# is documented as an array but the input is not
|
185
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
186
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
187
|
+
end
|
188
|
+
elsif !attributes[attribute_map[key]].nil?
|
189
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
190
|
+
end
|
191
|
+
end
|
192
|
+
new(transformed_hash)
|
193
|
+
end
|
194
|
+
|
195
|
+
# Deserializes the data based on type
|
196
|
+
# @param string type Data type
|
197
|
+
# @param string value Value to be deserialized
|
198
|
+
# @return [Object] Deserialized data
|
199
|
+
def self._deserialize(type, value)
|
200
|
+
case type.to_sym
|
201
|
+
when :Time
|
202
|
+
Time.parse(value)
|
203
|
+
when :Date
|
204
|
+
Date.parse(value)
|
205
|
+
when :String
|
206
|
+
value.to_s
|
207
|
+
when :Integer
|
208
|
+
value.to_i
|
209
|
+
when :Float
|
210
|
+
value.to_f
|
211
|
+
when :Boolean
|
212
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
213
|
+
true
|
214
|
+
else
|
215
|
+
false
|
216
|
+
end
|
217
|
+
when :Object
|
218
|
+
# generic object (usually a Hash), return directly
|
219
|
+
value
|
220
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
221
|
+
inner_type = Regexp.last_match[:inner_type]
|
222
|
+
value.map { |v| _deserialize(inner_type, v) }
|
223
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
224
|
+
k_type = Regexp.last_match[:k_type]
|
225
|
+
v_type = Regexp.last_match[:v_type]
|
226
|
+
{}.tap do |hash|
|
227
|
+
value.each do |k, v|
|
228
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
229
|
+
end
|
230
|
+
end
|
231
|
+
else # model
|
232
|
+
# models (e.g. Pet) or oneOf
|
233
|
+
klass = VoucherifySdk.const_get(type)
|
234
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
# Returns the string representation of the object
|
239
|
+
# @return [String] String presentation of the object
|
240
|
+
def to_s
|
241
|
+
to_hash.to_s
|
242
|
+
end
|
243
|
+
|
244
|
+
# to_body is an alias to to_hash (backward compatibility)
|
245
|
+
# @return [Hash] Returns the object in the form of hash
|
246
|
+
def to_body
|
247
|
+
to_hash
|
248
|
+
end
|
249
|
+
|
250
|
+
# Returns the object in the form of hash
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
252
|
+
def to_hash
|
253
|
+
hash = {}
|
254
|
+
self.class.attribute_map.each_pair do |attr, param|
|
255
|
+
value = self.send(attr)
|
256
|
+
if value.nil?
|
257
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
258
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
259
|
+
end
|
260
|
+
|
261
|
+
hash[param] = _to_hash(value)
|
262
|
+
end
|
263
|
+
hash
|
264
|
+
end
|
265
|
+
|
266
|
+
# Outputs non-array value in the form of hash
|
267
|
+
# For object, use to_hash. Otherwise, just return the value
|
268
|
+
# @param [Object] value Any valid value
|
269
|
+
# @return [Hash] Returns the value in the form of hash
|
270
|
+
def _to_hash(value)
|
271
|
+
if value.is_a?(Array)
|
272
|
+
value.compact.map { |v| _to_hash(v) }
|
273
|
+
elsif value.is_a?(Hash)
|
274
|
+
{}.tap do |hash|
|
275
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
276
|
+
end
|
277
|
+
elsif value.respond_to? :to_hash
|
278
|
+
value.to_hash
|
279
|
+
else
|
280
|
+
value
|
281
|
+
end
|
282
|
+
end
|
283
|
+
|
284
|
+
end
|
285
|
+
|
286
|
+
end
|
@@ -44,16 +44,18 @@ module VoucherifySdk
|
|
44
44
|
# Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`.
|
45
45
|
attr_accessor :category_id
|
46
46
|
|
47
|
+
attr_accessor :access_settings
|
48
|
+
|
47
49
|
# Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.
|
48
50
|
attr_accessor :activity_duration_after_publishing
|
49
51
|
|
50
|
-
# If this value is set to `true`, customers will be able to join the campaign only once.
|
52
|
+
# If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.
|
51
53
|
attr_accessor :join_once
|
52
54
|
|
53
55
|
# Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
|
54
56
|
attr_accessor :auto_join
|
55
57
|
|
56
|
-
# Defines whether the campaign can be updated with new vouchers after campaign creation.
|
58
|
+
# Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. If the `type` of the campaign is `STANDALONE`, the type cannot be changed. Also, the `type` cannot be changed to `STANDALONE`.
|
57
59
|
attr_accessor :type
|
58
60
|
|
59
61
|
attr_accessor :loyalty_tiers_expiration
|
@@ -95,6 +97,7 @@ module VoucherifySdk
|
|
95
97
|
:'metadata' => :'metadata',
|
96
98
|
:'unset_metadata_fields' => :'unset_metadata_fields',
|
97
99
|
:'category_id' => :'category_id',
|
100
|
+
:'access_settings' => :'access_settings',
|
98
101
|
:'activity_duration_after_publishing' => :'activity_duration_after_publishing',
|
99
102
|
:'join_once' => :'join_once',
|
100
103
|
:'auto_join' => :'auto_join',
|
@@ -122,6 +125,7 @@ module VoucherifySdk
|
|
122
125
|
:'metadata' => :'Object',
|
123
126
|
:'unset_metadata_fields' => :'Array<String>',
|
124
127
|
:'category_id' => :'String',
|
128
|
+
:'access_settings' => :'AccessSettings',
|
125
129
|
:'activity_duration_after_publishing' => :'String',
|
126
130
|
:'join_once' => :'Boolean',
|
127
131
|
:'auto_join' => :'Boolean',
|
@@ -201,6 +205,10 @@ module VoucherifySdk
|
|
201
205
|
self.category_id = attributes[:'category_id']
|
202
206
|
end
|
203
207
|
|
208
|
+
if attributes.key?(:'access_settings')
|
209
|
+
self.access_settings = attributes[:'access_settings']
|
210
|
+
end
|
211
|
+
|
204
212
|
if attributes.key?(:'activity_duration_after_publishing')
|
205
213
|
self.activity_duration_after_publishing = attributes[:'activity_duration_after_publishing']
|
206
214
|
end
|
@@ -258,6 +266,7 @@ module VoucherifySdk
|
|
258
266
|
metadata == o.metadata &&
|
259
267
|
unset_metadata_fields == o.unset_metadata_fields &&
|
260
268
|
category_id == o.category_id &&
|
269
|
+
access_settings == o.access_settings &&
|
261
270
|
activity_duration_after_publishing == o.activity_duration_after_publishing &&
|
262
271
|
join_once == o.join_once &&
|
263
272
|
auto_join == o.auto_join &&
|
@@ -275,7 +284,7 @@ module VoucherifySdk
|
|
275
284
|
# Calculates hash code according to all attributes.
|
276
285
|
# @return [Integer] Hash code
|
277
286
|
def hash
|
278
|
-
[start_date, expiration_date, validity_timeframe, validity_day_of_week, validity_hours, description, category, metadata, unset_metadata_fields, category_id, activity_duration_after_publishing, join_once, auto_join, type, loyalty_tiers_expiration, options].hash
|
287
|
+
[start_date, expiration_date, validity_timeframe, validity_day_of_week, validity_hours, description, category, metadata, unset_metadata_fields, category_id, access_settings, activity_duration_after_publishing, join_once, auto_join, type, loyalty_tiers_expiration, options].hash
|
279
288
|
end
|
280
289
|
|
281
290
|
# Builds the object from hash
|
@@ -33,16 +33,16 @@ module VoucherifySdk
|
|
33
33
|
# Reason why the transaction occurred. In case of a redemption, this value is null.
|
34
34
|
attr_accessor :reason
|
35
35
|
|
36
|
-
attr_accessor :type
|
37
|
-
|
38
|
-
attr_accessor :details
|
39
|
-
|
40
36
|
# The related transaction ID on the receiving card.
|
41
37
|
attr_accessor :related_transaction_id
|
42
38
|
|
43
39
|
# Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format.
|
44
40
|
attr_accessor :created_at
|
45
41
|
|
42
|
+
attr_accessor :details
|
43
|
+
|
44
|
+
attr_accessor :type
|
45
|
+
|
46
46
|
class EnumAttributeValidator
|
47
47
|
attr_reader :datatype
|
48
48
|
attr_reader :allowable_values
|
@@ -74,10 +74,10 @@ module VoucherifySdk
|
|
74
74
|
:'campaign_id' => :'campaign_id',
|
75
75
|
:'source' => :'source',
|
76
76
|
:'reason' => :'reason',
|
77
|
-
:'type' => :'type',
|
78
|
-
:'details' => :'details',
|
79
77
|
:'related_transaction_id' => :'related_transaction_id',
|
80
|
-
:'created_at' => :'created_at'
|
78
|
+
:'created_at' => :'created_at',
|
79
|
+
:'details' => :'details',
|
80
|
+
:'type' => :'type'
|
81
81
|
}
|
82
82
|
end
|
83
83
|
|
@@ -95,10 +95,10 @@ module VoucherifySdk
|
|
95
95
|
:'campaign_id' => :'String',
|
96
96
|
:'source' => :'String',
|
97
97
|
:'reason' => :'String',
|
98
|
-
:'type' => :'LoyaltyCardTransactionsType',
|
99
|
-
:'details' => :'LoyaltyCardTransactionDetails',
|
100
98
|
:'related_transaction_id' => :'String',
|
101
|
-
:'created_at' => :'Time'
|
99
|
+
:'created_at' => :'Time',
|
100
|
+
:'details' => :'LoyaltyCardTransactionDetails',
|
101
|
+
:'type' => :'LoyaltyCardTransactionsType'
|
102
102
|
}
|
103
103
|
end
|
104
104
|
|
@@ -111,9 +111,9 @@ module VoucherifySdk
|
|
111
111
|
:'campaign_id',
|
112
112
|
:'source',
|
113
113
|
:'reason',
|
114
|
-
:'details',
|
115
114
|
:'related_transaction_id',
|
116
|
-
:'created_at'
|
115
|
+
:'created_at',
|
116
|
+
:'details',
|
117
117
|
])
|
118
118
|
end
|
119
119
|
|
@@ -149,16 +149,6 @@ module VoucherifySdk
|
|
149
149
|
self.reason = attributes[:'reason']
|
150
150
|
end
|
151
151
|
|
152
|
-
if attributes.key?(:'type')
|
153
|
-
self.type = attributes[:'type']
|
154
|
-
else
|
155
|
-
self.type = nil
|
156
|
-
end
|
157
|
-
|
158
|
-
if attributes.key?(:'details')
|
159
|
-
self.details = attributes[:'details']
|
160
|
-
end
|
161
|
-
|
162
152
|
if attributes.key?(:'related_transaction_id')
|
163
153
|
self.related_transaction_id = attributes[:'related_transaction_id']
|
164
154
|
end
|
@@ -166,6 +156,14 @@ module VoucherifySdk
|
|
166
156
|
if attributes.key?(:'created_at')
|
167
157
|
self.created_at = attributes[:'created_at']
|
168
158
|
end
|
159
|
+
|
160
|
+
if attributes.key?(:'details')
|
161
|
+
self.details = attributes[:'details']
|
162
|
+
end
|
163
|
+
|
164
|
+
if attributes.key?(:'type')
|
165
|
+
self.type = attributes[:'type']
|
166
|
+
end
|
169
167
|
end
|
170
168
|
|
171
169
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -173,10 +171,6 @@ module VoucherifySdk
|
|
173
171
|
def list_invalid_properties
|
174
172
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
175
173
|
invalid_properties = Array.new
|
176
|
-
if @type.nil?
|
177
|
-
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
178
|
-
end
|
179
|
-
|
180
174
|
invalid_properties
|
181
175
|
end
|
182
176
|
|
@@ -184,7 +178,6 @@ module VoucherifySdk
|
|
184
178
|
# @return true if the model is valid
|
185
179
|
def valid?
|
186
180
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
187
|
-
return false if @type.nil?
|
188
181
|
true
|
189
182
|
end
|
190
183
|
|
@@ -199,10 +192,10 @@ module VoucherifySdk
|
|
199
192
|
campaign_id == o.campaign_id &&
|
200
193
|
source == o.source &&
|
201
194
|
reason == o.reason &&
|
202
|
-
type == o.type &&
|
203
|
-
details == o.details &&
|
204
195
|
related_transaction_id == o.related_transaction_id &&
|
205
|
-
created_at == o.created_at
|
196
|
+
created_at == o.created_at &&
|
197
|
+
details == o.details &&
|
198
|
+
type == o.type
|
206
199
|
end
|
207
200
|
|
208
201
|
# @see the `==` method
|
@@ -214,7 +207,7 @@ module VoucherifySdk
|
|
214
207
|
# Calculates hash code according to all attributes.
|
215
208
|
# @return [Integer] Hash code
|
216
209
|
def hash
|
217
|
-
[id, source_id, voucher_id, campaign_id, source, reason,
|
210
|
+
[id, source_id, voucher_id, campaign_id, source, reason, related_transaction_id, created_at, details, type].hash
|
218
211
|
end
|
219
212
|
|
220
213
|
# Builds the object from hash
|
@@ -36,6 +36,10 @@ module VoucherifySdk
|
|
36
36
|
|
37
37
|
attr_accessor :event_schema
|
38
38
|
|
39
|
+
attr_accessor :holder_loyalty_tier
|
40
|
+
|
41
|
+
attr_accessor :pending_points
|
42
|
+
|
39
43
|
attr_accessor :reward
|
40
44
|
|
41
45
|
attr_accessor :source_voucher
|
@@ -55,6 +59,8 @@ module VoucherifySdk
|
|
55
59
|
:'rollback' => :'rollback',
|
56
60
|
:'custom_event' => :'custom_event',
|
57
61
|
:'event_schema' => :'event_schema',
|
62
|
+
:'holder_loyalty_tier' => :'holder_loyalty_tier',
|
63
|
+
:'pending_points' => :'pending_points',
|
58
64
|
:'reward' => :'reward',
|
59
65
|
:'source_voucher' => :'source_voucher',
|
60
66
|
:'destination_voucher' => :'destination_voucher'
|
@@ -79,6 +85,8 @@ module VoucherifySdk
|
|
79
85
|
:'rollback' => :'LoyaltyCardTransactionDetailsRollback',
|
80
86
|
:'custom_event' => :'LoyaltyCardTransactionDetailsCustomEvent',
|
81
87
|
:'event_schema' => :'LoyaltyCardTransactionDetailsEventSchema',
|
88
|
+
:'holder_loyalty_tier' => :'LoyaltyCardTransactionDetailsHolderLoyaltyTier',
|
89
|
+
:'pending_points' => :'LoyaltyPendingPoints',
|
82
90
|
:'reward' => :'LoyaltyCardTransactionDetailsReward',
|
83
91
|
:'source_voucher' => :'SimpleVoucher',
|
84
92
|
:'destination_voucher' => :'SimpleVoucher'
|
@@ -88,7 +96,6 @@ module VoucherifySdk
|
|
88
96
|
# List of attributes with nullable: true
|
89
97
|
def self.openapi_nullable
|
90
98
|
Set.new([
|
91
|
-
:'balance',
|
92
99
|
:'order',
|
93
100
|
:'event',
|
94
101
|
:'earning_rule',
|
@@ -98,6 +105,7 @@ module VoucherifySdk
|
|
98
105
|
:'rollback',
|
99
106
|
:'custom_event',
|
100
107
|
:'event_schema',
|
108
|
+
:'holder_loyalty_tier',
|
101
109
|
:'reward',
|
102
110
|
])
|
103
111
|
end
|
@@ -150,6 +158,14 @@ module VoucherifySdk
|
|
150
158
|
self.event_schema = attributes[:'event_schema']
|
151
159
|
end
|
152
160
|
|
161
|
+
if attributes.key?(:'holder_loyalty_tier')
|
162
|
+
self.holder_loyalty_tier = attributes[:'holder_loyalty_tier']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.key?(:'pending_points')
|
166
|
+
self.pending_points = attributes[:'pending_points']
|
167
|
+
end
|
168
|
+
|
153
169
|
if attributes.key?(:'reward')
|
154
170
|
self.reward = attributes[:'reward']
|
155
171
|
end
|
@@ -193,6 +209,8 @@ module VoucherifySdk
|
|
193
209
|
rollback == o.rollback &&
|
194
210
|
custom_event == o.custom_event &&
|
195
211
|
event_schema == o.event_schema &&
|
212
|
+
holder_loyalty_tier == o.holder_loyalty_tier &&
|
213
|
+
pending_points == o.pending_points &&
|
196
214
|
reward == o.reward &&
|
197
215
|
source_voucher == o.source_voucher &&
|
198
216
|
destination_voucher == o.destination_voucher
|
@@ -207,7 +225,7 @@ module VoucherifySdk
|
|
207
225
|
# Calculates hash code according to all attributes.
|
208
226
|
# @return [Integer] Hash code
|
209
227
|
def hash
|
210
|
-
[balance, order, event, earning_rule, segment, loyalty_tier, redemption, rollback, custom_event, event_schema, reward, source_voucher, destination_voucher].hash
|
228
|
+
[balance, order, event, earning_rule, segment, loyalty_tier, redemption, rollback, custom_event, event_schema, holder_loyalty_tier, pending_points, reward, source_voucher, destination_voucher].hash
|
211
229
|
end
|
212
230
|
|
213
231
|
# Builds the object from hash
|
@@ -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' => :'LoyaltyCardTransactionDetailsBalanceRelatedObject'
|
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
|