talon_one 4.0.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +83 -18
- data/docs/AchievementProgress.md +2 -0
- data/docs/ActivateUserRequest.md +17 -0
- data/docs/AdditionalCampaignProperties.md +3 -1
- data/docs/AnalyticsDataPoint.md +19 -0
- data/docs/AnalyticsDataPointWithTrend.md +19 -0
- data/docs/AnalyticsDataPointWithTrendAndInfluencedRate.md +21 -0
- data/docs/AnalyticsDataPointWithTrendAndUplift.md +21 -0
- data/docs/Application.md +4 -0
- data/docs/ApplicationAnalyticsDataPoint.md +6 -6
- data/docs/ApplicationCIF.md +33 -0
- data/docs/ApplicationCIFExpression.md +27 -0
- data/docs/ApplicationCampaignAnalytics.md +13 -19
- data/docs/ApplicationCampaignStats.md +1 -3
- data/docs/AsyncCouponDeletionJobResponse.md +17 -0
- data/docs/BaseLoyaltyProgram.md +8 -4
- data/docs/BaseNotification.md +1 -1
- data/docs/BaseNotificationEntity.md +1 -1
- data/docs/Campaign.md +15 -1
- data/docs/CampaignCollectionEditedNotification.md +21 -0
- data/docs/CampaignNotificationPolicy.md +3 -1
- data/docs/CampaignStateChangedNotification.md +2 -2
- data/docs/CampaignStoreBudget.md +25 -0
- data/docs/CampaignVersions.md +27 -0
- data/docs/CardAddedDeductedPointsNotificationPolicy.md +19 -0
- data/docs/CartItem.md +1 -1
- data/docs/CodeGeneratorSettings.md +1 -1
- data/docs/Coupon.md +3 -3
- data/docs/CouponConstraints.md +1 -1
- data/docs/CouponCreationJob.md +1 -1
- data/docs/CouponDeletionFilters.md +43 -0
- data/docs/CouponDeletionJob.md +39 -0
- data/docs/CustomerInventory.md +1 -1
- data/docs/CustomerSessionV2.md +2 -2
- data/docs/Effect.md +8 -0
- data/docs/EffectEntity.md +9 -1
- data/docs/Environment.md +3 -1
- data/docs/Event.md +1 -1
- data/docs/GenerateCampaignDescription.md +19 -0
- data/docs/GenerateCampaignTags.md +17 -0
- data/docs/GenerateItemFilterDescription.md +17 -0
- data/docs/GenerateLoyaltyCard.md +19 -0
- data/docs/GenerateRuleTitle.md +19 -0
- data/docs/GenerateRuleTitleRule.md +19 -0
- data/docs/IncreaseAchievementProgressEffectProps.md +1 -1
- data/docs/InlineResponse20044.md +1 -1
- data/docs/IntegrationApi.md +77 -16
- data/docs/IntegrationCoupon.md +3 -3
- data/docs/InventoryCoupon.md +3 -3
- data/docs/InventoryReferral.md +1 -1
- data/docs/LoyaltyBalanceWithTier.md +31 -0
- data/docs/LoyaltyBalancesWithTiers.md +19 -0
- data/docs/LoyaltyCard.md +6 -2
- data/docs/LoyaltyCardBalances.md +21 -0
- data/docs/LoyaltyCardBatch.md +21 -0
- data/docs/LoyaltyCardBatchResponse.md +19 -0
- data/docs/LoyaltyCardProfileRegistration.md +1 -1
- data/docs/LoyaltyProgram.md +14 -6
- data/docs/ManagementApi.md +1269 -176
- data/docs/MessageLogEntry.md +1 -3
- data/docs/MessageLogResponse.md +3 -3
- data/docs/NewAppWideCouponDeletionJob.md +19 -0
- data/docs/NewApplication.md +3 -1
- data/docs/NewApplicationCIF.md +27 -0
- data/docs/NewApplicationCIFExpression.md +21 -0
- data/docs/NewBaseNotification.md +1 -1
- data/docs/NewCouponCreationJob.md +1 -1
- data/docs/NewCouponDeletionJob.md +17 -0
- data/docs/NewCoupons.md +2 -2
- data/docs/NewCouponsForMultipleRecipients.md +1 -1
- data/docs/NewCustomerSessionV2.md +2 -2
- data/docs/NewExternalInvitation.md +21 -0
- data/docs/NewLoyaltyProgram.md +8 -4
- data/docs/NewOutgoingIntegrationWebhook.md +2 -0
- data/docs/NewReferral.md +1 -1
- data/docs/NewReferralsForMultipleAdvocates.md +1 -1
- data/docs/NewRevisionVersion.md +37 -0
- data/docs/NewWebhook.md +2 -0
- data/docs/OktaEvent.md +19 -0
- data/docs/OktaEventPayload.md +17 -0
- data/docs/OktaEventPayloadData.md +17 -0
- data/docs/OktaEventTarget.md +21 -0
- data/docs/ProjectedTier.md +21 -0
- data/docs/Referral.md +1 -1
- data/docs/ReferralConstraints.md +1 -1
- data/docs/RejectCouponEffectProps.md +3 -1
- data/docs/RejectReferralEffectProps.md +3 -1
- data/docs/Revision.md +35 -0
- data/docs/RevisionActivation.md +17 -0
- data/docs/RevisionVersion.md +53 -0
- data/docs/RollbackIncreasedAchievementProgressEffectProps.md +27 -0
- data/docs/RuleFailureReason.md +5 -1
- data/docs/SSOConfig.md +3 -1
- data/docs/ScimBaseUser.md +23 -0
- data/docs/ScimBaseUserName.md +17 -0
- data/docs/ScimNewUser.md +23 -0
- data/docs/ScimPatchOperation.md +21 -0
- data/docs/ScimPatchRequest.md +19 -0
- data/docs/ScimResource.md +21 -0
- data/docs/ScimResourceTypesListResponse.md +17 -0
- data/docs/ScimSchemaResource.md +23 -0
- data/docs/ScimSchemasListResponse.md +21 -0
- data/docs/ScimServiceProviderConfigResponse.md +27 -0
- data/docs/ScimServiceProviderConfigResponseBulk.md +21 -0
- data/docs/ScimServiceProviderConfigResponseChangePassword.md +17 -0
- data/docs/ScimServiceProviderConfigResponseFilter.md +19 -0
- data/docs/ScimServiceProviderConfigResponsePatch.md +17 -0
- data/docs/ScimUser.md +25 -0
- data/docs/ScimUsersListResponse.md +21 -0
- data/docs/Tier.md +3 -1
- data/docs/TransferLoyaltyCard.md +3 -1
- data/docs/UpdateApplication.md +5 -1
- data/docs/UpdateApplicationCIF.md +23 -0
- data/docs/UpdateCampaign.md +1 -1
- data/docs/UpdateCoupon.md +2 -2
- data/docs/UpdateCouponBatch.md +1 -1
- data/docs/UpdateLoyaltyCard.md +4 -2
- data/docs/UpdateLoyaltyProgram.md +8 -4
- data/docs/UpdateReferral.md +1 -1
- data/docs/UpdateReferralBatch.md +1 -1
- data/docs/UpdateUser.md +1 -1
- data/docs/User.md +3 -1
- data/docs/Webhook.md +2 -0
- data/docs/WebhookWithOutgoingIntegrationDetails.md +2 -0
- data/lib/talon_one/api/integration_api.rb +101 -25
- data/lib/talon_one/api/management_api.rb +1362 -189
- data/lib/talon_one/models/achievement_progress.rb +16 -1
- data/lib/talon_one/models/activate_user_request.rb +213 -0
- data/lib/talon_one/models/additional_campaign_properties.rb +21 -6
- data/lib/talon_one/models/analytics_data_point.rb +225 -0
- data/lib/talon_one/models/analytics_data_point_with_trend.rb +225 -0
- data/lib/talon_one/models/analytics_data_point_with_trend_and_influenced_rate.rb +239 -0
- data/lib/talon_one/models/analytics_data_point_with_trend_and_uplift.rb +239 -0
- data/lib/talon_one/models/application.rb +21 -1
- data/lib/talon_one/models/application_analytics_data_point.rb +14 -4
- data/lib/talon_one/models/application_campaign_analytics.rb +39 -41
- data/lib/talon_one/models/application_campaign_stats.rb +1 -16
- data/lib/talon_one/models/application_cif.rb +308 -0
- data/lib/talon_one/models/application_cif_expression.rb +275 -0
- data/lib/talon_one/models/async_coupon_deletion_job_response.rb +213 -0
- data/lib/talon_one/models/attribute.rb +2 -2
- data/lib/talon_one/models/base_loyalty_program.rb +44 -25
- data/lib/talon_one/models/base_notification.rb +3 -2
- data/lib/talon_one/models/base_notification_entity.rb +1 -0
- data/lib/talon_one/models/campaign.rb +83 -6
- data/lib/talon_one/models/campaign_collection_edited_notification.rb +235 -0
- data/lib/talon_one/models/campaign_notification_policy.rb +16 -4
- data/lib/talon_one/models/campaign_state_changed_notification.rb +2 -2
- data/lib/talon_one/models/campaign_store_budget.rb +275 -0
- data/lib/talon_one/models/campaign_versions.rb +259 -0
- data/lib/talon_one/models/card_added_deducted_points_notification_policy.rb +269 -0
- data/lib/talon_one/models/cart_item.rb +1 -1
- data/lib/talon_one/models/code_generator_settings.rb +1 -1
- data/lib/talon_one/models/coupon.rb +3 -3
- data/lib/talon_one/models/coupon_constraints.rb +1 -1
- data/lib/talon_one/models/coupon_creation_job.rb +1 -1
- data/lib/talon_one/models/coupon_deletion_filters.rb +375 -0
- data/lib/talon_one/models/coupon_deletion_job.rb +370 -0
- data/lib/talon_one/models/customer_inventory.rb +1 -1
- data/lib/talon_one/models/customer_session_v2.rb +2 -2
- data/lib/talon_one/models/effect.rb +41 -1
- data/lib/talon_one/models/effect_entity.rb +44 -4
- data/lib/talon_one/models/environment.rb +16 -4
- data/lib/talon_one/models/event.rb +0 -5
- data/lib/talon_one/models/generate_campaign_description.rb +227 -0
- data/lib/talon_one/models/generate_campaign_tags.rb +212 -0
- data/lib/talon_one/models/generate_item_filter_description.rb +214 -0
- data/lib/talon_one/models/generate_loyalty_card.rb +256 -0
- data/lib/talon_one/models/generate_rule_title.rb +226 -0
- data/lib/talon_one/models/generate_rule_title_rule.rb +221 -0
- data/lib/talon_one/models/increase_achievement_progress_effect_props.rb +1 -1
- data/lib/talon_one/models/inline_response20044.rb +1 -1
- data/lib/talon_one/models/integration_coupon.rb +3 -3
- data/lib/talon_one/models/inventory_coupon.rb +3 -3
- data/lib/talon_one/models/inventory_referral.rb +1 -1
- data/lib/talon_one/models/loyalty_balance_with_tier.rb +276 -0
- data/lib/talon_one/models/loyalty_balances_with_tiers.rb +219 -0
- data/lib/talon_one/models/loyalty_card.rb +25 -5
- data/lib/talon_one/models/loyalty_card_balances.rb +231 -0
- data/lib/talon_one/models/loyalty_card_batch.rb +304 -0
- data/lib/talon_one/models/loyalty_card_batch_response.rb +227 -0
- data/lib/talon_one/models/loyalty_card_profile_registration.rb +1 -1
- data/lib/talon_one/models/loyalty_program.rb +70 -29
- data/lib/talon_one/models/message_log_entry.rb +4 -14
- data/lib/talon_one/models/message_log_response.rb +3 -22
- data/lib/talon_one/models/new_app_wide_coupon_deletion_job.rb +227 -0
- data/lib/talon_one/models/new_application.rb +14 -4
- data/lib/talon_one/models/new_application_cif.rb +262 -0
- data/lib/talon_one/models/new_application_cif_expression.rb +229 -0
- data/lib/talon_one/models/new_attribute.rb +2 -2
- data/lib/talon_one/models/new_base_notification.rb +1 -0
- data/lib/talon_one/models/new_coupon_creation_job.rb +1 -1
- data/lib/talon_one/models/new_coupon_deletion_job.rb +211 -0
- data/lib/talon_one/models/new_coupons.rb +2 -2
- data/lib/talon_one/models/new_coupons_for_multiple_recipients.rb +1 -1
- data/lib/talon_one/models/new_customer_session_v2.rb +2 -2
- data/lib/talon_one/models/new_external_invitation.rb +235 -0
- data/lib/talon_one/models/new_loyalty_program.rb +44 -25
- data/lib/talon_one/models/new_notification_test.rb +2 -2
- data/lib/talon_one/models/new_outgoing_integration_webhook.rb +11 -1
- data/lib/talon_one/models/new_referral.rb +1 -1
- data/lib/talon_one/models/new_referrals_for_multiple_advocates.rb +1 -1
- data/lib/talon_one/models/new_revision_version.rb +352 -0
- data/lib/talon_one/models/new_webhook.rb +11 -1
- data/lib/talon_one/models/okta_event.rb +229 -0
- data/lib/talon_one/models/okta_event_payload.rb +212 -0
- data/lib/talon_one/models/okta_event_payload_data.rb +214 -0
- data/lib/talon_one/models/okta_event_target.rb +243 -0
- data/lib/talon_one/models/projected_tier.rb +232 -0
- data/lib/talon_one/models/referral.rb +1 -1
- data/lib/talon_one/models/referral_constraints.rb +1 -1
- data/lib/talon_one/models/reject_coupon_effect_props.rb +14 -4
- data/lib/talon_one/models/reject_referral_effect_props.rb +14 -4
- data/lib/talon_one/models/revision.rb +319 -0
- data/lib/talon_one/models/revision_activation.rb +206 -0
- data/lib/talon_one/models/revision_version.rb +466 -0
- data/lib/talon_one/models/rollback_increased_achievement_progress_effect_props.rb +288 -0
- data/lib/talon_one/models/rule_failure_reason.rb +24 -4
- data/lib/talon_one/models/scim_base_user.rb +237 -0
- data/lib/talon_one/models/scim_base_user_name.rb +208 -0
- data/lib/talon_one/models/scim_new_user.rb +237 -0
- data/lib/talon_one/models/scim_patch_operation.rb +267 -0
- data/lib/talon_one/models/scim_patch_request.rb +226 -0
- data/lib/talon_one/models/scim_resource.rb +228 -0
- data/lib/talon_one/models/scim_resource_types_list_response.rb +214 -0
- data/lib/talon_one/models/scim_schema_resource.rb +239 -0
- data/lib/talon_one/models/scim_schemas_list_response.rb +236 -0
- data/lib/talon_one/models/scim_service_provider_config_response.rb +256 -0
- data/lib/talon_one/models/scim_service_provider_config_response_bulk.rb +228 -0
- data/lib/talon_one/models/scim_service_provider_config_response_change_password.rb +208 -0
- data/lib/talon_one/models/scim_service_provider_config_response_filter.rb +218 -0
- data/lib/talon_one/models/scim_service_provider_config_response_patch.rb +208 -0
- data/lib/talon_one/models/scim_user.rb +252 -0
- data/lib/talon_one/models/scim_users_list_response.rb +236 -0
- data/lib/talon_one/models/sso_config.rb +14 -4
- data/lib/talon_one/models/tier.rb +12 -2
- data/lib/talon_one/models/transfer_loyalty_card.rb +14 -4
- data/lib/talon_one/models/update_application.rb +24 -4
- data/lib/talon_one/models/update_application_cif.rb +237 -0
- data/lib/talon_one/models/update_campaign.rb +1 -1
- data/lib/talon_one/models/update_coupon.rb +2 -2
- data/lib/talon_one/models/update_coupon_batch.rb +1 -1
- data/lib/talon_one/models/update_loyalty_card.rb +15 -5
- data/lib/talon_one/models/update_loyalty_program.rb +44 -25
- data/lib/talon_one/models/update_referral.rb +1 -1
- data/lib/talon_one/models/update_referral_batch.rb +1 -1
- data/lib/talon_one/models/update_user.rb +1 -1
- data/lib/talon_one/models/user.rb +14 -4
- data/lib/talon_one/models/webhook.rb +11 -1
- data/lib/talon_one/models/webhook_with_outgoing_integration_details.rb +11 -1
- data/lib/talon_one/version.rb +1 -1
- data/lib/talon_one.rb +57 -11
- data/spec/api/integration_api_spec.rb +25 -10
- data/spec/api/management_api_spec.rb +267 -39
- data/spec/models/achievement_progress_spec.rb +6 -0
- data/spec/models/activate_user_request_spec.rb +41 -0
- data/spec/models/additional_campaign_properties_spec.rb +7 -1
- data/spec/models/analytics_data_point_spec.rb +47 -0
- data/spec/models/analytics_data_point_with_trend_and_influenced_rate_spec.rb +53 -0
- data/spec/models/analytics_data_point_with_trend_and_uplift_spec.rb +53 -0
- data/spec/models/analytics_data_point_with_trend_spec.rb +47 -0
- data/spec/models/application_campaign_analytics_spec.rb +1 -19
- data/spec/models/application_campaign_stats_spec.rb +0 -6
- data/spec/models/application_cif_expression_spec.rb +71 -0
- data/spec/models/application_cif_spec.rb +89 -0
- data/spec/models/application_spec.rb +12 -0
- data/spec/models/async_coupon_deletion_job_response_spec.rb +41 -0
- data/spec/models/attribute_spec.rb +1 -1
- data/spec/models/base_loyalty_program_spec.rb +18 -6
- data/spec/models/base_notification_spec.rb +1 -1
- data/spec/models/campaign_collection_edited_notification_spec.rb +53 -0
- data/spec/models/campaign_notification_policy_spec.rb +6 -0
- data/spec/models/campaign_spec.rb +43 -1
- data/spec/models/campaign_store_budget_spec.rb +65 -0
- data/spec/models/campaign_versions_spec.rb +71 -0
- data/spec/models/card_added_deducted_points_notification_policy_spec.rb +51 -0
- data/spec/models/coupon_deletion_filters_spec.rb +123 -0
- data/spec/models/coupon_deletion_job_spec.rb +107 -0
- data/spec/models/effect_entity_spec.rb +24 -0
- data/spec/models/effect_spec.rb +24 -0
- data/spec/models/environment_spec.rb +6 -0
- data/spec/models/generate_campaign_description_spec.rb +47 -0
- data/spec/models/generate_campaign_tags_spec.rb +41 -0
- data/spec/models/generate_item_filter_description_spec.rb +41 -0
- data/spec/models/generate_loyalty_card_spec.rb +51 -0
- data/spec/models/generate_rule_title_rule_spec.rb +47 -0
- data/spec/models/generate_rule_title_spec.rb +47 -0
- data/spec/models/loyalty_balance_with_tier_spec.rb +83 -0
- data/spec/models/loyalty_balances_with_tiers_spec.rb +47 -0
- data/spec/models/loyalty_card_balances_spec.rb +53 -0
- data/spec/models/loyalty_card_batch_response_spec.rb +47 -0
- data/spec/models/loyalty_card_batch_spec.rb +57 -0
- data/spec/models/loyalty_card_spec.rb +12 -0
- data/spec/models/loyalty_program_spec.rb +30 -6
- data/spec/models/message_log_entry_spec.rb +1 -7
- data/spec/models/new_app_wide_coupon_deletion_job_spec.rb +47 -0
- data/spec/models/new_application_cif_expression_spec.rb +53 -0
- data/spec/models/new_application_cif_spec.rb +71 -0
- data/spec/models/new_application_spec.rb +6 -0
- data/spec/models/new_attribute_spec.rb +1 -1
- data/spec/models/new_coupon_deletion_job_spec.rb +41 -0
- data/spec/models/new_external_invitation_spec.rb +53 -0
- data/spec/models/new_loyalty_program_spec.rb +18 -6
- data/spec/models/new_notification_test_spec.rb +1 -1
- data/spec/models/new_outgoing_integration_webhook_spec.rb +6 -0
- data/spec/models/new_revision_version_spec.rb +105 -0
- data/spec/models/new_webhook_spec.rb +6 -0
- data/spec/models/okta_event_payload_data_spec.rb +41 -0
- data/spec/models/okta_event_payload_spec.rb +41 -0
- data/spec/models/okta_event_spec.rb +47 -0
- data/spec/models/okta_event_target_spec.rb +53 -0
- data/spec/models/projected_tier_spec.rb +53 -0
- data/spec/models/reject_coupon_effect_props_spec.rb +6 -0
- data/spec/models/reject_referral_effect_props_spec.rb +6 -0
- data/spec/models/revision_activation_spec.rb +41 -0
- data/spec/models/revision_spec.rb +95 -0
- data/spec/models/revision_version_spec.rb +153 -0
- data/spec/models/rollback_increased_achievement_progress_effect_props_spec.rb +71 -0
- data/spec/models/rule_failure_reason_spec.rb +12 -0
- data/spec/models/scim_base_user_name_spec.rb +41 -0
- data/spec/models/scim_base_user_spec.rb +59 -0
- data/spec/models/scim_new_user_spec.rb +59 -0
- data/spec/models/scim_patch_operation_spec.rb +57 -0
- data/spec/models/scim_patch_request_spec.rb +47 -0
- data/spec/models/scim_resource_spec.rb +53 -0
- data/spec/models/scim_resource_types_list_response_spec.rb +41 -0
- data/spec/models/scim_schema_resource_spec.rb +59 -0
- data/spec/models/scim_schemas_list_response_spec.rb +53 -0
- data/spec/models/scim_service_provider_config_response_bulk_spec.rb +53 -0
- data/spec/models/scim_service_provider_config_response_change_password_spec.rb +41 -0
- data/spec/models/scim_service_provider_config_response_filter_spec.rb +47 -0
- data/spec/models/scim_service_provider_config_response_patch_spec.rb +41 -0
- data/spec/models/scim_service_provider_config_response_spec.rb +71 -0
- data/spec/models/scim_user_spec.rb +65 -0
- data/spec/models/scim_users_list_response_spec.rb +53 -0
- data/spec/models/sso_config_spec.rb +6 -0
- data/spec/models/tier_spec.rb +6 -0
- data/spec/models/transfer_loyalty_card_spec.rb +6 -0
- data/spec/models/update_application_cif_spec.rb +59 -0
- data/spec/models/update_application_spec.rb +12 -0
- data/spec/models/update_loyalty_card_spec.rb +6 -0
- data/spec/models/update_loyalty_program_spec.rb +18 -6
- data/spec/models/user_spec.rb +6 -0
- data/spec/models/webhook_spec.rb +6 -0
- data/spec/models/webhook_with_outgoing_integration_details_spec.rb +6 -0
- metadata +246 -18
@@ -0,0 +1,375 @@
|
|
1
|
+
=begin
|
2
|
+
#Talon.One API
|
3
|
+
|
4
|
+
#Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
|
5
|
+
|
6
|
+
The version of the OpenAPI document:
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module TalonOne
|
16
|
+
class CouponDeletionFilters
|
17
|
+
# Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
|
18
|
+
attr_accessor :created_before
|
19
|
+
|
20
|
+
# Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
|
21
|
+
attr_accessor :created_after
|
22
|
+
|
23
|
+
# Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
|
24
|
+
attr_accessor :starts_after
|
25
|
+
|
26
|
+
# Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
|
27
|
+
attr_accessor :starts_before
|
28
|
+
|
29
|
+
# - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which the start date is null or in the past and the expiration date is null or in the future. - `validFuture`: Matches coupons in which the start date is set and in the future.
|
30
|
+
attr_accessor :valid
|
31
|
+
|
32
|
+
# - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. - This field cannot be used in conjunction with the `usable` query parameter.
|
33
|
+
attr_accessor :usable
|
34
|
+
|
35
|
+
# - `true`: only coupons where `usageCounter > 0` will be returned. - `false`: only coupons where `usageCounter = 0` will be returned. **Note:** This field cannot be used in conjunction with the `usable` query parameter.
|
36
|
+
attr_accessor :redeemed
|
37
|
+
|
38
|
+
# Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field.
|
39
|
+
attr_accessor :recipient_integration_id
|
40
|
+
|
41
|
+
# Filter results to an exact case-insensitive matching against the coupon code
|
42
|
+
attr_accessor :exact_match
|
43
|
+
|
44
|
+
# Filter results by the coupon code
|
45
|
+
attr_accessor :value
|
46
|
+
|
47
|
+
# Filter results by batches of coupons
|
48
|
+
attr_accessor :batch_id
|
49
|
+
|
50
|
+
# Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.
|
51
|
+
attr_accessor :referral_id
|
52
|
+
|
53
|
+
# Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
|
54
|
+
attr_accessor :expires_after
|
55
|
+
|
56
|
+
# Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
|
57
|
+
attr_accessor :expires_before
|
58
|
+
|
59
|
+
class EnumAttributeValidator
|
60
|
+
attr_reader :datatype
|
61
|
+
attr_reader :allowable_values
|
62
|
+
|
63
|
+
def initialize(datatype, allowable_values)
|
64
|
+
@allowable_values = allowable_values.map do |value|
|
65
|
+
case datatype.to_s
|
66
|
+
when /Integer/i
|
67
|
+
value.to_i
|
68
|
+
when /Float/i
|
69
|
+
value.to_f
|
70
|
+
else
|
71
|
+
value
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def valid?(value)
|
77
|
+
!value || allowable_values.include?(value)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
82
|
+
def self.attribute_map
|
83
|
+
{
|
84
|
+
:'created_before' => :'createdBefore',
|
85
|
+
:'created_after' => :'createdAfter',
|
86
|
+
:'starts_after' => :'startsAfter',
|
87
|
+
:'starts_before' => :'startsBefore',
|
88
|
+
:'valid' => :'valid',
|
89
|
+
:'usable' => :'usable',
|
90
|
+
:'redeemed' => :'redeemed',
|
91
|
+
:'recipient_integration_id' => :'recipientIntegrationId',
|
92
|
+
:'exact_match' => :'exactMatch',
|
93
|
+
:'value' => :'value',
|
94
|
+
:'batch_id' => :'batchId',
|
95
|
+
:'referral_id' => :'referralId',
|
96
|
+
:'expires_after' => :'expiresAfter',
|
97
|
+
:'expires_before' => :'expiresBefore'
|
98
|
+
}
|
99
|
+
end
|
100
|
+
|
101
|
+
# Attribute type mapping.
|
102
|
+
def self.openapi_types
|
103
|
+
{
|
104
|
+
:'created_before' => :'DateTime',
|
105
|
+
:'created_after' => :'DateTime',
|
106
|
+
:'starts_after' => :'DateTime',
|
107
|
+
:'starts_before' => :'DateTime',
|
108
|
+
:'valid' => :'String',
|
109
|
+
:'usable' => :'Boolean',
|
110
|
+
:'redeemed' => :'Boolean',
|
111
|
+
:'recipient_integration_id' => :'String',
|
112
|
+
:'exact_match' => :'Boolean',
|
113
|
+
:'value' => :'String',
|
114
|
+
:'batch_id' => :'String',
|
115
|
+
:'referral_id' => :'Integer',
|
116
|
+
:'expires_after' => :'DateTime',
|
117
|
+
:'expires_before' => :'DateTime'
|
118
|
+
}
|
119
|
+
end
|
120
|
+
|
121
|
+
# List of attributes with nullable: true
|
122
|
+
def self.openapi_nullable
|
123
|
+
Set.new([
|
124
|
+
])
|
125
|
+
end
|
126
|
+
|
127
|
+
# Initializes the object
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
129
|
+
def initialize(attributes = {})
|
130
|
+
if (!attributes.is_a?(Hash))
|
131
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::CouponDeletionFilters` initialize method"
|
132
|
+
end
|
133
|
+
|
134
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
135
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
136
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
137
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::CouponDeletionFilters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
138
|
+
end
|
139
|
+
h[k.to_sym] = v
|
140
|
+
}
|
141
|
+
|
142
|
+
if attributes.key?(:'created_before')
|
143
|
+
self.created_before = attributes[:'created_before']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.key?(:'created_after')
|
147
|
+
self.created_after = attributes[:'created_after']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.key?(:'starts_after')
|
151
|
+
self.starts_after = attributes[:'starts_after']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.key?(:'starts_before')
|
155
|
+
self.starts_before = attributes[:'starts_before']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes.key?(:'valid')
|
159
|
+
self.valid = attributes[:'valid']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.key?(:'usable')
|
163
|
+
self.usable = attributes[:'usable']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.key?(:'redeemed')
|
167
|
+
self.redeemed = attributes[:'redeemed']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.key?(:'recipient_integration_id')
|
171
|
+
self.recipient_integration_id = attributes[:'recipient_integration_id']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.key?(:'exact_match')
|
175
|
+
self.exact_match = attributes[:'exact_match']
|
176
|
+
else
|
177
|
+
self.exact_match = false
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes.key?(:'value')
|
181
|
+
self.value = attributes[:'value']
|
182
|
+
else
|
183
|
+
self.value = 'false'
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.key?(:'batch_id')
|
187
|
+
self.batch_id = attributes[:'batch_id']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.key?(:'referral_id')
|
191
|
+
self.referral_id = attributes[:'referral_id']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.key?(:'expires_after')
|
195
|
+
self.expires_after = attributes[:'expires_after']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.key?(:'expires_before')
|
199
|
+
self.expires_before = attributes[:'expires_before']
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
204
|
+
# @return Array for valid properties with the reasons
|
205
|
+
def list_invalid_properties
|
206
|
+
invalid_properties = Array.new
|
207
|
+
invalid_properties
|
208
|
+
end
|
209
|
+
|
210
|
+
# Check to see if the all the properties in the model are valid
|
211
|
+
# @return true if the model is valid
|
212
|
+
def valid?
|
213
|
+
valid_validator = EnumAttributeValidator.new('String', ["expired", "validNow", "validFuture"])
|
214
|
+
return false unless valid_validator.valid?(@valid)
|
215
|
+
true
|
216
|
+
end
|
217
|
+
|
218
|
+
# Custom attribute writer method checking allowed values (enum).
|
219
|
+
# @param [Object] valid Object to be assigned
|
220
|
+
def valid=(valid)
|
221
|
+
validator = EnumAttributeValidator.new('String', ["expired", "validNow", "validFuture"])
|
222
|
+
unless validator.valid?(valid)
|
223
|
+
fail ArgumentError, "invalid value for \"valid\", must be one of #{validator.allowable_values}."
|
224
|
+
end
|
225
|
+
@valid = valid
|
226
|
+
end
|
227
|
+
|
228
|
+
# Checks equality by comparing each attribute.
|
229
|
+
# @param [Object] Object to be compared
|
230
|
+
def ==(o)
|
231
|
+
return true if self.equal?(o)
|
232
|
+
self.class == o.class &&
|
233
|
+
created_before == o.created_before &&
|
234
|
+
created_after == o.created_after &&
|
235
|
+
starts_after == o.starts_after &&
|
236
|
+
starts_before == o.starts_before &&
|
237
|
+
valid == o.valid &&
|
238
|
+
usable == o.usable &&
|
239
|
+
redeemed == o.redeemed &&
|
240
|
+
recipient_integration_id == o.recipient_integration_id &&
|
241
|
+
exact_match == o.exact_match &&
|
242
|
+
value == o.value &&
|
243
|
+
batch_id == o.batch_id &&
|
244
|
+
referral_id == o.referral_id &&
|
245
|
+
expires_after == o.expires_after &&
|
246
|
+
expires_before == o.expires_before
|
247
|
+
end
|
248
|
+
|
249
|
+
# @see the `==` method
|
250
|
+
# @param [Object] Object to be compared
|
251
|
+
def eql?(o)
|
252
|
+
self == o
|
253
|
+
end
|
254
|
+
|
255
|
+
# Calculates hash code according to all attributes.
|
256
|
+
# @return [Integer] Hash code
|
257
|
+
def hash
|
258
|
+
[created_before, created_after, starts_after, starts_before, valid, usable, redeemed, recipient_integration_id, exact_match, value, batch_id, referral_id, expires_after, expires_before].hash
|
259
|
+
end
|
260
|
+
|
261
|
+
# Builds the object from hash
|
262
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
263
|
+
# @return [Object] Returns the model itself
|
264
|
+
def self.build_from_hash(attributes)
|
265
|
+
new.build_from_hash(attributes)
|
266
|
+
end
|
267
|
+
|
268
|
+
# Builds the object from hash
|
269
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
270
|
+
# @return [Object] Returns the model itself
|
271
|
+
def build_from_hash(attributes)
|
272
|
+
return nil unless attributes.is_a?(Hash)
|
273
|
+
self.class.openapi_types.each_pair do |key, type|
|
274
|
+
if type =~ /\AArray<(.*)>/i
|
275
|
+
# check to ensure the input is an array given that the attribute
|
276
|
+
# is documented as an array but the input is not
|
277
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
278
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
279
|
+
end
|
280
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
281
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
282
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
283
|
+
end
|
284
|
+
|
285
|
+
self
|
286
|
+
end
|
287
|
+
|
288
|
+
# Deserializes the data based on type
|
289
|
+
# @param string type Data type
|
290
|
+
# @param string value Value to be deserialized
|
291
|
+
# @return [Object] Deserialized data
|
292
|
+
def _deserialize(type, value)
|
293
|
+
case type.to_sym
|
294
|
+
when :DateTime
|
295
|
+
DateTime.parse(value)
|
296
|
+
when :Date
|
297
|
+
Date.parse(value)
|
298
|
+
when :String
|
299
|
+
value.to_s
|
300
|
+
when :Integer
|
301
|
+
value.to_i
|
302
|
+
when :Float
|
303
|
+
value.to_f
|
304
|
+
when :Boolean
|
305
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
306
|
+
true
|
307
|
+
else
|
308
|
+
false
|
309
|
+
end
|
310
|
+
when :Object
|
311
|
+
# generic object (usually a Hash), return directly
|
312
|
+
value
|
313
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
314
|
+
inner_type = Regexp.last_match[:inner_type]
|
315
|
+
value.map { |v| _deserialize(inner_type, v) }
|
316
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
317
|
+
k_type = Regexp.last_match[:k_type]
|
318
|
+
v_type = Regexp.last_match[:v_type]
|
319
|
+
{}.tap do |hash|
|
320
|
+
value.each do |k, v|
|
321
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
322
|
+
end
|
323
|
+
end
|
324
|
+
else # model
|
325
|
+
TalonOne.const_get(type).build_from_hash(value)
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
# Returns the string representation of the object
|
330
|
+
# @return [String] String presentation of the object
|
331
|
+
def to_s
|
332
|
+
to_hash.to_s
|
333
|
+
end
|
334
|
+
|
335
|
+
# to_body is an alias to to_hash (backward compatibility)
|
336
|
+
# @return [Hash] Returns the object in the form of hash
|
337
|
+
def to_body
|
338
|
+
to_hash
|
339
|
+
end
|
340
|
+
|
341
|
+
# Returns the object in the form of hash
|
342
|
+
# @return [Hash] Returns the object in the form of hash
|
343
|
+
def to_hash
|
344
|
+
hash = {}
|
345
|
+
self.class.attribute_map.each_pair do |attr, param|
|
346
|
+
value = self.send(attr)
|
347
|
+
if value.nil?
|
348
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
349
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
350
|
+
end
|
351
|
+
|
352
|
+
hash[param] = _to_hash(value)
|
353
|
+
end
|
354
|
+
hash
|
355
|
+
end
|
356
|
+
|
357
|
+
# Outputs non-array value in the form of hash
|
358
|
+
# For object, use to_hash. Otherwise, just return the value
|
359
|
+
# @param [Object] value Any valid value
|
360
|
+
# @return [Hash] Returns the value in the form of hash
|
361
|
+
def _to_hash(value)
|
362
|
+
if value.is_a?(Array)
|
363
|
+
value.compact.map { |v| _to_hash(v) }
|
364
|
+
elsif value.is_a?(Hash)
|
365
|
+
{}.tap do |hash|
|
366
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
367
|
+
end
|
368
|
+
elsif value.respond_to? :to_hash
|
369
|
+
value.to_hash
|
370
|
+
else
|
371
|
+
value
|
372
|
+
end
|
373
|
+
end
|
374
|
+
end
|
375
|
+
end
|