diff --git a/api/openapi.yaml b/api/openapi.yaml index ec1a57aa..d0b1bc80 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -18849,9 +18849,6 @@ components: hierarchy: description: Category hierarchy. type: integer - required: - - hierarchy - - name title: Categories Create Request Body type: object CategoriesCreateResponseBody: @@ -18883,12 +18880,6 @@ components: example: 2022-07-14T10:45:13.156Z format: date-time type: string - required: - - created_at - - hierarchy - - id - - name - - object title: Categories Create Response Body type: object CategoriesGetResponseBody: @@ -18940,11 +18931,6 @@ components: total: description: Total number of categories. type: integer - required: - - data - - data_ref - - object - - total title: Categories List Response Body type: object CategoriesUpdateRequestBody: @@ -18959,9 +18945,6 @@ components: hierarchy: description: Category hierarchy. type: integer - required: - - hierarchy - - name title: Categories Update Request Body type: object CategoriesUpdateResponseBody: @@ -19000,13 +18983,6 @@ components: example: 2022-08-16T10:52:08.094Z format: date-time type: string - required: - - created_at - - hierarchy - - id - - name - - object - - updated_at title: Categories Update Response Body type: object ClientCustomersConsentsUpdateRequestBody: @@ -19047,9 +19023,6 @@ components: > **Project Settings** > **Event Schema** > **Edit particular event** > **Metadata property definition**. type: object - required: - - customer - - event title: Client Events Create Request Body type: object ClientEventsCreateResponseBody: @@ -19082,12 +19055,6 @@ components: description: A `null` loyalty object. nullable: true type: object - required: - - customer - - loyalty - - object - - referral - - type title: Client Events Create Response Body type: object ClientQualificationsCheckEligibilityRequestBody: @@ -19451,7 +19418,7 @@ components: skipped_redeemables: - result: details: - message: Applicable redeemables limit exceeded + message: message key: applicable_redeemables_limit_exceeded metadata: "{}" id: id @@ -19474,7 +19441,7 @@ components: object: voucher - result: details: - message: Applicable redeemables limit exceeded + message: message key: applicable_redeemables_limit_exceeded metadata: "{}" id: id @@ -19600,11 +19567,6 @@ components: \ parameters. This lets you know if you can run another request (with\ \ a different end date filter) to get more records returned in the results." type: boolean - required: - - customers - - data_ref - - object - - total title: Customers List Response Body CustomersMetadataUpdateInBulkRequestBody: description: Request body schema for **POST** `/customers/metadata/async`. @@ -19627,9 +19589,6 @@ components: metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. type: object - required: - - metadata - - source_ids title: Customers Metadata Update In Bulk Request Body type: object CustomersMetadataUpdateInBulkResponseBody: @@ -19684,14 +19643,6 @@ components: default: pernament_deletion description: The type of the object represented by JSON. type: string - required: - - created_at - - data_json - - id - - object - - related_object - - related_object_id - - status title: Customers Permanent Deletion Create Response Body type: object CustomersSegmentsListResponseBody: @@ -19706,8 +19657,6 @@ components: source_id: description: Unique customer source ID. type: string - required: - - source_id title: CustomerSourceId type: object - $ref: '#/components/schemas/CustomerBase' @@ -19763,9 +19712,6 @@ components: > **Project Settings** > **Event Schema** > **Edit particular event** > **Metadata property definition**. type: object - required: - - customer - - event title: Events Create Request Body type: object EventsCreateResponseBody: @@ -19798,12 +19744,6 @@ components: description: A `null` loyalty object. nullable: true type: object - required: - - customer - - loyalty - - object - - referral - - type title: Events Create Response Body type: object ExportsCreateRequestBody: @@ -19835,8 +19775,6 @@ components: type: string parameters: $ref: '#/components/schemas/ExportsCreateRequestBodyParameters' - required: - - exported_object title: ExportsCreateRequestBody type: object ExportsCreateResponseBody: @@ -19991,11 +19929,6 @@ components: total: description: Total number of exports. type: integer - required: - - data_ref - - exports - - object - - total title: Exports List Response Body type: object LoyaltiesDeleteResponseBody: @@ -20021,8 +19954,6 @@ components: the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. type: boolean - required: - - active type: object description: "Response body schema for **POST** `/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable`" title: Loyalties Earning Rules Disable Response Body @@ -20043,8 +19974,6 @@ components: the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. type: boolean - required: - - active type: object description: "Response body schema for **POST** `/loyalties/{campaignId}/earning-rules/{earningRuleId}/enable`" title: Loyalties Earning Rules Enable Response Body @@ -20094,8 +20023,6 @@ components: \ between multiple systems. It can be a transaction ID from a CRM system,\ \ database or 3rd-party service." type: string - required: - - points title: Loyalties Members Balance Update Request Body type: object LoyaltiesMembersBalanceUpdateResponseBody: @@ -20144,13 +20071,6 @@ components: - MANUAL - AUTOMATIC type: string - required: - - balance - - object - - points - - related_object - - total - - type title: Loyalties Members Balance Update Response Body type: object LoyaltiesMembersPointsExpirationListResponseBody: @@ -20205,11 +20125,6 @@ components: total: description: Total number of point expiration buckets. type: integer - required: - - data - - data_ref - - object - - total title: Loyalties Members Points Expiration List Response Body type: object LoyaltiesMembersRedemptionRedeemRequestBody: @@ -20287,11 +20202,6 @@ components: description: Total number of loyalty reward objects. minimum: 0 type: integer - required: - - data - - data_ref - - object - - total title: Loyalties Members Rewards List Response Body type: object LoyaltiesMembersTiersListResponseBody: @@ -20325,11 +20235,6 @@ components: total: description: Total number of loyalty tier objects. type: integer - required: - - data - - data_ref - - object - - total title: Loyalties Members Tiers List Response Body type: object LoyaltiesMembersTransactionsExportCreateRequestBody: @@ -20392,11 +20297,6 @@ components: \ a different page or a different start date filter) to get more records\ \ returned in the results." type: boolean - required: - - data - - data_ref - - has_more - - object title: Loyalties Members Transactions List Response Body type: object LoyaltiesMembersTransfersCreateRequestBody: @@ -20599,15 +20499,6 @@ components: created_at: format: date-time type: string - required: - - active - - code - - created_at - - id - - is_referral_code - - loyalty_card - - metadata - - type title: Loyalties Members Transfers Create Response Body type: object LoyaltiesRewardAssignmentsGetResponseBody: @@ -20672,11 +20563,6 @@ components: total: description: Total number of earning rule objects. type: integer - required: - - data - - data_ref - - object - - total title: Loyalties Tiers Earning Rules List Response Body type: object LoyaltiesTiersGetResponseBody: @@ -20719,11 +20605,6 @@ components: total: description: Total number of loyalty tier objects. type: integer - required: - - data - - data_ref - - object - - total title: Loyalties Tiers List Response Body type: object LoyaltiesTiersRewardsListResponseBody: @@ -20784,11 +20665,6 @@ components: total: description: Total number of loyalty tier reward objects. type: integer - required: - - data - - data_ref - - object - - total title: Loyalties Tiers Rewards List Response Body type: object OrdersCreateRequestBody: @@ -20872,11 +20748,6 @@ components: total: description: Total number of orders. type: integer - required: - - data_ref - - object - - orders - - total title: Orders List Response Body type: object OrdersUpdateRequestBody: @@ -21146,9 +21017,6 @@ components: type: array filter: $ref: '#/components/schemas/ProductCollectionsCreateRequestBody_filter' - required: - - name - - type title: ProductCollectionsCreateRequestBody type: object ProductCollectionsCreateResponseBody: @@ -21278,11 +21146,6 @@ components: total: description: Total number of product objects. type: integer - required: - - data_ref - - object - - products - - total title: Products List Response Body type: object ProductsMetadataUpdateInBulkRequestBody: @@ -21304,9 +21167,6 @@ components: object. It can be useful for storing additional information about the product in a structured format. type: object - required: - - metadata - - source_ids title: Products Metadata Update In Bulk Request Body type: object ProductsMetadataUpdateInBulkResponseBody: @@ -21465,8 +21325,6 @@ components: object. It can be useful for storing additional information about the product in a structured format. type: object - required: - - source_id title: Products Update In Bulk Request Body type: object ProductsUpdateInBulkResponseBody: @@ -21561,12 +21419,6 @@ components: items: $ref: '#/components/schemas/PromotionStackBase' type: array - required: - - campaign_id - - categories - - created_at - - id - - object type: object description: "Response body schema for **POST** `/promotions/{campaignId}/stacks`." title: Promotions Stacks Create Response Body @@ -21610,11 +21462,6 @@ components: description: Total number of promotion stacks. minimum: 0 type: integer - required: - - data - - data_ref - - object - - total title: Promotions Stacks List Response Body type: object PromotionsStacksUpdateRequestBody: @@ -21673,13 +21520,6 @@ components: items: $ref: '#/components/schemas/PromotionStackBase' type: array - required: - - campaign_id - - categories - - created_at - - id - - object - - updated_at type: object description: "Response body schema for **PUT** `/promotions/{campaignId}/stacks/{stackId}`." title: Promotions Stacks Update Response Body @@ -22118,11 +21958,6 @@ components: total: description: Total number of publications. type: integer - required: - - data_ref - - object - - publications - - total title: Publications List Response Body type: object QualificationsCheckEligibilityRequestBody: @@ -22732,15 +22567,6 @@ components: description: System generated cause for the redemption being invalid in the context of the provided parameters. type: string - required: - - channel - - date - - id - - object - - related_object_id - - related_object_type - - result - - status title: RedemptionsGetResponseBody type: object RedemptionsListResponseBody: @@ -23601,11 +23427,6 @@ components: total: description: Total number of redemptions. type: integer - required: - - data_ref - - object - - redemptions - - total title: Redemptions List Response Body type: object RedemptionsRedeemRequestBody: @@ -23869,7 +23690,7 @@ components: skipped_redeemables: - result: details: - message: Applicable redeemables limit exceeded + message: message key: applicable_redeemables_limit_exceeded metadata: "{}" id: id @@ -23892,7 +23713,7 @@ components: object: voucher - result: details: - message: Applicable redeemables limit exceeded + message: message key: applicable_redeemables_limit_exceeded metadata: "{}" id: id @@ -24215,8 +24036,6 @@ components: items: type: string type: array - required: - - campaign title: RewardsAssignmentsCreateRequestBody type: object RewardsAssignmentsCreateResponseBody: @@ -24258,11 +24077,6 @@ components: total: description: Total number of reward assignments. type: integer - required: - - data - - data_ref - - object - - total title: Rewards Assignments List Response Body type: object RewardsAssignmentsUpdateRequestBody: @@ -24385,11 +24199,6 @@ components: total: description: Total number of validation rules in the project. type: integer - required: - - data - - data_ref - - object - - total title: Validation Rules List Response Body type: object ValidationRulesUpdateRequestBody: @@ -24457,7 +24266,7 @@ components: source_id: source_id amount_off: 2.027123023002322 details: - message: Applicable redeemables limit exceeded + message: message key: applicable_redeemables_limit_exceeded loyalty_card: points: 1 @@ -24573,7 +24382,7 @@ components: source_id: source_id amount_off: 2.027123023002322 details: - message: Applicable redeemables limit exceeded + message: message key: applicable_redeemables_limit_exceeded loyalty_card: points: 1 @@ -24709,10 +24518,6 @@ components: $ref: '#/components/schemas/Session' stacking_rules: $ref: '#/components/schemas/StackingRules' - required: - - redeemables - - stacking_rules - - valid title: Validations Validate Response Body type: object VouchersBalanceUpdateRequestBody: @@ -24738,8 +24543,6 @@ components: reason: description: Reason why the transaction occurred. type: string - required: - - amount title: Vouchers Balance Update Request Body type: object VouchersBalanceUpdateResponseBody: @@ -24789,14 +24592,6 @@ components: type: string related_object: $ref: '#/components/schemas/VouchersBalanceUpdateResponseBody_related_object' - required: - - amount - - balance - - object - - operation_type - - related_object - - total - - type title: Vouchers Balance Update Response Body type: object VouchersDisableResponseBody: @@ -25701,13 +25496,6 @@ components: $ref: '#/components/schemas/Vouchers_Redemption_Get_Response_Body_Redemption_Entries_Item' title: Vouchers Redemption Get Response Body Redemption Entries Item type: array - required: - - data_ref - - object - - redeemed_quantity - - redemption_entries - - total - - url title: Vouchers Redemption Get Response Body type: object VouchersTransactionsExportCreateRequestBody: @@ -25857,11 +25645,6 @@ components: \ a different page or a different start date filter) to get more records\ \ returned in the results." type: boolean - required: - - data - - data_ref - - has_more - - object title: Vouchers Transactions List Response Body type: object ParameterCreatedBeforeAfter: @@ -25982,11 +25765,6 @@ components: enum: - data type: string - required: - - data - - data_ref - - object - - total title: Applicable To Result List type: object AsyncActions: @@ -25997,8 +25775,6 @@ components: description: The ID of the scheduled asynchronous action. example: aa_0a875d56c805df6601 type: string - required: - - async_action_id title: Asynchronous Actions type: object Campaign: @@ -26282,20 +26058,6 @@ components: $ref: '#/components/schemas/ReferralProgram' loyalty_tiers_expiration: $ref: '#/components/schemas/LoyaltyTiersExpirationAll' - required: - - auto_join - - campaign_type - - categories - - created_at - - creation_status - - id - - join_once - - name - - object - - protected - - type - - use_voucher_metadata_schema - - vouchers_generation_status title: Campaign Base type: object CampaignLoyaltyCard: @@ -26315,8 +26077,6 @@ components: type: integer expiration_rules: $ref: '#/components/schemas/CampaignLoyaltyCard_expiration_rules' - required: - - points title: Campaign Loyalty Card type: object CampaignsImportVoucherItem: @@ -26374,8 +26134,6 @@ components: allOf: - $ref: '#/components/schemas/CampaignsImportVoucherLoyaltyCard' description: Defines the voucher loyalty card details. - required: - - code title: Import Vouchers to Campaign type: object CampaignsVouchersCreateBaseRequestBody: @@ -26455,12 +26213,6 @@ components: - JOINT - EXCLUSIVE type: string - required: - - created_at - - hierarchy - - id - - name - - object title: Category type: object CodeConfig: @@ -26517,8 +26269,6 @@ components: maximum: 20 minimum: 1 type: integer - required: - - name title: Create Publication Campaign type: object Customer: @@ -26586,9 +26336,6 @@ components: enum: - customer type: string - required: - - id - - object title: Customer Id type: object CustomerSegmentsList: @@ -26612,11 +26359,6 @@ components: total: description: Total number of segments the customer belongs to. type: integer - required: - - data - - data_ref - - object - - total title: Customer Segments List type: object CustomerWithSummaryLoyaltyReferrals: @@ -26667,8 +26409,6 @@ components: enum: - customer type: string - required: - - object title: Customer Response Data type: object - $ref: '#/components/schemas/CustomerBase' @@ -26780,8 +26520,6 @@ components: type: number fixed_amount_formula: type: string - required: - - type title: Discount type: object DiscountUnitMultipleOneUnit: @@ -26818,9 +26556,6 @@ components: allOf: - $ref: '#/components/schemas/SimpleSkuDiscountUnit' description: Contains information about the sku. - required: - - effect - - unit_type title: One Unit type: object EarningRule: @@ -26846,8 +26581,6 @@ components: - `true` indicates an active earning rule - `false` indicates an inactive earning rule type: boolean - required: - - active type: object title: Earning Rule EarningRuleBase: @@ -26927,14 +26660,6 @@ components: rule object. It can be useful for storing additional information about the earning rule in a structured format. type: object - required: - - automation_id - - created_at - - id - - loyalty - - metadata - - object - - source title: EarningRuleBase type: object EmptyJson: @@ -26979,10 +26704,6 @@ components: description: The resource type. example: voucher type: string - required: - - code - - details - - message title: Error Object type: object Export: @@ -27069,8 +26790,6 @@ components: type: string parameters: $ref: '#/components/schemas/OrdersExportCreateRequestBody_parameters' - required: - - exported_object title: Export Orders type: object ExportOrderFields: @@ -27140,13 +26859,6 @@ components: description: Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. type: string - required: - - created_at - - id - - object - - result - - status - - user_id title: Export Scheduled Base type: object ExportVoucherTransactionsFields: @@ -27260,9 +26972,6 @@ components: - APPLY_TO_ORDER - APPLY_TO_ITEMS type: string - required: - - amount - - balance title: Gift type: object ImportCSVRequestBody: @@ -27273,8 +26982,6 @@ components: description: File path. format: binary type: string - required: - - file title: Import CSV file type: object InapplicableToResultList: @@ -27308,11 +27015,6 @@ components: enum: - data type: string - required: - - data - - data_ref - - object - - total title: Inapplicable To Result List type: object Junction: @@ -27394,10 +27096,6 @@ components: description: Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. type: boolean - required: - - campaign - - code - - object title: List Publications Item Voucher type: object LoyaltiesLoyaltyTierReward: @@ -27431,10 +27129,6 @@ components: enum: - loyalty_tier_reward type: string - required: - - assignment - - object - - reward title: Loyalty Tier Reward Object type: object LoyaltiesTransferPoints: @@ -27462,10 +27156,6 @@ components: \ between multiple systems. It can be a transaction ID from a CRM system,\ \ database or 3rd-party service." type: string - required: - - code - - points - - source_id title: Loyalties Transfer Points type: object LoyaltyCardTransaction: @@ -27511,12 +27201,6 @@ components: enum: - loyalty_tier type: string - required: - - campaign_id - - config - - created_at - - id - - object type: object title: Loyalty Tier LoyaltyTierBase: @@ -27538,9 +27222,6 @@ components: type: object points: $ref: '#/components/schemas/LoyaltyTierBase_points' - required: - - name - - points title: Loyalty Tier Base type: object LoyaltyTiersExpirationAll: @@ -27592,10 +27273,6 @@ components: $ref: '#/components/schemas/LoyaltyTiersExpirationAll_start_date' expiration_date: $ref: '#/components/schemas/LoyaltyTiersExpirationAll_expiration_date' - required: - - expiration_date - - qualification_type - - start_date title: Loyalty Tiers Expiration type: object LuckyDraw: @@ -27815,8 +27492,6 @@ components: It can be useful for storing additional information about the SKU in a structured format. type: object - required: - - object title: Order Item Calculated type: object PointsExpirationTypes: @@ -27877,12 +27552,6 @@ components: enum: - products_collection type: string - required: - - created_at - - id - - name - - object - - type title: Product Collection Base type: object ProductCollectionsList: @@ -27913,11 +27582,6 @@ components: total: description: Total number of product collections. type: integer - required: - - data - - data_ref - - object - - total title: List Product Collections type: object ProductCollectionsProductsList: @@ -27941,11 +27605,6 @@ components: total: description: Total number of products & SKUs in the product collection. type: integer - required: - - data - - data_ref - - object - - total title: List Products in Collection Response Body type: object PromotionStack: @@ -27983,12 +27642,6 @@ components: items: $ref: '#/components/schemas/Category' type: array - required: - - campaign_id - - categories - - created_at - - id - - object type: object title: Promotion Stack PromotionStackBase: @@ -27998,9 +27651,6 @@ components: type: string tiers: $ref: '#/components/schemas/PromotionStackBase_tiers' - required: - - name - - tiers title: Promotion Stack Base type: object PromotionTier: @@ -28256,8 +27906,6 @@ components: \ i.e. `cat_0c9da30e7116ba6bba`." example: cat_0c9da30e7116ba6bba type: string - required: - - name title: Promotion Tier Create Params type: object PromotionTiersList: @@ -28380,12 +28028,6 @@ components: example: 2023-10-31T12:13:16.374Z format: date-time type: string - required: - - data - - data_ref - - has_more - - object - - total title: Redeemables type: object Redemption: @@ -28550,15 +28192,6 @@ components: $ref: '#/components/schemas/Redemption_gift' loyalty_card: $ref: '#/components/schemas/Redemption_loyalty_card' - required: - - channel - - date - - id - - object - - related_object_id - - related_object_type - - result - - status title: Redemption type: object RedemptionRewardResult: @@ -28640,8 +28273,6 @@ components: - COIN - MATERIAL type: string - required: - - reward title: Redemption Reward Result type: object RedemptionRollback: @@ -28812,15 +28443,6 @@ components: $ref: '#/components/schemas/RedemptionRollback_gift' loyalty_card: $ref: '#/components/schemas/RedemptionRollback_loyalty_card' - required: - - channel - - date - - id - - object - - related_object_id - - related_object_type - - result - - status title: Redemption Rollback type: object ReferralProgram: @@ -28927,13 +28549,6 @@ components: enum: - reward type: string - required: - - created_at - - id - - metadata - - name - - object - - type title: Reward type: object RewardAssignment: @@ -29055,8 +28670,6 @@ components: description: The type of the object represented by the JSON. This object stores information about the customer. type: string - required: - - object title: Customer Object Required Object Type type: object SimpleSkuDiscountUnit: @@ -29074,9 +28687,6 @@ components: name: description: Sku name type: string - required: - - id - - name title: Simple Sku Discount Unit type: object Sku: @@ -29149,13 +28759,6 @@ components: enum: - sku type: string - required: - - attributes - - created_at - - id - - metadata - - object - - product_id title: SKU Object type: object SkusList: @@ -29179,11 +28782,6 @@ components: total: description: Total number of SKUs in the product. type: integer - required: - - data_ref - - object - - skus - - total title: SKUs List type: object StackableValidateRedeemBase: @@ -29217,8 +28815,6 @@ components: object. It can be useful for storing additional information about the redemption in a structured format. type: object - required: - - redeemables title: Stackable Validate Redeem Base type: object StackingRules: @@ -29304,14 +28900,6 @@ components: - CATEGORY_HIERARCHY - REQUESTED_ORDER type: string - required: - - applicable_exclusive_redeemables_limit - - applicable_redeemables_limit - - exclusive_categories - - joint_categories - - redeemables_application_mode - - redeemables_limit - - redeemables_sorting_rule title: Stacking Rules type: object ValidationRule: @@ -29344,15 +28932,6 @@ components: description: The type of the object represented by JSON. This object stores information about the validation rule. type: string - required: - - applicable_to - - context_type - - created_at - - id - - name - - object - - rules - - type title: Validation Rule type: object title: Validation Rule @@ -29400,13 +28979,6 @@ components: enum: - validation_rules_assignment type: string - required: - - created_at - - id - - object - - related_object_id - - related_object_type - - rule_id title: Validation Rule Assignment type: object ValidationRuleAssignmentsList: @@ -29447,11 +29019,6 @@ components: total: description: Total number of validation rule assignments. type: integer - required: - - data - - data_ref - - object - - total title: Validation Rule Assignments List type: object ValidationRuleBase: @@ -29617,11 +29184,6 @@ components: description: Total number of validation rules assignments. minimum: 0 type: integer - required: - - data - - data_ref - - object - - total title: Validation Rules Assignments List type: object ValidationsRedeemableInapplicable: @@ -29684,18 +29246,13 @@ components: items: $ref: '#/components/schemas/Category' type: array - required: - - id - - object - - result - - status title: Inapplicable Redeemable type: object ValidationsRedeemableSkipped: example: result: details: - message: Applicable redeemables limit exceeded + message: message key: applicable_redeemables_limit_exceeded metadata: "{}" id: id @@ -29743,11 +29300,6 @@ components: items: $ref: '#/components/schemas/Category' type: array - required: - - id - - object - - result - - status title: Skipped Redeemable type: object ValidityHours: @@ -30161,13 +29713,6 @@ components: was created. The value is shown in the ISO 8601 format. format: date-time type: string - required: - - campaign_id - - created_at - - details - - id - - type - - voucher_id title: Voucher Transaction type: object VoucherTransactionsExport: @@ -30227,14 +29772,6 @@ components: example: user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH nullable: true type: string - required: - - channel - - created_at - - exported_object - - id - - object - - parameters - - status title: Voucher Transactions Export type: object VoucherTransactionsExportParameters: @@ -30364,11 +29901,6 @@ components: items: type: integer type: array - required: - - effect - - id - - object - - strict title: Applicable To type: object BusValRuleAssignment: @@ -30425,12 +29957,6 @@ components: items: type: string type: array - required: - - id - - object - - related_object_id - - related_object_type - - rule_id title: Business Validation Rule Assignment CampaignVoucher: description: Schema model for a campaign voucher. @@ -30526,11 +30052,6 @@ components: type: array validity_hours: $ref: '#/components/schemas/ValidityHours' - required: - - code_config - - is_referral_code - - redemption - - type title: Campaign Voucher type: object CampaignsImportVoucherLoyaltyCard: @@ -30541,8 +30062,6 @@ components: This is the current loyalty card score i.e. the number of loyalty points on the card. type: integer - required: - - points title: Campaigns Import Voucher Loyalty Card type: object CustomerLoyalty: @@ -30559,10 +30078,6 @@ components: description: Contains campaigns with details about point balances and how many customers were referred by the customer. type: object - required: - - campaigns - - points - - referred_customers title: Customer Loyalty type: object CustomerReferrals: @@ -30580,9 +30095,6 @@ components: items: $ref: '#/components/schemas/Customer_Referrals_Campaigns_Item' type: array - required: - - campaigns - - total title: Customer Referrals type: object CustomerSummary: @@ -30591,9 +30103,6 @@ components: $ref: '#/components/schemas/CustomerSummaryRedemptions' orders: $ref: '#/components/schemas/CustomerSummaryOrders' - required: - - orders - - redemptions title: Customer Summary type: object EarningRuleEvent: @@ -30618,8 +30127,6 @@ components: type: string parameters: $ref: '#/components/schemas/LoyaltiesMembersTransactionsExportCreateRequestBody_parameters' - required: - - exported_object title: Export Vouchers Transactions type: object FiltersCondition: @@ -30728,11 +30235,6 @@ components: example: 2021-12-22T10:13:06.487Z format: date-time type: string - required: - - campaign_id - - created_at - - customer_id - - tier_id title: Loyalty Tier Expiration type: object MappingPoints: @@ -30851,8 +30353,6 @@ components: additionalProperties: $ref: '#/components/schemas/OrderRedemptions' type: object - required: - - object title: Order Response Base type: object OrderItem: @@ -30975,11 +30475,6 @@ components: enum: - product type: string - required: - - attributes - - id - - metadata - - object title: Product without Skus Object QualificationsFieldConditions: properties: @@ -31053,13 +30548,6 @@ components: enum: - campaign type: string - required: - - created_at - - id - - object - - related_object_id - - related_object_type - - reward_id title: Reward Assignment Base type: object RewardAssignmentParameters: @@ -31089,9 +30577,6 @@ components: name: description: Product name. type: string - required: - - id - - name title: Simple Product Discount Unit type: object SimpleSegment: @@ -31109,10 +30594,6 @@ components: enum: - segment type: string - required: - - id - - name - - object title: Simple Segment type: object SimpleVoucher: @@ -31212,12 +30693,6 @@ components: enum: - voucher type: string - required: - - code - - created_at - - inapplicable_to - - object - - type title: Simple Voucher type: object SkusListForProduct: @@ -31241,11 +30716,6 @@ components: total: description: Total number of SKUs in the product. type: integer - required: - - data - - data_ref - - object - - total title: Skus List For Product type: object ValidationRuleRules: @@ -31310,8 +30780,6 @@ components: type: array filters: $ref: '#/components/schemas/VoucherTransactionsExportFilterConditions' - required: - - filters title: Voucher Transactions type: object Any: @@ -31356,11 +30824,6 @@ components: example: 2022-08-30T11:51:08.029Z format: date-time type: string - required: - - average_amount - - last_order_amount - - total_amount - - total_count title: Customer Summary Orders type: object CustomerSummaryRedemptions: @@ -31387,15 +30850,6 @@ components: $ref: '#/components/schemas/CustomerSummaryRedemptions_gift' loyalty_card: $ref: '#/components/schemas/CustomerSummaryRedemptions_loyalty_card' - required: - - gift - - loyalty_card - - total_failed - - total_redeemed - - total_rollback_failed - - total_rollback_succeeded - - total_rolled_back - - total_succeeded title: Customer Summary Redemptions type: object OrderRedemptions: @@ -31557,9 +31011,6 @@ components: next_expiration_points: description: The amount of points that are set to expire next. type: integer - required: - - balance - - points title: Simple Loyalty Card type: object VoucherTransactionsExportFilterConditions: @@ -31567,8 +31018,6 @@ components: properties: voucher_id: $ref: '#/components/schemas/VoucherTransactionsExportFilterConditions_voucher_id' - required: - - voucher_id title: Filter by voucher ID type: object RedeemableResult: @@ -31737,8 +31186,6 @@ components: $ref: '#/components/schemas/Gift' loyalty_card: $ref: '#/components/schemas/CampaignLoyaltyCard' - required: - - type title: CampaignsCreateRequestBodyVoucher type: object CampaignsCreateRequestBody_promotion: @@ -32059,8 +31506,6 @@ components: required if the referral **code** is provided. example: cust_Vzck5i8U3OhcEUFY6MKhN9Rv type: string - required: - - code type: object ClientEventsCreateRequestBody_loyalty: description: If an earning rule in a loyalty program is based on a custom event. @@ -32076,8 +31521,6 @@ components: the request payload gets sent along with this loyalty card code. example: L-CARD-BUHuH6g type: string - required: - - code type: object ClientRedemptionsRedeemRequestBody_allOf_options: description: Configure parameters returned in the response. @@ -32167,14 +31610,6 @@ components: default: 1 description: Number of customers deleted. type: integer - required: - - customer - - customer_events - - daily_events - - events - - order_events - - orders - - segments type: object ExportsCreateRequestBodyParametersFilters: example: @@ -32497,9 +31932,6 @@ components: description: "Identifies the loyalty card that is being modified, this is\ \ the ID that was assigned by the Voucherify API." type: string - required: - - id - - type type: object Loyalties_Members_Points_Expiration_List_Response_Body_Data_Item_bucket: description: Defines the number of points stored in the given loyalty points @@ -32665,9 +32097,6 @@ components: next_expiration_points: description: The amount of points that are set to expire next. type: integer - required: - - balance - - points type: object LoyaltiesMembersTransfersCreateResponseBody_validity_timeframe: description: "Set recurrent time periods when the voucher is valid. For example,\ @@ -32724,8 +32153,6 @@ components: description: "The endpoint where this list of publications can be accessed\ \ using a GET method. /v1/vouchers/{voucher_code}/publications" type: string - required: - - object type: object LoyaltiesMembersTransfersCreateResponseBody_redemption: description: Stores a summary of redemptions that have been applied to the voucher. @@ -33030,8 +32457,6 @@ components: $ref: '#/components/schemas/FieldConditions' updated_at: $ref: '#/components/schemas/FieldConditions' - required: - - junction type: object PromotionsStacksUpdateRequestBody_tiers: description: Contains the tier configuration. @@ -36087,15 +35512,6 @@ components: description: System generated cause for the redemption being invalid in the context of the provided parameters. type: string - required: - - channel - - date - - id - - object - - related_object_id - - related_object_type - - result - - status title: Redemptions List Response Body Redemptions Item type: object RewardsAssignmentsCreateRequestBody_parameters_loyalty: @@ -36116,8 +35532,6 @@ components: properties: loyalty: $ref: '#/components/schemas/RewardsAssignmentsCreateRequestBody_parameters_loyalty' - required: - - loyalty type: object RewardsAssignmentsUpdateRequestBody_parameters_loyalty: description: Stores the points parameter. @@ -36152,9 +35566,6 @@ components: name: description: Product name. type: string - required: - - id - - name title: Validations Validate Response Body Redeemables ItemResultDiscountProduct type: object Validations_Validate_Response_Body_Redeemables_ItemResultDiscount: @@ -36265,8 +35676,6 @@ components: type: number fixed_amount_formula: type: string - required: - - type title: Validations Validate Response Body Redeemables ItemResultDiscount type: object Validations_Validate_Response_Body_Redeemables_ItemResult_gift: @@ -36290,7 +35699,7 @@ components: type: object Validations_Validate_Response_Body_Redeemables_ItemResultDetails: example: - message: Applicable redeemables limit exceeded + message: message key: applicable_redeemables_limit_exceeded properties: key: @@ -36303,13 +35712,6 @@ components: - preceding_validation_failed type: string message: - enum: - - Applicable redeemables limit exceeded - - Applicable redeemables limit per category exceeded - - Applicable exclusive redeemables limit exceeded - - Applicable exclusive redeemables limit per category exceeded - - Redeemable cannot be applied due to exclusion rules - - Redeemable cannot be applied due to preceding validation failure type: string title: Validations Validate Response Body Redeemables ItemResultDetails type: object @@ -36354,7 +35756,7 @@ components: source_id: source_id amount_off: 2.027123023002322 details: - message: Applicable redeemables limit exceeded + message: message key: applicable_redeemables_limit_exceeded loyalty_card: points: 1 @@ -36421,7 +35823,7 @@ components: source_id: source_id amount_off: 2.027123023002322 details: - message: Applicable redeemables limit exceeded + message: message key: applicable_redeemables_limit_exceeded loyalty_card: points: 1 @@ -36528,11 +35930,6 @@ components: items: $ref: '#/components/schemas/Category' type: array - required: - - id - - object - - result - - status title: Validations Validate Response Body Redeemables Item type: object VouchersBalanceUpdateResponseBody_related_object: @@ -36553,9 +35950,6 @@ components: \ ID that was assigned by the Voucherify API." example: v_4Bd3aX7eXjHbe7Ef7on8YsLWBynsT4jq type: string - required: - - id - - type type: object Vouchers_Redemption_Get_Response_Body_Redemption_Entries_ItemRelatedRedemptionsRollbacksItem: example: @@ -38210,15 +37604,6 @@ components: description: System generated cause for the redemption being invalid in the context of the provided parameters. type: string - required: - - channel - - date - - id - - object - - related_object_id - - related_object_type - - result - - status title: Vouchers Redemption Get Response Body Redemption Entries Item type: object CampaignBase_validity_timeframe: @@ -38259,11 +37644,6 @@ components: rounding_value: description: Value of rounding type: integer - required: - - period_type - - period_value - - rounding_type - - rounding_value type: object CampaignsImportVoucherItem_redemption: description: Stores the quantity of redemptions that can be applied to the voucher. @@ -38321,9 +37701,6 @@ components: description: "Number of points to be awarded, i.e. how many points to be\ \ added to the loyalty card." type: integer - required: - - every - - points type: object Earning_Rule_Base_LoyaltyOrder_metadata: description: "Defines the ratio based on the property defined in the calculation_type\ @@ -38343,10 +37720,6 @@ components: property: description: Order metadata property. type: string - required: - - every - - points - - property type: object Earning_Rule_Base_LoyaltyOrder: properties: @@ -38384,11 +37757,6 @@ components: description: "Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6,\ \ prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619." type: string - required: - - every - - id - - object - - points type: object Earning_Rule_Base_LoyaltyOrderItems: properties: @@ -38418,17 +37786,11 @@ components: property: description: Customer metadata property. type: string - required: - - every - - points - - property type: object Earning_Rule_Base_Loyalty_customer: properties: metadata: $ref: '#/components/schemas/Earning_Rule_Base_Loyalty_customer_metadata' - required: - - metadata type: object Earning_Rule_Base_Loyalty_custom_event_metadata: description: "Defines the ratio based on the property defined in the calculation_type\ @@ -38450,17 +37812,11 @@ components: Custom event metadata property. type: string - required: - - every - - points - - property type: object Earning_Rule_Base_Loyalty_custom_event: properties: metadata: $ref: '#/components/schemas/Earning_Rule_Base_Loyalty_custom_event_metadata' - required: - - metadata type: object Earning_Rule_Base_Loyalty: properties: @@ -38498,8 +37854,6 @@ components: properties: schema_id: type: string - required: - - schema_id type: object EarningRuleBase_segment: description: Contains the ID of a customer segment. Required for the customer.segment.entered @@ -38509,8 +37863,6 @@ components: description: Contains a unique identifier of a customer segment. Assigned by the Voucherify API. type: string - required: - - id type: object EarningRuleBase_source: description: Contains the custom earning rule name and parent campaign. @@ -38529,9 +37881,6 @@ components: enum: - campaign type: string - required: - - object_id - - object_type type: object EarningRuleBase_validity_timeframe: description: "Set recurrent time periods when the earning rule is valid. For\ @@ -38548,9 +37897,6 @@ components: \ 8601 format, expressed as a duration. For example, an earning rule with\ \ an interval of P2D will be valid every other day." type: string - required: - - duration - - interval type: object ExportResult: example: @@ -38560,8 +37906,6 @@ components: description: URL of the CSV file location. It contains the token used for authorization in the Download export method. type: string - required: - - url title: ExportResult type: object ExportParametersFilters: @@ -38732,8 +38076,6 @@ components: properties: points: $ref: '#/components/schemas/LoyaltyTier_allOf_config_points' - required: - - points type: object example: null LoyaltyTierBase_points: @@ -38759,8 +38101,6 @@ components: - IMMEDIATE - NEXT_PERIOD type: string - required: - - type type: object LoyaltyTiersExpirationAll_expiration_date_rounding: description: Defines the rounding mechanism for tier expiration. @@ -38835,9 +38175,6 @@ components: type: string rounding: $ref: '#/components/schemas/LoyaltyTiersExpirationAll_expiration_date_rounding' - required: - - extend - - type type: object Customer_Id: properties: @@ -38850,9 +38187,6 @@ components: enum: - customer type: string - required: - - id - - object title: Customer Id type: object example: null @@ -39020,8 +38354,6 @@ components: enum: - MANUAL type: string - required: - - ids type: object PromotionTier_action: description: Contains details about the discount applied by the promotion tier. @@ -39731,7 +39063,7 @@ components: type: object Validations_Redeemable_Skipped_Details: example: - message: Applicable redeemables limit exceeded + message: message key: applicable_redeemables_limit_exceeded properties: key: @@ -39744,13 +39076,6 @@ components: - preceding_validation_failed type: string message: - enum: - - Applicable redeemables limit exceeded - - Applicable redeemables limit per category exceeded - - Applicable exclusive redeemables limit exceeded - - Applicable exclusive redeemables limit per category exceeded - - Redeemable cannot be applied due to exclusion rules - - Redeemable cannot be applied due to preceding validation failure type: string title: Validations Redeemable Skipped Details type: object @@ -39758,7 +39083,7 @@ components: description: Provides details about the reason why the redeemable is skipped. example: details: - message: Applicable redeemables limit exceeded + message: message key: applicable_redeemables_limit_exceeded properties: details: @@ -39826,9 +39151,6 @@ components: - voucher pattern: voucher type: string - required: - - id - - type type: object VoucherTransaction_details_balance: description: Contains information on how the balance was affected by the transaction. @@ -39870,13 +39192,6 @@ components: type: integer related_object: $ref: '#/components/schemas/VoucherTransaction_details_balance_related_object' - required: - - balance - - object - - points - - related_object - - total - - type type: object VoucherTransaction_details_order: description: Contains information about the original order. @@ -39892,9 +39207,6 @@ components: \ order ID. It is really useful in case of integration between multiple\ \ systems. It can be an order ID from CRM, database or 3rd party service." type: string - required: - - id - - source_id type: object VoucherTransaction_details_event: description: Contains information about the event that triggers the point accrual. @@ -39908,9 +39220,6 @@ components: type: description: Type of event. type: string - required: - - id - - type type: object VoucherTransaction_details_earning_rule_source: description: Contains the custom earning rule name. @@ -39921,8 +39230,6 @@ components: description: Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. type: string - required: - - banner type: object VoucherTransaction_details_earning_rule: description: Contains information about the earning rule. @@ -39936,9 +39243,6 @@ components: type: string source: $ref: '#/components/schemas/VoucherTransaction_details_earning_rule_source' - required: - - id - - source type: object VoucherTransaction_details_segment: description: Contains information about the segment. @@ -39950,9 +39254,6 @@ components: type: string name: type: string - required: - - id - - name type: object VoucherTransaction_details_loyalty_tier: description: Contains information about the loyalty tier. @@ -39964,9 +39265,6 @@ components: type: string name: type: string - required: - - id - - name type: object VoucherTransaction_details_redemption: description: Contains information about the original redemption. @@ -39976,8 +39274,6 @@ components: id: description: Unique redemption ID. type: string - required: - - id type: object VoucherTransaction_details_rollback: description: Contains information about the redemption rollback. @@ -39987,8 +39283,6 @@ components: id: description: Unique redemption rollback ID. type: string - required: - - id type: object VoucherTransaction_details_custom_event: description: Contains information about the custom event that triggers the point @@ -40003,9 +39297,6 @@ components: type: description: Type of custom event. type: string - required: - - id - - type type: object VoucherTransaction_details_event_schema: description: Contains information about the custom event metadata schema. @@ -40019,9 +39310,6 @@ components: name: description: Type of custom event. type: string - required: - - id - - name type: object VoucherTransaction_details_reward: description: Contains information about the pay with points reward. @@ -40035,9 +39323,6 @@ components: name: description: Reward name. type: string - required: - - id - - name type: object VoucherTransaction_details: description: Contains the detailed information about the transaction. @@ -40125,8 +39410,6 @@ components: \ for authorization in the [Download export](ref:download-export) method." type: string - required: - - url type: object CampaignVoucher_redemption: description: Defines the redemption limits on vouchers. @@ -40199,8 +39482,6 @@ components: properties: loyalty: $ref: '#/components/schemas/RewardAssignmentParameters_parameters_loyalty' - required: - - loyalty type: object RewardType_campaign: description: Objects stores information about the campaign related to the reward. @@ -40222,9 +39503,6 @@ components: - REFERRAL_PROGRAM - LOYALTY_PROGRAM type: string - required: - - id - - type type: object RewardType_coin: description: Defines the ratio by mapping the number of loyalty points in points_ratio @@ -40238,8 +39516,6 @@ components: description: The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property. type: integer - required: - - exchange_ratio type: object RewardType_product: description: Contains information about the product given as a reward. @@ -40254,8 +39530,6 @@ components: example: sku_0b7d7dfb090be5c619 nullable: true type: string - required: - - id type: object SimpleVoucher_redemption: description: Defines the redemption limits on vouchers. @@ -40269,8 +39543,6 @@ components: description: How many times a voucher has already been redeemed. example: 1 type: integer - required: - - redeemed_quantity type: object CustomerSummaryRedemptions_gift: description: Summary of gift card credits. @@ -40287,9 +39559,6 @@ components: multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. type: integer - required: - - amount_to_go - - redeemed_amount type: object CustomerSummaryRedemptions_loyalty_card: description: Summary of loyalty points. @@ -40301,9 +39570,6 @@ components: description: Sum of remaining available point balance across all loyalty cards. type: integer - required: - - points_to_go - - redeemed_points type: object VoucherTransactionsExportFilterConditions_voucher_id_conditions: description: Data filters used to narrow the data records to be returned in @@ -40317,8 +39583,6 @@ components: maxItems: 1 minItems: 1 type: array - required: - - $in type: object VoucherTransactionsExportFilterConditions_voucher_id: description: Data filters used to narrow the data records to be returned in @@ -40326,8 +39590,6 @@ components: properties: conditions: $ref: '#/components/schemas/VoucherTransactionsExportFilterConditions_voucher_id_conditions' - required: - - conditions type: object securitySchemes: X-App-Id: diff --git a/docs/ApplicableTo.md b/docs/ApplicableTo.md index cbcf87c3..d6a559a6 100644 --- a/docs/ApplicableTo.md +++ b/docs/ApplicableTo.md @@ -5,22 +5,22 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | This object stores information about the product collection. | | -|**id** | **String** | Unique product collection ID assigned by Voucherify. | | -|**sourceId** | **String** | The source ID from your inventory system. | [optional] | -|**productId** | **String** | Parent product's unique ID assigned by Voucherify. | [optional] | -|**productSourceId** | **String** | Parent product's source ID from your inventory system. | [optional] | -|**strict** | **Boolean** | | | -|**price** | **BigDecimal** | New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price. | [optional] | -|**priceFormula** | **BigDecimal** | Formula used to calculate the discounted price of an item. | [optional] | -|**effect** | **ApplicableToEffect** | | | -|**quantityLimit** | **Integer** | The maximum number of units allowed to be discounted per order line item. | [optional] | -|**aggregatedQuantityLimit** | **Integer** | The maximum number of units allowed to be discounted combined across all matched order line items. | [optional] | -|**amountLimit** | **Integer** | Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600. | [optional] | -|**aggregatedAmountLimit** | **Integer** | Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects: - `APPLY_TO_ITEMS` (each item subtotal is discounted equally) - `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value) | [optional] | -|**orderItemIndices** | **List<Integer>** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | This object stores information about the product collection. | +|**id** | **String** | Unique product collection ID assigned by Voucherify. | +|**sourceId** | **String** | The source ID from your inventory system. | +|**productId** | **String** | Parent product's unique ID assigned by Voucherify. | +|**productSourceId** | **String** | Parent product's source ID from your inventory system. | +|**strict** | **Boolean** | | +|**price** | **BigDecimal** | New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price. | +|**priceFormula** | **BigDecimal** | Formula used to calculate the discounted price of an item. | +|**effect** | **ApplicableToEffect** | | +|**quantityLimit** | **Integer** | The maximum number of units allowed to be discounted per order line item. | +|**aggregatedQuantityLimit** | **Integer** | The maximum number of units allowed to be discounted combined across all matched order line items. | +|**amountLimit** | **Integer** | Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600. | +|**aggregatedAmountLimit** | **Integer** | Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects: - `APPLY_TO_ITEMS` (each item subtotal is discounted equally) - `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value) | +|**orderItemIndices** | **List<Integer>** | | @@ -31,7 +31,6 @@ | PRODUCT | "product" | | SKU | "sku" | | PRODUCTS_COLLECTION | "products_collection" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ApplicableToEffect.md b/docs/ApplicableToEffect.md index 2f2d812d..81d03ff0 100644 --- a/docs/ApplicableToEffect.md +++ b/docs/ApplicableToEffect.md @@ -11,7 +11,5 @@ * `MOST_EXPENSIVE` (value: `"APPLY_TO_MOST_EXPENSIVE"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ApplicableToResultList.md b/docs/ApplicableToResultList.md index 40c1f0a4..d444b5d9 100644 --- a/docs/ApplicableToResultList.md +++ b/docs/ApplicableToResultList.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**data** | [**List<ApplicableTo>**](ApplicableTo.md) | Contains array of items to which the discount can apply. | | -|**total** | **Integer** | Total number of objects defining included products, SKUs, or product collections. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | The type of the object represented by JSON. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**data** | [**List<ApplicableTo>**](ApplicableTo.md) | Contains array of items to which the discount can apply. | +|**total** | **Integer** | Total number of objects defining included products, SKUs, or product collections. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | The type of the object represented by JSON. | @@ -19,7 +19,6 @@ | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -28,7 +27,6 @@ | Name | Value | |---- | -----| | DATA | "data" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/AsyncActions.md b/docs/AsyncActions.md index 2f3d1eb0..d132b227 100644 --- a/docs/AsyncActions.md +++ b/docs/AsyncActions.md @@ -6,9 +6,9 @@ Response to requests that are processed asynchronously. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | diff --git a/docs/BusValRuleAssignment.md b/docs/BusValRuleAssignment.md index 371f4851..bf7abefd 100644 --- a/docs/BusValRuleAssignment.md +++ b/docs/BusValRuleAssignment.md @@ -6,17 +6,17 @@ Assignments of business validation rule ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The unique identifier for a assignment | | -|**ruleId** | **String** | The unique identifier for a rule | | -|**relatedObjectId** | **String** | The unique identifier for a related object | | -|**relatedObjectType** | **String** | The type of related object | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the object was last updated in ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**validationStatus** | [**ValidationStatusEnum**](#ValidationStatusEnum) | The validation status of the assignment | [optional] | -|**validationOmittedRules** | **List<String>** | The list of omitted rules | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | The unique identifier for a assignment | +|**ruleId** | **String** | The unique identifier for a rule | +|**relatedObjectId** | **String** | The unique identifier for a related object | +|**relatedObjectType** | **String** | The type of related object | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the object was last updated in ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**validationStatus** | [**ValidationStatusEnum**](#ValidationStatusEnum) | The validation status of the assignment | +|**validationOmittedRules** | **List<String>** | The list of omitted rules | @@ -25,7 +25,6 @@ Assignments of business validation rule | Name | Value | |---- | -----| | VALIDATION_RULES_ASSIGNMENT | "validation_rules_assignment" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -36,7 +35,6 @@ Assignments of business validation rule | VALID | "VALID" | | PARTIALLY_VALID | "PARTIALLY_VALID" | | INVALID | "INVALID" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/Campaign.md b/docs/Campaign.md index 3e49fd1d..bcdf402c 100644 --- a/docs/Campaign.md +++ b/docs/Campaign.md @@ -5,39 +5,39 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique campaign ID, assigned by Voucherify. | | -|**name** | **String** | Campaign name. | | -|**description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] | -|**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | Type of campaign. | | -|**type** | [**TypeEnum**](#TypeEnum) | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | | -|**voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | [optional] | -|**autoJoin** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | | -|**joinOnce** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | | -|**useVoucherMetadataSchema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | | -|**validityTimeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**activityDurationAfterPublishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] | -|**vouchersCount** | **Integer** | Total number of unique vouchers in campaign. | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] | -|**active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format. | [optional] | -|**category** | **String** | Unique category name. | [optional] | -|**creationStatus** | [**CreationStatusEnum**](#CreationStatusEnum) | Indicates the status of the campaign creation. | | -|**vouchersGenerationStatus** | [**VouchersGenerationStatusEnum**](#VouchersGenerationStatusEnum) | Indicates the status of the campaign's voucher generation. | | -|**_protected** | **Boolean** | Indicates whether the resource can be deleted. | | -|**categoryId** | **String** | Unique category ID that this campaign belongs to. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the campaign. | | -|**referralProgram** | [**ReferralProgram**](ReferralProgram.md) | | [optional] | -|**loyaltyTiersExpiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional] | -|**promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique campaign ID, assigned by Voucherify. | +|**name** | **String** | Campaign name. | +|**description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | +|**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | Type of campaign. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | +|**voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | +|**autoJoin** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | +|**joinOnce** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | +|**useVoucherMetadataSchema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | +|**validityTimeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**activityDurationAfterPublishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | +|**vouchersCount** | **Integer** | Total number of unique vouchers in campaign. | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | +|**active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format. | +|**category** | **String** | Unique category name. | +|**creationStatus** | [**CreationStatusEnum**](#CreationStatusEnum) | Indicates the status of the campaign creation. | +|**vouchersGenerationStatus** | [**VouchersGenerationStatusEnum**](#VouchersGenerationStatusEnum) | Indicates the status of the campaign's voucher generation. | +|**_protected** | **Boolean** | Indicates whether the resource can be deleted. | +|**categoryId** | **String** | Unique category ID that this campaign belongs to. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the campaign. | +|**referralProgram** | [**ReferralProgram**](ReferralProgram.md) | | +|**loyaltyTiersExpiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | +|**promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | @@ -51,7 +51,6 @@ | PROMOTION | "PROMOTION" | | REFERRAL_PROGRAM | "REFERRAL_PROGRAM" | | LUCKY_DRAW | "LUCKY_DRAW" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -61,7 +60,6 @@ |---- | -----| | AUTO_UPDATE | "AUTO_UPDATE" | | STATIC | "STATIC" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -76,7 +74,6 @@ | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | @@ -89,7 +86,6 @@ | FAILED | "FAILED" | | DRAFT | "DRAFT" | | MODIFYING | "MODIFYING" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -102,7 +98,6 @@ | FAILED | "FAILED" | | DRAFT | "DRAFT" | | MODIFYING | "MODIFYING" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CampaignBase.md b/docs/CampaignBase.md index 1e51a0df..e165e168 100644 --- a/docs/CampaignBase.md +++ b/docs/CampaignBase.md @@ -6,37 +6,37 @@ This is an object representing a campaign. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique campaign ID, assigned by Voucherify. | | -|**name** | **String** | Campaign name. | | -|**description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] | -|**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | Type of campaign. | | -|**type** | [**TypeEnum**](#TypeEnum) | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | | -|**voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | [optional] | -|**autoJoin** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | | -|**joinOnce** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | | -|**useVoucherMetadataSchema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | | -|**validityTimeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**activityDurationAfterPublishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] | -|**vouchersCount** | **Integer** | Total number of unique vouchers in campaign. | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] | -|**active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format. | [optional] | -|**category** | **String** | Unique category name. | [optional] | -|**creationStatus** | [**CreationStatusEnum**](#CreationStatusEnum) | Indicates the status of the campaign creation. | | -|**vouchersGenerationStatus** | [**VouchersGenerationStatusEnum**](#VouchersGenerationStatusEnum) | Indicates the status of the campaign's voucher generation. | | -|**_protected** | **Boolean** | Indicates whether the resource can be deleted. | | -|**categoryId** | **String** | Unique category ID that this campaign belongs to. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the campaign. | | -|**referralProgram** | [**ReferralProgram**](ReferralProgram.md) | | [optional] | -|**loyaltyTiersExpiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique campaign ID, assigned by Voucherify. | +|**name** | **String** | Campaign name. | +|**description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | +|**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | Type of campaign. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | +|**voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | +|**autoJoin** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | +|**joinOnce** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | +|**useVoucherMetadataSchema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | +|**validityTimeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**activityDurationAfterPublishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | +|**vouchersCount** | **Integer** | Total number of unique vouchers in campaign. | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | +|**active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format. | +|**category** | **String** | Unique category name. | +|**creationStatus** | [**CreationStatusEnum**](#CreationStatusEnum) | Indicates the status of the campaign creation. | +|**vouchersGenerationStatus** | [**VouchersGenerationStatusEnum**](#VouchersGenerationStatusEnum) | Indicates the status of the campaign's voucher generation. | +|**_protected** | **Boolean** | Indicates whether the resource can be deleted. | +|**categoryId** | **String** | Unique category ID that this campaign belongs to. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the campaign. | +|**referralProgram** | [**ReferralProgram**](ReferralProgram.md) | | +|**loyaltyTiersExpiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | @@ -50,7 +50,6 @@ This is an object representing a campaign. | PROMOTION | "PROMOTION" | | REFERRAL_PROGRAM | "REFERRAL_PROGRAM" | | LUCKY_DRAW | "LUCKY_DRAW" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -60,7 +59,6 @@ This is an object representing a campaign. |---- | -----| | AUTO_UPDATE | "AUTO_UPDATE" | | STATIC | "STATIC" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -75,7 +73,6 @@ This is an object representing a campaign. | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | @@ -88,7 +85,6 @@ This is an object representing a campaign. | FAILED | "FAILED" | | DRAFT | "DRAFT" | | MODIFYING | "MODIFYING" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -101,7 +97,6 @@ This is an object representing a campaign. | FAILED | "FAILED" | | DRAFT | "DRAFT" | | MODIFYING | "MODIFYING" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CampaignBaseValidityTimeframe.md b/docs/CampaignBaseValidityTimeframe.md index a5a6ab15..2f127a4a 100644 --- a/docs/CampaignBaseValidityTimeframe.md +++ b/docs/CampaignBaseValidityTimeframe.md @@ -6,10 +6,10 @@ Set recurrent time periods when the campaign is valid. For example, valid for 1 ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | [optional] | -|**duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | +|**duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | diff --git a/docs/CampaignLoyaltyCard.md b/docs/CampaignLoyaltyCard.md index 0d6c454d..623663b8 100644 --- a/docs/CampaignLoyaltyCard.md +++ b/docs/CampaignLoyaltyCard.md @@ -6,10 +6,10 @@ Schema model for a campaign loyalty card. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card. | | -|**expirationRules** | [**CampaignLoyaltyCardExpirationRules**](CampaignLoyaltyCardExpirationRules.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card. | +|**expirationRules** | [**CampaignLoyaltyCardExpirationRules**](CampaignLoyaltyCardExpirationRules.md) | | diff --git a/docs/CampaignLoyaltyCardExpirationRules.md b/docs/CampaignLoyaltyCardExpirationRules.md index f848d563..9ef94f2c 100644 --- a/docs/CampaignLoyaltyCardExpirationRules.md +++ b/docs/CampaignLoyaltyCardExpirationRules.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**periodType** | **String** | Type of period | | -|**periodValue** | **Integer** | Value of the period | | -|**roundingType** | **String** | Type of rounding | | -|**roundingValue** | **Integer** | Value of rounding | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**periodType** | **String** | Type of period | +|**periodValue** | **Integer** | Value of the period | +|**roundingType** | **String** | Type of rounding | +|**roundingValue** | **Integer** | Value of rounding | diff --git a/docs/CampaignVoucher.md b/docs/CampaignVoucher.md index cf9e741b..103fafb0 100644 --- a/docs/CampaignVoucher.md +++ b/docs/CampaignVoucher.md @@ -6,20 +6,20 @@ Schema model for a campaign voucher. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | **String** | Type of voucher. | | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**gift** | [**Gift**](Gift.md) | | [optional] | -|**loyaltyCard** | [**CampaignLoyaltyCard**](CampaignLoyaltyCard.md) | | [optional] | -|**redemption** | [**CampaignVoucherRedemption**](CampaignVoucherRedemption.md) | | | -|**codeConfig** | [**CodeConfigRequiredLengthCharsetPattern**](CodeConfigRequiredLengthCharsetPattern.md) | | | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**type** | **String** | Type of voucher. | +|**discount** | [**Discount**](Discount.md) | | +|**gift** | [**Gift**](Gift.md) | | +|**loyaltyCard** | [**CampaignLoyaltyCard**](CampaignLoyaltyCard.md) | | +|**redemption** | [**CampaignVoucherRedemption**](CampaignVoucherRedemption.md) | | +|**codeConfig** | [**CodeConfigRequiredLengthCharsetPattern**](CodeConfigRequiredLengthCharsetPattern.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | +|**validityTimeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | @@ -34,7 +34,6 @@ Schema model for a campaign voucher. | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/CampaignVoucherRedemption.md b/docs/CampaignVoucherRedemption.md index 11c80bf9..d32a7926 100644 --- a/docs/CampaignVoucherRedemption.md +++ b/docs/CampaignVoucherRedemption.md @@ -6,9 +6,9 @@ Defines the redemption limits on vouchers. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | diff --git a/docs/CampaignsApi.md b/docs/CampaignsApi.md index 1d856076..f9e7090d 100644 --- a/docs/CampaignsApi.md +++ b/docs/CampaignsApi.md @@ -72,11 +72,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The campaign ID or name of the campaign to which voucher will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | | -| **code** | **String**| A custom **code** that identifies the voucher. | | -| **campaignsVouchersCreateRequestBody** | [**CampaignsVouchersCreateRequestBody**](CampaignsVouchersCreateRequestBody.md)| Specify the voucher parameters that you would like to overwrite. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| The campaign ID or name of the campaign to which voucher will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | +| **code** | **String**| A custom **code** that identifies the voucher. | +| **campaignsVouchersCreateRequestBody** | [**CampaignsVouchersCreateRequestBody**](CampaignsVouchersCreateRequestBody.md)| Specify the voucher parameters that you would like to overwrite. | ### Return type @@ -151,11 +151,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The campaign ID or name of the campaign to which voucher(s) will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | | -| **vouchersCount** | **Integer**| Number of vouchers that should be added. | [optional] | -| **campaignsVouchersCreateInBulkRequestBody** | [**CampaignsVouchersCreateInBulkRequestBody**](CampaignsVouchersCreateInBulkRequestBody.md)| Specify the voucher parameters that you would like to overwrite. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| The campaign ID or name of the campaign to which voucher(s) will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | +| **vouchersCount** | **Integer**| Number of vouchers that should be added. | +| **campaignsVouchersCreateInBulkRequestBody** | [**CampaignsVouchersCreateInBulkRequestBody**](CampaignsVouchersCreateInBulkRequestBody.md)| Specify the voucher parameters that you would like to overwrite. | ### Return type @@ -228,9 +228,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignsCreateRequestBody** | [**CampaignsCreateRequestBody**](CampaignsCreateRequestBody.md)| Specify the details of the campaign that you would like to create. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignsCreateRequestBody** | [**CampaignsCreateRequestBody**](CampaignsCreateRequestBody.md)| Specify the details of the campaign that you would like to create. | ### Return type @@ -304,10 +304,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | | -| **force** | **Boolean**| If this flag is set to `true`, the campaign and related vouchers will be removed permanently. If it is set to `false` or not set at all, the campaign and related vouchers will be moved to the bin. Going forward, the user will be able to create the next campaign with exactly the same name. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | +| **force** | **Boolean**| If this flag is set to `true`, the campaign and related vouchers will be removed permanently. If it is set to `false` or not set at all, the campaign and related vouchers will be moved to the bin. Going forward, the user will be able to create the next campaign with exactly the same name. | ### Return type @@ -380,9 +380,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The campaign ID or name of the campaign being disabled. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| The campaign ID or name of the campaign being disabled. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | ### Return type @@ -455,9 +455,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value. | ### Return type @@ -530,9 +530,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | ### Return type @@ -606,10 +606,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The ID of an existing campaign to which you're importing the codes. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | | -| **campaignsImportVoucherItem** | [**List<CampaignsImportVoucherItem>**](CampaignsImportVoucherItem.md)| Discount type, expiration date and the remaining attributes will be taken from the <!-- [Campaign](OpenAPI.json/components/schemas/Campaign) -->[Campaign](ref:get-campaign) settings. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| The ID of an existing campaign to which you're importing the codes. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | +| **campaignsImportVoucherItem** | [**List<CampaignsImportVoucherItem>**](CampaignsImportVoucherItem.md)| Discount type, expiration date and the remaining attributes will be taken from the <!-- [Campaign](OpenAPI.json/components/schemas/Campaign) -->[Campaign](ref:get-campaign) settings. | ### Return type @@ -683,10 +683,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value. | | -| **_file** | **File**| File path. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value. | +| **_file** | **File**| File path. | ### Return type @@ -763,13 +763,13 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | -| **campaignType** | [**ParameterCampaignType**](.md)| This attribute allows filtering by campaign type. | [optional] [enum: PROMOTION, GIFT_VOUCHERS, REFERRAL_PROGRAM, DISCOUNT_COUPONS, LOYALTY_PROGRAM, LUCKY_DRAW] | -| **expand** | [**ParameterExpandListCampaigns**](.md)| Include an expanded `categories` object in the response. | [optional] [default to category] [enum: category] | -| **order** | [**ParameterOrderListCampaigns**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] [enum: created_at, -created_at, updated_at, -updated_at] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | +| **campaignType** | [**ParameterCampaignType**](.md)| This attribute allows filtering by campaign type. | +| **expand** | [**ParameterExpandListCampaigns**](.md)| Include an expanded `categories` object in the response. | +| **order** | [**ParameterOrderListCampaigns**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | ### Return type @@ -843,10 +843,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | | -| **campaignsUpdateRequestBody** | [**CampaignsUpdateRequestBody**](CampaignsUpdateRequestBody.md)| Specify the campaign parameters to be updated. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | +| **campaignsUpdateRequestBody** | [**CampaignsUpdateRequestBody**](CampaignsUpdateRequestBody.md)| Specify the campaign parameters to be updated. | ### Return type diff --git a/docs/CampaignsCreateRequestBody.md b/docs/CampaignsCreateRequestBody.md index 45ed3dce..cdaaff90 100644 --- a/docs/CampaignsCreateRequestBody.md +++ b/docs/CampaignsCreateRequestBody.md @@ -5,30 +5,30 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Campaign name. | [optional] | -|**description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | 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. | [optional] | -|**joinOnce** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] | -|**autoJoin** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] | -|**useVoucherMetadataSchema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional] | -|**vouchersCount** | **Integer** | Total number of unique vouchers in campaign (size of campaign). | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**CampaignsCreateRequestBodyValidityTimeframe**](CampaignsCreateRequestBodyValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**activityDurationAfterPublishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] | -|**validationRules** | **List<String>** | Array containing the ID of the validation rule associated with the promotion tier. | [optional] | -|**categoryId** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] | -|**category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] | -|**metadata** | **Object** | | [optional] | -|**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | | [optional] | -|**voucher** | [**CampaignsCreateRequestBodyVoucher**](CampaignsCreateRequestBodyVoucher.md) | | [optional] | -|**referralProgram** | [**ReferralProgram**](ReferralProgram.md) | | [optional] | -|**promotion** | [**CampaignsCreateRequestBodyPromotion**](CampaignsCreateRequestBodyPromotion.md) | | [optional] | -|**luckyDraw** | [**LuckyDraw**](LuckyDraw.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Campaign name. | +|**description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | +|**type** | [**TypeEnum**](#TypeEnum) | 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. | +|**joinOnce** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | +|**autoJoin** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | +|**useVoucherMetadataSchema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | +|**vouchersCount** | **Integer** | Total number of unique vouchers in campaign (size of campaign). | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | +|**validityTimeframe** | [**CampaignsCreateRequestBodyValidityTimeframe**](CampaignsCreateRequestBodyValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**activityDurationAfterPublishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | +|**validationRules** | **List<String>** | Array containing the ID of the validation rule associated with the promotion tier. | +|**categoryId** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | +|**category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | +|**metadata** | **Object** | | +|**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | | +|**voucher** | [**CampaignsCreateRequestBodyVoucher**](CampaignsCreateRequestBodyVoucher.md) | | +|**referralProgram** | [**ReferralProgram**](ReferralProgram.md) | | +|**promotion** | [**CampaignsCreateRequestBodyPromotion**](CampaignsCreateRequestBodyPromotion.md) | | +|**luckyDraw** | [**LuckyDraw**](LuckyDraw.md) | | @@ -38,7 +38,6 @@ |---- | -----| | AUTO_UPDATE | "AUTO_UPDATE" | | STATIC | "STATIC" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -53,7 +52,6 @@ | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | @@ -67,7 +65,6 @@ | LOYALTY_PROGRAM | "LOYALTY_PROGRAM" | | PROMOTION | "PROMOTION" | | LUCKY_DRAW | "LUCKY_DRAW" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CampaignsCreateRequestBodyPromotion.md b/docs/CampaignsCreateRequestBodyPromotion.md index 20a10a88..b997535c 100644 --- a/docs/CampaignsCreateRequestBodyPromotion.md +++ b/docs/CampaignsCreateRequestBodyPromotion.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**tiers** | [**List<PromotionTierCreateParams>**](PromotionTierCreateParams.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**tiers** | [**List<PromotionTierCreateParams>**](PromotionTierCreateParams.md) | | diff --git a/docs/CampaignsCreateRequestBodyValidityTimeframe.md b/docs/CampaignsCreateRequestBodyValidityTimeframe.md index 454dc81c..a693a194 100644 --- a/docs/CampaignsCreateRequestBodyValidityTimeframe.md +++ b/docs/CampaignsCreateRequestBodyValidityTimeframe.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | [optional] | -|**duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | +|**duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | diff --git a/docs/CampaignsCreateRequestBodyVoucher.md b/docs/CampaignsCreateRequestBodyVoucher.md index 46ff2c1f..f31aec71 100644 --- a/docs/CampaignsCreateRequestBodyVoucher.md +++ b/docs/CampaignsCreateRequestBodyVoucher.md @@ -5,15 +5,15 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | | | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**codeConfig** | [**CodeConfig**](CodeConfig.md) | | [optional] | -|**redemption** | [**CampaignsCreateRequestBodyVoucherRedemption**](CampaignsCreateRequestBodyVoucherRedemption.md) | | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] | -|**gift** | [**Gift**](Gift.md) | | [optional] | -|**loyaltyCard** | [**CampaignLoyaltyCard**](CampaignLoyaltyCard.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**type** | [**TypeEnum**](#TypeEnum) | | +|**discount** | [**Discount**](Discount.md) | | +|**codeConfig** | [**CodeConfig**](CodeConfig.md) | | +|**redemption** | [**CampaignsCreateRequestBodyVoucherRedemption**](CampaignsCreateRequestBodyVoucherRedemption.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**gift** | [**Gift**](Gift.md) | | +|**loyaltyCard** | [**CampaignLoyaltyCard**](CampaignLoyaltyCard.md) | | @@ -24,7 +24,6 @@ | DISCOUNT_VOUCHER | "DISCOUNT_VOUCHER" | | GIFT_VOUCHER | "GIFT_VOUCHER" | | LOYALTY_CARD | "LOYALTY_CARD" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CampaignsCreateRequestBodyVoucherRedemption.md b/docs/CampaignsCreateRequestBodyVoucherRedemption.md index 276098ba..19d2b094 100644 --- a/docs/CampaignsCreateRequestBodyVoucherRedemption.md +++ b/docs/CampaignsCreateRequestBodyVoucherRedemption.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | diff --git a/docs/CampaignsCreateResponseBody.md b/docs/CampaignsCreateResponseBody.md index a5051e0d..a66fe4c0 100644 --- a/docs/CampaignsCreateResponseBody.md +++ b/docs/CampaignsCreateResponseBody.md @@ -6,39 +6,39 @@ Response body schema for **POST** `/campaigns/{campaignId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique campaign ID, assigned by Voucherify. | | -|**name** | **String** | Campaign name. | | -|**description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] | -|**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | Type of campaign. | | -|**type** | [**TypeEnum**](#TypeEnum) | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | | -|**voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | [optional] | -|**autoJoin** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | | -|**joinOnce** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | | -|**useVoucherMetadataSchema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | | -|**validityTimeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**activityDurationAfterPublishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] | -|**vouchersCount** | **Integer** | Total number of unique vouchers in campaign. | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] | -|**active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format. | [optional] | -|**category** | **String** | Unique category name. | [optional] | -|**creationStatus** | [**CreationStatusEnum**](#CreationStatusEnum) | Indicates the status of the campaign creation. | | -|**vouchersGenerationStatus** | [**VouchersGenerationStatusEnum**](#VouchersGenerationStatusEnum) | Indicates the status of the campaign's voucher generation. | | -|**_protected** | **Boolean** | Indicates whether the resource can be deleted. | | -|**categoryId** | **String** | Unique category ID that this campaign belongs to. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the campaign. | | -|**referralProgram** | [**ReferralProgram**](ReferralProgram.md) | | [optional] | -|**loyaltyTiersExpiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional] | -|**promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique campaign ID, assigned by Voucherify. | +|**name** | **String** | Campaign name. | +|**description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | +|**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | Type of campaign. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | +|**voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | +|**autoJoin** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | +|**joinOnce** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | +|**useVoucherMetadataSchema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | +|**validityTimeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**activityDurationAfterPublishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | +|**vouchersCount** | **Integer** | Total number of unique vouchers in campaign. | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | +|**active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format. | +|**category** | **String** | Unique category name. | +|**creationStatus** | [**CreationStatusEnum**](#CreationStatusEnum) | Indicates the status of the campaign creation. | +|**vouchersGenerationStatus** | [**VouchersGenerationStatusEnum**](#VouchersGenerationStatusEnum) | Indicates the status of the campaign's voucher generation. | +|**_protected** | **Boolean** | Indicates whether the resource can be deleted. | +|**categoryId** | **String** | Unique category ID that this campaign belongs to. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the campaign. | +|**referralProgram** | [**ReferralProgram**](ReferralProgram.md) | | +|**loyaltyTiersExpiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | +|**promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | @@ -52,7 +52,6 @@ Response body schema for **POST** `/campaigns/{campaignId}`. | PROMOTION | "PROMOTION" | | REFERRAL_PROGRAM | "REFERRAL_PROGRAM" | | LUCKY_DRAW | "LUCKY_DRAW" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -62,7 +61,6 @@ Response body schema for **POST** `/campaigns/{campaignId}`. |---- | -----| | AUTO_UPDATE | "AUTO_UPDATE" | | STATIC | "STATIC" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -77,7 +75,6 @@ Response body schema for **POST** `/campaigns/{campaignId}`. | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | @@ -90,7 +87,6 @@ Response body schema for **POST** `/campaigns/{campaignId}`. | FAILED | "FAILED" | | DRAFT | "DRAFT" | | MODIFYING | "MODIFYING" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -103,7 +99,6 @@ Response body schema for **POST** `/campaigns/{campaignId}`. | FAILED | "FAILED" | | DRAFT | "DRAFT" | | MODIFYING | "MODIFYING" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CampaignsDeleteResponseBody.md b/docs/CampaignsDeleteResponseBody.md index c5bfa70e..cce26666 100644 --- a/docs/CampaignsDeleteResponseBody.md +++ b/docs/CampaignsDeleteResponseBody.md @@ -6,9 +6,9 @@ Response body schema for **DELETE** `/campaigns/{campaignId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | diff --git a/docs/CampaignsDisableResponseBody.md b/docs/CampaignsDisableResponseBody.md index e0f650ae..931a14e2 100644 --- a/docs/CampaignsDisableResponseBody.md +++ b/docs/CampaignsDisableResponseBody.md @@ -6,8 +6,8 @@ Response body schema for **POST** `/campaigns/{campaignId}/disable`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| +| Name | Type | Description | +|------------ | ------------- | ------------- | diff --git a/docs/CampaignsEnableResponseBody.md b/docs/CampaignsEnableResponseBody.md index aad3ec46..d2bc9f3d 100644 --- a/docs/CampaignsEnableResponseBody.md +++ b/docs/CampaignsEnableResponseBody.md @@ -6,8 +6,8 @@ Response body schema for **POST** `/campaigns/{campaignId}/enable`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| +| Name | Type | Description | +|------------ | ------------- | ------------- | diff --git a/docs/CampaignsGetResponseBody.md b/docs/CampaignsGetResponseBody.md index c4f34801..e244c475 100644 --- a/docs/CampaignsGetResponseBody.md +++ b/docs/CampaignsGetResponseBody.md @@ -6,39 +6,39 @@ Response body schema for **GET** `/campaigns/{campaignId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique campaign ID, assigned by Voucherify. | | -|**name** | **String** | Campaign name. | | -|**description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] | -|**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | Type of campaign. | | -|**type** | [**TypeEnum**](#TypeEnum) | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | | -|**voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | [optional] | -|**autoJoin** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | | -|**joinOnce** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | | -|**useVoucherMetadataSchema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | | -|**validityTimeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**activityDurationAfterPublishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] | -|**vouchersCount** | **Integer** | Total number of unique vouchers in campaign. | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] | -|**active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format. | [optional] | -|**category** | **String** | Unique category name. | [optional] | -|**creationStatus** | [**CreationStatusEnum**](#CreationStatusEnum) | Indicates the status of the campaign creation. | | -|**vouchersGenerationStatus** | [**VouchersGenerationStatusEnum**](#VouchersGenerationStatusEnum) | Indicates the status of the campaign's voucher generation. | | -|**_protected** | **Boolean** | Indicates whether the resource can be deleted. | | -|**categoryId** | **String** | Unique category ID that this campaign belongs to. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the campaign. | | -|**referralProgram** | [**ReferralProgram**](ReferralProgram.md) | | [optional] | -|**loyaltyTiersExpiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional] | -|**promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique campaign ID, assigned by Voucherify. | +|**name** | **String** | Campaign name. | +|**description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | +|**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | Type of campaign. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | +|**voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | +|**autoJoin** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | +|**joinOnce** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | +|**useVoucherMetadataSchema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | +|**validityTimeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**activityDurationAfterPublishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | +|**vouchersCount** | **Integer** | Total number of unique vouchers in campaign. | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | +|**active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format. | +|**category** | **String** | Unique category name. | +|**creationStatus** | [**CreationStatusEnum**](#CreationStatusEnum) | Indicates the status of the campaign creation. | +|**vouchersGenerationStatus** | [**VouchersGenerationStatusEnum**](#VouchersGenerationStatusEnum) | Indicates the status of the campaign's voucher generation. | +|**_protected** | **Boolean** | Indicates whether the resource can be deleted. | +|**categoryId** | **String** | Unique category ID that this campaign belongs to. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the campaign. | +|**referralProgram** | [**ReferralProgram**](ReferralProgram.md) | | +|**loyaltyTiersExpiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | +|**promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | @@ -52,7 +52,6 @@ Response body schema for **GET** `/campaigns/{campaignId}`. | PROMOTION | "PROMOTION" | | REFERRAL_PROGRAM | "REFERRAL_PROGRAM" | | LUCKY_DRAW | "LUCKY_DRAW" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -62,7 +61,6 @@ Response body schema for **GET** `/campaigns/{campaignId}`. |---- | -----| | AUTO_UPDATE | "AUTO_UPDATE" | | STATIC | "STATIC" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -77,7 +75,6 @@ Response body schema for **GET** `/campaigns/{campaignId}`. | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | @@ -90,7 +87,6 @@ Response body schema for **GET** `/campaigns/{campaignId}`. | FAILED | "FAILED" | | DRAFT | "DRAFT" | | MODIFYING | "MODIFYING" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -103,7 +99,6 @@ Response body schema for **GET** `/campaigns/{campaignId}`. | FAILED | "FAILED" | | DRAFT | "DRAFT" | | MODIFYING | "MODIFYING" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CampaignsImportCreateResponseBody.md b/docs/CampaignsImportCreateResponseBody.md index daf4ae9a..5af5919c 100644 --- a/docs/CampaignsImportCreateResponseBody.md +++ b/docs/CampaignsImportCreateResponseBody.md @@ -6,9 +6,9 @@ Response body schema for **POST** `/campaigns/{campaignId}/import`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | diff --git a/docs/CampaignsImportCsvCreateResponseBody.md b/docs/CampaignsImportCsvCreateResponseBody.md index b56bbfa7..93f61e12 100644 --- a/docs/CampaignsImportCsvCreateResponseBody.md +++ b/docs/CampaignsImportCsvCreateResponseBody.md @@ -6,9 +6,9 @@ Response body schema for **POST** `/campaigns/{campaignId}/importCSV`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | diff --git a/docs/CampaignsImportVoucherItem.md b/docs/CampaignsImportVoucherItem.md index 853f8fe5..311e9d56 100644 --- a/docs/CampaignsImportVoucherItem.md +++ b/docs/CampaignsImportVoucherItem.md @@ -6,17 +6,17 @@ Import Vouchers to Campaign ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **String** | Unique custom voucher code. | | -|**type** | [**TypeEnum**](#TypeEnum) | Type of voucher. | [optional] | -|**redemption** | [**CampaignsImportVoucherItemRedemption**](CampaignsImportVoucherItemRedemption.md) | | [optional] | -|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the voucher. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] | -|**category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**gift** | [**Gift**](Gift.md) | | [optional] | -|**loyaltyCard** | [**CampaignsImportVoucherLoyaltyCard**](CampaignsImportVoucherLoyaltyCard.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**code** | **String** | Unique custom voucher code. | +|**type** | [**TypeEnum**](#TypeEnum) | Type of voucher. | +|**redemption** | [**CampaignsImportVoucherItemRedemption**](CampaignsImportVoucherItemRedemption.md) | | +|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the voucher. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | +|**category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**gift** | [**Gift**](Gift.md) | | +|**loyaltyCard** | [**CampaignsImportVoucherLoyaltyCard**](CampaignsImportVoucherLoyaltyCard.md) | | @@ -28,7 +28,6 @@ Import Vouchers to Campaign | GIFT_VOUCHER | "GIFT_VOUCHER" | | LOYALTY_CARD | "LOYALTY_CARD" | | LUCKY_DRAW_CODE | "LUCKY_DRAW_CODE" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CampaignsImportVoucherItemRedemption.md b/docs/CampaignsImportVoucherItemRedemption.md index df022718..236b4759 100644 --- a/docs/CampaignsImportVoucherItemRedemption.md +++ b/docs/CampaignsImportVoucherItemRedemption.md @@ -6,9 +6,9 @@ Stores the quantity of redemptions that can be applied to the voucher. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | diff --git a/docs/CampaignsImportVoucherLoyaltyCard.md b/docs/CampaignsImportVoucherLoyaltyCard.md index 015e9d12..4f8f784d 100644 --- a/docs/CampaignsImportVoucherLoyaltyCard.md +++ b/docs/CampaignsImportVoucherLoyaltyCard.md @@ -6,9 +6,9 @@ Schema model for a campaign loyalty card. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card. | diff --git a/docs/CampaignsListResponseBody.md b/docs/CampaignsListResponseBody.md index ee6a09d5..af041335 100644 --- a/docs/CampaignsListResponseBody.md +++ b/docs/CampaignsListResponseBody.md @@ -6,12 +6,12 @@ Schema model for **GET** `/campaigns`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about campaigns in a dictionary. | [optional] | -|**dataRef** | **String** | Identifies the name of the attribute that contains the array of campaign objects. | [optional] | -|**campaigns** | [**List<CampaignBase>**](CampaignBase.md) | Contains array of campaign objects. | [optional] | -|**total** | **Integer** | Total number of campaigns. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about campaigns in a dictionary. | +|**dataRef** | **String** | Identifies the name of the attribute that contains the array of campaign objects. | +|**campaigns** | [**List<CampaignBase>**](CampaignBase.md) | Contains array of campaign objects. | +|**total** | **Integer** | Total number of campaigns. | diff --git a/docs/CampaignsUpdateRequestBody.md b/docs/CampaignsUpdateRequestBody.md index 0462f7a1..abf466a5 100644 --- a/docs/CampaignsUpdateRequestBody.md +++ b/docs/CampaignsUpdateRequestBody.md @@ -5,30 +5,30 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**CampaignsUpdateRequestBodyValidityTimeframe**](CampaignsUpdateRequestBodyValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] | -|**category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] | -|**metadata** | **Object** | | [optional] | -|**unsetMetadataFields** | **List<String>** | Determine which metadata should be removed from campaign. | [optional] | -|**categoryId** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] | -|**activityDurationAfterPublishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] | -|**joinOnce** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] | -|**autoJoin** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | 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. | [optional] | -|**discount** | **Object** | | [optional] | -|**referralProgram** | [**ReferralProgram**](ReferralProgram.md) | | [optional] | -|**gift** | [**Gift**](Gift.md) | | [optional] | -|**loyaltyTiersExpiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional] | -|**options** | [**CampaignsUpdateRequestBodyOptions**](CampaignsUpdateRequestBodyOptions.md) | | [optional] | -|**winnersCount** | **String** | It represents the total number of winners in a lucky draw. | [optional] | -|**uniqueWinnersPerDraw** | **String** | It indicates whether each winner in a draw is unique or not. | [optional] | -|**uniqueWinners** | **String** | Specifies whether each participant can win only once across multiple draws. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | +|**validityTimeframe** | [**CampaignsUpdateRequestBodyValidityTimeframe**](CampaignsUpdateRequestBodyValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | +|**category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | +|**metadata** | **Object** | | +|**unsetMetadataFields** | **List<String>** | Determine which metadata should be removed from campaign. | +|**categoryId** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | +|**activityDurationAfterPublishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | +|**joinOnce** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | +|**autoJoin** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | +|**type** | [**TypeEnum**](#TypeEnum) | 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. | +|**discount** | **Object** | | +|**referralProgram** | [**ReferralProgram**](ReferralProgram.md) | | +|**gift** | [**Gift**](Gift.md) | | +|**loyaltyTiersExpiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | +|**options** | [**CampaignsUpdateRequestBodyOptions**](CampaignsUpdateRequestBodyOptions.md) | | +|**winnersCount** | **String** | It represents the total number of winners in a lucky draw. | +|**uniqueWinnersPerDraw** | **String** | It indicates whether each winner in a draw is unique or not. | +|**uniqueWinners** | **String** | Specifies whether each participant can win only once across multiple draws. | @@ -43,7 +43,6 @@ | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | @@ -53,7 +52,6 @@ |---- | -----| | AUTO_UPDATE | "AUTO_UPDATE" | | STATIC | "STATIC" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CampaignsUpdateRequestBodyOptions.md b/docs/CampaignsUpdateRequestBodyOptions.md index dfea4aee..e0ec092a 100644 --- a/docs/CampaignsUpdateRequestBodyOptions.md +++ b/docs/CampaignsUpdateRequestBodyOptions.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**recalculateTiers** | **Boolean** | Determine if tiers should be recalculated or no. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**recalculateTiers** | **Boolean** | Determine if tiers should be recalculated or no. | diff --git a/docs/CampaignsUpdateRequestBodyValidityTimeframe.md b/docs/CampaignsUpdateRequestBodyValidityTimeframe.md index 0b8c09b2..9f7d060a 100644 --- a/docs/CampaignsUpdateRequestBodyValidityTimeframe.md +++ b/docs/CampaignsUpdateRequestBodyValidityTimeframe.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | [optional] | -|**duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | +|**duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | diff --git a/docs/CampaignsUpdateResponseBody.md b/docs/CampaignsUpdateResponseBody.md index b873d0af..25b530e8 100644 --- a/docs/CampaignsUpdateResponseBody.md +++ b/docs/CampaignsUpdateResponseBody.md @@ -6,39 +6,39 @@ Response body schema for **PUT** `/campaigns/{campaignId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique campaign ID, assigned by Voucherify. | | -|**name** | **String** | Campaign name. | | -|**description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] | -|**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | Type of campaign. | | -|**type** | [**TypeEnum**](#TypeEnum) | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | | -|**voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | [optional] | -|**autoJoin** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | | -|**joinOnce** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | | -|**useVoucherMetadataSchema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | | -|**validityTimeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**activityDurationAfterPublishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] | -|**vouchersCount** | **Integer** | Total number of unique vouchers in campaign. | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] | -|**active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format. | [optional] | -|**category** | **String** | Unique category name. | [optional] | -|**creationStatus** | [**CreationStatusEnum**](#CreationStatusEnum) | Indicates the status of the campaign creation. | | -|**vouchersGenerationStatus** | [**VouchersGenerationStatusEnum**](#VouchersGenerationStatusEnum) | Indicates the status of the campaign's voucher generation. | | -|**_protected** | **Boolean** | Indicates whether the resource can be deleted. | | -|**categoryId** | **String** | Unique category ID that this campaign belongs to. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the campaign. | | -|**referralProgram** | [**ReferralProgram**](ReferralProgram.md) | | [optional] | -|**loyaltyTiersExpiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional] | -|**promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique campaign ID, assigned by Voucherify. | +|**name** | **String** | Campaign name. | +|**description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | +|**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | Type of campaign. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | +|**voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | +|**autoJoin** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | +|**joinOnce** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | +|**useVoucherMetadataSchema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | +|**validityTimeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**activityDurationAfterPublishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | +|**vouchersCount** | **Integer** | Total number of unique vouchers in campaign. | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | +|**active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format. | +|**category** | **String** | Unique category name. | +|**creationStatus** | [**CreationStatusEnum**](#CreationStatusEnum) | Indicates the status of the campaign creation. | +|**vouchersGenerationStatus** | [**VouchersGenerationStatusEnum**](#VouchersGenerationStatusEnum) | Indicates the status of the campaign's voucher generation. | +|**_protected** | **Boolean** | Indicates whether the resource can be deleted. | +|**categoryId** | **String** | Unique category ID that this campaign belongs to. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the campaign. | +|**referralProgram** | [**ReferralProgram**](ReferralProgram.md) | | +|**loyaltyTiersExpiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | +|**promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | @@ -52,7 +52,6 @@ Response body schema for **PUT** `/campaigns/{campaignId}`. | PROMOTION | "PROMOTION" | | REFERRAL_PROGRAM | "REFERRAL_PROGRAM" | | LUCKY_DRAW | "LUCKY_DRAW" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -62,7 +61,6 @@ Response body schema for **PUT** `/campaigns/{campaignId}`. |---- | -----| | AUTO_UPDATE | "AUTO_UPDATE" | | STATIC | "STATIC" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -77,7 +75,6 @@ Response body schema for **PUT** `/campaigns/{campaignId}`. | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | @@ -90,7 +87,6 @@ Response body schema for **PUT** `/campaigns/{campaignId}`. | FAILED | "FAILED" | | DRAFT | "DRAFT" | | MODIFYING | "MODIFYING" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -103,7 +99,6 @@ Response body schema for **PUT** `/campaigns/{campaignId}`. | FAILED | "FAILED" | | DRAFT | "DRAFT" | | MODIFYING | "MODIFYING" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CampaignsVouchersCreateBaseRequestBody.md b/docs/CampaignsVouchersCreateBaseRequestBody.md index e08291f8..3a31576d 100644 --- a/docs/CampaignsVouchersCreateBaseRequestBody.md +++ b/docs/CampaignsVouchersCreateBaseRequestBody.md @@ -5,14 +5,14 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the voucher. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] | -|**redemption** | [**CampaignsImportVoucherItemRedemption**](CampaignsImportVoucherItemRedemption.md) | | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the voucher. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | +|**redemption** | [**CampaignsImportVoucherItemRedemption**](CampaignsImportVoucherItemRedemption.md) | | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is *inactive after* this date. | diff --git a/docs/CampaignsVouchersCreateCombinedResponseBody.md b/docs/CampaignsVouchersCreateCombinedResponseBody.md index 56d5ffab..38d2493b 100644 --- a/docs/CampaignsVouchersCreateCombinedResponseBody.md +++ b/docs/CampaignsVouchersCreateCombinedResponseBody.md @@ -5,38 +5,38 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] | -|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] | -|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] | -|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] | -|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] | -|**categoryId** | **String** | Unique category ID assigned by Voucherify. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | [optional] | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | [optional] | -|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] | -|**assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] | -|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | [optional] | -|**referrerId** | **String** | Unique identifier of the referring person. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | -|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | [optional] | -|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | [optional] | -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | +|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | +|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | +|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | +|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | +|**categoryId** | **String** | Unique category ID assigned by Voucherify. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | +|**discount** | [**Discount**](Discount.md) | | +|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | +|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | +|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | +|**assets** | [**VoucherAssets**](VoucherAssets.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | +|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | +|**referrerId** | **String** | Unique identifier of the referring person. | +|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | +|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | +|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | @@ -47,7 +47,6 @@ | GIFT_VOUCHER | "GIFT_VOUCHER" | | DISCOUNT_VOUCHER | "DISCOUNT_VOUCHER" | | LOYALTY_CARD | "LOYALTY_CARD" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -62,7 +61,6 @@ | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/CampaignsVouchersCreateCombinedResponseBodyGift.md b/docs/CampaignsVouchersCreateCombinedResponseBodyGift.md index 2c37b874..80844d4c 100644 --- a/docs/CampaignsVouchersCreateCombinedResponseBodyGift.md +++ b/docs/CampaignsVouchersCreateCombinedResponseBodyGift.md @@ -6,11 +6,11 @@ Object representing gift parameters. Child attributes are present only if `type` ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Integer** | Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] | -|**balance** | **Integer** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] | -|**effect** | [**EffectEnum**](#EffectEnum) | Defines how the credits are applied to the customer's order. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**amount** | **Integer** | Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | +|**balance** | **Integer** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | +|**effect** | [**EffectEnum**](#EffectEnum) | Defines how the credits are applied to the customer's order. | @@ -20,7 +20,6 @@ Object representing gift parameters. Child attributes are present only if `type` |---- | -----| | ORDER | "APPLY_TO_ORDER" | | ITEMS | "APPLY_TO_ITEMS" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md b/docs/CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md index 16fc7bb1..c027c439 100644 --- a/docs/CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md +++ b/docs/CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md @@ -6,12 +6,12 @@ Object representing loyalty card parameters. Child attributes are present only i ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Total points incurred over lifespan of loyalty card. | [optional] | -|**balance** | **Integer** | Points available for reward redemption. | [optional] | -|**nextExpirationDate** | **LocalDate** | The next closest date when the next set of points are due to expire. | [optional] | -|**nextExpirationPoints** | **Integer** | The amount of points that are set to expire next. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Total points incurred over lifespan of loyalty card. | +|**balance** | **Integer** | Points available for reward redemption. | +|**nextExpirationDate** | **LocalDate** | The next closest date when the next set of points are due to expire. | +|**nextExpirationPoints** | **Integer** | The amount of points that are set to expire next. | diff --git a/docs/CampaignsVouchersCreateCombinedResponseBodyPublish.md b/docs/CampaignsVouchersCreateCombinedResponseBodyPublish.md index aca3b110..54dbea17 100644 --- a/docs/CampaignsVouchersCreateCombinedResponseBodyPublish.md +++ b/docs/CampaignsVouchersCreateCombinedResponseBodyPublish.md @@ -6,11 +6,11 @@ This object stores a summary of publish events: an events counter and an endpoin ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] | -|**count** | **Integer** | Publication events counter. | [optional] | -|**url** | **String** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | +|**count** | **Integer** | Publication events counter. | +|**url** | **String** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | diff --git a/docs/CampaignsVouchersCreateCombinedResponseBodyRedemption.md b/docs/CampaignsVouchersCreateCombinedResponseBodyRedemption.md index 37a59dad..54ea357c 100644 --- a/docs/CampaignsVouchersCreateCombinedResponseBodyRedemption.md +++ b/docs/CampaignsVouchersCreateCombinedResponseBodyRedemption.md @@ -6,13 +6,13 @@ Stores a summary of redemptions that have been applied to the voucher. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | [optional] | -|**redeemedQuantity** | **Integer** | How many times a voucher has already been redeemed. | [optional] | -|**redeemedPoints** | **Integer** | Total loyalty points redeemed. | [optional] | -|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] | -|**url** | **String** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | +|**redeemedQuantity** | **Integer** | How many times a voucher has already been redeemed. | +|**redeemedPoints** | **Integer** | Total loyalty points redeemed. | +|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | +|**url** | **String** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | diff --git a/docs/CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md b/docs/CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md index d461010a..a002e508 100644 --- a/docs/CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md +++ b/docs/CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md @@ -6,10 +6,10 @@ Set recurrent time periods when the voucher is valid. For example, valid for 1 h ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**duration** | **String** | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a `duration` of `PT1H` will be valid for a duration of one hour. | [optional] | -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an `interval` of `P2D` will be active every other day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**duration** | **String** | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a `duration` of `PT1H` will be valid for a duration of one hour. | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an `interval` of `P2D` will be active every other day. | diff --git a/docs/CampaignsVouchersCreateInBulkRequestBody.md b/docs/CampaignsVouchersCreateInBulkRequestBody.md index 66d293d7..34e93f96 100644 --- a/docs/CampaignsVouchersCreateInBulkRequestBody.md +++ b/docs/CampaignsVouchersCreateInBulkRequestBody.md @@ -6,16 +6,16 @@ Request body schema for **POST** `/campaigns/{campaignId}/vouchers`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the voucher. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] | -|**redemption** | [**CampaignsImportVoucherItemRedemption**](CampaignsImportVoucherItemRedemption.md) | | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | -|**code** | **String** | Unique voucher code. | [optional] | -|**codeConfig** | [**CodeConfig**](CodeConfig.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the voucher. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | +|**redemption** | [**CampaignsImportVoucherItemRedemption**](CampaignsImportVoucherItemRedemption.md) | | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is *inactive after* this date. | +|**code** | **String** | Unique voucher code. | +|**codeConfig** | [**CodeConfig**](CodeConfig.md) | | diff --git a/docs/CampaignsVouchersCreateRequestBody.md b/docs/CampaignsVouchersCreateRequestBody.md index b26f0398..74a1626e 100644 --- a/docs/CampaignsVouchersCreateRequestBody.md +++ b/docs/CampaignsVouchersCreateRequestBody.md @@ -6,14 +6,14 @@ Request body schema for **POST** `/campaigns/{campaignId}/vouchers/{code}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the voucher. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] | -|**redemption** | [**CampaignsImportVoucherItemRedemption**](CampaignsImportVoucherItemRedemption.md) | | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the voucher. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | +|**redemption** | [**CampaignsImportVoucherItemRedemption**](CampaignsImportVoucherItemRedemption.md) | | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is *inactive after* this date. | diff --git a/docs/CampaignsVouchersCreateResponseBody.md b/docs/CampaignsVouchersCreateResponseBody.md index 1a09853a..525b714e 100644 --- a/docs/CampaignsVouchersCreateResponseBody.md +++ b/docs/CampaignsVouchersCreateResponseBody.md @@ -6,37 +6,37 @@ Response body schema for **POST** `/campaigns/{campaignId}/vouchers/{code}` and ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] | -|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] | -|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] | -|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] | -|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] | -|**categoryId** | **String** | Unique category ID assigned by Voucherify. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | [optional] | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | [optional] | -|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] | -|**assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] | -|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | [optional] | -|**referrerId** | **String** | Unique identifier of the referring person. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | -|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | [optional] | -|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | +|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | +|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | +|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | +|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | +|**categoryId** | **String** | Unique category ID assigned by Voucherify. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | +|**discount** | [**Discount**](Discount.md) | | +|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | +|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | +|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | +|**assets** | [**VoucherAssets**](VoucherAssets.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | +|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | +|**referrerId** | **String** | Unique identifier of the referring person. | +|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | +|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | +|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | @@ -47,7 +47,6 @@ Response body schema for **POST** `/campaigns/{campaignId}/vouchers/{code}` and | GIFT_VOUCHER | "GIFT_VOUCHER" | | DISCOUNT_VOUCHER | "DISCOUNT_VOUCHER" | | LOYALTY_CARD | "LOYALTY_CARD" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -62,7 +61,6 @@ Response body schema for **POST** `/campaigns/{campaignId}/vouchers/{code}` and | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/CategoriesApi.md b/docs/CategoriesApi.md index 18c44d5c..ef64b2a3 100644 --- a/docs/CategoriesApi.md +++ b/docs/CategoriesApi.md @@ -64,9 +64,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **categoriesCreateRequestBody** | [**CategoriesCreateRequestBody**](CategoriesCreateRequestBody.md)| Specify the details of the category that you would like to create. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **categoriesCreateRequestBody** | [**CategoriesCreateRequestBody**](CategoriesCreateRequestBody.md)| Specify the details of the category that you would like to create. | ### Return type @@ -138,9 +138,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **categoryId** | **String**| Unique category ID assigned by Voucherify. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **categoryId** | **String**| Unique category ID assigned by Voucherify. | ### Return type @@ -213,9 +213,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **categoryId** | **String**| Unique category ID assigned by Voucherify. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **categoryId** | **String**| Unique category ID assigned by Voucherify. | ### Return type @@ -360,10 +360,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **categoryId** | **String**| Unique category ID assigned by Voucherify. | | -| **categoriesUpdateRequestBody** | [**CategoriesUpdateRequestBody**](CategoriesUpdateRequestBody.md)| Specify the details of the category that you would like to update. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **categoryId** | **String**| Unique category ID assigned by Voucherify. | +| **categoriesUpdateRequestBody** | [**CategoriesUpdateRequestBody**](CategoriesUpdateRequestBody.md)| Specify the details of the category that you would like to update. | ### Return type diff --git a/docs/CategoriesCreateRequestBody.md b/docs/CategoriesCreateRequestBody.md index 6fff6bcb..1a4102af 100644 --- a/docs/CategoriesCreateRequestBody.md +++ b/docs/CategoriesCreateRequestBody.md @@ -6,10 +6,10 @@ Request body schema for **POST** `/categories`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Category name. | | -|**hierarchy** | **Integer** | Category hierarchy. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Category name. | +|**hierarchy** | **Integer** | Category hierarchy. | diff --git a/docs/CategoriesCreateResponseBody.md b/docs/CategoriesCreateResponseBody.md index 647010ba..f2f86277 100644 --- a/docs/CategoriesCreateResponseBody.md +++ b/docs/CategoriesCreateResponseBody.md @@ -6,13 +6,13 @@ Response body schema for **POST** `/categories`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique category ID assigned by Voucherify. | | -|**name** | **String** | Category name. | | -|**hierarchy** | **Integer** | Category hierarchy. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique category ID assigned by Voucherify. | +|**name** | **String** | Category name. | +|**hierarchy** | **Integer** | Category hierarchy. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. | @@ -21,7 +21,6 @@ Response body schema for **POST** `/categories`. | Name | Value | |---- | -----| | CATEGORY | "category" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CategoriesGetResponseBody.md b/docs/CategoriesGetResponseBody.md index 13dfadd8..4e9f6c46 100644 --- a/docs/CategoriesGetResponseBody.md +++ b/docs/CategoriesGetResponseBody.md @@ -6,15 +6,15 @@ Response body schema for **GET** `/categories/{categoryId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique category ID assigned by Voucherify. | | -|**name** | **String** | Category name. | | -|**hierarchy** | **Integer** | Category hierarchy. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the category. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format. | [optional] | -|**stackingRulesType** | [**StackingRulesTypeEnum**](#StackingRulesTypeEnum) | The type of the stacking rule eligibility. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique category ID assigned by Voucherify. | +|**name** | **String** | Category name. | +|**hierarchy** | **Integer** | Category hierarchy. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the category. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format. | +|**stackingRulesType** | [**StackingRulesTypeEnum**](#StackingRulesTypeEnum) | The type of the stacking rule eligibility. | @@ -23,7 +23,6 @@ Response body schema for **GET** `/categories/{categoryId}`. | Name | Value | |---- | -----| | CATEGORY | "category" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ Response body schema for **GET** `/categories/{categoryId}`. |---- | -----| | JOINT | "JOINT" | | EXCLUSIVE | "EXCLUSIVE" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CategoriesListResponseBody.md b/docs/CategoriesListResponseBody.md index 2ee2959c..8db0a0b3 100644 --- a/docs/CategoriesListResponseBody.md +++ b/docs/CategoriesListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/categories`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about categories in a dictionary. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of category objects. | | -|**data** | [**List<Category>**](Category.md) | | | -|**total** | **Integer** | Total number of categories. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about categories in a dictionary. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of category objects. | +|**data** | [**List<Category>**](Category.md) | | +|**total** | **Integer** | Total number of categories. | @@ -20,7 +20,6 @@ Response body schema for **GET** `/categories`. | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -29,7 +28,6 @@ Response body schema for **GET** `/categories`. | Name | Value | |---- | -----| | DATA | "data" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CategoriesUpdateRequestBody.md b/docs/CategoriesUpdateRequestBody.md index 2d7c5d91..8d33ae0e 100644 --- a/docs/CategoriesUpdateRequestBody.md +++ b/docs/CategoriesUpdateRequestBody.md @@ -6,10 +6,10 @@ Request body schema for **PUT** `/categories/{categoryId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Category name. | | -|**hierarchy** | **Integer** | Category hierarchy. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Category name. | +|**hierarchy** | **Integer** | Category hierarchy. | diff --git a/docs/CategoriesUpdateResponseBody.md b/docs/CategoriesUpdateResponseBody.md index 4ec083a4..73aad50d 100644 --- a/docs/CategoriesUpdateResponseBody.md +++ b/docs/CategoriesUpdateResponseBody.md @@ -6,14 +6,14 @@ Response body schema for **PUT** `/categories/{categoryId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique category ID assigned by Voucherify. | | -|**name** | **String** | Category name. | | -|**hierarchy** | **Integer** | Category hierarchy. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique category ID assigned by Voucherify. | +|**name** | **String** | Category name. | +|**hierarchy** | **Integer** | Category hierarchy. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format. | @@ -22,7 +22,6 @@ Response body schema for **PUT** `/categories/{categoryId}`. | Name | Value | |---- | -----| | CATEGORY | "category" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/Category.md b/docs/Category.md index d2437d87..753dc120 100644 --- a/docs/Category.md +++ b/docs/Category.md @@ -6,15 +6,15 @@ This is an object representing a category. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique category ID assigned by Voucherify. | | -|**name** | **String** | Category name. | | -|**hierarchy** | **Integer** | Category hierarchy. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the category. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format. | [optional] | -|**stackingRulesType** | [**StackingRulesTypeEnum**](#StackingRulesTypeEnum) | The type of the stacking rule eligibility. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique category ID assigned by Voucherify. | +|**name** | **String** | Category name. | +|**hierarchy** | **Integer** | Category hierarchy. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the category. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format. | +|**stackingRulesType** | [**StackingRulesTypeEnum**](#StackingRulesTypeEnum) | The type of the stacking rule eligibility. | @@ -23,7 +23,6 @@ This is an object representing a category. | Name | Value | |---- | -----| | CATEGORY | "category" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ This is an object representing a category. |---- | -----| | JOINT | "JOINT" | | EXCLUSIVE | "EXCLUSIVE" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ClientEventsCreateRequestBody.md b/docs/ClientEventsCreateRequestBody.md index ba7fcd3b..656e6b27 100644 --- a/docs/ClientEventsCreateRequestBody.md +++ b/docs/ClientEventsCreateRequestBody.md @@ -6,13 +6,13 @@ Request body schema for **POST** `/events`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**event** | **String** | Event name. This is the same name that you used to define a custom event in the **Dashboard** > **Project Settings** > **Event Schema**. | | -|**customer** | [**Customer**](Customer.md) | | | -|**referral** | [**ClientEventsCreateRequestBodyReferral**](ClientEventsCreateRequestBodyReferral.md) | | [optional] | -|**loyalty** | [**ClientEventsCreateRequestBodyLoyalty**](ClientEventsCreateRequestBodyLoyalty.md) | | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the event. A set of key/value pairs that you can attach to an event object. It can be useful for storing additional information about the event in a structured format. Event metadata schema is defined in the **Dashboard** > **Project Settings** > **Event Schema** > **Edit particular event** > **Metadata property definition**. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**event** | **String** | Event name. This is the same name that you used to define a custom event in the **Dashboard** > **Project Settings** > **Event Schema**. | +|**customer** | [**Customer**](Customer.md) | | +|**referral** | [**ClientEventsCreateRequestBodyReferral**](ClientEventsCreateRequestBodyReferral.md) | | +|**loyalty** | [**ClientEventsCreateRequestBodyLoyalty**](ClientEventsCreateRequestBodyLoyalty.md) | | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the event. A set of key/value pairs that you can attach to an event object. It can be useful for storing additional information about the event in a structured format. Event metadata schema is defined in the **Dashboard** > **Project Settings** > **Event Schema** > **Edit particular event** > **Metadata property definition**. | diff --git a/docs/ClientEventsCreateRequestBodyLoyalty.md b/docs/ClientEventsCreateRequestBodyLoyalty.md index f3b4bee0..dbf30e9d 100644 --- a/docs/ClientEventsCreateRequestBodyLoyalty.md +++ b/docs/ClientEventsCreateRequestBodyLoyalty.md @@ -6,9 +6,9 @@ If an earning rule in a loyalty program is based on a custom event. This objects ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **String** | Code of the loyalty card to receive points based on the calculation method defined in the related earning rule. An earning rule is triggered for the loyalty card when the event passed in the `event` parameter of the request payload gets sent along with this loyalty card code. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**code** | **String** | Code of the loyalty card to receive points based on the calculation method defined in the related earning rule. An earning rule is triggered for the loyalty card when the event passed in the `event` parameter of the request payload gets sent along with this loyalty card code. | diff --git a/docs/ClientEventsCreateRequestBodyReferral.md b/docs/ClientEventsCreateRequestBodyReferral.md index 235b9cbe..f5d3ef95 100644 --- a/docs/ClientEventsCreateRequestBodyReferral.md +++ b/docs/ClientEventsCreateRequestBodyReferral.md @@ -6,10 +6,10 @@ If a **conversion event** for a referral program is set to a custom event, then ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **String** | A code through which a new visitor has been referred to a service. | | -|**referrerId** | **String** | Unique ID of the referring person - it is optional and not required if the referral **code** is provided. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**code** | **String** | A code through which a new visitor has been referred to a service. | +|**referrerId** | **String** | Unique ID of the referring person - it is optional and not required if the referral **code** is provided. | diff --git a/docs/ClientEventsCreateResponseBody.md b/docs/ClientEventsCreateResponseBody.md index 6e0c32a0..4dc5649c 100644 --- a/docs/ClientEventsCreateResponseBody.md +++ b/docs/ClientEventsCreateResponseBody.md @@ -6,13 +6,13 @@ Response body schema for **POST** `/events`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The object represented is an `event`. | | -|**type** | **String** | The event name. | | -|**customer** | [**SimpleCustomerRequiredObjectType**](SimpleCustomerRequiredObjectType.md) | | | -|**referral** | **Object** | A `null` referral object. | | -|**loyalty** | **Object** | A `null` loyalty object. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The object represented is an `event`. | +|**type** | **String** | The event name. | +|**customer** | [**SimpleCustomerRequiredObjectType**](SimpleCustomerRequiredObjectType.md) | | +|**referral** | **Object** | A `null` referral object. | +|**loyalty** | **Object** | A `null` loyalty object. | @@ -21,7 +21,6 @@ Response body schema for **POST** `/events`. | Name | Value | |---- | -----| | EVENT | "event" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ClientQualificationsCheckEligibilityRequestBody.md b/docs/ClientQualificationsCheckEligibilityRequestBody.md index 33505e24..ba909a2b 100644 --- a/docs/ClientQualificationsCheckEligibilityRequestBody.md +++ b/docs/ClientQualificationsCheckEligibilityRequestBody.md @@ -6,14 +6,14 @@ Request body schema for **POST** `/qualifications`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**customer** | [**Customer**](Customer.md) | | [optional] | -|**order** | [**Order**](Order.md) | | [optional] | -|**trackingId** | **String** | Is correspondent to Customer's source_id | [optional] | -|**scenario** | [**ScenarioEnum**](#ScenarioEnum) | Defines the scenario Voucherify should consider during the qualification process. - `ALL` - Scenario that returns all redeemables available for the customer in one API request. This scenario is used by default when no value is selected. - `CUSTOMER_WALLET` - returns vouchers applicable to the customer’s cart based on the vouchers assigned to the customer’s profile. - `AUDIENCE_ONLY` - returns all vouchers, promotion tiers, and campaigns available to the customer. Voucherify validates the rules based on the customer profile only. - `PRODUCTS` - returns all promotions available for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule). - `PRODUCTS_DISCOUNT` - returns all promotions available for products when a discount is defined as applicable to specific item(s). - `PROMOTION_STACKS` - returns the applicable promotion stacks. - `PRODUCTS_BY_CUSTOMER` - returns all promotions available for a customer for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule). - `PRODUCTS_DISCOUNT_BY_CUSTOMER` - returns all promotions available for a customer for products when a discount is defined as applicable to specific item(s). | [optional] | -|**options** | [**QualificationsOption**](QualificationsOption.md) | | [optional] | -|**metadata** | **Object** | A set of key/value pairs that you can send in the request body to check against redeemables requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the <!-- [Create Validation Rules](https://docs.voucherify.io/reference/create-validation-rules) -->[Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule). | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**customer** | [**Customer**](Customer.md) | | +|**order** | [**Order**](Order.md) | | +|**trackingId** | **String** | Is correspondent to Customer's source_id | +|**scenario** | [**ScenarioEnum**](#ScenarioEnum) | Defines the scenario Voucherify should consider during the qualification process. - `ALL` - Scenario that returns all redeemables available for the customer in one API request. This scenario is used by default when no value is selected. - `CUSTOMER_WALLET` - returns vouchers applicable to the customer’s cart based on the vouchers assigned to the customer’s profile. - `AUDIENCE_ONLY` - returns all vouchers, promotion tiers, and campaigns available to the customer. Voucherify validates the rules based on the customer profile only. - `PRODUCTS` - returns all promotions available for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule). - `PRODUCTS_DISCOUNT` - returns all promotions available for products when a discount is defined as applicable to specific item(s). - `PROMOTION_STACKS` - returns the applicable promotion stacks. - `PRODUCTS_BY_CUSTOMER` - returns all promotions available for a customer for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule). - `PRODUCTS_DISCOUNT_BY_CUSTOMER` - returns all promotions available for a customer for products when a discount is defined as applicable to specific item(s). | +|**options** | [**QualificationsOption**](QualificationsOption.md) | | +|**metadata** | **Object** | A set of key/value pairs that you can send in the request body to check against redeemables requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the <!-- [Create Validation Rules](https://docs.voucherify.io/reference/create-validation-rules) -->[Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule). | @@ -29,7 +29,6 @@ Request body schema for **POST** `/qualifications`. | PROMOTION_STACKS | "PROMOTION_STACKS" | | PRODUCTS_BY_CUSTOMER | "PRODUCTS_BY_CUSTOMER" | | PRODUCTS_DISCOUNT_BY_CUSTOMER | "PRODUCTS_DISCOUNT_BY_CUSTOMER" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ClientQualificationsCheckEligibilityResponseBody.md b/docs/ClientQualificationsCheckEligibilityResponseBody.md index b359faa4..76bf61ba 100644 --- a/docs/ClientQualificationsCheckEligibilityResponseBody.md +++ b/docs/ClientQualificationsCheckEligibilityResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **POST** `/qualifications`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redeemables** | [**QualificationsRedeemables**](QualificationsRedeemables.md) | | [optional] | -|**trackingId** | **String** | This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID. | [optional] | -|**order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] | -|**stackingRules** | [**StackingRules**](StackingRules.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redeemables** | [**QualificationsRedeemables**](QualificationsRedeemables.md) | | +|**trackingId** | **String** | This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID. | +|**order** | [**OrderCalculated**](OrderCalculated.md) | | +|**stackingRules** | [**StackingRules**](StackingRules.md) | | diff --git a/docs/ClientRedemptionsRedeemRequestBody.md b/docs/ClientRedemptionsRedeemRequestBody.md index f93a7cab..9eebeed0 100644 --- a/docs/ClientRedemptionsRedeemRequestBody.md +++ b/docs/ClientRedemptionsRedeemRequestBody.md @@ -6,15 +6,15 @@ Response body schema for **POST** `/redemptions`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redeemables** | [**List<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | | | -|**order** | [**Order**](Order.md) | | [optional] | -|**customer** | [**Customer**](Customer.md) | | [optional] | -|**session** | [**Session**](Session.md) | | [optional] | -|**trackingId** | **String** | Is correspondent to Customer's source_id | [optional] | -|**metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | [optional] | -|**options** | [**ClientRedemptionsRedeemRequestBodyAllOfOptions**](ClientRedemptionsRedeemRequestBodyAllOfOptions.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redeemables** | [**List<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | | +|**order** | [**Order**](Order.md) | | +|**customer** | [**Customer**](Customer.md) | | +|**session** | [**Session**](Session.md) | | +|**trackingId** | **String** | Is correspondent to Customer's source_id | +|**metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | +|**options** | [**ClientRedemptionsRedeemRequestBodyAllOfOptions**](ClientRedemptionsRedeemRequestBodyAllOfOptions.md) | | diff --git a/docs/ClientRedemptionsRedeemRequestBodyAllOfOptions.md b/docs/ClientRedemptionsRedeemRequestBodyAllOfOptions.md index 172be686..2084b779 100644 --- a/docs/ClientRedemptionsRedeemRequestBodyAllOfOptions.md +++ b/docs/ClientRedemptionsRedeemRequestBodyAllOfOptions.md @@ -6,9 +6,9 @@ Configure parameters returned in the response. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**expand** | [**List<ExpandEnum>**](#List<ExpandEnum>) | Expand array lets you configure params included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [\"order\"] | - Same response as fallback response (without an options object).<br>- Order data with calculated discounts are listed in each child redeemable object.<br>- Metadata not included for each discount type. | | [\"redeemable\"] | Expands redeemable objects by including `metadata` for each discount type. | | [\"order\", \"redeemable\"] | - Order data with calculated discounts are listed in each child redeemable object.<br>- Includes `metadata` for each discount type. | | [\"redeemable\", \"redemption\", \"category\"] | - Returns each discount type's `metadata` in each child redemption object.<br>- Returns redemption object `metadata`.<br>- Returns an expanded `categories` object, showing details about the category. | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**expand** | [**List<ExpandEnum>**](#List<ExpandEnum>) | Expand array lets you configure params included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [\"order\"] | - Same response as fallback response (without an options object).<br>- Order data with calculated discounts are listed in each child redeemable object.<br>- Metadata not included for each discount type. | | [\"redeemable\"] | Expands redeemable objects by including `metadata` for each discount type. | | [\"order\", \"redeemable\"] | - Order data with calculated discounts are listed in each child redeemable object.<br>- Includes `metadata` for each discount type. | | [\"redeemable\", \"redemption\", \"category\"] | - Returns each discount type's `metadata` in each child redemption object.<br>- Returns redemption object `metadata`.<br>- Returns an expanded `categories` object, showing details about the category. | | @@ -20,7 +20,6 @@ Configure parameters returned in the response. | REDEMPTION | "redemption" | | REDEEMABLE | "redeemable" | | CATEGORY | "category" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ClientRedemptionsRedeemResponseBody.md b/docs/ClientRedemptionsRedeemResponseBody.md index f89ecb31..54cb2615 100644 --- a/docs/ClientRedemptionsRedeemResponseBody.md +++ b/docs/ClientRedemptionsRedeemResponseBody.md @@ -6,13 +6,13 @@ Response body schema for **POST** `/redemptions`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redemptions** | [**List<Redemption>**](Redemption.md) | | [optional] | -|**parentRedemption** | [**Redemption**](Redemption.md) | | [optional] | -|**order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] | -|**inapplicableRedeemables** | [**List<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | [optional] | -|**skippedRedeemables** | [**List<ValidationsRedeemableSkipped>**](ValidationsRedeemableSkipped.md) | Lists validation results of each redeemable. If a redeemable can be applied, the API returns `\"status\": \"APPLICABLE\"`. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redemptions** | [**List<Redemption>**](Redemption.md) | | +|**parentRedemption** | [**Redemption**](Redemption.md) | | +|**order** | [**OrderCalculated**](OrderCalculated.md) | | +|**inapplicableRedeemables** | [**List<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | +|**skippedRedeemables** | [**List<ValidationsRedeemableSkipped>**](ValidationsRedeemableSkipped.md) | Lists validation results of each redeemable. If a redeemable can be applied, the API returns `\"status\": \"APPLICABLE\"`. | diff --git a/docs/ClientSideApi.md b/docs/ClientSideApi.md index 78db875d..8c5b63bc 100644 --- a/docs/ClientSideApi.md +++ b/docs/ClientSideApi.md @@ -64,9 +64,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **clientQualificationsCheckEligibilityRequestBody** | [**ClientQualificationsCheckEligibilityRequestBody**](ClientQualificationsCheckEligibilityRequestBody.md)| Define order and customer context. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **clientQualificationsCheckEligibilityRequestBody** | [**ClientQualificationsCheckEligibilityRequestBody**](ClientQualificationsCheckEligibilityRequestBody.md)| Define order and customer context. | ### Return type @@ -140,10 +140,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **origin** | **String**| Indicates the origin (scheme, hostname, and port). | | -| **clientRedemptionsRedeemRequestBody** | [**ClientRedemptionsRedeemRequestBody**](ClientRedemptionsRedeemRequestBody.md)| | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **origin** | **String**| Indicates the origin (scheme, hostname, and port). | +| **clientRedemptionsRedeemRequestBody** | [**ClientRedemptionsRedeemRequestBody**](ClientRedemptionsRedeemRequestBody.md)| | ### Return type @@ -217,10 +217,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **origin** | **String**| Indicates the origin (scheme, hostname, and port). | | -| **clientEventsCreateRequestBody** | [**ClientEventsCreateRequestBody**](ClientEventsCreateRequestBody.md)| Specify the details of the custom event. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **origin** | **String**| Indicates the origin (scheme, hostname, and port). | +| **clientEventsCreateRequestBody** | [**ClientEventsCreateRequestBody**](ClientEventsCreateRequestBody.md)| Specify the details of the custom event. | ### Return type @@ -293,10 +293,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **customerId** | **String**| A Voucherify customer identifier or `source_id` | | -| **body** | **Object**| Key-value pairs where the key is the consent identifier and value is a boolean that identifies if a customer has given the consent or not. To deny all consents use \"unsubscribed\" as a consent identifier and \"true\" as its value. #### Examples <!-- title: \"Request Body\" lineNumbers: true --> ```json { \"cnst_aIdUulAh0SCsOCaS3005y7yS\": true, \"cnst_aIdUulAhwewqaS31213fdsfds\": false } ``` Opt-out from all communication: <!-- title: \"Request Body\" lineNumbers: true --> ```json { \"unsubscribed\": true } ``` | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **customerId** | **String**| A Voucherify customer identifier or `source_id` | +| **body** | **Object**| Key-value pairs where the key is the consent identifier and value is a boolean that identifies if a customer has given the consent or not. To deny all consents use \"unsubscribed\" as a consent identifier and \"true\" as its value. #### Examples <!-- title: \"Request Body\" lineNumbers: true --> ```json { \"cnst_aIdUulAh0SCsOCaS3005y7yS\": true, \"cnst_aIdUulAhwewqaS31213fdsfds\": false } ``` Opt-out from all communication: <!-- title: \"Request Body\" lineNumbers: true --> ```json { \"unsubscribed\": true } ``` | ### Return type @@ -370,10 +370,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **origin** | **String**| Indicates the origin (scheme, hostname, and port). | | -| **clientValidationsValidateRequestBody** | [**ClientValidationsValidateRequestBody**](ClientValidationsValidateRequestBody.md)| | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **origin** | **String**| Indicates the origin (scheme, hostname, and port). | +| **clientValidationsValidateRequestBody** | [**ClientValidationsValidateRequestBody**](ClientValidationsValidateRequestBody.md)| | ### Return type diff --git a/docs/ClientValidationsValidateRequestBody.md b/docs/ClientValidationsValidateRequestBody.md index ab58d1c1..ec37ddeb 100644 --- a/docs/ClientValidationsValidateRequestBody.md +++ b/docs/ClientValidationsValidateRequestBody.md @@ -6,15 +6,15 @@ Response body schema for **POST** `/validations`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redeemables** | [**List<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | | | -|**order** | [**Order**](Order.md) | | [optional] | -|**customer** | [**Customer**](Customer.md) | | [optional] | -|**session** | [**Session**](Session.md) | | [optional] | -|**trackingId** | **String** | Is correspondent to Customer's source_id | [optional] | -|**metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | [optional] | -|**options** | [**ClientValidationsValidateRequestBodyAllOfOptions**](ClientValidationsValidateRequestBodyAllOfOptions.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redeemables** | [**List<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | | +|**order** | [**Order**](Order.md) | | +|**customer** | [**Customer**](Customer.md) | | +|**session** | [**Session**](Session.md) | | +|**trackingId** | **String** | Is correspondent to Customer's source_id | +|**metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | +|**options** | [**ClientValidationsValidateRequestBodyAllOfOptions**](ClientValidationsValidateRequestBodyAllOfOptions.md) | | diff --git a/docs/ClientValidationsValidateRequestBodyAllOfOptions.md b/docs/ClientValidationsValidateRequestBodyAllOfOptions.md index cff60d3d..ea597b39 100644 --- a/docs/ClientValidationsValidateRequestBodyAllOfOptions.md +++ b/docs/ClientValidationsValidateRequestBodyAllOfOptions.md @@ -6,9 +6,9 @@ Configure parameters returned in the response. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**expand** | [**List<ExpandEnum>**](#List<ExpandEnum>) | The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [\"order\"] | - Same response as fallback response (without an options object).<br>- Order data with calculated discounts are listed in each child redeemable object.<br>- Metadata not included for each discount type. | | [\"redeemable\"] | Expands redeemable objects by including `metadata` for each discount type. | | [\"order\", \"redeemable\"] | - Order data with calculated discounts are listed in each child redeemable object.<br>- Includes `metadata` for each discount type. | | [\"category\"] | - Returns an expanded `categories` object, showing details about the category. | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**expand** | [**List<ExpandEnum>**](#List<ExpandEnum>) | The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [\"order\"] | - Same response as fallback response (without an options object).<br>- Order data with calculated discounts are listed in each child redeemable object.<br>- Metadata not included for each discount type. | | [\"redeemable\"] | Expands redeemable objects by including `metadata` for each discount type. | | [\"order\", \"redeemable\"] | - Order data with calculated discounts are listed in each child redeemable object.<br>- Includes `metadata` for each discount type. | | [\"category\"] | - Returns an expanded `categories` object, showing details about the category. | | @@ -20,7 +20,6 @@ Configure parameters returned in the response. | REDEMPTION | "redemption" | | REDEEMABLE | "redeemable" | | CATEGORY | "category" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ClientValidationsValidateResponseBody.md b/docs/ClientValidationsValidateResponseBody.md index 03a26903..c8494f52 100644 --- a/docs/ClientValidationsValidateResponseBody.md +++ b/docs/ClientValidationsValidateResponseBody.md @@ -6,16 +6,16 @@ Response body schema for POST `/validations`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**valid** | **Boolean** | The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable. | | -|**redeemables** | [**List<ValidationsValidateResponseBodyRedeemablesItem>**](ValidationsValidateResponseBodyRedeemablesItem.md) | | | -|**skippedRedeemables** | [**List<ValidationsRedeemableSkipped>**](ValidationsRedeemableSkipped.md) | Lists validation results of each skipped redeemable. | [optional] | -|**inapplicableRedeemables** | [**List<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | [optional] | -|**order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] | -|**trackingId** | **String** | Hashed customer source ID. | [optional] | -|**session** | [**Session**](Session.md) | | [optional] | -|**stackingRules** | [**StackingRules**](StackingRules.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**valid** | **Boolean** | The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable. | +|**redeemables** | [**List<ValidationsValidateResponseBodyRedeemablesItem>**](ValidationsValidateResponseBodyRedeemablesItem.md) | | +|**skippedRedeemables** | [**List<ValidationsRedeemableSkipped>**](ValidationsRedeemableSkipped.md) | Lists validation results of each skipped redeemable. | +|**inapplicableRedeemables** | [**List<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | +|**order** | [**OrderCalculated**](OrderCalculated.md) | | +|**trackingId** | **String** | Hashed customer source ID. | +|**session** | [**Session**](Session.md) | | +|**stackingRules** | [**StackingRules**](StackingRules.md) | | diff --git a/docs/CodeConfig.md b/docs/CodeConfig.md index a29573a1..947f4db1 100644 --- a/docs/CodeConfig.md +++ b/docs/CodeConfig.md @@ -6,14 +6,14 @@ Schema containing information about config used for voucher. Defines code's patt ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**length** | **BigDecimal** | Number of characters in a generated code (excluding prefix and postfix). | [optional] | -|**charset** | **String** | Characters that can appear in the code. Examples: - Alphanumeric: `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` - Alphabetic: `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` - Alphabetic Lowercase: `abcdefghijklmnopqrstuvwxyz` - Alphabetic Uppercase: `ABCDEFGHIJKLMNOPQRSTUVWXYZ` - Numbers: `0123456789` - Custom: a custom character set | [optional] | -|**prefix** | **String** | A text appended before the code. | [optional] | -|**postfix** | **String** | A text appended after the code. | [optional] | -|**pattern** | **String** | A pattern for codes where hashes (#) will be replaced with random characters. Overrides `length`. | [optional] | -|**initialCount** | **Integer** | The initial count | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**length** | **BigDecimal** | Number of characters in a generated code (excluding prefix and postfix). | +|**charset** | **String** | Characters that can appear in the code. Examples: - Alphanumeric: `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` - Alphabetic: `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` - Alphabetic Lowercase: `abcdefghijklmnopqrstuvwxyz` - Alphabetic Uppercase: `ABCDEFGHIJKLMNOPQRSTUVWXYZ` - Numbers: `0123456789` - Custom: a custom character set | +|**prefix** | **String** | A text appended before the code. | +|**postfix** | **String** | A text appended after the code. | +|**pattern** | **String** | A pattern for codes where hashes (#) will be replaced with random characters. Overrides `length`. | +|**initialCount** | **Integer** | The initial count | diff --git a/docs/CodeConfigRequiredLengthCharsetPattern.md b/docs/CodeConfigRequiredLengthCharsetPattern.md index 592babc0..68849cc5 100644 --- a/docs/CodeConfigRequiredLengthCharsetPattern.md +++ b/docs/CodeConfigRequiredLengthCharsetPattern.md @@ -5,14 +5,14 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**length** | **BigDecimal** | Number of characters in a generated code (excluding prefix and postfix). | | -|**charset** | **String** | Characters that can appear in the code. Examples: - Alphanumeric: `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` - Alphabetic: `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` - Alphabetic Lowercase: `abcdefghijklmnopqrstuvwxyz` - Alphabetic Uppercase: `ABCDEFGHIJKLMNOPQRSTUVWXYZ` - Numbers: `0123456789` - Custom: a custom character set | | -|**prefix** | **String** | A text appended before the code. | [optional] | -|**postfix** | **String** | A text appended after the code. | [optional] | -|**pattern** | **String** | A pattern for codes where hashes (#) will be replaced with random characters. Overrides `length`. | | -|**initialCount** | **Integer** | The initial count | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**length** | **BigDecimal** | Number of characters in a generated code (excluding prefix and postfix). | +|**charset** | **String** | Characters that can appear in the code. Examples: - Alphanumeric: `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` - Alphabetic: `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` - Alphabetic Lowercase: `abcdefghijklmnopqrstuvwxyz` - Alphabetic Uppercase: `ABCDEFGHIJKLMNOPQRSTUVWXYZ` - Numbers: `0123456789` - Custom: a custom character set | +|**prefix** | **String** | A text appended before the code. | +|**postfix** | **String** | A text appended after the code. | +|**pattern** | **String** | A pattern for codes where hashes (#) will be replaced with random characters. Overrides `length`. | +|**initialCount** | **Integer** | The initial count | diff --git a/docs/CreatePublicationCampaign.md b/docs/CreatePublicationCampaign.md index fd3ca875..f8745bf8 100644 --- a/docs/CreatePublicationCampaign.md +++ b/docs/CreatePublicationCampaign.md @@ -6,10 +6,10 @@ Create publication with campaign. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Name of voucher's parent campaign or unique campaign ID that was assigned by Voucherify. | | -|**count** | **Integer** | Number of vouchers to be published to customer. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Name of voucher's parent campaign or unique campaign ID that was assigned by Voucherify. | +|**count** | **Integer** | Number of vouchers to be published to customer. | diff --git a/docs/Customer.md b/docs/Customer.md index 15d2a090..eb18563b 100644 --- a/docs/Customer.md +++ b/docs/Customer.md @@ -5,18 +5,18 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Customer's first and last name. | [optional] | -|**description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] | -|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | [optional] | -|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | [optional] | -|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] | -|**id** | **String** | The ID of an existing customer. | [optional] | -|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Customer's first and last name. | +|**description** | **String** | An arbitrary string that you can attach to a customer object. | +|**email** | **String** | Customer's email address. | +|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | +|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | +|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | +|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | +|**id** | **String** | The ID of an existing customer. | +|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | diff --git a/docs/CustomerBase.md b/docs/CustomerBase.md index 6baebfb1..d8f1759d 100644 --- a/docs/CustomerBase.md +++ b/docs/CustomerBase.md @@ -5,16 +5,16 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Customer's first and last name. | [optional] | -|**description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] | -|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | [optional] | -|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | [optional] | -|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Customer's first and last name. | +|**description** | **String** | An arbitrary string that you can attach to a customer object. | +|**email** | **String** | Customer's email address. | +|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | +|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | +|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | +|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | diff --git a/docs/CustomerBaseAddress.md b/docs/CustomerBaseAddress.md index 7b24b457..33a5d2fa 100644 --- a/docs/CustomerBaseAddress.md +++ b/docs/CustomerBaseAddress.md @@ -6,14 +6,14 @@ Customer's address. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**city** | **String** | City | [optional] | -|**state** | **String** | State | [optional] | -|**line1** | **String** | First line of address. | [optional] | -|**line2** | **String** | Second line of address. | [optional] | -|**country** | **String** | Country. | [optional] | -|**postalCode** | **String** | Postal code. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**city** | **String** | City | +|**state** | **String** | State | +|**line1** | **String** | First line of address. | +|**line2** | **String** | Second line of address. | +|**country** | **String** | Country. | +|**postalCode** | **String** | Postal code. | diff --git a/docs/CustomerId.md b/docs/CustomerId.md index cfd425ec..3295e658 100644 --- a/docs/CustomerId.md +++ b/docs/CustomerId.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | A unique identifier of an existing customer. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | A unique identifier of an existing customer. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | @@ -17,7 +17,6 @@ | Name | Value | |---- | -----| | CUSTOMER | "customer" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CustomerLoyalty.md b/docs/CustomerLoyalty.md index 108932f8..1b153fd0 100644 --- a/docs/CustomerLoyalty.md +++ b/docs/CustomerLoyalty.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Customer's loyalty points. | | -|**referredCustomers** | **Integer** | Total number of customers referred by the customer. | | -|**campaigns** | [**Map<String, CustomerLoyaltyCampaignsValue>**](CustomerLoyaltyCampaignsValue.md) | Contains campaigns with details about point balances and how many customers were referred by the customer. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Customer's loyalty points. | +|**referredCustomers** | **Integer** | Total number of customers referred by the customer. | +|**campaigns** | [**Map<String, CustomerLoyaltyCampaignsValue>**](CustomerLoyaltyCampaignsValue.md) | Contains campaigns with details about point balances and how many customers were referred by the customer. | diff --git a/docs/CustomerLoyaltyCampaignsValue.md b/docs/CustomerLoyaltyCampaignsValue.md index e1237866..0500f485 100644 --- a/docs/CustomerLoyaltyCampaignsValue.md +++ b/docs/CustomerLoyaltyCampaignsValue.md @@ -6,11 +6,11 @@ Contains details about the point balances left on loyalty cards and the number o ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Remaining point balance in campaign. | [optional] | -|**loyaltyTier** | **String** | Customer's loyalty tier within the campaign. | [optional] | -|**referredCustomers** | **Integer** | Number of customers referred by the customer in campaign. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Remaining point balance in campaign. | +|**loyaltyTier** | **String** | Customer's loyalty tier within the campaign. | +|**referredCustomers** | **Integer** | Number of customers referred by the customer in campaign. | diff --git a/docs/CustomerReferrals.md b/docs/CustomerReferrals.md index 79265ac2..17d13d15 100644 --- a/docs/CustomerReferrals.md +++ b/docs/CustomerReferrals.md @@ -6,10 +6,10 @@ Summary of customer's referrals, in this case, the customer being the referee, i ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**total** | **Integer** | Total number of times this customer received a referral, i.e. was referred by another customer. | | -|**campaigns** | [**List<CustomerReferralsCampaignsItem>**](CustomerReferralsCampaignsItem.md) | Contains an array of campaigns that served as the source of a referral for the customer. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**total** | **Integer** | Total number of times this customer received a referral, i.e. was referred by another customer. | +|**campaigns** | [**List<CustomerReferralsCampaignsItem>**](CustomerReferralsCampaignsItem.md) | Contains an array of campaigns that served as the source of a referral for the customer. | diff --git a/docs/CustomerReferralsCampaignsItem.md b/docs/CustomerReferralsCampaignsItem.md index 78ead9d4..6862b080 100644 --- a/docs/CustomerReferralsCampaignsItem.md +++ b/docs/CustomerReferralsCampaignsItem.md @@ -6,13 +6,13 @@ Contains information about the source of the referral. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**campaignId** | **String** | Unique campaign ID, assigned by Voucherify. | | -|**referrerId** | **String** | Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer. | | -|**relatedObjectId** | **String** | Related object id | | -|**relatedObjectType** | **String** | Related object type, i.e. `redemption`. | | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the customer was referred in ISO 8601 format. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**campaignId** | **String** | Unique campaign ID, assigned by Voucherify. | +|**referrerId** | **String** | Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer. | +|**relatedObjectId** | **String** | Related object id | +|**relatedObjectType** | **String** | Related object type, i.e. `redemption`. | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the customer was referred in ISO 8601 format. | diff --git a/docs/CustomerResponseDataAssets.md b/docs/CustomerResponseDataAssets.md index 0da08daa..020588e5 100644 --- a/docs/CustomerResponseDataAssets.md +++ b/docs/CustomerResponseDataAssets.md @@ -6,9 +6,9 @@ Contains information about the customer's cockpit. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**cockpitUrl** | **String** | Customer's cockpit URL address. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**cockpitUrl** | **String** | Customer's cockpit URL address. | diff --git a/docs/CustomerSegmentsList.md b/docs/CustomerSegmentsList.md index 4ef90ce9..b8c47ef6 100644 --- a/docs/CustomerSegmentsList.md +++ b/docs/CustomerSegmentsList.md @@ -6,12 +6,12 @@ List of customer's segments ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about customer segments. | | -|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of segment IDs. | | -|**data** | [**List<SimpleSegment>**](SimpleSegment.md) | A dictionary that contains an array of segment IDs and names. | | -|**total** | **Integer** | Total number of segments the customer belongs to. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about customer segments. | +|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of segment IDs. | +|**data** | [**List<SimpleSegment>**](SimpleSegment.md) | A dictionary that contains an array of segment IDs and names. | +|**total** | **Integer** | Total number of segments the customer belongs to. | diff --git a/docs/CustomerSummary.md b/docs/CustomerSummary.md index 549ef63f..98db5cc7 100644 --- a/docs/CustomerSummary.md +++ b/docs/CustomerSummary.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redemptions** | [**CustomerSummaryRedemptions**](CustomerSummaryRedemptions.md) | | | -|**orders** | [**CustomerSummaryOrders**](CustomerSummaryOrders.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redemptions** | [**CustomerSummaryRedemptions**](CustomerSummaryRedemptions.md) | | +|**orders** | [**CustomerSummaryOrders**](CustomerSummaryOrders.md) | | diff --git a/docs/CustomerSummaryOrders.md b/docs/CustomerSummaryOrders.md index 1c3dc9e5..0c5c0075 100644 --- a/docs/CustomerSummaryOrders.md +++ b/docs/CustomerSummaryOrders.md @@ -5,13 +5,13 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**totalAmount** | **Integer** | The total amount spent by the customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | | -|**totalCount** | **Integer** | Total number of orders made by the customer. | | -|**averageAmount** | **Integer** | Average amount spent on orders. `total_amount` &divide; `total_count`. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | | -|**lastOrderAmount** | **Integer** | Amount spent on last order. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | | -|**lastOrderDate** | **OffsetDateTime** | Timestamp representing the date and time of the customer's last order in ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**totalAmount** | **Integer** | The total amount spent by the customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | +|**totalCount** | **Integer** | Total number of orders made by the customer. | +|**averageAmount** | **Integer** | Average amount spent on orders. `total_amount` &divide; `total_count`. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | +|**lastOrderAmount** | **Integer** | Amount spent on last order. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | +|**lastOrderDate** | **OffsetDateTime** | Timestamp representing the date and time of the customer's last order in ISO 8601 format. | diff --git a/docs/CustomerSummaryRedemptions.md b/docs/CustomerSummaryRedemptions.md index 17bd7a99..09841d83 100644 --- a/docs/CustomerSummaryRedemptions.md +++ b/docs/CustomerSummaryRedemptions.md @@ -5,16 +5,16 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**totalRedeemed** | **Integer** | Total number of redemptions made by the customer. | | -|**totalFailed** | **Integer** | Total number of redemptions that failed. | | -|**totalSucceeded** | **Integer** | Total number of redemptions that succeeded. | | -|**totalRolledBack** | **Integer** | Total number of redemptions that were rolled back for the customer. | | -|**totalRollbackFailed** | **Integer** | Total number of redemption rollbacks that failed. | | -|**totalRollbackSucceeded** | **Integer** | Total number of redemption rollbacks that succeeded. | | -|**gift** | [**CustomerSummaryRedemptionsGift**](CustomerSummaryRedemptionsGift.md) | | | -|**loyaltyCard** | [**CustomerSummaryRedemptionsLoyaltyCard**](CustomerSummaryRedemptionsLoyaltyCard.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**totalRedeemed** | **Integer** | Total number of redemptions made by the customer. | +|**totalFailed** | **Integer** | Total number of redemptions that failed. | +|**totalSucceeded** | **Integer** | Total number of redemptions that succeeded. | +|**totalRolledBack** | **Integer** | Total number of redemptions that were rolled back for the customer. | +|**totalRollbackFailed** | **Integer** | Total number of redemption rollbacks that failed. | +|**totalRollbackSucceeded** | **Integer** | Total number of redemption rollbacks that succeeded. | +|**gift** | [**CustomerSummaryRedemptionsGift**](CustomerSummaryRedemptionsGift.md) | | +|**loyaltyCard** | [**CustomerSummaryRedemptionsLoyaltyCard**](CustomerSummaryRedemptionsLoyaltyCard.md) | | diff --git a/docs/CustomerSummaryRedemptionsGift.md b/docs/CustomerSummaryRedemptionsGift.md index 4ba1540b..7ffd0731 100644 --- a/docs/CustomerSummaryRedemptionsGift.md +++ b/docs/CustomerSummaryRedemptionsGift.md @@ -6,10 +6,10 @@ Summary of gift card credits. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redeemedAmount** | **Integer** | Total amount of gift card credits redeemed by customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | | -|**amountToGo** | **Integer** | Remaining gift card balance across all gift cards. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redeemedAmount** | **Integer** | Total amount of gift card credits redeemed by customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | +|**amountToGo** | **Integer** | Remaining gift card balance across all gift cards. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | diff --git a/docs/CustomerSummaryRedemptionsLoyaltyCard.md b/docs/CustomerSummaryRedemptionsLoyaltyCard.md index 99d2b5a0..20da9911 100644 --- a/docs/CustomerSummaryRedemptionsLoyaltyCard.md +++ b/docs/CustomerSummaryRedemptionsLoyaltyCard.md @@ -6,10 +6,10 @@ Summary of loyalty points. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redeemedPoints** | **Integer** | Total number of loyalty points redeemed by the customer. | | -|**pointsToGo** | **Integer** | Sum of remaining available point balance across all loyalty cards. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redeemedPoints** | **Integer** | Total number of loyalty points redeemed by the customer. | +|**pointsToGo** | **Integer** | Sum of remaining available point balance across all loyalty cards. | diff --git a/docs/CustomerWithSummaryLoyaltyReferrals.md b/docs/CustomerWithSummaryLoyaltyReferrals.md index b6909097..97e7874e 100644 --- a/docs/CustomerWithSummaryLoyaltyReferrals.md +++ b/docs/CustomerWithSummaryLoyaltyReferrals.md @@ -5,26 +5,26 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Customer's first and last name. | [optional] | -|**description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] | -|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | [optional] | -|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | [optional] | -|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] | -|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | [optional] | -|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] | -|**summary** | [**CustomerSummary**](CustomerSummary.md) | | [optional] | -|**loyalty** | [**CustomerLoyalty**](CustomerLoyalty.md) | | [optional] | -|**referrals** | [**CustomerReferrals**](CustomerReferrals.md) | | [optional] | -|**systemMetadata** | **Object** | Object used to store system metadata information. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format. | [optional] | -|**assets** | [**CustomerResponseDataAssets**](CustomerResponseDataAssets.md) | | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Customer's first and last name. | +|**description** | **String** | An arbitrary string that you can attach to a customer object. | +|**email** | **String** | Customer's email address. | +|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | +|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | +|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | +|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | +|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | +|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | +|**summary** | [**CustomerSummary**](CustomerSummary.md) | | +|**loyalty** | [**CustomerLoyalty**](CustomerLoyalty.md) | | +|**referrals** | [**CustomerReferrals**](CustomerReferrals.md) | | +|**systemMetadata** | **Object** | Object used to store system metadata information. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format. | +|**assets** | [**CustomerResponseDataAssets**](CustomerResponseDataAssets.md) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | @@ -33,7 +33,6 @@ | Name | Value | |---- | -----| | CUSTOMER | "customer" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CustomersApi.md b/docs/CustomersApi.md index 489fe57a..567f25f7 100644 --- a/docs/CustomersApi.md +++ b/docs/CustomersApi.md @@ -70,9 +70,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **customersCreateRequestBody** | [**CustomersCreateRequestBody**](CustomersCreateRequestBody.md)| Create a customer with specified parameters. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **customersCreateRequestBody** | [**CustomersCreateRequestBody**](CustomersCreateRequestBody.md)| Create a customer with specified parameters. | ### Return type @@ -145,9 +145,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **customerId** | **String**| A Voucherify customer's `id` or `source_id`. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **customerId** | **String**| A Voucherify customer's `id` or `source_id`. | ### Return type @@ -219,9 +219,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **customerId** | **String**| A Voucherify customer's `id` or `source_id`. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **customerId** | **String**| A Voucherify customer's `id` or `source_id`. | ### Return type @@ -294,9 +294,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **customerId** | **String**| A Voucherify customer's `id` or `source_id`. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **customerId** | **String**| A Voucherify customer's `id` or `source_id`. | ### Return type @@ -369,9 +369,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **_file** | **File**| File path. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **_file** | **File**| File path. | ### Return type @@ -444,9 +444,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **customerId** | **String**| Unique identifier of a customer represented by an internal customer ID or customer source ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **customerId** | **String**| Unique identifier of a customer represented by an internal customer ID or customer source ID. | ### Return type @@ -530,20 +530,20 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | -| **email** | **String**| Limit the customers to the ones that have this specific email address. | [optional] | -| **city** | **String**| Limit the customers to the ones that are located in the specified city. | [optional] | -| **name** | **String**| Filter customers by the name property. | [optional] | -| **segmentId** | **String**| Filter customers by the segment id. | [optional] | -| **createdAtBefore** | **OffsetDateTime**| Filter customers by date customer was created. | [optional] | -| **createdAtAfter** | **OffsetDateTime**| Filter customers by date customer was created. | [optional] | -| **updatedAtBefore** | **OffsetDateTime**| Filter customers by date customer was updated last time. | [optional] | -| **updatedAtAfter** | **OffsetDateTime**| Filter customers by date customer was updated last time. | [optional] | -| **order** | [**ParameterOrderListCustomers**](.md)| This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] [enum: created_at, -created_at, updated_at, -updated_at, source_id, -source_id] | -| **startingAfter** | **OffsetDateTime**| A cursor for pagination. This is a date-time value that defines your place in the list based on `created_at` property from the customer object. For instance, if you make a list request and receive 100 objects, ending with an object created at `2020-05-24T13:43:09.024Z`, your subsequent call can include `starting_after=2020-05-24T13:43:09.024Z` in order to fetch the next page of the list. <!-- title: Options --> | **Option** | **Format** | **Sorting** | |:---|:---|:---| | Return customers **before** a specific creation date | - set `starting_after` parameter to the breakpoint date | Sorting order is **descending**; the most recent dates first and least recent dates last. | | Return customers **after** a specific create or update date | - include the `order` parameter set to `created_at` or `updated_at`<br>- set `starting_after` to the breakpoint date | Sorting order is **ascending**; the least recent dates first and the most recent dates last. | | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | +| **email** | **String**| Limit the customers to the ones that have this specific email address. | +| **city** | **String**| Limit the customers to the ones that are located in the specified city. | +| **name** | **String**| Filter customers by the name property. | +| **segmentId** | **String**| Filter customers by the segment id. | +| **createdAtBefore** | **OffsetDateTime**| Filter customers by date customer was created. | +| **createdAtAfter** | **OffsetDateTime**| Filter customers by date customer was created. | +| **updatedAtBefore** | **OffsetDateTime**| Filter customers by date customer was updated last time. | +| **updatedAtAfter** | **OffsetDateTime**| Filter customers by date customer was updated last time. | +| **order** | [**ParameterOrderListCustomers**](.md)| This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | +| **startingAfter** | **OffsetDateTime**| A cursor for pagination. This is a date-time value that defines your place in the list based on `created_at` property from the customer object. For instance, if you make a list request and receive 100 objects, ending with an object created at `2020-05-24T13:43:09.024Z`, your subsequent call can include `starting_after=2020-05-24T13:43:09.024Z` in order to fetch the next page of the list. <!-- title: Options --> | **Option** | **Format** | **Sorting** | |:---|:---|:---| | Return customers **before** a specific creation date | - set `starting_after` parameter to the breakpoint date | Sorting order is **descending**; the most recent dates first and least recent dates last. | | Return customers **after** a specific create or update date | - include the `order` parameter set to `created_at` or `updated_at`<br>- set `starting_after` to the breakpoint date | Sorting order is **ascending**; the least recent dates first and the most recent dates last. | | ### Return type @@ -617,10 +617,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **customerId** | **String**| A Voucherify customer's `id` or `source_id`. | | -| **customersUpdateRequestBody** | [**CustomersUpdateRequestBody**](CustomersUpdateRequestBody.md)| Specify the parameters to be updated. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **customerId** | **String**| A Voucherify customer's `id` or `source_id`. | +| **customersUpdateRequestBody** | [**CustomersUpdateRequestBody**](CustomersUpdateRequestBody.md)| Specify the parameters to be updated. | ### Return type @@ -693,10 +693,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **customerId** | **String**| A Voucherify unique customer identifier or source ID. | | -| **body** | **Object**| Key-value pairs where the key is the consent identifier and value is a boolean that identifies if a customer has given the consent or not. To deny all consents use \"unsubscribed\" as a consent identifier and \"true\" as its value. #### Examples <!-- title: \"Request Body\" lineNumbers: true --> ```json { \"cnst_aIdUulAh0SCsOCaS3005y7yS\": true, \"cnst_aIdUulAhwewqaS31213fdsfds\": false } ``` Opt-out from all communication: <!-- title: \"Request Body\" lineNumbers: true --> ```json { \"unsubscribed\": true } ``` | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **customerId** | **String**| A Voucherify unique customer identifier or source ID. | +| **body** | **Object**| Key-value pairs where the key is the consent identifier and value is a boolean that identifies if a customer has given the consent or not. To deny all consents use \"unsubscribed\" as a consent identifier and \"true\" as its value. #### Examples <!-- title: \"Request Body\" lineNumbers: true --> ```json { \"cnst_aIdUulAh0SCsOCaS3005y7yS\": true, \"cnst_aIdUulAhwewqaS31213fdsfds\": false } ``` Opt-out from all communication: <!-- title: \"Request Body\" lineNumbers: true --> ```json { \"unsubscribed\": true } ``` | ### Return type @@ -769,9 +769,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **customersUpdateInBulkRequestBody** | [**List<CustomersUpdateInBulkRequestBody>**](CustomersUpdateInBulkRequestBody.md)| Specify the customer fields that you would like to update in each customer object. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **customersUpdateInBulkRequestBody** | [**List<CustomersUpdateInBulkRequestBody>**](CustomersUpdateInBulkRequestBody.md)| Specify the customer fields that you would like to update in each customer object. | ### Return type @@ -844,9 +844,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **customersMetadataUpdateInBulkRequestBody** | [**CustomersMetadataUpdateInBulkRequestBody**](CustomersMetadataUpdateInBulkRequestBody.md)| List the `source_ids` of the customer's you would like to update along with the metadata key value pairs. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **customersMetadataUpdateInBulkRequestBody** | [**CustomersMetadataUpdateInBulkRequestBody**](CustomersMetadataUpdateInBulkRequestBody.md)| List the `source_ids` of the customer's you would like to update along with the metadata key value pairs. | ### Return type diff --git a/docs/CustomersCreateRequestBody.md b/docs/CustomersCreateRequestBody.md index 3c8f360e..b04828ce 100644 --- a/docs/CustomersCreateRequestBody.md +++ b/docs/CustomersCreateRequestBody.md @@ -6,18 +6,18 @@ Request body schema for **POST** `/customers`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The ID of an existing customer. | [optional] | -|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] | -|**name** | **String** | Customer's first and last name. | [optional] | -|**description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] | -|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | [optional] | -|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | [optional] | -|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | The ID of an existing customer. | +|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | +|**name** | **String** | Customer's first and last name. | +|**description** | **String** | An arbitrary string that you can attach to a customer object. | +|**email** | **String** | Customer's email address. | +|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | +|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | +|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | +|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | diff --git a/docs/CustomersCreateResponseBody.md b/docs/CustomersCreateResponseBody.md index 05a25c1b..3225063d 100644 --- a/docs/CustomersCreateResponseBody.md +++ b/docs/CustomersCreateResponseBody.md @@ -6,26 +6,26 @@ Response body for **POST** `/customers`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | [optional] | -|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] | -|**summary** | [**CustomerSummary**](CustomerSummary.md) | | [optional] | -|**loyalty** | [**CustomerLoyalty**](CustomerLoyalty.md) | | [optional] | -|**referrals** | [**CustomerReferrals**](CustomerReferrals.md) | | [optional] | -|**systemMetadata** | **Object** | Object used to store system metadata information. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format. | [optional] | -|**assets** | [**CustomerResponseDataAssets**](CustomerResponseDataAssets.md) | | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**name** | **String** | Customer's first and last name. | [optional] | -|**description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] | -|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | [optional] | -|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | [optional] | -|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | +|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | +|**summary** | [**CustomerSummary**](CustomerSummary.md) | | +|**loyalty** | [**CustomerLoyalty**](CustomerLoyalty.md) | | +|**referrals** | [**CustomerReferrals**](CustomerReferrals.md) | | +|**systemMetadata** | **Object** | Object used to store system metadata information. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format. | +|**assets** | [**CustomerResponseDataAssets**](CustomerResponseDataAssets.md) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**name** | **String** | Customer's first and last name. | +|**description** | **String** | An arbitrary string that you can attach to a customer object. | +|**email** | **String** | Customer's email address. | +|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | +|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | +|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | +|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | @@ -34,7 +34,6 @@ Response body for **POST** `/customers`. | Name | Value | |---- | -----| | CUSTOMER | "customer" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CustomersGetResponseBody.md b/docs/CustomersGetResponseBody.md index 2838ae54..4883e0ed 100644 --- a/docs/CustomersGetResponseBody.md +++ b/docs/CustomersGetResponseBody.md @@ -6,26 +6,26 @@ Response body schema for **GET** `/customers/{customerId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | [optional] | -|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] | -|**summary** | [**CustomerSummary**](CustomerSummary.md) | | [optional] | -|**loyalty** | [**CustomerLoyalty**](CustomerLoyalty.md) | | [optional] | -|**referrals** | [**CustomerReferrals**](CustomerReferrals.md) | | [optional] | -|**systemMetadata** | **Object** | Object used to store system metadata information. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format. | [optional] | -|**assets** | [**CustomerResponseDataAssets**](CustomerResponseDataAssets.md) | | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**name** | **String** | Customer's first and last name. | [optional] | -|**description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] | -|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | [optional] | -|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | [optional] | -|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | +|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | +|**summary** | [**CustomerSummary**](CustomerSummary.md) | | +|**loyalty** | [**CustomerLoyalty**](CustomerLoyalty.md) | | +|**referrals** | [**CustomerReferrals**](CustomerReferrals.md) | | +|**systemMetadata** | **Object** | Object used to store system metadata information. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format. | +|**assets** | [**CustomerResponseDataAssets**](CustomerResponseDataAssets.md) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**name** | **String** | Customer's first and last name. | +|**description** | **String** | An arbitrary string that you can attach to a customer object. | +|**email** | **String** | Customer's email address. | +|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | +|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | +|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | +|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | @@ -34,7 +34,6 @@ Response body schema for **GET** `/customers/{customerId}`. | Name | Value | |---- | -----| | CUSTOMER | "customer" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/CustomersImportCsvCreateResponseBody.md b/docs/CustomersImportCsvCreateResponseBody.md index 38d2b7e9..96dd474f 100644 --- a/docs/CustomersImportCsvCreateResponseBody.md +++ b/docs/CustomersImportCsvCreateResponseBody.md @@ -6,9 +6,9 @@ Response body schema for **POST** `/customers/importCSV`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | diff --git a/docs/CustomersListResponseBody.md b/docs/CustomersListResponseBody.md index c4a6c01e..02794d05 100644 --- a/docs/CustomersListResponseBody.md +++ b/docs/CustomersListResponseBody.md @@ -6,13 +6,13 @@ Response body schema for **GET** `/customers`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about customers in a dictionary. | | -|**dataRef** | **String** | Identifies the name of the attribute that contains the array of customer objects. | | -|**customers** | [**List<CustomerWithSummaryLoyaltyReferrals>**](CustomerWithSummaryLoyaltyReferrals.md) | Contains array of customer objects. | | -|**total** | **Integer** | Total number of customers. | | -|**hasMore** | **Boolean** | 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 (with a different end date filter) to get more records returned in the results. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about customers in a dictionary. | +|**dataRef** | **String** | Identifies the name of the attribute that contains the array of customer objects. | +|**customers** | [**List<CustomerWithSummaryLoyaltyReferrals>**](CustomerWithSummaryLoyaltyReferrals.md) | Contains array of customer objects. | +|**total** | **Integer** | Total number of customers. | +|**hasMore** | **Boolean** | 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 (with a different end date filter) to get more records returned in the results. | diff --git a/docs/CustomersMetadataUpdateInBulkRequestBody.md b/docs/CustomersMetadataUpdateInBulkRequestBody.md index 237d2b3a..8a42e5b1 100644 --- a/docs/CustomersMetadataUpdateInBulkRequestBody.md +++ b/docs/CustomersMetadataUpdateInBulkRequestBody.md @@ -6,10 +6,10 @@ Request body schema for **POST** `/customers/metadata/async`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**sourceIds** | **List<String>** | An array of customer `source_id`'s. | | -|**metadata** | **Object** | Metadata key value pairs to be updated. A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**sourceIds** | **List<String>** | An array of customer `source_id`'s. | +|**metadata** | **Object** | Metadata key value pairs to be updated. A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | diff --git a/docs/CustomersMetadataUpdateInBulkResponseBody.md b/docs/CustomersMetadataUpdateInBulkResponseBody.md index 3ec6fbc7..23698b62 100644 --- a/docs/CustomersMetadataUpdateInBulkResponseBody.md +++ b/docs/CustomersMetadataUpdateInBulkResponseBody.md @@ -6,9 +6,9 @@ Response body schema for **POST** `/customers/metadata/async`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | diff --git a/docs/CustomersPermanentDeletionCreateResponseBody.md b/docs/CustomersPermanentDeletionCreateResponseBody.md index d236cad8..63e3db95 100644 --- a/docs/CustomersPermanentDeletionCreateResponseBody.md +++ b/docs/CustomersPermanentDeletionCreateResponseBody.md @@ -6,15 +6,15 @@ Response body schema for **POST** `/customers/{customerId}/permanent-deletion`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique permanent deletion object ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was requested to be deleted in ISO 8601 format. | | -|**relatedObjectId** | **String** | Unique customer ID that is being deleted. | | -|**relatedObject** | **String** | Object being deleted. | | -|**status** | **String** | Deletion status. | | -|**dataJson** | [**CustomersPermanentDeletionCreateResponseBodyDataJson**](CustomersPermanentDeletionCreateResponseBodyDataJson.md) | | | -|**_object** | **String** | The type of the object represented by JSON. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique permanent deletion object ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was requested to be deleted in ISO 8601 format. | +|**relatedObjectId** | **String** | Unique customer ID that is being deleted. | +|**relatedObject** | **String** | Object being deleted. | +|**status** | **String** | Deletion status. | +|**dataJson** | [**CustomersPermanentDeletionCreateResponseBodyDataJson**](CustomersPermanentDeletionCreateResponseBodyDataJson.md) | | +|**_object** | **String** | The type of the object represented by JSON. | diff --git a/docs/CustomersPermanentDeletionCreateResponseBodyDataJson.md b/docs/CustomersPermanentDeletionCreateResponseBodyDataJson.md index fbd947dc..3455fc80 100644 --- a/docs/CustomersPermanentDeletionCreateResponseBodyDataJson.md +++ b/docs/CustomersPermanentDeletionCreateResponseBodyDataJson.md @@ -6,15 +6,15 @@ Statistics summarizing the number of related information that was deleted. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**events** | **Integer** | Number of events deleted. | | -|**customerEvents** | **Integer** | Number of customer events deleted. | | -|**dailyEvents** | **Integer** | Number of daily events deleted. | | -|**segments** | **Integer** | Number of segments deleted. | | -|**orders** | **Integer** | Number of orders deleted. | | -|**orderEvents** | **Integer** | Number of order events deleted. | | -|**customer** | **Integer** | Number of customers deleted. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**events** | **Integer** | Number of events deleted. | +|**customerEvents** | **Integer** | Number of customer events deleted. | +|**dailyEvents** | **Integer** | Number of daily events deleted. | +|**segments** | **Integer** | Number of segments deleted. | +|**orders** | **Integer** | Number of orders deleted. | +|**orderEvents** | **Integer** | Number of order events deleted. | +|**customer** | **Integer** | Number of customers deleted. | diff --git a/docs/CustomersSegmentsListResponseBody.md b/docs/CustomersSegmentsListResponseBody.md index 310034a6..38438a36 100644 --- a/docs/CustomersSegmentsListResponseBody.md +++ b/docs/CustomersSegmentsListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/customers/{customerId}/segments`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about customer segments. | | -|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of segment IDs. | | -|**data** | [**List<SimpleSegment>**](SimpleSegment.md) | A dictionary that contains an array of segment IDs and names. | | -|**total** | **Integer** | Total number of segments the customer belongs to. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about customer segments. | +|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of segment IDs. | +|**data** | [**List<SimpleSegment>**](SimpleSegment.md) | A dictionary that contains an array of segment IDs and names. | +|**total** | **Integer** | Total number of segments the customer belongs to. | diff --git a/docs/CustomersUpdateInBulkRequestBody.md b/docs/CustomersUpdateInBulkRequestBody.md index 9a8b9116..86760a54 100644 --- a/docs/CustomersUpdateInBulkRequestBody.md +++ b/docs/CustomersUpdateInBulkRequestBody.md @@ -6,17 +6,17 @@ Request body schema for **POST** `/customers/bulk/async`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Customer's first and last name. | [optional] | -|**description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] | -|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | [optional] | -|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | [optional] | -|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] | -|**sourceId** | **String** | Unique customer source ID. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Customer's first and last name. | +|**description** | **String** | An arbitrary string that you can attach to a customer object. | +|**email** | **String** | Customer's email address. | +|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | +|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | +|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | +|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | +|**sourceId** | **String** | Unique customer source ID. | diff --git a/docs/CustomersUpdateInBulkResponseBody.md b/docs/CustomersUpdateInBulkResponseBody.md index 0443533b..ed16e0b6 100644 --- a/docs/CustomersUpdateInBulkResponseBody.md +++ b/docs/CustomersUpdateInBulkResponseBody.md @@ -6,9 +6,9 @@ Response body schema for **POST** `/customers/bulk/async`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | diff --git a/docs/CustomersUpdateRequestBody.md b/docs/CustomersUpdateRequestBody.md index 49365821..90a27649 100644 --- a/docs/CustomersUpdateRequestBody.md +++ b/docs/CustomersUpdateRequestBody.md @@ -6,16 +6,16 @@ Request body schema for **PUT** `/customers/{customerId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Customer's first and last name. | [optional] | -|**description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] | -|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | [optional] | -|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | [optional] | -|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Customer's first and last name. | +|**description** | **String** | An arbitrary string that you can attach to a customer object. | +|**email** | **String** | Customer's email address. | +|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | +|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | +|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | +|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | diff --git a/docs/CustomersUpdateResponseBody.md b/docs/CustomersUpdateResponseBody.md index a17748bd..8d0faf48 100644 --- a/docs/CustomersUpdateResponseBody.md +++ b/docs/CustomersUpdateResponseBody.md @@ -6,26 +6,26 @@ Response body schema for **PUT** `/customers/{customerId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | [optional] | -|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] | -|**summary** | [**CustomerSummary**](CustomerSummary.md) | | [optional] | -|**loyalty** | [**CustomerLoyalty**](CustomerLoyalty.md) | | [optional] | -|**referrals** | [**CustomerReferrals**](CustomerReferrals.md) | | [optional] | -|**systemMetadata** | **Object** | Object used to store system metadata information. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format. | [optional] | -|**assets** | [**CustomerResponseDataAssets**](CustomerResponseDataAssets.md) | | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**name** | **String** | Customer's first and last name. | [optional] | -|**description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] | -|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | [optional] | -|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | [optional] | -|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | +|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | +|**summary** | [**CustomerSummary**](CustomerSummary.md) | | +|**loyalty** | [**CustomerLoyalty**](CustomerLoyalty.md) | | +|**referrals** | [**CustomerReferrals**](CustomerReferrals.md) | | +|**systemMetadata** | **Object** | Object used to store system metadata information. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format. | +|**assets** | [**CustomerResponseDataAssets**](CustomerResponseDataAssets.md) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**name** | **String** | Customer's first and last name. | +|**description** | **String** | An arbitrary string that you can attach to a customer object. | +|**email** | **String** | Customer's email address. | +|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | +|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | +|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | +|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | @@ -34,7 +34,6 @@ Response body schema for **PUT** `/customers/{customerId}`. | Name | Value | |---- | -----| | CUSTOMER | "customer" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/Discount.md b/docs/Discount.md index aaafc7e7..1ffc9d01 100644 --- a/docs/Discount.md +++ b/docs/Discount.md @@ -5,25 +5,25 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | | | -|**amountOff** | **BigDecimal** | Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. | [optional] | -|**amountOffFormula** | **String** | | [optional] | -|**aggregatedAmountLimit** | **Integer** | Maximum discount amount per order. | [optional] | -|**effect** | [**EffectEnum**](#EffectEnum) | | [optional] | -|**isDynamic** | **Boolean** | Flag indicating whether the discount was calculated using a formula. | [optional] | -|**unitOff** | **Integer** | Number of units to be granted a full value discount. | [optional] | -|**unitOffFormula** | **String** | | [optional] | -|**unitType** | **String** | The product deemed as free, chosen from product inventory (e.g. time, items). | [optional] | -|**product** | [**SimpleProductDiscountUnit**](SimpleProductDiscountUnit.md) | | [optional] | -|**sku** | [**SimpleSkuDiscountUnit**](SimpleSkuDiscountUnit.md) | | [optional] | -|**units** | [**List<DiscountUnitMultipleOneUnit>**](DiscountUnitMultipleOneUnit.md) | | [optional] | -|**percentOff** | **BigDecimal** | The percent discount that the customer will receive. | [optional] | -|**percentOffFormula** | **String** | | [optional] | -|**amountLimit** | **BigDecimal** | Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600. | [optional] | -|**fixedAmount** | **BigDecimal** | Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the `fixed_amount_formula` parameter is present in the fixed amount definition, this value becomes the **fallback value**. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value. | [optional] | -|**fixedAmountFormula** | **String** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**type** | [**TypeEnum**](#TypeEnum) | | +|**amountOff** | **BigDecimal** | Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. | +|**amountOffFormula** | **String** | | +|**aggregatedAmountLimit** | **Integer** | Maximum discount amount per order. | +|**effect** | [**EffectEnum**](#EffectEnum) | | +|**isDynamic** | **Boolean** | Flag indicating whether the discount was calculated using a formula. | +|**unitOff** | **Integer** | Number of units to be granted a full value discount. | +|**unitOffFormula** | **String** | | +|**unitType** | **String** | The product deemed as free, chosen from product inventory (e.g. time, items). | +|**product** | [**SimpleProductDiscountUnit**](SimpleProductDiscountUnit.md) | | +|**sku** | [**SimpleSkuDiscountUnit**](SimpleSkuDiscountUnit.md) | | +|**units** | [**List<DiscountUnitMultipleOneUnit>**](DiscountUnitMultipleOneUnit.md) | | +|**percentOff** | **BigDecimal** | The percent discount that the customer will receive. | +|**percentOffFormula** | **String** | | +|**amountLimit** | **BigDecimal** | Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600. | +|**fixedAmount** | **BigDecimal** | Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the `fixed_amount_formula` parameter is present in the fixed amount definition, this value becomes the **fallback value**. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value. | +|**fixedAmountFormula** | **String** | | @@ -35,7 +35,6 @@ | UNIT | "UNIT" | | PERCENT | "PERCENT" | | FIXED | "FIXED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -51,7 +50,6 @@ | ADD_MISSING_ITEMS | "ADD_MISSING_ITEMS" | | ADD_NEW_ITEMS | "ADD_NEW_ITEMS" | | ADD_MANY_ITEMS | "ADD_MANY_ITEMS" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/DiscountUnitMultipleOneUnit.md b/docs/DiscountUnitMultipleOneUnit.md index d04cdf99..09174f69 100644 --- a/docs/DiscountUnitMultipleOneUnit.md +++ b/docs/DiscountUnitMultipleOneUnit.md @@ -5,14 +5,14 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**unitOff** | **BigDecimal** | Number of units to be granted a full value discount. | [optional] | -|**unitOffFormula** | **String** | | [optional] | -|**effect** | [**EffectEnum**](#EffectEnum) | Defines how the unit is added to the customer's order. | | -|**unitType** | **String** | The product deemed as free, chosen from product inventory (e.g. time, items). | | -|**product** | [**SimpleProductDiscountUnit**](SimpleProductDiscountUnit.md) | | [optional] | -|**sku** | [**SimpleSkuDiscountUnit**](SimpleSkuDiscountUnit.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**unitOff** | **BigDecimal** | Number of units to be granted a full value discount. | +|**unitOffFormula** | **String** | | +|**effect** | [**EffectEnum**](#EffectEnum) | Defines how the unit is added to the customer's order. | +|**unitType** | **String** | The product deemed as free, chosen from product inventory (e.g. time, items). | +|**product** | [**SimpleProductDiscountUnit**](SimpleProductDiscountUnit.md) | | +|**sku** | [**SimpleSkuDiscountUnit**](SimpleSkuDiscountUnit.md) | | @@ -22,7 +22,6 @@ |---- | -----| | NEW_ITEMS | "ADD_NEW_ITEMS" | | MISSING_ITEMS | "ADD_MISSING_ITEMS" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/EarningRule.md b/docs/EarningRule.md index f217a147..54c86cc4 100644 --- a/docs/EarningRule.md +++ b/docs/EarningRule.md @@ -5,26 +5,26 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. | | -|**loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | | -|**event** | **EarningRuleEvent** | | [optional] | -|**customEvent** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | [optional] | -|**segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | [optional] | -|**source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is earning_rule. | | -|**automationId** | **String** | For internal use by Voucherify. | | -|**startDate** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | [optional] | -|**expirationDate** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | [optional] | -|**validityTimeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**metadata** | **Object** | 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. | | -|**validationRuleId** | **String** | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format. | [optional] | -|**active** | **Boolean** | A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. - `true` indicates an active earning rule - `false` indicates an inactive earning rule | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. | +|**loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | +|**event** | **EarningRuleEvent** | | +|**customEvent** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | +|**segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | +|**source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is earning_rule. | +|**automationId** | **String** | For internal use by Voucherify. | +|**startDate** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | +|**expirationDate** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | +|**validityTimeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**metadata** | **Object** | 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. | +|**validationRuleId** | **String** | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format. | +|**active** | **Boolean** | A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. - `true` indicates an active earning rule - `false` indicates an inactive earning rule | @@ -33,7 +33,6 @@ | Name | Value | |---- | -----| | EARNING_RULE | "earning_rule" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -48,7 +47,6 @@ | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/EarningRuleBase.md b/docs/EarningRuleBase.md index a18eda9f..592d74d5 100644 --- a/docs/EarningRuleBase.md +++ b/docs/EarningRuleBase.md @@ -5,23 +5,23 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. | | -|**loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | | -|**event** | **EarningRuleEvent** | | [optional] | -|**customEvent** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | [optional] | -|**segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | [optional] | -|**source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is earning_rule. | | -|**automationId** | **String** | For internal use by Voucherify. | | -|**startDate** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | [optional] | -|**expirationDate** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | [optional] | -|**validityTimeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**metadata** | **Object** | 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. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. | +|**loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | +|**event** | **EarningRuleEvent** | | +|**customEvent** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | +|**segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | +|**source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is earning_rule. | +|**automationId** | **String** | For internal use by Voucherify. | +|**startDate** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | +|**expirationDate** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | +|**validityTimeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**metadata** | **Object** | 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. | @@ -30,7 +30,6 @@ | Name | Value | |---- | -----| | EARNING_RULE | "earning_rule" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -45,7 +44,6 @@ | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/EarningRuleBaseCustomEvent.md b/docs/EarningRuleBaseCustomEvent.md index d44b0f25..3cf10b9d 100644 --- a/docs/EarningRuleBaseCustomEvent.md +++ b/docs/EarningRuleBaseCustomEvent.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**schemaId** | **String** | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**schemaId** | **String** | | diff --git a/docs/EarningRuleBaseLoyalty.md b/docs/EarningRuleBaseLoyalty.md index 91427bae..5158158e 100644 --- a/docs/EarningRuleBaseLoyalty.md +++ b/docs/EarningRuleBaseLoyalty.md @@ -5,15 +5,15 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | -|**calculationType** | [**CalculationTypeEnum**](#CalculationTypeEnum) | | [optional] | -|**order** | [**EarningRuleBaseLoyaltyOrder**](EarningRuleBaseLoyaltyOrder.md) | | [optional] | -|**orderItems** | [**EarningRuleBaseLoyaltyOrderItems**](EarningRuleBaseLoyaltyOrderItems.md) | | [optional] | -|**customer** | [**EarningRuleBaseLoyaltyCustomer**](EarningRuleBaseLoyaltyCustomer.md) | | [optional] | -|**customEvent** | [**EarningRuleBaseLoyaltyCustomEvent**](EarningRuleBaseLoyaltyCustomEvent.md) | | [optional] | -|**points** | **Integer** | Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**type** | [**TypeEnum**](#TypeEnum) | | +|**calculationType** | [**CalculationTypeEnum**](#CalculationTypeEnum) | | +|**order** | [**EarningRuleBaseLoyaltyOrder**](EarningRuleBaseLoyaltyOrder.md) | | +|**orderItems** | [**EarningRuleBaseLoyaltyOrderItems**](EarningRuleBaseLoyaltyOrderItems.md) | | +|**customer** | [**EarningRuleBaseLoyaltyCustomer**](EarningRuleBaseLoyaltyCustomer.md) | | +|**customEvent** | [**EarningRuleBaseLoyaltyCustomEvent**](EarningRuleBaseLoyaltyCustomEvent.md) | | +|**points** | **Integer** | Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points. | @@ -23,7 +23,6 @@ |---- | -----| | PROPORTIONAL | "PROPORTIONAL" | | FIXED | "FIXED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -39,7 +38,6 @@ | ORDER_ITEMS_SUBTOTAL_AMOUNT | "ORDER_ITEMS_SUBTOTAL_AMOUNT" | | CUSTOMER_METADATA | "CUSTOMER_METADATA" | | CUSTOM_EVENT_METADATA | "CUSTOM_EVENT_METADATA" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/EarningRuleBaseLoyaltyCustomEvent.md b/docs/EarningRuleBaseLoyaltyCustomEvent.md index a17f92fb..f2dff2d2 100644 --- a/docs/EarningRuleBaseLoyaltyCustomEvent.md +++ b/docs/EarningRuleBaseLoyaltyCustomEvent.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**metadata** | [**EarningRuleBaseLoyaltyCustomEventMetadata**](EarningRuleBaseLoyaltyCustomEventMetadata.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**metadata** | [**EarningRuleBaseLoyaltyCustomEventMetadata**](EarningRuleBaseLoyaltyCustomEventMetadata.md) | | diff --git a/docs/EarningRuleBaseLoyaltyCustomEventMetadata.md b/docs/EarningRuleBaseLoyaltyCustomEventMetadata.md index 53af92a5..b4cbc85a 100644 --- a/docs/EarningRuleBaseLoyaltyCustomEventMetadata.md +++ b/docs/EarningRuleBaseLoyaltyCustomEventMetadata.md @@ -6,11 +6,11 @@ Defines the ratio based on the property defined in the calculation_type paramete ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**every** | **Integer** | For how many increments of the customer metadata property to grant points for. | | -|**points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | | -|**property** | **String** | Custom event metadata property. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**every** | **Integer** | For how many increments of the customer metadata property to grant points for. | +|**points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | +|**property** | **String** | Custom event metadata property. | diff --git a/docs/EarningRuleBaseLoyaltyCustomer.md b/docs/EarningRuleBaseLoyaltyCustomer.md index a2c4d708..0b002772 100644 --- a/docs/EarningRuleBaseLoyaltyCustomer.md +++ b/docs/EarningRuleBaseLoyaltyCustomer.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**metadata** | [**EarningRuleBaseLoyaltyCustomerMetadata**](EarningRuleBaseLoyaltyCustomerMetadata.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**metadata** | [**EarningRuleBaseLoyaltyCustomerMetadata**](EarningRuleBaseLoyaltyCustomerMetadata.md) | | diff --git a/docs/EarningRuleBaseLoyaltyCustomerMetadata.md b/docs/EarningRuleBaseLoyaltyCustomerMetadata.md index 8c715972..c5a312d1 100644 --- a/docs/EarningRuleBaseLoyaltyCustomerMetadata.md +++ b/docs/EarningRuleBaseLoyaltyCustomerMetadata.md @@ -6,11 +6,11 @@ Defines the ratio based on the property defined in the calculation_type paramete ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**every** | **Integer** | For how many increments of the customer metadata property to grant points for. | | -|**points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | | -|**property** | **String** | Customer metadata property. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**every** | **Integer** | For how many increments of the customer metadata property to grant points for. | +|**points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | +|**property** | **String** | Customer metadata property. | diff --git a/docs/EarningRuleBaseLoyaltyOrder.md b/docs/EarningRuleBaseLoyaltyOrder.md index 1a4b0688..4d5327ad 100644 --- a/docs/EarningRuleBaseLoyaltyOrder.md +++ b/docs/EarningRuleBaseLoyaltyOrder.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | [**EarningRuleBaseLoyaltyOrderAmount**](EarningRuleBaseLoyaltyOrderAmount.md) | | [optional] | -|**totalAmount** | [**EarningRuleBaseLoyaltyOrderAmount**](EarningRuleBaseLoyaltyOrderAmount.md) | | [optional] | -|**metadata** | [**EarningRuleBaseLoyaltyOrderMetadata**](EarningRuleBaseLoyaltyOrderMetadata.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**amount** | [**EarningRuleBaseLoyaltyOrderAmount**](EarningRuleBaseLoyaltyOrderAmount.md) | | +|**totalAmount** | [**EarningRuleBaseLoyaltyOrderAmount**](EarningRuleBaseLoyaltyOrderAmount.md) | | +|**metadata** | [**EarningRuleBaseLoyaltyOrderMetadata**](EarningRuleBaseLoyaltyOrderMetadata.md) | | diff --git a/docs/EarningRuleBaseLoyaltyOrderAmount.md b/docs/EarningRuleBaseLoyaltyOrderAmount.md index 03dcf2e4..cffc5778 100644 --- a/docs/EarningRuleBaseLoyaltyOrderAmount.md +++ b/docs/EarningRuleBaseLoyaltyOrderAmount.md @@ -6,10 +6,10 @@ Defines the ratio based on the property defined in the calculation_type paramete ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**every** | **Integer** | Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000. | | -|**points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**every** | **Integer** | Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000. | +|**points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | diff --git a/docs/EarningRuleBaseLoyaltyOrderItems.md b/docs/EarningRuleBaseLoyaltyOrderItems.md index 863978ea..9779c0e6 100644 --- a/docs/EarningRuleBaseLoyaltyOrderItems.md +++ b/docs/EarningRuleBaseLoyaltyOrderItems.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**quantity** | [**EarningRuleBaseLoyaltyOrderItemsQuantity**](EarningRuleBaseLoyaltyOrderItemsQuantity.md) | | [optional] | -|**amount** | [**EarningRuleBaseLoyaltyOrderItemsQuantity**](EarningRuleBaseLoyaltyOrderItemsQuantity.md) | | [optional] | -|**subtotalAmount** | [**EarningRuleBaseLoyaltyOrderItemsQuantity**](EarningRuleBaseLoyaltyOrderItemsQuantity.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**quantity** | [**EarningRuleBaseLoyaltyOrderItemsQuantity**](EarningRuleBaseLoyaltyOrderItemsQuantity.md) | | +|**amount** | [**EarningRuleBaseLoyaltyOrderItemsQuantity**](EarningRuleBaseLoyaltyOrderItemsQuantity.md) | | +|**subtotalAmount** | [**EarningRuleBaseLoyaltyOrderItemsQuantity**](EarningRuleBaseLoyaltyOrderItemsQuantity.md) | | diff --git a/docs/EarningRuleBaseLoyaltyOrderItemsQuantity.md b/docs/EarningRuleBaseLoyaltyOrderItemsQuantity.md index a9b358cb..b4e7cc52 100644 --- a/docs/EarningRuleBaseLoyaltyOrderItemsQuantity.md +++ b/docs/EarningRuleBaseLoyaltyOrderItemsQuantity.md @@ -6,12 +6,12 @@ Defines the ratio based on the property defined in the calculation_type paramete ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**every** | **Integer** | Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000. | | -|**points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | Type of object taken under consideration. | | -|**id** | **String** | Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**every** | **Integer** | Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000. | +|**points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | Type of object taken under consideration. | +|**id** | **String** | Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619. | @@ -22,7 +22,6 @@ Defines the ratio based on the property defined in the calculation_type paramete | PRODUCTS_COLLECTION | "products_collection" | | PRODUCT | "product" | | SKU | "sku" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/EarningRuleBaseLoyaltyOrderMetadata.md b/docs/EarningRuleBaseLoyaltyOrderMetadata.md index f10c4f51..cc637324 100644 --- a/docs/EarningRuleBaseLoyaltyOrderMetadata.md +++ b/docs/EarningRuleBaseLoyaltyOrderMetadata.md @@ -6,11 +6,11 @@ Defines the ratio based on the property defined in the calculation_type paramete ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**every** | **Integer** | For how many increments of the order metadata property to grant points for. | | -|**points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | | -|**property** | **String** | Order metadata property. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**every** | **Integer** | For how many increments of the order metadata property to grant points for. | +|**points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | +|**property** | **String** | Order metadata property. | diff --git a/docs/EarningRuleBaseSegment.md b/docs/EarningRuleBaseSegment.md index c15c1272..66f66314 100644 --- a/docs/EarningRuleBaseSegment.md +++ b/docs/EarningRuleBaseSegment.md @@ -6,9 +6,9 @@ Contains the ID of a customer segment. Required for the customer.segment.entered ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Contains a unique identifier of a customer segment. Assigned by the Voucherify API. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Contains a unique identifier of a customer segment. Assigned by the Voucherify API. | diff --git a/docs/EarningRuleBaseSource.md b/docs/EarningRuleBaseSource.md index 937075a8..ec81b338 100644 --- a/docs/EarningRuleBaseSource.md +++ b/docs/EarningRuleBaseSource.md @@ -6,11 +6,11 @@ Contains the custom earning rule name and parent campaign. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**banner** | **String** | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. | [optional] | -|**objectId** | **String** | A unique campaign identifier assigned by the Voucherify API. | | -|**objectType** | [**ObjectTypeEnum**](#ObjectTypeEnum) | Defines the object associated with the earning rule. Defaults to `campaign`. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**banner** | **String** | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. | +|**objectId** | **String** | A unique campaign identifier assigned by the Voucherify API. | +|**objectType** | [**ObjectTypeEnum**](#ObjectTypeEnum) | Defines the object associated with the earning rule. Defaults to `campaign`. | @@ -19,7 +19,6 @@ Contains the custom earning rule name and parent campaign. | Name | Value | |---- | -----| | CAMPAIGN | "campaign" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/EarningRuleBaseValidityTimeframe.md b/docs/EarningRuleBaseValidityTimeframe.md index 79203623..dc410bf7 100644 --- a/docs/EarningRuleBaseValidityTimeframe.md +++ b/docs/EarningRuleBaseValidityTimeframe.md @@ -6,10 +6,10 @@ Set recurrent time periods when the earning rule is valid. For example, valid fo ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**duration** | **String** | Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration of PT1H will be valid for a duration of one hour. | | -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval of P2D will be valid every other day. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**duration** | **String** | Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration of PT1H will be valid for a duration of one hour. | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval of P2D will be valid every other day. | diff --git a/docs/EarningRuleEvent.md b/docs/EarningRuleEvent.md index 84142be8..98995e88 100644 --- a/docs/EarningRuleEvent.md +++ b/docs/EarningRuleEvent.md @@ -21,7 +21,5 @@ * `CUSTOMER_LOYALTY_TIER_LEFT` (value: `"customer.loyalty.tier.left"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/Error.md b/docs/Error.md index c10e09ed..23425cb8 100644 --- a/docs/Error.md +++ b/docs/Error.md @@ -6,15 +6,15 @@ Error details ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **Integer** | Error's HTTP status code. | | -|**key** | **String** | Short string describing the kind of error which occurred. | [optional] | -|**message** | **String** | A human-readable message providing a short description about the error. | | -|**details** | **String** | A human-readable message providing more details about the error. | | -|**requestId** | **String** | This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team. | [optional] | -|**resourceId** | **String** | Unique resource ID that can be used in another endpoint to get more details. | [optional] | -|**resourceType** | **String** | The resource type. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**code** | **Integer** | Error's HTTP status code. | +|**key** | **String** | Short string describing the kind of error which occurred. | +|**message** | **String** | A human-readable message providing a short description about the error. | +|**details** | **String** | A human-readable message providing more details about the error. | +|**requestId** | **String** | This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team. | +|**resourceId** | **String** | Unique resource ID that can be used in another endpoint to get more details. | +|**resourceType** | **String** | The resource type. | diff --git a/docs/EventsApi.md b/docs/EventsApi.md index 0d5bb68f..616ce105 100644 --- a/docs/EventsApi.md +++ b/docs/EventsApi.md @@ -60,9 +60,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **eventsCreateRequestBody** | [**EventsCreateRequestBody**](EventsCreateRequestBody.md)| Specify the details of the custom event. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **eventsCreateRequestBody** | [**EventsCreateRequestBody**](EventsCreateRequestBody.md)| Specify the details of the custom event. | ### Return type diff --git a/docs/EventsCreateRequestBody.md b/docs/EventsCreateRequestBody.md index 82d59f6f..dd496b1d 100644 --- a/docs/EventsCreateRequestBody.md +++ b/docs/EventsCreateRequestBody.md @@ -6,13 +6,13 @@ Request body schema for **POST** `/events`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**event** | **String** | Event name. This is the same name that you used to define a custom event in the **Dashboard** > **Project Settings** > **Event Schema**. | | -|**customer** | [**Customer**](Customer.md) | | | -|**referral** | [**ClientEventsCreateRequestBodyReferral**](ClientEventsCreateRequestBodyReferral.md) | | [optional] | -|**loyalty** | [**ClientEventsCreateRequestBodyLoyalty**](ClientEventsCreateRequestBodyLoyalty.md) | | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the event. A set of key/value pairs that you can attach to an event object. It can be useful for storing additional information about the event in a structured format. Event metadata schema is defined in the **Dashboard** > **Project Settings** > **Event Schema** > **Edit particular event** > **Metadata property definition**. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**event** | **String** | Event name. This is the same name that you used to define a custom event in the **Dashboard** > **Project Settings** > **Event Schema**. | +|**customer** | [**Customer**](Customer.md) | | +|**referral** | [**ClientEventsCreateRequestBodyReferral**](ClientEventsCreateRequestBodyReferral.md) | | +|**loyalty** | [**ClientEventsCreateRequestBodyLoyalty**](ClientEventsCreateRequestBodyLoyalty.md) | | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the event. A set of key/value pairs that you can attach to an event object. It can be useful for storing additional information about the event in a structured format. Event metadata schema is defined in the **Dashboard** > **Project Settings** > **Event Schema** > **Edit particular event** > **Metadata property definition**. | diff --git a/docs/EventsCreateResponseBody.md b/docs/EventsCreateResponseBody.md index d9da13dd..55521d3e 100644 --- a/docs/EventsCreateResponseBody.md +++ b/docs/EventsCreateResponseBody.md @@ -6,13 +6,13 @@ Response body schema for **POST** `/events`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The object represented is an `event`. | | -|**type** | **String** | The event name. | | -|**customer** | [**SimpleCustomerRequiredObjectType**](SimpleCustomerRequiredObjectType.md) | | | -|**referral** | **Object** | A `null` referral object. | | -|**loyalty** | **Object** | A `null` loyalty object. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The object represented is an `event`. | +|**type** | **String** | The event name. | +|**customer** | [**SimpleCustomerRequiredObjectType**](SimpleCustomerRequiredObjectType.md) | | +|**referral** | **Object** | A `null` referral object. | +|**loyalty** | **Object** | A `null` loyalty object. | @@ -21,7 +21,6 @@ Response body schema for **POST** `/events`. | Name | Value | |---- | -----| | EVENT | "event" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/Export.md b/docs/Export.md index 9ba93826..ccd74557 100644 --- a/docs/Export.md +++ b/docs/Export.md @@ -5,17 +5,17 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique export ID. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the export. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [optional] | -|**channel** | **String** | The channel through which the export was triggered. | [optional] | -|**result** | [**ExportResult**](ExportResult.md) | | [optional] | -|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | [optional] | -|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | | [optional] | -|**parameters** | [**ExportParameters**](ExportParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique export ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the export. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | +|**channel** | **String** | The channel through which the export was triggered. | +|**result** | [**ExportResult**](ExportResult.md) | | +|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | +|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | | +|**parameters** | [**ExportParameters**](ExportParameters.md) | | @@ -24,7 +24,6 @@ | Name | Value | |---- | -----| | EXPORT | "export" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -36,7 +35,6 @@ | IN_PROGRESS | "IN_PROGRESS" | | DONE | "DONE" | | ERROR | "ERROR" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -51,7 +49,6 @@ | ORDER | "order" | | POINTS_EXPIRATION | "points_expiration" | | VOUCHER_TRANSACTIONS | "voucher_transactions" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ExportOrderBase.md b/docs/ExportOrderBase.md index 6fa7b32c..9ef0dd95 100644 --- a/docs/ExportOrderBase.md +++ b/docs/ExportOrderBase.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | The type of object to be exported. | | -|**parameters** | [**OrdersExportCreateRequestBodyParameters**](OrdersExportCreateRequestBodyParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | The type of object to be exported. | +|**parameters** | [**OrdersExportCreateRequestBodyParameters**](OrdersExportCreateRequestBodyParameters.md) | | @@ -17,7 +17,6 @@ | Name | Value | |---- | -----| | ORDER | "order" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ExportOrderFields.md b/docs/ExportOrderFields.md index 64ccaef5..11682db9 100644 --- a/docs/ExportOrderFields.md +++ b/docs/ExportOrderFields.md @@ -31,7 +31,5 @@ * `METADATA` (value: `"metadata"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ExportOrderOrder.md b/docs/ExportOrderOrder.md index 7f1feed8..edf7a886 100644 --- a/docs/ExportOrderOrder.md +++ b/docs/ExportOrderOrder.md @@ -17,7 +17,5 @@ * `STATUS` (value: `"status"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ExportParameters.md b/docs/ExportParameters.md index 0c496f36..a12eb16a 100644 --- a/docs/ExportParameters.md +++ b/docs/ExportParameters.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**order** | [**OrderEnum**](#OrderEnum) | | [optional] | -|**fields** | [**List<FieldsEnum>**](#List<FieldsEnum>) | Array of strings containing the data in the export. These fields define the headers in the CSV file. | [optional] | -|**filters** | [**ExportParametersFilters**](ExportParametersFilters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**order** | [**OrderEnum**](#OrderEnum) | | +|**fields** | [**List<FieldsEnum>**](#List<FieldsEnum>) | Array of strings containing the data in the export. These fields define the headers in the CSV file. | +|**filters** | [**ExportParametersFilters**](ExportParametersFilters.md) | | @@ -31,7 +31,6 @@ | TRACKING_ID | "tracking_id" | | _CUSTOMER_ID | "-customer_id" | | CUSTOMER_ID | "customer_id" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -128,7 +127,6 @@ | BALANCE | "balance" | | RELATED_TRANSACTION_ID | "related_transaction_id" | | DETAILS | "details" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ExportParametersFilters.md b/docs/ExportParametersFilters.md index 07e312e9..1baaf5e2 100644 --- a/docs/ExportParametersFilters.md +++ b/docs/ExportParametersFilters.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**junction** | **Junction** | | [optional] | -|**campaignId** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**voucherId** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**createdAt** | [**FieldConditions**](FieldConditions.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**junction** | **Junction** | | +|**campaignId** | [**FieldConditions**](FieldConditions.md) | | +|**voucherId** | [**FieldConditions**](FieldConditions.md) | | +|**createdAt** | [**FieldConditions**](FieldConditions.md) | | diff --git a/docs/ExportResult.md b/docs/ExportResult.md index ce60adf8..42116075 100644 --- a/docs/ExportResult.md +++ b/docs/ExportResult.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**url** | **String** | URL of the CSV file location. It contains the token used for authorization in the Download export method. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**url** | **String** | URL of the CSV file location. It contains the token used for authorization in the Download export method. | diff --git a/docs/ExportScheduledBase.md b/docs/ExportScheduledBase.md index bf4269b1..0cb7a701 100644 --- a/docs/ExportScheduledBase.md +++ b/docs/ExportScheduledBase.md @@ -5,15 +5,15 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique export ID. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the export. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | | -|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | | -|**channel** | **String** | The channel through which the export was triggered. | [optional] | -|**result** | **Object** | Contains the URL of the CSV file. | | -|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique export ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the export. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | +|**channel** | **String** | The channel through which the export was triggered. | +|**result** | **Object** | Contains the URL of the CSV file. | +|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | @@ -22,7 +22,6 @@ | Name | Value | |---- | -----| | EXPORT | "export" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -31,7 +30,6 @@ | Name | Value | |---- | -----| | SCHEDULED | "SCHEDULED" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ExportVoucherTransactionsBase.md b/docs/ExportVoucherTransactionsBase.md index e88a2274..284ca8f0 100644 --- a/docs/ExportVoucherTransactionsBase.md +++ b/docs/ExportVoucherTransactionsBase.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | The type of object to be exported. | | -|**parameters** | [**LoyaltiesMembersTransactionsExportCreateRequestBodyParameters**](LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | The type of object to be exported. | +|**parameters** | [**LoyaltiesMembersTransactionsExportCreateRequestBodyParameters**](LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md) | | @@ -17,7 +17,6 @@ | Name | Value | |---- | -----| | VOUCHER_TRANSACTIONS | "voucher_transactions" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ExportVoucherTransactionsFields.md b/docs/ExportVoucherTransactionsFields.md index f094c2c3..90c472b1 100644 --- a/docs/ExportVoucherTransactionsFields.md +++ b/docs/ExportVoucherTransactionsFields.md @@ -29,7 +29,5 @@ * `DETAILS` (value: `"details"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ExportVoucherTransactionsFilters.md b/docs/ExportVoucherTransactionsFilters.md index 757ba0ad..df5a5486 100644 --- a/docs/ExportVoucherTransactionsFilters.md +++ b/docs/ExportVoucherTransactionsFilters.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**junction** | **Junction** | | [optional] | -|**createdAt** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**voucherId** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**campaignId** | [**FieldConditions**](FieldConditions.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**junction** | **Junction** | | +|**createdAt** | [**FieldConditions**](FieldConditions.md) | | +|**voucherId** | [**FieldConditions**](FieldConditions.md) | | +|**campaignId** | [**FieldConditions**](FieldConditions.md) | | diff --git a/docs/ExportVoucherTransactionsOrder.md b/docs/ExportVoucherTransactionsOrder.md index 8f4561f6..f34bb411 100644 --- a/docs/ExportVoucherTransactionsOrder.md +++ b/docs/ExportVoucherTransactionsOrder.md @@ -9,7 +9,5 @@ * `CREATED_AT` (value: `"created_at"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ExportVoucherTransactionsScheduled.md b/docs/ExportVoucherTransactionsScheduled.md index 05256a70..f23aa149 100644 --- a/docs/ExportVoucherTransactionsScheduled.md +++ b/docs/ExportVoucherTransactionsScheduled.md @@ -5,17 +5,17 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique export ID. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the export. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | | -|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | | -|**channel** | **String** | The channel through which the export was triggered. | [optional] | -|**result** | **Object** | Contains the URL of the CSV file. | | -|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | | -|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | The type of object to be exported. | | -|**parameters** | [**LoyaltiesMembersTransactionsExportCreateRequestBodyParameters**](LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique export ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the export. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | +|**channel** | **String** | The channel through which the export was triggered. | +|**result** | **Object** | Contains the URL of the CSV file. | +|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | +|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | The type of object to be exported. | +|**parameters** | [**LoyaltiesMembersTransactionsExportCreateRequestBodyParameters**](LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md) | | @@ -24,7 +24,6 @@ | Name | Value | |---- | -----| | EXPORT | "export" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ | Name | Value | |---- | -----| | SCHEDULED | "SCHEDULED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -42,7 +40,6 @@ | Name | Value | |---- | -----| | VOUCHER_TRANSACTIONS | "voucher_transactions" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ExportsApi.md b/docs/ExportsApi.md index 88e3fb1b..abc1e742 100644 --- a/docs/ExportsApi.md +++ b/docs/ExportsApi.md @@ -64,9 +64,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **exportsCreateRequestBody** | [**ExportsCreateRequestBody**](ExportsCreateRequestBody.md)| Specify the details of the export that you would like to create. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **exportsCreateRequestBody** | [**ExportsCreateRequestBody**](ExportsCreateRequestBody.md)| Specify the details of the export that you would like to create. | ### Return type @@ -138,9 +138,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **exportId** | **String**| Unique export object ID of previously created export. This object can be a: `voucher`, `redemption`, `publication`, `customer`, `order`, `points_expiration`, or `voucher_transactions`. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **exportId** | **String**| Unique export object ID of previously created export. This object can be a: `voucher`, `redemption`, `publication`, `customer`, `order`, `points_expiration`, or `voucher_transactions`. | ### Return type @@ -201,10 +201,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **exportId** | **String**| Unique export object ID. | | -| **token** | **String**| Token that was issued to the export, to get this token, get the export first | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **exportId** | **String**| Unique export object ID. | +| **token** | **String**| Token that was issued to the export, to get this token, get the export first | ### Return type @@ -277,9 +277,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **exportId** | **String**| Unique export object ID of previously created export. This object can be a: `voucher`, `redemption`, `publication`, `customer`, `order`, `points_expiration`, or `voucher_transactions`. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **exportId** | **String**| Unique export object ID of previously created export. This object can be a: `voucher`, `redemption`, `publication`, `customer`, `order`, `points_expiration`, or `voucher_transactions`. | ### Return type @@ -354,11 +354,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | -| **order** | [**ParameterOrderListExports**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] [enum: created_at, -created_at, status, -status] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | +| **order** | [**ParameterOrderListExports**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | ### Return type diff --git a/docs/ExportsCreateRequestBody.md b/docs/ExportsCreateRequestBody.md index 438f3d78..bd7d779c 100644 --- a/docs/ExportsCreateRequestBody.md +++ b/docs/ExportsCreateRequestBody.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | | | -|**parameters** | [**ExportsCreateRequestBodyParameters**](ExportsCreateRequestBodyParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | | +|**parameters** | [**ExportsCreateRequestBodyParameters**](ExportsCreateRequestBodyParameters.md) | | @@ -23,7 +23,6 @@ | ORDER | "order" | | POINTS_EXPIRATION | "points_expiration" | | VOUCHER_TRANSACTIONS | "voucher_transactions" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ExportsCreateRequestBodyParameters.md b/docs/ExportsCreateRequestBodyParameters.md index 5752a5bb..c2d2a70f 100644 --- a/docs/ExportsCreateRequestBodyParameters.md +++ b/docs/ExportsCreateRequestBodyParameters.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**order** | [**OrderEnum**](#OrderEnum) | | [optional] | -|**fields** | [**List<FieldsEnum>**](#List<FieldsEnum>) | Array of strings containing the data in the export. These fields define the headers in the CSV file. | [optional] | -|**filters** | [**ExportsCreateRequestBodyParametersFilters**](ExportsCreateRequestBodyParametersFilters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**order** | [**OrderEnum**](#OrderEnum) | | +|**fields** | [**List<FieldsEnum>**](#List<FieldsEnum>) | Array of strings containing the data in the export. These fields define the headers in the CSV file. | +|**filters** | [**ExportsCreateRequestBodyParametersFilters**](ExportsCreateRequestBodyParametersFilters.md) | | @@ -31,7 +31,6 @@ | TRACKING_ID | "tracking_id" | | _CUSTOMER_ID | "-customer_id" | | CUSTOMER_ID | "customer_id" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -128,7 +127,6 @@ | BALANCE | "balance" | | RELATED_TRANSACTION_ID | "related_transaction_id" | | DETAILS | "details" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ExportsCreateRequestBodyParametersFilters.md b/docs/ExportsCreateRequestBodyParametersFilters.md index 08e1e581..c6f93072 100644 --- a/docs/ExportsCreateRequestBodyParametersFilters.md +++ b/docs/ExportsCreateRequestBodyParametersFilters.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**junction** | **Junction** | | [optional] | -|**campaignId** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**voucherId** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**createdAt** | [**FieldConditions**](FieldConditions.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**junction** | **Junction** | | +|**campaignId** | [**FieldConditions**](FieldConditions.md) | | +|**voucherId** | [**FieldConditions**](FieldConditions.md) | | +|**createdAt** | [**FieldConditions**](FieldConditions.md) | | diff --git a/docs/ExportsCreateResponseBody.md b/docs/ExportsCreateResponseBody.md index bf6dd346..075728d5 100644 --- a/docs/ExportsCreateResponseBody.md +++ b/docs/ExportsCreateResponseBody.md @@ -5,17 +5,17 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique export ID. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the export. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [optional] | -|**channel** | **String** | The channel through which the export was triggered. | [optional] | -|**result** | **Object** | Contains the URL of the CSV file. | [optional] | -|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | [optional] | -|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | | [optional] | -|**parameters** | [**ExportsCreateResponseBodyParameters**](ExportsCreateResponseBodyParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique export ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the export. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | +|**channel** | **String** | The channel through which the export was triggered. | +|**result** | **Object** | Contains the URL of the CSV file. | +|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | +|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | | +|**parameters** | [**ExportsCreateResponseBodyParameters**](ExportsCreateResponseBodyParameters.md) | | @@ -24,7 +24,6 @@ | Name | Value | |---- | -----| | EXPORT | "export" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ | Name | Value | |---- | -----| | SCHEDULED | "SCHEDULED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -48,7 +46,6 @@ | ORDER | "order" | | POINTS_EXPIRATION | "points_expiration" | | VOUCHER_TRANSACTIONS | "voucher_transactions" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ExportsCreateResponseBodyParameters.md b/docs/ExportsCreateResponseBodyParameters.md index c3d67278..c5c18115 100644 --- a/docs/ExportsCreateResponseBodyParameters.md +++ b/docs/ExportsCreateResponseBodyParameters.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**order** | [**OrderEnum**](#OrderEnum) | | [optional] | -|**fields** | [**List<FieldsEnum>**](#List<FieldsEnum>) | Array of strings containing the data in the export. These fields define the headers in the CSV file. | [optional] | -|**filters** | [**ExportsCreateResponseBodyParametersFilters**](ExportsCreateResponseBodyParametersFilters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**order** | [**OrderEnum**](#OrderEnum) | | +|**fields** | [**List<FieldsEnum>**](#List<FieldsEnum>) | Array of strings containing the data in the export. These fields define the headers in the CSV file. | +|**filters** | [**ExportsCreateResponseBodyParametersFilters**](ExportsCreateResponseBodyParametersFilters.md) | | @@ -31,7 +31,6 @@ | TRACKING_ID | "tracking_id" | | _CUSTOMER_ID | "-customer_id" | | CUSTOMER_ID | "customer_id" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -128,7 +127,6 @@ | BALANCE | "balance" | | RELATED_TRANSACTION_ID | "related_transaction_id" | | DETAILS | "details" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ExportsCreateResponseBodyParametersFilters.md b/docs/ExportsCreateResponseBodyParametersFilters.md index 9a1853ff..b2c00869 100644 --- a/docs/ExportsCreateResponseBodyParametersFilters.md +++ b/docs/ExportsCreateResponseBodyParametersFilters.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**junction** | **Junction** | | [optional] | -|**campaignId** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**voucherId** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**createdAt** | [**FieldConditions**](FieldConditions.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**junction** | **Junction** | | +|**campaignId** | [**FieldConditions**](FieldConditions.md) | | +|**voucherId** | [**FieldConditions**](FieldConditions.md) | | +|**createdAt** | [**FieldConditions**](FieldConditions.md) | | diff --git a/docs/ExportsGetResponseBody.md b/docs/ExportsGetResponseBody.md index 15db1792..63f32988 100644 --- a/docs/ExportsGetResponseBody.md +++ b/docs/ExportsGetResponseBody.md @@ -6,17 +6,17 @@ Response body schema for **GET** `/exports/{exportId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique export ID. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the export. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [optional] | -|**channel** | **String** | The channel through which the export was triggered. | [optional] | -|**result** | [**ExportResult**](ExportResult.md) | | [optional] | -|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | [optional] | -|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | | [optional] | -|**parameters** | [**ExportParameters**](ExportParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique export ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the export. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | +|**channel** | **String** | The channel through which the export was triggered. | +|**result** | [**ExportResult**](ExportResult.md) | | +|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | +|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | | +|**parameters** | [**ExportParameters**](ExportParameters.md) | | @@ -25,7 +25,6 @@ Response body schema for **GET** `/exports/{exportId}`. | Name | Value | |---- | -----| | EXPORT | "export" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -37,7 +36,6 @@ Response body schema for **GET** `/exports/{exportId}`. | IN_PROGRESS | "IN_PROGRESS" | | DONE | "DONE" | | ERROR | "ERROR" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -52,7 +50,6 @@ Response body schema for **GET** `/exports/{exportId}`. | ORDER | "order" | | POINTS_EXPIRATION | "points_expiration" | | VOUCHER_TRANSACTIONS | "voucher_transactions" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ExportsListResponseBody.md b/docs/ExportsListResponseBody.md index 7461da6e..ffa885e7 100644 --- a/docs/ExportsListResponseBody.md +++ b/docs/ExportsListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/exports`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about exports. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of exports. | | -|**exports** | [**List<Export>**](Export.md) | An array of export objects. | | -|**total** | **Integer** | Total number of exports. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about exports. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of exports. | +|**exports** | [**List<Export>**](Export.md) | An array of export objects. | +|**total** | **Integer** | Total number of exports. | @@ -20,7 +20,6 @@ Response body schema for **GET** `/exports`. | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -29,7 +28,6 @@ Response body schema for **GET** `/exports`. | Name | Value | |---- | -----| | EXPORTS | "exports" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/FieldConditions.md b/docs/FieldConditions.md index 9d1f93ec..47dc4d79 100644 --- a/docs/FieldConditions.md +++ b/docs/FieldConditions.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**FiltersCondition**](FiltersCondition.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**FiltersCondition**](FiltersCondition.md) | | diff --git a/docs/FilterConditionsString.md b/docs/FilterConditionsString.md index b6b72928..b459e7d2 100644 --- a/docs/FilterConditionsString.md +++ b/docs/FilterConditionsString.md @@ -6,16 +6,16 @@ Data filters used to narrow the data records to be returned in the result. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**$in** | **List<String>** | Array of resource values that should be included in the results (multiple values). | [optional] | -|**$notIn** | **List<String>** | Array of resource values that should be included in the results (multiple values). | [optional] | -|**$is** | **String** | Value is exactly this value (single value). | [optional] | -|**$isNot** | **String** | Results omit this value (single value). | [optional] | -|**$hasValue** | **String** | Value is NOT null. The value for this parameter is an empty string. | [optional] | -|**$isUnknown** | **String** | Value is null. The value for this parameter is an empty string. | [optional] | -|**$startsWith** | **String** | Value starts with the specified string. | [optional] | -|**$endsWith** | **String** | Value ends with the specified string. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**$in** | **List<String>** | Array of resource values that should be included in the results (multiple values). | +|**$notIn** | **List<String>** | Array of resource values that should be included in the results (multiple values). | +|**$is** | **String** | Value is exactly this value (single value). | +|**$isNot** | **String** | Results omit this value (single value). | +|**$hasValue** | **String** | Value is NOT null. The value for this parameter is an empty string. | +|**$isUnknown** | **String** | Value is null. The value for this parameter is an empty string. | +|**$startsWith** | **String** | Value starts with the specified string. | +|**$endsWith** | **String** | Value ends with the specified string. | diff --git a/docs/FiltersCondition.md b/docs/FiltersCondition.md index 5a14582f..a3c2b4be 100644 --- a/docs/FiltersCondition.md +++ b/docs/FiltersCondition.md @@ -5,33 +5,33 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**$in** | **Object** | | [optional] | -|**$notIn** | **Object** | | [optional] | -|**$is** | **Object** | | [optional] | -|**$isDaysAgo** | **Object** | | [optional] | -|**$isDaysInFuture** | **Object** | | [optional] | -|**$isNot** | **Object** | | [optional] | -|**$hasValue** | **Object** | | [optional] | -|**$isUnknown** | **Object** | | [optional] | -|**$contains** | **Object** | | [optional] | -|**$notContain** | **Object** | | [optional] | -|**$startsWith** | **Object** | | [optional] | -|**$endsWith** | **Object** | | [optional] | -|**$moreThan** | **Object** | | [optional] | -|**$lessThan** | **Object** | | [optional] | -|**$moreThanAgo** | **Object** | | [optional] | -|**$lessThanAgo** | **Object** | | [optional] | -|**$moreThanFuture** | **Object** | | [optional] | -|**$lessThanFuture** | **Object** | | [optional] | -|**$moreThanEqual** | **Object** | | [optional] | -|**$lessThanEqual** | **Object** | | [optional] | -|**$after** | **Object** | | [optional] | -|**$before** | **Object** | | [optional] | -|**$count** | **Object** | | [optional] | -|**$countLess** | **Object** | | [optional] | -|**$countMore** | **Object** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**$in** | **Object** | | +|**$notIn** | **Object** | | +|**$is** | **Object** | | +|**$isDaysAgo** | **Object** | | +|**$isDaysInFuture** | **Object** | | +|**$isNot** | **Object** | | +|**$hasValue** | **Object** | | +|**$isUnknown** | **Object** | | +|**$contains** | **Object** | | +|**$notContain** | **Object** | | +|**$startsWith** | **Object** | | +|**$endsWith** | **Object** | | +|**$moreThan** | **Object** | | +|**$lessThan** | **Object** | | +|**$moreThanAgo** | **Object** | | +|**$lessThanAgo** | **Object** | | +|**$moreThanFuture** | **Object** | | +|**$lessThanFuture** | **Object** | | +|**$moreThanEqual** | **Object** | | +|**$lessThanEqual** | **Object** | | +|**$after** | **Object** | | +|**$before** | **Object** | | +|**$count** | **Object** | | +|**$countLess** | **Object** | | +|**$countMore** | **Object** | | diff --git a/docs/Gift.md b/docs/Gift.md index 33e6e49f..2d82b117 100644 --- a/docs/Gift.md +++ b/docs/Gift.md @@ -6,11 +6,11 @@ Contains current gift card balance information. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **BigDecimal** | Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | | -|**balance** | **BigDecimal** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | | -|**effect** | [**EffectEnum**](#EffectEnum) | Defines how the credits are applied to the customer's order. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**amount** | **BigDecimal** | Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | +|**balance** | **BigDecimal** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | +|**effect** | [**EffectEnum**](#EffectEnum) | Defines how the credits are applied to the customer's order. | @@ -20,7 +20,6 @@ Contains current gift card balance information. |---- | -----| | ORDER | "APPLY_TO_ORDER" | | ITEMS | "APPLY_TO_ITEMS" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/InapplicableTo.md b/docs/InapplicableTo.md index 623e45bc..f89cc411 100644 --- a/docs/InapplicableTo.md +++ b/docs/InapplicableTo.md @@ -5,22 +5,22 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | This object stores information about the product collection. | | -|**id** | **String** | Unique product collection ID assigned by Voucherify. | | -|**sourceId** | **String** | The source ID from your inventory system. | [optional] | -|**productId** | **String** | Parent product's unique ID assigned by Voucherify. | [optional] | -|**productSourceId** | **String** | Parent product's source ID from your inventory system. | [optional] | -|**strict** | **Boolean** | | | -|**price** | **BigDecimal** | New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price. | [optional] | -|**priceFormula** | **BigDecimal** | Formula used to calculate the discounted price of an item. | [optional] | -|**effect** | **ApplicableToEffect** | | | -|**quantityLimit** | **Integer** | The maximum number of units allowed to be discounted per order line item. | [optional] | -|**aggregatedQuantityLimit** | **Integer** | The maximum number of units allowed to be discounted combined across all matched order line items. | [optional] | -|**amountLimit** | **Integer** | Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600. | [optional] | -|**aggregatedAmountLimit** | **Integer** | Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects: - `APPLY_TO_ITEMS` (each item subtotal is discounted equally) - `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value) | [optional] | -|**orderItemIndices** | **List<Integer>** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | This object stores information about the product collection. | +|**id** | **String** | Unique product collection ID assigned by Voucherify. | +|**sourceId** | **String** | The source ID from your inventory system. | +|**productId** | **String** | Parent product's unique ID assigned by Voucherify. | +|**productSourceId** | **String** | Parent product's source ID from your inventory system. | +|**strict** | **Boolean** | | +|**price** | **BigDecimal** | New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price. | +|**priceFormula** | **BigDecimal** | Formula used to calculate the discounted price of an item. | +|**effect** | **ApplicableToEffect** | | +|**quantityLimit** | **Integer** | The maximum number of units allowed to be discounted per order line item. | +|**aggregatedQuantityLimit** | **Integer** | The maximum number of units allowed to be discounted combined across all matched order line items. | +|**amountLimit** | **Integer** | Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600. | +|**aggregatedAmountLimit** | **Integer** | Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects: - `APPLY_TO_ITEMS` (each item subtotal is discounted equally) - `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value) | +|**orderItemIndices** | **List<Integer>** | | @@ -31,7 +31,6 @@ | PRODUCT | "product" | | SKU | "sku" | | PRODUCTS_COLLECTION | "products_collection" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/InapplicableToResultList.md b/docs/InapplicableToResultList.md index 7ddcc803..893b5c1d 100644 --- a/docs/InapplicableToResultList.md +++ b/docs/InapplicableToResultList.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**data** | [**List<InapplicableTo>**](InapplicableTo.md) | Contains array of items to which the discount cannot apply. | | -|**total** | **Integer** | Total number of objects defining included products, SKUs, or product collections. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | The type of the object represented by JSON. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**data** | [**List<InapplicableTo>**](InapplicableTo.md) | Contains array of items to which the discount cannot apply. | +|**total** | **Integer** | Total number of objects defining included products, SKUs, or product collections. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | The type of the object represented by JSON. | @@ -19,7 +19,6 @@ | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -28,7 +27,6 @@ | Name | Value | |---- | -----| | DATA | "data" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/Junction.md b/docs/Junction.md index 3b474eb8..b64f1338 100644 --- a/docs/Junction.md +++ b/docs/Junction.md @@ -9,7 +9,5 @@ * `OR` (value: `"or"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ListPublicationsItemVoucher.md b/docs/ListPublicationsItemVoucher.md index 4b1a8316..9e2824e8 100644 --- a/docs/ListPublicationsItemVoucher.md +++ b/docs/ListPublicationsItemVoucher.md @@ -5,15 +5,15 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **String** | Voucher code. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**campaign** | **String** | Campaign name | | -|**gift** | [**Gift**](Gift.md) | | [optional] | -|**loyaltyCard** | **Object** | Defines the loyalty card details. | [optional] | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**code** | **String** | Voucher code. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**campaign** | **String** | Campaign name | +|**gift** | [**Gift**](Gift.md) | | +|**loyaltyCard** | **Object** | Defines the loyalty card details. | +|**discount** | [**Discount**](Discount.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | @@ -22,7 +22,6 @@ | Name | Value | |---- | -----| | VOUCHER | "voucher" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesApi.md b/docs/LoyaltiesApi.md index bd0d9241..2280dd0d 100644 --- a/docs/LoyaltiesApi.md +++ b/docs/LoyaltiesApi.md @@ -85,10 +85,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| Unique loyalty campaign ID or name. | | -| **loyaltiesTiersCreateInBulkRequestBodyItem** | [**List<LoyaltiesTiersCreateInBulkRequestBodyItem>**](LoyaltiesTiersCreateInBulkRequestBodyItem.md)| Provide tier definitions you want to add to existing loyalty campaign. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| Unique loyalty campaign ID or name. | +| **loyaltiesTiersCreateInBulkRequestBodyItem** | [**List<LoyaltiesTiersCreateInBulkRequestBodyItem>**](LoyaltiesTiersCreateInBulkRequestBodyItem.md)| Provide tier definitions you want to add to existing loyalty campaign. | ### Return type @@ -162,10 +162,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. | | -| **force** | **Boolean**| If this flag is set to `true`, the campaign and related vouchers will be removed permanently. If it is set to `false` or not set at all, the loyalty campaign and all related loyalty cards will be moved to the bin. Going forward, the user will be able to create the next campaign with the same name. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. | +| **force** | **Boolean**| If this flag is set to `true`, the campaign and related vouchers will be removed permanently. If it is set to `false` or not set at all, the loyalty campaign and all related loyalty cards will be moved to the bin. Going forward, the user will be able to create the next campaign with the same name. | ### Return type @@ -238,10 +238,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. | | -| **assignmentId** | **String**| A unique reward assignment ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. | +| **assignmentId** | **String**| A unique reward assignment ID. | ### Return type @@ -315,10 +315,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| Unique campaign ID or name. | | -| **earningRuleId** | **String**| Unique earning rule ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| Unique campaign ID or name. | +| **earningRuleId** | **String**| Unique earning rule ID. | ### Return type @@ -392,10 +392,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| Unique campaign ID or name. | | -| **earningRuleId** | **String**| Unique earning rule ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| Unique campaign ID or name. | +| **earningRuleId** | **String**| Unique earning rule ID. | ### Return type @@ -469,10 +469,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **memberId** | **String**| A unique code identifying the loyalty card that you are looking to export transaction data for. | | -| **loyaltiesMembersTransactionsExportCreateRequestBody** | [**LoyaltiesMembersTransactionsExportCreateRequestBody**](LoyaltiesMembersTransactionsExportCreateRequestBody.md)| Specify the parameters and filters for the transaction export. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **memberId** | **String**| A unique code identifying the loyalty card that you are looking to export transaction data for. | +| **loyaltiesMembersTransactionsExportCreateRequestBody** | [**LoyaltiesMembersTransactionsExportCreateRequestBody**](LoyaltiesMembersTransactionsExportCreateRequestBody.md)| Specify the parameters and filters for the transaction export. | ### Return type @@ -547,11 +547,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to export. | | -| **memberId** | **String**| A unique code identifying the loyalty card that you are looking to export transaction data for. | | -| **loyaltiesMembersTransactionsExportCreateRequestBody** | [**LoyaltiesMembersTransactionsExportCreateRequestBody**](LoyaltiesMembersTransactionsExportCreateRequestBody.md)| Specify the parameters and filters for the transaction export. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to export. | +| **memberId** | **String**| A unique code identifying the loyalty card that you are looking to export transaction data for. | +| **loyaltiesMembersTransactionsExportCreateRequestBody** | [**LoyaltiesMembersTransactionsExportCreateRequestBody**](LoyaltiesMembersTransactionsExportCreateRequestBody.md)| Specify the parameters and filters for the transaction export. | ### Return type @@ -625,10 +625,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. | | -| **earningRuleId** | **String**| A unique earning rule ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. | +| **earningRuleId** | **String**| A unique earning rule ID. | ### Return type @@ -702,10 +702,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| Unique loyalty campaign ID or name. | | -| **loyaltyTierId** | **String**| Unique loyalty tier ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| Unique loyalty campaign ID or name. | +| **loyaltyTierId** | **String**| Unique loyalty tier ID. | ### Return type @@ -779,10 +779,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. | | -| **assignmentId** | **String**| Unique reward assignment ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. | +| **assignmentId** | **String**| Unique reward assignment ID. | ### Return type @@ -856,10 +856,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. | | -| **assignmentId** | **String**| A unique reward assignment ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. | +| **assignmentId** | **String**| A unique reward assignment ID. | ### Return type @@ -933,10 +933,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. | | -| **assignmentId** | **String**| Unique reward assignment ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. | +| **assignmentId** | **String**| Unique reward assignment ID. | ### Return type @@ -1011,11 +1011,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **memberId** | **String**| A unique code identifying the loyalty card that you are looking to retrieve transaction data for. | | -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **memberId** | **String**| A unique code identifying the loyalty card that you are looking to retrieve transaction data for. | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | ### Return type @@ -1091,12 +1091,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to return. | | -| **memberId** | **String**| A unique code identifying the loyalty card that you are looking to retrieve transaction data for. | | -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to return. | +| **memberId** | **String**| A unique code identifying the loyalty card that you are looking to retrieve transaction data for. | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | ### Return type @@ -1172,12 +1172,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| Unique campaign ID or name. | | -| **loyaltyTierId** | **String**| Unique loyalty tier ID. | | -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| Unique campaign ID or name. | +| **loyaltyTierId** | **String**| Unique loyalty tier ID. | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | ### Return type @@ -1251,10 +1251,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| Unique campaign ID or name. | | -| **loyaltyTierId** | **String**| Unique loyalty tier ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| Unique campaign ID or name. | +| **loyaltyTierId** | **String**| Unique loyalty tier ID. | ### Return type @@ -1329,11 +1329,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| Unique loyalty campaign ID or name. | | -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **order** | [**ParameterOrderListLoyaltyTiers**](.md)| Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] [enum: created_at, -created_at, updated_at, -updated_at] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| Unique loyalty campaign ID or name. | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **order** | [**ParameterOrderListLoyaltyTiers**](.md)| Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | ### Return type @@ -1406,9 +1406,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **memberId** | **String**| Unique loyalty card assigned to a particular customer. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **memberId** | **String**| Unique loyalty card assigned to a particular customer. | ### Return type @@ -1482,10 +1482,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **memberId** | **String**| Unique loyalty card assigned to a particular customer. | | -| **affordableOnly** | **Boolean**| Limit the results to rewards that the customer can actually afford (only rewards whose price in points is not higher than the loyalty points balance on a loyalty card). Set this flag to `true` to return rewards which the customer can actually afford. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **memberId** | **String**| Unique loyalty card assigned to a particular customer. | +| **affordableOnly** | **Boolean**| Limit the results to rewards that the customer can actually afford (only rewards whose price in points is not higher than the loyalty points balance on a loyalty card). Set this flag to `true` to return rewards which the customer can actually afford. | ### Return type @@ -1561,12 +1561,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. | | -| **memberId** | **String**| Loyalty card code. | | -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. | +| **memberId** | **String**| Loyalty card code. | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | ### Return type @@ -1640,10 +1640,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **memberId** | **String**| Unique loyalty card assigned to a particular customer. | | -| **loyaltiesMembersRedemptionRedeemRequestBody** | [**LoyaltiesMembersRedemptionRedeemRequestBody**](LoyaltiesMembersRedemptionRedeemRequestBody.md)| Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **memberId** | **String**| Unique loyalty card assigned to a particular customer. | +| **loyaltiesMembersRedemptionRedeemRequestBody** | [**LoyaltiesMembersRedemptionRedeemRequestBody**](LoyaltiesMembersRedemptionRedeemRequestBody.md)| Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order. | ### Return type @@ -1718,11 +1718,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| Unique campaign ID. | | -| **memberId** | **String**| A code that identifies the loyalty card. | | -| **loyaltiesMembersRedemptionRedeemRequestBody** | [**LoyaltiesMembersRedemptionRedeemRequestBody**](LoyaltiesMembersRedemptionRedeemRequestBody.md)| Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| Unique campaign ID. | +| **memberId** | **String**| A code that identifies the loyalty card. | +| **loyaltiesMembersRedemptionRedeemRequestBody** | [**LoyaltiesMembersRedemptionRedeemRequestBody**](LoyaltiesMembersRedemptionRedeemRequestBody.md)| Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order. | ### Return type @@ -1797,11 +1797,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| A unique identifier of the loyalty campaign containing the voucher to which the loyalty points will be sent (destination). | | -| **memberId** | **String**| A unique code identifying the loyalty card to which the user wants to transfer loyalty points (destination). | | -| **loyaltiesTransferPoints** | [**List<LoyaltiesTransferPoints>**](LoyaltiesTransferPoints.md)| Provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| A unique identifier of the loyalty campaign containing the voucher to which the loyalty points will be sent (destination). | +| **memberId** | **String**| A unique code identifying the loyalty card to which the user wants to transfer loyalty points (destination). | +| **loyaltiesTransferPoints** | [**List<LoyaltiesTransferPoints>**](LoyaltiesTransferPoints.md)| Provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card. | ### Return type @@ -1875,10 +1875,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **memberId** | **String**| Unique loyalty card assigned to a particular customer. | | -| **loyaltiesMembersBalanceUpdateRequestBody** | [**LoyaltiesMembersBalanceUpdateRequestBody**](LoyaltiesMembersBalanceUpdateRequestBody.md)| Specify the point adjustment along with the expiration mechanism. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **memberId** | **String**| Unique loyalty card assigned to a particular customer. | +| **loyaltiesMembersBalanceUpdateRequestBody** | [**LoyaltiesMembersBalanceUpdateRequestBody**](LoyaltiesMembersBalanceUpdateRequestBody.md)| Specify the point adjustment along with the expiration mechanism. | ### Return type @@ -1953,11 +1953,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| Unique campaign ID. | | -| **memberId** | **String**| A code that identifies the loyalty card. | | -| **loyaltiesMembersBalanceUpdateRequestBody** | [**LoyaltiesMembersBalanceUpdateRequestBody**](LoyaltiesMembersBalanceUpdateRequestBody.md)| Specify the point adjustment along with the expiration mechanism. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| Unique campaign ID. | +| **memberId** | **String**| A code that identifies the loyalty card. | +| **loyaltiesMembersBalanceUpdateRequestBody** | [**LoyaltiesMembersBalanceUpdateRequestBody**](LoyaltiesMembersBalanceUpdateRequestBody.md)| Specify the point adjustment along with the expiration mechanism. | ### Return type diff --git a/docs/LoyaltiesDeleteResponseBody.md b/docs/LoyaltiesDeleteResponseBody.md index acf15787..7754e7fc 100644 --- a/docs/LoyaltiesDeleteResponseBody.md +++ b/docs/LoyaltiesDeleteResponseBody.md @@ -6,9 +6,9 @@ Response body schema for **DELETE** `/loyalties/{campaignId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | diff --git a/docs/LoyaltiesEarningRulesDisableResponseBody.md b/docs/LoyaltiesEarningRulesDisableResponseBody.md index af44ddbb..3ca375f7 100644 --- a/docs/LoyaltiesEarningRulesDisableResponseBody.md +++ b/docs/LoyaltiesEarningRulesDisableResponseBody.md @@ -6,25 +6,25 @@ Response body schema for **POST** `/loyalties/{campaignId}/earning-rules/{earnin ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. | | -|**loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | | -|**event** | **EarningRuleEvent** | | [optional] | -|**customEvent** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | [optional] | -|**segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | [optional] | -|**source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is earning_rule. | | -|**automationId** | **String** | For internal use by Voucherify. | | -|**startDate** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | [optional] | -|**expirationDate** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | [optional] | -|**validityTimeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**metadata** | **Object** | 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. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format. | [optional] | -|**active** | **Boolean** | A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. | +|**loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | +|**event** | **EarningRuleEvent** | | +|**customEvent** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | +|**segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | +|**source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is earning_rule. | +|**automationId** | **String** | For internal use by Voucherify. | +|**startDate** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | +|**expirationDate** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | +|**validityTimeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**metadata** | **Object** | 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. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format. | +|**active** | **Boolean** | A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. | @@ -33,7 +33,6 @@ Response body schema for **POST** `/loyalties/{campaignId}/earning-rules/{earnin | Name | Value | |---- | -----| | EARNING_RULE | "earning_rule" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -48,7 +47,6 @@ Response body schema for **POST** `/loyalties/{campaignId}/earning-rules/{earnin | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/LoyaltiesEarningRulesEnableResponseBody.md b/docs/LoyaltiesEarningRulesEnableResponseBody.md index f3dd8a27..a85cf8c7 100644 --- a/docs/LoyaltiesEarningRulesEnableResponseBody.md +++ b/docs/LoyaltiesEarningRulesEnableResponseBody.md @@ -6,25 +6,25 @@ Response body schema for **POST** `/loyalties/{campaignId}/earning-rules/{earnin ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. | | -|**loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | | -|**event** | **EarningRuleEvent** | | [optional] | -|**customEvent** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | [optional] | -|**segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | [optional] | -|**source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is earning_rule. | | -|**automationId** | **String** | For internal use by Voucherify. | | -|**startDate** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | [optional] | -|**expirationDate** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | [optional] | -|**validityTimeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**metadata** | **Object** | 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. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format. | [optional] | -|**active** | **Boolean** | A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. | +|**loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | +|**event** | **EarningRuleEvent** | | +|**customEvent** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | +|**segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | +|**source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is earning_rule. | +|**automationId** | **String** | For internal use by Voucherify. | +|**startDate** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | +|**expirationDate** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | +|**validityTimeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**metadata** | **Object** | 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. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format. | +|**active** | **Boolean** | A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. | @@ -33,7 +33,6 @@ Response body schema for **POST** `/loyalties/{campaignId}/earning-rules/{earnin | Name | Value | |---- | -----| | EARNING_RULE | "earning_rule" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -48,7 +47,6 @@ Response body schema for **POST** `/loyalties/{campaignId}/earning-rules/{earnin | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/LoyaltiesEarningRulesGetResponseBody.md b/docs/LoyaltiesEarningRulesGetResponseBody.md index f09f38cf..aad389c9 100644 --- a/docs/LoyaltiesEarningRulesGetResponseBody.md +++ b/docs/LoyaltiesEarningRulesGetResponseBody.md @@ -6,26 +6,26 @@ Response body schema for **GET** `/loyalties/{campaignId}/earning-rules/{earning ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. | | -|**loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | | -|**event** | **EarningRuleEvent** | | [optional] | -|**customEvent** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | [optional] | -|**segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | [optional] | -|**source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is earning_rule. | | -|**automationId** | **String** | For internal use by Voucherify. | | -|**startDate** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | [optional] | -|**expirationDate** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | [optional] | -|**validityTimeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**metadata** | **Object** | 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. | | -|**validationRuleId** | **String** | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format. | [optional] | -|**active** | **Boolean** | A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. - `true` indicates an active earning rule - `false` indicates an inactive earning rule | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. | +|**loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | +|**event** | **EarningRuleEvent** | | +|**customEvent** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | +|**segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | +|**source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is earning_rule. | +|**automationId** | **String** | For internal use by Voucherify. | +|**startDate** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | +|**expirationDate** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | +|**validityTimeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**metadata** | **Object** | 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. | +|**validationRuleId** | **String** | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format. | +|**active** | **Boolean** | A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. - `true` indicates an active earning rule - `false` indicates an inactive earning rule | @@ -34,7 +34,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/earning-rules/{earning | Name | Value | |---- | -----| | EARNING_RULE | "earning_rule" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -49,7 +48,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/earning-rules/{earning | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/LoyaltiesLoyaltyTierReward.md b/docs/LoyaltiesLoyaltyTierReward.md index 86ab4f82..49649818 100644 --- a/docs/LoyaltiesLoyaltyTierReward.md +++ b/docs/LoyaltiesLoyaltyTierReward.md @@ -6,11 +6,11 @@ This is an object representing a loyalty tier reward. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**reward** | [**Reward**](Reward.md) | | | -|**assignment** | [**RewardAssignment**](RewardAssignment.md) | | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the loyalty tier reward. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**reward** | [**Reward**](Reward.md) | | +|**assignment** | [**RewardAssignment**](RewardAssignment.md) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the loyalty tier reward. | @@ -19,7 +19,6 @@ This is an object representing a loyalty tier reward. | Name | Value | |---- | -----| | LOYALTY_TIER_REWARD | "loyalty_tier_reward" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesMembersBalanceUpdateRequestBody.md b/docs/LoyaltiesMembersBalanceUpdateRequestBody.md index c197c71e..ae8a94ec 100644 --- a/docs/LoyaltiesMembersBalanceUpdateRequestBody.md +++ b/docs/LoyaltiesMembersBalanceUpdateRequestBody.md @@ -6,13 +6,13 @@ Request Body schema for **post** `/loyalties/members/{memberId}/balance` and **P ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Incremental balance to be added to/subtracted from the loyalty card. - To add points: 100 - To subtract points, add a minus: -100 | | -|**expirationType** | **PointsExpirationTypes** | | [optional] | -|**expirationDate** | **OffsetDateTime** | Set expiration date for added points, i.e. `YYYY-MM-DD`. This parameter is required only when expiration_type is set to `CUSTOM_DATE`. | [optional] | -|**reason** | **String** | Reason for the transfer. | [optional] | -|**sourceId** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Incremental balance to be added to/subtracted from the loyalty card. - To add points: 100 - To subtract points, add a minus: -100 | +|**expirationType** | **PointsExpirationTypes** | | +|**expirationDate** | **OffsetDateTime** | Set expiration date for added points, i.e. `YYYY-MM-DD`. This parameter is required only when expiration_type is set to `CUSTOM_DATE`. | +|**reason** | **String** | Reason for the transfer. | +|**sourceId** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. | diff --git a/docs/LoyaltiesMembersBalanceUpdateResponseBody.md b/docs/LoyaltiesMembersBalanceUpdateResponseBody.md index e8b6d4a4..61dd731d 100644 --- a/docs/LoyaltiesMembersBalanceUpdateResponseBody.md +++ b/docs/LoyaltiesMembersBalanceUpdateResponseBody.md @@ -6,15 +6,15 @@ Response schema for **POST** `/loyalties/members/{memberId}/balance` and for **P ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | The incremental points removed or added to the current balance on the loyalty card. | | -|**total** | **Integer** | The total of points accrued over the lifetime of the loyalty card. | | -|**balance** | **Integer** | The balance after adding/removing points. | | -|**type** | [**TypeEnum**](#TypeEnum) | The type of voucher being modified. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is balance. | | -|**relatedObject** | [**LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject**](LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.md) | | | -|**operationType** | [**OperationTypeEnum**](#OperationTypeEnum) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | The incremental points removed or added to the current balance on the loyalty card. | +|**total** | **Integer** | The total of points accrued over the lifetime of the loyalty card. | +|**balance** | **Integer** | The balance after adding/removing points. | +|**type** | [**TypeEnum**](#TypeEnum) | The type of voucher being modified. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is balance. | +|**relatedObject** | [**LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject**](LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.md) | | +|**operationType** | [**OperationTypeEnum**](#OperationTypeEnum) | | @@ -24,7 +24,6 @@ Response schema for **POST** `/loyalties/members/{memberId}/balance` and for **P |---- | -----| | LOYALTY_CARD | "loyalty_card" | | GIFT_VOUCHER | "gift_voucher" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ Response schema for **POST** `/loyalties/members/{memberId}/balance` and for **P | Name | Value | |---- | -----| | BALANCE | "balance" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -43,7 +41,6 @@ Response schema for **POST** `/loyalties/members/{memberId}/balance` and for **P |---- | -----| | MANUAL | "MANUAL" | | AUTOMATIC | "AUTOMATIC" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.md b/docs/LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.md index 8314c757..fb0f4ebe 100644 --- a/docs/LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.md +++ b/docs/LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.md @@ -6,10 +6,10 @@ Defines the object that is being modified with the values that are returned in t ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | The object being modified. | | -|**id** | **String** | Identifies the loyalty card that is being modified, this is the ID that was assigned by the Voucherify API. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**type** | [**TypeEnum**](#TypeEnum) | The object being modified. | +|**id** | **String** | Identifies the loyalty card that is being modified, this is the ID that was assigned by the Voucherify API. | @@ -18,7 +18,6 @@ Defines the object that is being modified with the values that are returned in t | Name | Value | |---- | -----| | VOUCHER | "voucher" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesMembersPointsExpirationListResponseBody.md b/docs/LoyaltiesMembersPointsExpirationListResponseBody.md index 81361d41..48a1495d 100644 --- a/docs/LoyaltiesMembersPointsExpirationListResponseBody.md +++ b/docs/LoyaltiesMembersPointsExpirationListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/loyalties/{campaignId}/members/{memberId}/poi ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about loyalty points expiration buckets in a dictionary. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of loyalty points expiration bucket objects. | | -|**data** | [**List<LoyaltiesMembersPointsExpirationListResponseBodyDataItem>**](LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md) | Contains array of loyalty points expiration buckets. | | -|**total** | **Integer** | Total number of point expiration buckets. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about loyalty points expiration buckets in a dictionary. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of loyalty points expiration bucket objects. | +|**data** | [**List<LoyaltiesMembersPointsExpirationListResponseBodyDataItem>**](LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md) | Contains array of loyalty points expiration buckets. | +|**total** | **Integer** | Total number of point expiration buckets. | @@ -20,7 +20,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/members/{memberId}/poi | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -29,7 +28,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/members/{memberId}/poi | Name | Value | |---- | -----| | DATA | "data" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md b/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md index 8a0028de..b5993fbf 100644 --- a/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md +++ b/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md @@ -5,17 +5,17 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique loyalty points bucket ID. | | -|**voucherId** | **String** | Unique parent loyalty card ID. | | -|**campaignId** | **String** | Unique parent campaign ID. | | -|**bucket** | [**LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket**](LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md) | | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty points bucket object was created. The value is shown in the ISO 8601 format. | | -|**status** | **String** | Loyalty points bucket point status. | | -|**expiresAt** | **OffsetDateTime** | Date when the number of points defined in the bucket object are due to expire. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty points bucket object was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the loyalty points bucket. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique loyalty points bucket ID. | +|**voucherId** | **String** | Unique parent loyalty card ID. | +|**campaignId** | **String** | Unique parent campaign ID. | +|**bucket** | [**LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket**](LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md) | | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty points bucket object was created. The value is shown in the ISO 8601 format. | +|**status** | **String** | Loyalty points bucket point status. | +|**expiresAt** | **OffsetDateTime** | Date when the number of points defined in the bucket object are due to expire. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty points bucket object was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the loyalty points bucket. | @@ -24,7 +24,6 @@ | Name | Value | |---- | -----| | LOYALTY_POINTS_BUCKET | "loyalty_points_bucket" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md b/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md index 112ba8d2..91e6753b 100644 --- a/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md +++ b/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md @@ -6,9 +6,9 @@ Defines the number of points stored in the given loyalty points bucket. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**totalPoints** | **Integer** | Total number of points in the loyalty points bucket. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**totalPoints** | **Integer** | Total number of points in the loyalty points bucket. | diff --git a/docs/LoyaltiesMembersRedemptionRedeemRequestBody.md b/docs/LoyaltiesMembersRedemptionRedeemRequestBody.md index 83bb224c..3af5cfcb 100644 --- a/docs/LoyaltiesMembersRedemptionRedeemRequestBody.md +++ b/docs/LoyaltiesMembersRedemptionRedeemRequestBody.md @@ -6,11 +6,11 @@ Request body schema for **POST** `/loyalties/{campaignId}/members/{memberId}/red ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**reward** | [**LoyaltiesMembersRedemptionRedeemRequestBodyReward**](LoyaltiesMembersRedemptionRedeemRequestBodyReward.md) | | [optional] | -|**order** | [**Order**](Order.md) | | [optional] | -|**metadata** | **Object** | A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the <!-- [Create Validation Rules](https://docs.voucherify.io/reference/create-validation-rules) -->[Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule). | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**reward** | [**LoyaltiesMembersRedemptionRedeemRequestBodyReward**](LoyaltiesMembersRedemptionRedeemRequestBodyReward.md) | | +|**order** | [**Order**](Order.md) | | +|**metadata** | **Object** | A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the <!-- [Create Validation Rules](https://docs.voucherify.io/reference/create-validation-rules) -->[Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule). | diff --git a/docs/LoyaltiesMembersRedemptionRedeemRequestBodyReward.md b/docs/LoyaltiesMembersRedemptionRedeemRequestBodyReward.md index 8abb4047..bc240f84 100644 --- a/docs/LoyaltiesMembersRedemptionRedeemRequestBodyReward.md +++ b/docs/LoyaltiesMembersRedemptionRedeemRequestBodyReward.md @@ -6,10 +6,10 @@ Contains information about the reward that the customer wants to redeem and the ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique reward ID assigned by Voucherify. The reward must be assigned to the campaign in order for the user to be able to use the reward. | [optional] | -|**points** | **Integer** | The number of loyalty points that the user wants to spend in order to fulfill the order. The number of points cannot be higher than the current balance on the loyalty card. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique reward ID assigned by Voucherify. The reward must be assigned to the campaign in order for the user to be able to use the reward. | +|**points** | **Integer** | The number of loyalty points that the user wants to spend in order to fulfill the order. The number of points cannot be higher than the current balance on the loyalty card. | diff --git a/docs/LoyaltiesMembersRedemptionRedeemResponseBody.md b/docs/LoyaltiesMembersRedemptionRedeemResponseBody.md index 650006a6..57564ce4 100644 --- a/docs/LoyaltiesMembersRedemptionRedeemResponseBody.md +++ b/docs/LoyaltiesMembersRedemptionRedeemResponseBody.md @@ -6,31 +6,31 @@ Response body schema for **POST** `/loyalties/{campaignId}/members/{memberId}/re ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique redemption ID. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON | | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | | -|**customerId** | **String** | Unique customer ID of the redeeming customer. | [optional] | -|**trackingId** | **String** | Hashed customer source ID. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the redemption. | [optional] | -|**amount** | **Integer** | For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction. | [optional] | -|**redemption** | **String** | Unique redemption ID of the parent redemption. | [optional] | -|**result** | [**ResultEnum**](#ResultEnum) | Redemption result. | | -|**status** | [**StatusEnum**](#StatusEnum) | Redemption status. | | -|**relatedRedemptions** | [**RedemptionRelatedRedemptions**](RedemptionRelatedRedemptions.md) | | [optional] | -|**failureCode** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | [optional] | -|**failureMessage** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | [optional] | -|**order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | [optional] | -|**channel** | [**RedemptionChannel**](RedemptionChannel.md) | | | -|**customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object. | | -|**relatedObjectId** | **String** | Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. | | -|**voucher** | [**RedemptionVoucher**](RedemptionVoucher.md) | | [optional] | -|**promotionTier** | [**PromotionTier**](PromotionTier.md) | | [optional] | -|**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | | -|**gift** | [**RedemptionGift**](RedemptionGift.md) | | [optional] | -|**loyaltyCard** | [**RedemptionLoyaltyCard**](RedemptionLoyaltyCard.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique redemption ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | +|**customerId** | **String** | Unique customer ID of the redeeming customer. | +|**trackingId** | **String** | Hashed customer source ID. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the redemption. | +|**amount** | **Integer** | For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction. | +|**redemption** | **String** | Unique redemption ID of the parent redemption. | +|**result** | [**ResultEnum**](#ResultEnum) | Redemption result. | +|**status** | [**StatusEnum**](#StatusEnum) | Redemption status. | +|**relatedRedemptions** | [**RedemptionRelatedRedemptions**](RedemptionRelatedRedemptions.md) | | +|**failureCode** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | +|**failureMessage** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | +|**order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | +|**channel** | [**RedemptionChannel**](RedemptionChannel.md) | | +|**customer** | [**SimpleCustomer**](SimpleCustomer.md) | | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object. | +|**relatedObjectId** | **String** | Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. | +|**voucher** | [**RedemptionVoucher**](RedemptionVoucher.md) | | +|**promotionTier** | [**PromotionTier**](PromotionTier.md) | | +|**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | +|**gift** | [**RedemptionGift**](RedemptionGift.md) | | +|**loyaltyCard** | [**RedemptionLoyaltyCard**](RedemptionLoyaltyCard.md) | | @@ -39,7 +39,6 @@ Response body schema for **POST** `/loyalties/{campaignId}/members/{memberId}/re | Name | Value | |---- | -----| | REDEMPTION | "redemption" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -49,7 +48,6 @@ Response body schema for **POST** `/loyalties/{campaignId}/members/{memberId}/re |---- | -----| | SUCCESS | "SUCCESS" | | FAILURE | "FAILURE" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -60,7 +58,6 @@ Response body schema for **POST** `/loyalties/{campaignId}/members/{memberId}/re | SUCCEEDED | "SUCCEEDED" | | FAILED | "FAILED" | | ROLLED_BACK | "ROLLED_BACK" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -71,7 +68,6 @@ Response body schema for **POST** `/loyalties/{campaignId}/members/{memberId}/re | VOUCHER | "voucher" | | PROMOTION_TIER | "promotion_tier" | | REDEMPTION | "redemption" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesMembersRewardsListResponseBody.md b/docs/LoyaltiesMembersRewardsListResponseBody.md index 2236f2d8..3b3e9e9a 100644 --- a/docs/LoyaltiesMembersRewardsListResponseBody.md +++ b/docs/LoyaltiesMembersRewardsListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/loyalties/members/{memberId}/rewards` ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of loyalty reward objects. | | -|**data** | [**List<LoyaltiesMembersRewardsListResponseBodyDataItem>**](LoyaltiesMembersRewardsListResponseBodyDataItem.md) | Contains array of loyalty reward objects. | | -|**total** | **Integer** | Total number of loyalty reward objects. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of loyalty reward objects. | +|**data** | [**List<LoyaltiesMembersRewardsListResponseBodyDataItem>**](LoyaltiesMembersRewardsListResponseBodyDataItem.md) | Contains array of loyalty reward objects. | +|**total** | **Integer** | Total number of loyalty reward objects. | @@ -20,7 +20,6 @@ Response body schema for **GET** `/loyalties/members/{memberId}/rewards` | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -29,7 +28,6 @@ Response body schema for **GET** `/loyalties/members/{memberId}/rewards` | Name | Value | |---- | -----| | DATA | "data" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesMembersRewardsListResponseBodyDataItem.md b/docs/LoyaltiesMembersRewardsListResponseBodyDataItem.md index 3eaba517..69e2f785 100644 --- a/docs/LoyaltiesMembersRewardsListResponseBodyDataItem.md +++ b/docs/LoyaltiesMembersRewardsListResponseBodyDataItem.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**reward** | [**Reward**](Reward.md) | | [optional] | -|**assignment** | [**RewardAssignment**](RewardAssignment.md) | | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**reward** | [**Reward**](Reward.md) | | +|**assignment** | [**RewardAssignment**](RewardAssignment.md) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | @@ -18,7 +18,6 @@ | Name | Value | |---- | -----| | LOYALTY_REWARD | "loyalty_reward" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesMembersTiersListResponseBody.md b/docs/LoyaltiesMembersTiersListResponseBody.md index 7c533cee..06681964 100644 --- a/docs/LoyaltiesMembersTiersListResponseBody.md +++ b/docs/LoyaltiesMembersTiersListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/loyalties/members/{memberId}/tiers`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about loyalty tiers in a dictionary. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of loyalty tier objects. | | -|**data** | [**List<LoyaltyTier>**](LoyaltyTier.md) | | | -|**total** | **Integer** | Total number of loyalty tier objects. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about loyalty tiers in a dictionary. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of loyalty tier objects. | +|**data** | [**List<LoyaltyTier>**](LoyaltyTier.md) | | +|**total** | **Integer** | Total number of loyalty tier objects. | @@ -20,7 +20,6 @@ Response body schema for **GET** `/loyalties/members/{memberId}/tiers`. | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -29,7 +28,6 @@ Response body schema for **GET** `/loyalties/members/{memberId}/tiers`. | Name | Value | |---- | -----| | DATA | "data" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesMembersTransactionsExportCreateRequestBody.md b/docs/LoyaltiesMembersTransactionsExportCreateRequestBody.md index ac7ffff8..9c314cf4 100644 --- a/docs/LoyaltiesMembersTransactionsExportCreateRequestBody.md +++ b/docs/LoyaltiesMembersTransactionsExportCreateRequestBody.md @@ -6,9 +6,9 @@ Request body schema for **POST** `/loyalties/members/{memberId}/transactions/exp ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**parameters** | [**LoyaltiesMembersTransactionsExportCreateRequestBodyParameters**](LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**parameters** | [**LoyaltiesMembersTransactionsExportCreateRequestBodyParameters**](LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md) | | diff --git a/docs/LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md b/docs/LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md index 6c96c28c..b47c5986 100644 --- a/docs/LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md +++ b/docs/LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md @@ -6,11 +6,11 @@ List of available fields and filters that can be exported with an order along wi ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**order** | **ExportVoucherTransactionsOrder** | | [optional] | -|**fields** | **List<ExportVoucherTransactionsFields>** | Array of strings containing the data in the export. These fields define the headers in the CSV file. | [optional] | -|**filters** | [**ExportVoucherTransactionsFilters**](ExportVoucherTransactionsFilters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**order** | **ExportVoucherTransactionsOrder** | | +|**fields** | **List<ExportVoucherTransactionsFields>** | Array of strings containing the data in the export. These fields define the headers in the CSV file. | +|**filters** | [**ExportVoucherTransactionsFilters**](ExportVoucherTransactionsFilters.md) | | diff --git a/docs/LoyaltiesMembersTransactionsExportCreateResponseBody.md b/docs/LoyaltiesMembersTransactionsExportCreateResponseBody.md index 31f5e285..854f53ed 100644 --- a/docs/LoyaltiesMembersTransactionsExportCreateResponseBody.md +++ b/docs/LoyaltiesMembersTransactionsExportCreateResponseBody.md @@ -6,17 +6,17 @@ Response body schema for **POST** `/loyalties/members/{memberId}/transactions/ex ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique export ID. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the export. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | | -|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | | -|**channel** | **String** | The channel through which the export was triggered. | [optional] | -|**result** | **Object** | Contains the URL of the CSV file. | | -|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | | -|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | The type of object to be exported. | | -|**parameters** | [**LoyaltiesMembersTransactionsExportCreateRequestBodyParameters**](LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique export ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the export. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | +|**channel** | **String** | The channel through which the export was triggered. | +|**result** | **Object** | Contains the URL of the CSV file. | +|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | +|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | The type of object to be exported. | +|**parameters** | [**LoyaltiesMembersTransactionsExportCreateRequestBodyParameters**](LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md) | | @@ -25,7 +25,6 @@ Response body schema for **POST** `/loyalties/members/{memberId}/transactions/ex | Name | Value | |---- | -----| | EXPORT | "export" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -34,7 +33,6 @@ Response body schema for **POST** `/loyalties/members/{memberId}/transactions/ex | Name | Value | |---- | -----| | SCHEDULED | "SCHEDULED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -43,7 +41,6 @@ Response body schema for **POST** `/loyalties/members/{memberId}/transactions/ex | Name | Value | |---- | -----| | VOUCHER_TRANSACTIONS | "voucher_transactions" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesMembersTransactionsListResponseBody.md b/docs/LoyaltiesMembersTransactionsListResponseBody.md index c2f342dd..5c7ce17e 100644 --- a/docs/LoyaltiesMembersTransactionsListResponseBody.md +++ b/docs/LoyaltiesMembersTransactionsListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/loyalties/{campaignId}/members/{memberId}/tra ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of transaction objects. | | -|**data** | [**List<LoyaltyCardTransaction>**](LoyaltyCardTransaction.md) | A dictionary that contains an array of transactions. Each entry in the array is a separate transaction object. | | -|**hasMore** | **Boolean** | 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 (with a different page or a different start date filter) to get more records returned in the results. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of transaction objects. | +|**data** | [**List<LoyaltyCardTransaction>**](LoyaltyCardTransaction.md) | A dictionary that contains an array of transactions. Each entry in the array is a separate transaction object. | +|**hasMore** | **Boolean** | 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 (with a different page or a different start date filter) to get more records returned in the results. | @@ -20,7 +20,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/members/{memberId}/tra | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -29,7 +28,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/members/{memberId}/tra | Name | Value | |---- | -----| | DATA | "data" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBody.md b/docs/LoyaltiesMembersTransfersCreateResponseBody.md index 4571ebf4..22a48f16 100644 --- a/docs/LoyaltiesMembersTransfersCreateResponseBody.md +++ b/docs/LoyaltiesMembersTransfersCreateResponseBody.md @@ -6,32 +6,32 @@ Response body schema for **POST** `/loyalties/{campaignId}/members/{memberId}/tr ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | | -|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | | -|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] | -|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] | -|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] | -|**categoryId** | **String** | Unique category ID assigned by Voucherify. | [optional] | -|**categories** | [**List<Category>**](Category.md) | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | | -|**loyaltyCard** | [**LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard**](LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md) | | | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is inactive before this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date. | [optional] | -|**validityTimeframe** | [**LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe**](LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**publish** | [**LoyaltiesMembersTransfersCreateResponseBodyPublish**](LoyaltiesMembersTransfersCreateResponseBodyPublish.md) | | [optional] | -|**redemption** | [**LoyaltiesMembersTransfersCreateResponseBodyRedemption**](LoyaltiesMembersTransfersCreateResponseBodyRedemption.md) | | [optional] | -|**active** | **String** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the start_date and expiration_date. - `true` indicates an active voucher - `false` indicates an inactive voucher | | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | | -|**assets** | [**LoyaltiesMembersTransfersCreateResponseBodyAssets**](LoyaltiesMembersTransfersCreateResponseBodyAssets.md) | | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | | -|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] | -|**createdAt** | **OffsetDateTime** | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | +|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | +|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | +|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | +|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | +|**categoryId** | **String** | Unique category ID assigned by Voucherify. | +|**categories** | [**List<Category>**](Category.md) | | +|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | +|**loyaltyCard** | [**LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard**](LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md) | | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is inactive before this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date. | +|**validityTimeframe** | [**LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe**](LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**publish** | [**LoyaltiesMembersTransfersCreateResponseBodyPublish**](LoyaltiesMembersTransfersCreateResponseBodyPublish.md) | | +|**redemption** | [**LoyaltiesMembersTransfersCreateResponseBodyRedemption**](LoyaltiesMembersTransfersCreateResponseBodyRedemption.md) | | +|**active** | **String** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the start_date and expiration_date. - `true` indicates an active voucher - `false` indicates an inactive voucher | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | +|**assets** | [**LoyaltiesMembersTransfersCreateResponseBodyAssets**](LoyaltiesMembersTransfersCreateResponseBodyAssets.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | +|**createdAt** | **OffsetDateTime** | | @@ -40,7 +40,6 @@ Response body schema for **POST** `/loyalties/{campaignId}/members/{memberId}/tr | Name | Value | |---- | -----| | LOYALTY_CARD | "LOYALTY_CARD" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -55,7 +54,6 @@ Response body schema for **POST** `/loyalties/{campaignId}/members/{memberId}/tr | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyAssets.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyAssets.md index a1ea6f32..eb8b677a 100644 --- a/docs/LoyaltiesMembersTransfersCreateResponseBodyAssets.md +++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyAssets.md @@ -6,10 +6,10 @@ Stores links to images of QR and barcode that correspond to an encrypted voucher ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**qr** | [**LoyaltiesMembersTransfersCreateResponseBodyAssetsQr**](LoyaltiesMembersTransfersCreateResponseBodyAssetsQr.md) | | [optional] | -|**barcode** | [**LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode**](LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**qr** | [**LoyaltiesMembersTransfersCreateResponseBodyAssetsQr**](LoyaltiesMembersTransfersCreateResponseBodyAssetsQr.md) | | +|**barcode** | [**LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode**](LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode.md) | | diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode.md index a0d43c70..e951b931 100644 --- a/docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode.md +++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode.md @@ -6,10 +6,10 @@ Stores barcode representation of encrypted code. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Encrypted voucher code ID. | [optional] | -|**url** | **String** | URL to barcode *Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code. - `size`: integer value from `1` to `100` - `format`: string, either `png` (default) or `svg` | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Encrypted voucher code ID. | +|**url** | **String** | URL to barcode *Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code. - `size`: integer value from `1` to `100` - `format`: string, either `png` (default) or `svg` | diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsQr.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsQr.md index 08597bd5..c6187805 100644 --- a/docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsQr.md +++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsQr.md @@ -6,10 +6,10 @@ Stores Quick Response (QR) representation of encrypted code. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Encrypted voucher code ID. | [optional] | -|**url** | **String** | URL to QR code *Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code. - `size`: integer value from `1` to `100` - `format`: string, either `png` (default) or `svg` | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Encrypted voucher code ID. | +|**url** | **String** | URL to QR code *Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code. - `size`: integer value from `1` to `100` - `format`: string, either `png` (default) or `svg` | diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md index be1414ac..de552787 100644 --- a/docs/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md +++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md @@ -6,12 +6,12 @@ Object representing loyalty card parameters. Child attributes are present only i ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Total points incurred over lifespan of loyalty card. | | -|**balance** | **Integer** | Points available for reward redemption. | | -|**nextExpirationDate** | **String** | The next closest date when the next set of points are due to expire. | [optional] | -|**nextExpirationPoints** | **Integer** | The amount of points that are set to expire next. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Total points incurred over lifespan of loyalty card. | +|**balance** | **Integer** | Points available for reward redemption. | +|**nextExpirationDate** | **String** | The next closest date when the next set of points are due to expire. | +|**nextExpirationPoints** | **Integer** | The amount of points that are set to expire next. | diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyPublish.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyPublish.md index 11bc3731..7a5641a3 100644 --- a/docs/LoyaltiesMembersTransfersCreateResponseBodyPublish.md +++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyPublish.md @@ -6,12 +6,12 @@ This object stores a summary of publish events: an events counter and an endpoin ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute. | | -|**count** | **Integer** | Publication events counter. | [optional] | -|**entries** | **List<String>** | | [optional] | -|**url** | **String** | The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute. | +|**count** | **Integer** | Publication events counter. | +|**entries** | **List<String>** | | +|**url** | **String** | The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications | @@ -20,7 +20,6 @@ This object stores a summary of publish events: an events counter and an endpoin | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyRedemption.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyRedemption.md index b544d0db..26dc8c74 100644 --- a/docs/LoyaltiesMembersTransfersCreateResponseBodyRedemption.md +++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyRedemption.md @@ -6,14 +6,14 @@ Stores a summary of redemptions that have been applied to the voucher. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**quantity** | **Integer** | How many times a voucher can be redeemed. A null value means unlimited. | [optional] | -|**redeemedPoints** | **Integer** | Total loyalty points redeemed. | [optional] | -|**redeemedQuantity** | **Integer** | How many times a voucher has already been redeemed. | [optional] | -|**redemptionEntries** | **List<String>** | | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] | -|**url** | **String** | The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**quantity** | **Integer** | How many times a voucher can be redeemed. A null value means unlimited. | +|**redeemedPoints** | **Integer** | Total loyalty points redeemed. | +|**redeemedQuantity** | **Integer** | How many times a voucher has already been redeemed. | +|**redemptionEntries** | **List<String>** | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute. | +|**url** | **String** | The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions | @@ -22,7 +22,6 @@ Stores a summary of redemptions that have been applied to the voucher. | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe.md index 7c500bb5..78dcf946 100644 --- a/docs/LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe.md +++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe.md @@ -6,10 +6,10 @@ Set recurrent time periods when the voucher is valid. For example, valid for 1 h ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**interval** | **String** | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a duration of PT1H will be valid for a duration of one hour. | [optional] | -|**duration** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an interval of P2D will be active every other day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**interval** | **String** | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a duration of PT1H will be valid for a duration of one hour. | +|**duration** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an interval of P2D will be active every other day. | diff --git a/docs/LoyaltiesRewardAssignmentsGetResponseBody.md b/docs/LoyaltiesRewardAssignmentsGetResponseBody.md index 13aaac01..9f4eaf5f 100644 --- a/docs/LoyaltiesRewardAssignmentsGetResponseBody.md +++ b/docs/LoyaltiesRewardAssignmentsGetResponseBody.md @@ -6,16 +6,16 @@ Response body schema for **GET** `/loyalties/{campaignId}/reward-assignments/{as ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique reward assignment ID, assigned by Voucherify. | | -|**rewardId** | **String** | Associated reward ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward assignment. | | -|**relatedObjectId** | **String** | Related object ID to which the reward was assigned. | | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Related object type to which the reward was assigned. | | -|**parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique reward assignment ID, assigned by Voucherify. | +|**rewardId** | **String** | Associated reward ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward assignment. | +|**relatedObjectId** | **String** | Related object ID to which the reward was assigned. | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Related object type to which the reward was assigned. | +|**parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | @@ -24,7 +24,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/reward-assignments/{as | Name | Value | |---- | -----| | REWARD_ASSIGNMENT | "reward_assignment" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/reward-assignments/{as | Name | Value | |---- | -----| | CAMPAIGN | "campaign" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesRewardAssignmentsRewardGetResponseBody.md b/docs/LoyaltiesRewardAssignmentsRewardGetResponseBody.md index 4955146b..07c9434e 100644 --- a/docs/LoyaltiesRewardAssignmentsRewardGetResponseBody.md +++ b/docs/LoyaltiesRewardAssignmentsRewardGetResponseBody.md @@ -6,19 +6,19 @@ Response body schema for **GET** `/loyalties/{campaignId}/reward-assignments/{as ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique reward ID, assigned by Voucherify. | | -|**name** | **String** | Reward name. | | -|**stock** | **Integer** | Configurable for **material rewards**. The number of units of the product that you want to share as reward. | [optional] | -|**redeemed** | **Integer** | Defines the number of already invoked (successful) reward redemptions. | [optional] | -|**attributes** | [**RewardAttributes**](RewardAttributes.md) | | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format. | | -|**type** | [**TypeEnum**](#TypeEnum) | Reward type. | | -|**parameters** | [**RewardType**](RewardType.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique reward ID, assigned by Voucherify. | +|**name** | **String** | Reward name. | +|**stock** | **Integer** | Configurable for **material rewards**. The number of units of the product that you want to share as reward. | +|**redeemed** | **Integer** | Defines the number of already invoked (successful) reward redemptions. | +|**attributes** | [**RewardAttributes**](RewardAttributes.md) | | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format. | +|**type** | [**TypeEnum**](#TypeEnum) | Reward type. | +|**parameters** | [**RewardType**](RewardType.md) | | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward. | @@ -29,7 +29,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/reward-assignments/{as | CAMPAIGN | "CAMPAIGN" | | COIN | "COIN" | | MATERIAL | "MATERIAL" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -38,7 +37,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/reward-assignments/{as | Name | Value | |---- | -----| | REWARD | "reward" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesRewardsGetResponseBody.md b/docs/LoyaltiesRewardsGetResponseBody.md index 60f76cd3..6c5fd80b 100644 --- a/docs/LoyaltiesRewardsGetResponseBody.md +++ b/docs/LoyaltiesRewardsGetResponseBody.md @@ -6,16 +6,16 @@ Response body schema for **GET** `/loyalties/{campaignId}/rewards/{assignmentId} ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique reward assignment ID, assigned by Voucherify. | | -|**rewardId** | **String** | Associated reward ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward assignment. | | -|**relatedObjectId** | **String** | Related object ID to which the reward was assigned. | | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Related object type to which the reward was assigned. | | -|**parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique reward assignment ID, assigned by Voucherify. | +|**rewardId** | **String** | Associated reward ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward assignment. | +|**relatedObjectId** | **String** | Related object ID to which the reward was assigned. | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Related object type to which the reward was assigned. | +|**parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | @@ -24,7 +24,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/rewards/{assignmentId} | Name | Value | |---- | -----| | REWARD_ASSIGNMENT | "reward_assignment" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/rewards/{assignmentId} | Name | Value | |---- | -----| | CAMPAIGN | "campaign" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesTiersCreateInBulkRequestBodyItem.md b/docs/LoyaltiesTiersCreateInBulkRequestBodyItem.md index 06a17bf7..ec5a7c80 100644 --- a/docs/LoyaltiesTiersCreateInBulkRequestBodyItem.md +++ b/docs/LoyaltiesTiersCreateInBulkRequestBodyItem.md @@ -5,13 +5,13 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Loyalty Tier name. | | -|**earningRules** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of earning rule IDs and their points mapping for the given earning rule. | [optional] | -|**rewards** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of reward IDs and their points mapping for the given reward. | [optional] | -|**points** | [**LoyaltyTierBasePoints**](LoyaltyTierBasePoints.md) | | | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Loyalty Tier name. | +|**earningRules** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of earning rule IDs and their points mapping for the given earning rule. | +|**rewards** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of reward IDs and their points mapping for the given reward. | +|**points** | [**LoyaltyTierBasePoints**](LoyaltyTierBasePoints.md) | | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format. | diff --git a/docs/LoyaltiesTiersEarningRulesListResponseBody.md b/docs/LoyaltiesTiersEarningRulesListResponseBody.md index a8c8b2fe..2e40850e 100644 --- a/docs/LoyaltiesTiersEarningRulesListResponseBody.md +++ b/docs/LoyaltiesTiersEarningRulesListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/loyalties/{campaignId}/tiers/{loyaltyTierId}/ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about earning rules in a dictionary. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of earning rule objects. | | -|**data** | [**List<EarningRule>**](EarningRule.md) | Contains array of earning rule objects. | | -|**total** | **Integer** | Total number of earning rule objects. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about earning rules in a dictionary. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of earning rule objects. | +|**data** | [**List<EarningRule>**](EarningRule.md) | Contains array of earning rule objects. | +|**total** | **Integer** | Total number of earning rule objects. | @@ -20,7 +20,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/tiers/{loyaltyTierId}/ | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -29,7 +28,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/tiers/{loyaltyTierId}/ | Name | Value | |---- | -----| | DATA | "data" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesTiersGetResponseBody.md b/docs/LoyaltiesTiersGetResponseBody.md index 0273957b..c304100e 100644 --- a/docs/LoyaltiesTiersGetResponseBody.md +++ b/docs/LoyaltiesTiersGetResponseBody.md @@ -6,20 +6,20 @@ Response body schema for **GET** `/loyalties/{campaignId}/tiers/{loyaltyTierId}` ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Loyalty Tier name. | | -|**earningRules** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of earning rule IDs and their points mapping for the given earning rule. | [optional] | -|**rewards** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of reward IDs and their points mapping for the given reward. | [optional] | -|**points** | [**LoyaltyTierBasePoints**](LoyaltyTierBasePoints.md) | | | -|**id** | **String** | Unique loyalty tier ID. | | -|**campaignId** | **String** | Unique parent campaign ID. | | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format. | [optional] | -|**config** | [**LoyaltyTierAllOfConfig**](LoyaltyTierAllOfConfig.md) | | | -|**expiration** | [**LoyaltyTierExpiration**](LoyaltyTierExpiration.md) | | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the loyalty. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Loyalty Tier name. | +|**earningRules** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of earning rule IDs and their points mapping for the given earning rule. | +|**rewards** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of reward IDs and their points mapping for the given reward. | +|**points** | [**LoyaltyTierBasePoints**](LoyaltyTierBasePoints.md) | | +|**id** | **String** | Unique loyalty tier ID. | +|**campaignId** | **String** | Unique parent campaign ID. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format. | +|**config** | [**LoyaltyTierAllOfConfig**](LoyaltyTierAllOfConfig.md) | | +|**expiration** | [**LoyaltyTierExpiration**](LoyaltyTierExpiration.md) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the loyalty. | @@ -28,7 +28,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/tiers/{loyaltyTierId}` | Name | Value | |---- | -----| | LOYALTY_TIER | "loyalty_tier" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesTiersListResponseBody.md b/docs/LoyaltiesTiersListResponseBody.md index 5adab6ab..4392c30c 100644 --- a/docs/LoyaltiesTiersListResponseBody.md +++ b/docs/LoyaltiesTiersListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/loyalties/{campaignId}/tiers`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about loyalty tiers in a dictionary. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of loyalty tier objects. | | -|**data** | [**List<LoyaltyTier>**](LoyaltyTier.md) | This is an object representing a loyalty tier. Loyalty tiers are used to create a loyalty program with different levels of membership and varied earning rules and rewards based on customer’s tiers. | | -|**total** | **Integer** | Total number of loyalty tier objects. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about loyalty tiers in a dictionary. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of loyalty tier objects. | +|**data** | [**List<LoyaltyTier>**](LoyaltyTier.md) | This is an object representing a loyalty tier. Loyalty tiers are used to create a loyalty program with different levels of membership and varied earning rules and rewards based on customer’s tiers. | +|**total** | **Integer** | Total number of loyalty tier objects. | @@ -20,7 +20,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/tiers`. | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -29,7 +28,6 @@ Response body schema for **GET** `/loyalties/{campaignId}/tiers`. | Name | Value | |---- | -----| | DATA | "data" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltiesTiersRewardsListResponseBody.md b/docs/LoyaltiesTiersRewardsListResponseBody.md index e93c9dda..ef648644 100644 --- a/docs/LoyaltiesTiersRewardsListResponseBody.md +++ b/docs/LoyaltiesTiersRewardsListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/loyalties/{campaignId}/tiers/{loyaltyTierId}/ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about loyalty tier rewards in a dictionary. | | -|**dataRef** | **String** | Identifies the name of the attribute that contains the array of loyalty tier reward objects. | | -|**data** | [**List<LoyaltiesLoyaltyTierReward>**](LoyaltiesLoyaltyTierReward.md) | Contains array of loyalty tier reward objects. | | -|**total** | **Integer** | Total number of loyalty tier reward objects. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about loyalty tier rewards in a dictionary. | +|**dataRef** | **String** | Identifies the name of the attribute that contains the array of loyalty tier reward objects. | +|**data** | [**List<LoyaltiesLoyaltyTierReward>**](LoyaltiesLoyaltyTierReward.md) | Contains array of loyalty tier reward objects. | +|**total** | **Integer** | Total number of loyalty tier reward objects. | diff --git a/docs/LoyaltiesTransferPoints.md b/docs/LoyaltiesTransferPoints.md index 1200024a..6035586b 100644 --- a/docs/LoyaltiesTransferPoints.md +++ b/docs/LoyaltiesTransferPoints.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **String** | Unique loyalty card code from which the user wants to transfer loyalty points (source). | | -|**points** | **Integer** | The number of loyalty points that the user wants to transfer to another loyalty card. The number of points cannot be higher than the current balance on the loyalty card (source). | | -|**reason** | **String** | Reason for the transfer. | [optional] | -|**sourceId** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**code** | **String** | Unique loyalty card code from which the user wants to transfer loyalty points (source). | +|**points** | **Integer** | The number of loyalty points that the user wants to transfer to another loyalty card. The number of points cannot be higher than the current balance on the loyalty card (source). | +|**reason** | **String** | Reason for the transfer. | +|**sourceId** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. | diff --git a/docs/LoyaltyCardTransaction.md b/docs/LoyaltyCardTransaction.md index 4587df7f..b44883e3 100644 --- a/docs/LoyaltyCardTransaction.md +++ b/docs/LoyaltyCardTransaction.md @@ -5,18 +5,18 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique transaction ID. | | -|**sourceId** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. In case of a redemption, this value is null. | [optional] | -|**voucherId** | **String** | Unique voucher ID. | | -|**campaignId** | **String** | Unqiue campaign ID of the voucher's parent campaign if it is part of campaign that generates bulk codes. | | -|**source** | **String** | The channel through which the transaction took place, whether through the API or the the Dashboard. In case of a redemption, this value is null. | [optional] | -|**reason** | **String** | Reason why the transaction occurred. In case of a redemption, this value is null. | [optional] | -|**type** | **LoyaltyCardTransactionsType** | | | -|**details** | [**VoucherTransactionDetails**](VoucherTransactionDetails.md) | | | -|**relatedTransactionId** | **String** | The related transaction ID on the receiving card. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique transaction ID. | +|**sourceId** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. In case of a redemption, this value is null. | +|**voucherId** | **String** | Unique voucher ID. | +|**campaignId** | **String** | Unqiue campaign ID of the voucher's parent campaign if it is part of campaign that generates bulk codes. | +|**source** | **String** | The channel through which the transaction took place, whether through the API or the the Dashboard. In case of a redemption, this value is null. | +|**reason** | **String** | Reason why the transaction occurred. In case of a redemption, this value is null. | +|**type** | **LoyaltyCardTransactionsType** | | +|**details** | [**VoucherTransactionDetails**](VoucherTransactionDetails.md) | | +|**relatedTransactionId** | **String** | The related transaction ID on the receiving card. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format. | diff --git a/docs/LoyaltyCardTransactionsType.md b/docs/LoyaltyCardTransactionsType.md index 05ec9719..98e3f588 100644 --- a/docs/LoyaltyCardTransactionsType.md +++ b/docs/LoyaltyCardTransactionsType.md @@ -23,7 +23,5 @@ * `TRANSFER_OUT` (value: `"POINTS_TRANSFER_OUT"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/LoyaltyTier.md b/docs/LoyaltyTier.md index 8f2f90bf..e5ad4116 100644 --- a/docs/LoyaltyTier.md +++ b/docs/LoyaltyTier.md @@ -5,20 +5,20 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Loyalty Tier name. | | -|**earningRules** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of earning rule IDs and their points mapping for the given earning rule. | [optional] | -|**rewards** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of reward IDs and their points mapping for the given reward. | [optional] | -|**points** | [**LoyaltyTierBasePoints**](LoyaltyTierBasePoints.md) | | | -|**id** | **String** | Unique loyalty tier ID. | | -|**campaignId** | **String** | Unique parent campaign ID. | | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format. | [optional] | -|**config** | [**LoyaltyTierAllOfConfig**](LoyaltyTierAllOfConfig.md) | | | -|**expiration** | [**LoyaltyTierExpiration**](LoyaltyTierExpiration.md) | | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the loyalty. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Loyalty Tier name. | +|**earningRules** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of earning rule IDs and their points mapping for the given earning rule. | +|**rewards** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of reward IDs and their points mapping for the given reward. | +|**points** | [**LoyaltyTierBasePoints**](LoyaltyTierBasePoints.md) | | +|**id** | **String** | Unique loyalty tier ID. | +|**campaignId** | **String** | Unique parent campaign ID. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format. | +|**config** | [**LoyaltyTierAllOfConfig**](LoyaltyTierAllOfConfig.md) | | +|**expiration** | [**LoyaltyTierExpiration**](LoyaltyTierExpiration.md) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the loyalty. | @@ -27,7 +27,6 @@ | Name | Value | |---- | -----| | LOYALTY_TIER | "loyalty_tier" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltyTierAllOfConfig.md b/docs/LoyaltyTierAllOfConfig.md index 2e06cb79..d076d2b7 100644 --- a/docs/LoyaltyTierAllOfConfig.md +++ b/docs/LoyaltyTierAllOfConfig.md @@ -6,9 +6,9 @@ Defines loyalty tier range in points. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | [**LoyaltyTierAllOfConfigPoints**](LoyaltyTierAllOfConfigPoints.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | [**LoyaltyTierAllOfConfigPoints**](LoyaltyTierAllOfConfigPoints.md) | | diff --git a/docs/LoyaltyTierAllOfConfigPoints.md b/docs/LoyaltyTierAllOfConfigPoints.md index 088a4163..1db0f300 100644 --- a/docs/LoyaltyTierAllOfConfigPoints.md +++ b/docs/LoyaltyTierAllOfConfigPoints.md @@ -6,10 +6,10 @@ Defines range of loyalty tier in points. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**from** | **Integer** | Bottom points threshold value. | [optional] | -|**to** | **Integer** | Top points threshold value. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**from** | **Integer** | Bottom points threshold value. | +|**to** | **Integer** | Top points threshold value. | diff --git a/docs/LoyaltyTierBase.md b/docs/LoyaltyTierBase.md index ab2b7b81..1b793cdf 100644 --- a/docs/LoyaltyTierBase.md +++ b/docs/LoyaltyTierBase.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Loyalty Tier name. | | -|**earningRules** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of earning rule IDs and their points mapping for the given earning rule. | [optional] | -|**rewards** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of reward IDs and their points mapping for the given reward. | [optional] | -|**points** | [**LoyaltyTierBasePoints**](LoyaltyTierBasePoints.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Loyalty Tier name. | +|**earningRules** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of earning rule IDs and their points mapping for the given earning rule. | +|**rewards** | [**Map<String, MappingPoints>**](MappingPoints.md) | Contains a list of reward IDs and their points mapping for the given reward. | +|**points** | [**LoyaltyTierBasePoints**](LoyaltyTierBasePoints.md) | | diff --git a/docs/LoyaltyTierBasePoints.md b/docs/LoyaltyTierBasePoints.md index 2bf033a0..65dcc643 100644 --- a/docs/LoyaltyTierBasePoints.md +++ b/docs/LoyaltyTierBasePoints.md @@ -6,10 +6,10 @@ Defines range of loyalty tier in points. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**from** | **Integer** | Bottom points threshold value. | [optional] | -|**to** | **Integer** | Top points threshold value. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**from** | **Integer** | Bottom points threshold value. | +|**to** | **Integer** | Top points threshold value. | diff --git a/docs/LoyaltyTierExpiration.md b/docs/LoyaltyTierExpiration.md index 5fa55392..ecaf269b 100644 --- a/docs/LoyaltyTierExpiration.md +++ b/docs/LoyaltyTierExpiration.md @@ -6,15 +6,15 @@ Defines loyalty tier expiration date. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | | -|**campaignId** | **String** | Unique campaign ID, assigned by Voucherify. | | -|**tierId** | **String** | Unique tier ID, assigned by Voucherify. | | -|**startDate** | **String** | Activation timestamp defines when the loyalty tier starts to be active in ISO 8601 format. Loyalty tier is inactive before this date. | [optional] | -|**expirationDate** | **String** | Expiration timestamp defines when the loyalty tier expires in ISO 8601 format. Loyalty tier is inactive after this date. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**campaignId** | **String** | Unique campaign ID, assigned by Voucherify. | +|**tierId** | **String** | Unique tier ID, assigned by Voucherify. | +|**startDate** | **String** | Activation timestamp defines when the loyalty tier starts to be active in ISO 8601 format. Loyalty tier is inactive before this date. | +|**expirationDate** | **String** | Expiration timestamp defines when the loyalty tier expires in ISO 8601 format. Loyalty tier is inactive after this date. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format. | diff --git a/docs/LoyaltyTiersExpirationAll.md b/docs/LoyaltyTiersExpirationAll.md index 5dbfd888..8c07c911 100644 --- a/docs/LoyaltyTiersExpirationAll.md +++ b/docs/LoyaltyTiersExpirationAll.md @@ -6,12 +6,12 @@ Defines the Loyalty Tiers Expiration. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**qualificationType** | [**QualificationTypeEnum**](#QualificationTypeEnum) | Tier qualification. `BALANCE`: Points balance is based on the customer's current points balance. Customers qualify for the tier if their points balance is in the points range of the tier. `POINTS_IN_PERIOD`: A customer qualifies for the tier only if the sum of the accumulated points in a **defined time interval** reaches the tier threshold. | | -|**qualificationPeriod** | [**QualificationPeriodEnum**](#QualificationPeriodEnum) | Customers can qualify for the tier if they collected enough points in a given time period. So, in addition to the customer having to reach a points range, they also need to have collected the points within a set time period. | **Period** | **Definition** | |:---|:---| | **Calendar Month** | Points collected in one calendar month<br>January, February, March, etc. | | **Calendar Quarter** | Points collected in the quarter<br>- January - March<br>- April - June<br>- July - September<br>- October - December | | **Calendar Half-year** | Points collected in the half-year<br>- January - June<br>- July - December | | **Calendar Year** | Points collected in one calendar year<br>January - December | | [optional] | -|**startDate** | [**LoyaltyTiersExpirationAllStartDate**](LoyaltyTiersExpirationAllStartDate.md) | | | -|**expirationDate** | [**LoyaltyTiersExpirationAllExpirationDate**](LoyaltyTiersExpirationAllExpirationDate.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**qualificationType** | [**QualificationTypeEnum**](#QualificationTypeEnum) | Tier qualification. `BALANCE`: Points balance is based on the customer's current points balance. Customers qualify for the tier if their points balance is in the points range of the tier. `POINTS_IN_PERIOD`: A customer qualifies for the tier only if the sum of the accumulated points in a **defined time interval** reaches the tier threshold. | +|**qualificationPeriod** | [**QualificationPeriodEnum**](#QualificationPeriodEnum) | Customers can qualify for the tier if they collected enough points in a given time period. So, in addition to the customer having to reach a points range, they also need to have collected the points within a set time period. | **Period** | **Definition** | |:---|:---| | **Calendar Month** | Points collected in one calendar month<br>January, February, March, etc. | | **Calendar Quarter** | Points collected in the quarter<br>- January - March<br>- April - June<br>- July - September<br>- October - December | | **Calendar Half-year** | Points collected in the half-year<br>- January - June<br>- July - December | | **Calendar Year** | Points collected in one calendar year<br>January - December | | +|**startDate** | [**LoyaltyTiersExpirationAllStartDate**](LoyaltyTiersExpirationAllStartDate.md) | | +|**expirationDate** | [**LoyaltyTiersExpirationAllExpirationDate**](LoyaltyTiersExpirationAllExpirationDate.md) | | @@ -21,7 +21,6 @@ Defines the Loyalty Tiers Expiration. |---- | -----| | BALANCE | "BALANCE" | | POINTS_IN_PERIOD | "POINTS_IN_PERIOD" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ Defines the Loyalty Tiers Expiration. | QUARTER | "QUARTER" | | HALF_YEAR | "HALF_YEAR" | | YEAR | "YEAR" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltyTiersExpirationAllExpirationDate.md b/docs/LoyaltyTiersExpirationAllExpirationDate.md index 08f7a418..8bcba292 100644 --- a/docs/LoyaltyTiersExpirationAllExpirationDate.md +++ b/docs/LoyaltyTiersExpirationAllExpirationDate.md @@ -6,11 +6,11 @@ Defines the conditions for the expiration date of a tier. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | What triggers the tier to expire for a customer. `END_OF_PERIOD`: Expire tier at the end of the period. `END_OF_NEXT_PERIOD`: Expire tier at the end of the next period. `BALANCE_DROP`: Tier expires when the points balance drops below the required range of the tier. `CUSTOM`: Tier expires after a certain time period passes following the instance the points balance drops below the required range of the tier. | | -|**extend** | **String** | Extend the expiration by adding extra months or days in ISO 8601 format. The tier will remain active even though it reaches its expiration time period. For example, a tier with a duration of `P3M` will be valid for an additional duration of 3 months and a tier with a duration of `P1D` will be valid for an additional duration of 1 day. | | -|**rounding** | [**LoyaltyTiersExpirationAllExpirationDateRounding**](LoyaltyTiersExpirationAllExpirationDateRounding.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**type** | [**TypeEnum**](#TypeEnum) | What triggers the tier to expire for a customer. `END_OF_PERIOD`: Expire tier at the end of the period. `END_OF_NEXT_PERIOD`: Expire tier at the end of the next period. `BALANCE_DROP`: Tier expires when the points balance drops below the required range of the tier. `CUSTOM`: Tier expires after a certain time period passes following the instance the points balance drops below the required range of the tier. | +|**extend** | **String** | Extend the expiration by adding extra months or days in ISO 8601 format. The tier will remain active even though it reaches its expiration time period. For example, a tier with a duration of `P3M` will be valid for an additional duration of 3 months and a tier with a duration of `P1D` will be valid for an additional duration of 1 day. | +|**rounding** | [**LoyaltyTiersExpirationAllExpirationDateRounding**](LoyaltyTiersExpirationAllExpirationDateRounding.md) | | @@ -22,7 +22,6 @@ Defines the conditions for the expiration date of a tier. | END_OF_NEXT_PERIOD | "END_OF_NEXT_PERIOD" | | BALANCE_DROP | "BALANCE_DROP" | | CUSTOM | "CUSTOM" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltyTiersExpirationAllExpirationDateRounding.md b/docs/LoyaltyTiersExpirationAllExpirationDateRounding.md index 227f5f81..fd040383 100644 --- a/docs/LoyaltyTiersExpirationAllExpirationDateRounding.md +++ b/docs/LoyaltyTiersExpirationAllExpirationDateRounding.md @@ -6,12 +6,12 @@ Defines the rounding mechanism for tier expiration. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | This mechanism describes a custom rounding for the expiration date. | [optional] | -|**strategy** | [**StrategyEnum**](#StrategyEnum) | This mechanism describes a rounding strategy for the expiration date. | [optional] | -|**unit** | [**UnitEnum**](#UnitEnum) | Defines the type of unit of time in which the rounding period is counted. | [optional] | -|**value** | **Integer** | Value for the unit of time that the rounding applies to. Units for this parameter are defined by the `rounding.unit` parameter. - `0`: January - `1`: February - `2`: March - `3`: April - `4`: May - `5`: June - `6`: July - `7`: August - `8`: September - `9`: October - `10`: November - `11`: December | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**type** | [**TypeEnum**](#TypeEnum) | This mechanism describes a custom rounding for the expiration date. | +|**strategy** | [**StrategyEnum**](#StrategyEnum) | This mechanism describes a rounding strategy for the expiration date. | +|**unit** | [**UnitEnum**](#UnitEnum) | Defines the type of unit of time in which the rounding period is counted. | +|**value** | **Integer** | Value for the unit of time that the rounding applies to. Units for this parameter are defined by the `rounding.unit` parameter. - `0`: January - `1`: February - `2`: March - `3`: April - `4`: May - `5`: June - `6`: July - `7`: August - `8`: September - `9`: October - `10`: November - `11`: December | @@ -24,7 +24,6 @@ Defines the rounding mechanism for tier expiration. | HALF_YEAR | "HALF_YEAR" | | YEAR | "YEAR" | | CUSTOM | "CUSTOM" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -34,7 +33,6 @@ Defines the rounding mechanism for tier expiration. |---- | -----| | START | "START" | | END | "END" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -43,7 +41,6 @@ Defines the rounding mechanism for tier expiration. | Name | Value | |---- | -----| | MONTH | "MONTH" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LoyaltyTiersExpirationAllStartDate.md b/docs/LoyaltyTiersExpirationAllStartDate.md index 4806a10c..c931148e 100644 --- a/docs/LoyaltyTiersExpirationAllStartDate.md +++ b/docs/LoyaltyTiersExpirationAllStartDate.md @@ -6,9 +6,9 @@ Defines the conditions for the start date of the tier. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | What triggers the tier to be valid for a customer. `IMMEDIATE`: After reaching the minimum required points. `NEXT_PERIOD`: When the next qualification period starts. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**type** | [**TypeEnum**](#TypeEnum) | What triggers the tier to be valid for a customer. `IMMEDIATE`: After reaching the minimum required points. `NEXT_PERIOD`: When the next qualification period starts. | @@ -18,7 +18,6 @@ Defines the conditions for the start date of the tier. |---- | -----| | IMMEDIATE | "IMMEDIATE" | | NEXT_PERIOD | "NEXT_PERIOD" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/LuckyDraw.md b/docs/LuckyDraw.md index f5fbc91b..31552b07 100644 --- a/docs/LuckyDraw.md +++ b/docs/LuckyDraw.md @@ -6,11 +6,11 @@ Object for defining detailed information about lucky draw should be applied ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**winnersCount** | **String** | It represents the total number of winners in a lucky draw. | [optional] | -|**uniqueWinnersPerDraw** | **String** | It indicates whether each winner in a draw is unique or not. | [optional] | -|**uniqueWinners** | **String** | Specifies whether each participant can win only once across multiple draws. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**winnersCount** | **String** | It represents the total number of winners in a lucky draw. | +|**uniqueWinnersPerDraw** | **String** | It indicates whether each winner in a draw is unique or not. | +|**uniqueWinners** | **String** | Specifies whether each participant can win only once across multiple draws. | diff --git a/docs/MappingPoints.md b/docs/MappingPoints.md index d9d34f8e..b9b57910 100644 --- a/docs/MappingPoints.md +++ b/docs/MappingPoints.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | -|**multiplier** | **BigDecimal** | Multiplication factor used to multiply the points to obtain the mapped points. | [optional] | -|**points** | **Integer** | Fixed number of points to be applied. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**type** | [**TypeEnum**](#TypeEnum) | | +|**multiplier** | **BigDecimal** | Multiplication factor used to multiply the points to obtain the mapped points. | +|**points** | **Integer** | Fixed number of points to be applied. | @@ -19,7 +19,6 @@ |---- | -----| | MULTIPLY | "MULTIPLY" | | CUSTOM | "CUSTOM" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/Order.md b/docs/Order.md index 82c96e94..6650f1ba 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -5,20 +5,20 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | [**StatusEnum**](#StatusEnum) | The order status. | [optional] | -|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**items** | [**List<OrderItem>**](OrderItem.md) | Array of items applied to the order. | [optional] | -|**customer** | [**Customer**](Customer.md) | | [optional] | -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | [optional] | -|**referrer** | [**Referrer**](Referrer.md) | | [optional] | -|**referrerId** | **String** | Unique referrer ID. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] | -|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] | -|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**status** | [**StatusEnum**](#StatusEnum) | The order status. | +|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**items** | [**List<OrderItem>**](OrderItem.md) | Array of items applied to the order. | +|**customer** | [**Customer**](Customer.md) | | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**referrer** | [**Referrer**](Referrer.md) | | +|**referrerId** | **String** | Unique referrer ID. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | +|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | +|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | @@ -30,7 +30,6 @@ | PAID | "PAID" | | CANCELED | "CANCELED" | | FULFILLED | "FULFILLED" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/OrderBase.md b/docs/OrderBase.md index df3560c8..1bab5950 100644 --- a/docs/OrderBase.md +++ b/docs/OrderBase.md @@ -5,18 +5,18 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | [**StatusEnum**](#StatusEnum) | The order status. | [optional] | -|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**items** | [**List<OrderItem>**](OrderItem.md) | Array of items applied to the order. | [optional] | -|**customer** | [**Customer**](Customer.md) | | [optional] | -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | [optional] | -|**referrer** | [**Referrer**](Referrer.md) | | [optional] | -|**referrerId** | **String** | Unique referrer ID. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**status** | [**StatusEnum**](#StatusEnum) | The order status. | +|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**items** | [**List<OrderItem>**](OrderItem.md) | Array of items applied to the order. | +|**customer** | [**Customer**](Customer.md) | | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**referrer** | [**Referrer**](Referrer.md) | | +|**referrerId** | **String** | Unique referrer ID. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | @@ -28,7 +28,6 @@ | PAID | "PAID" | | CANCELED | "CANCELED" | | FULFILLED | "FULFILLED" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/OrderCalculated.md b/docs/OrderCalculated.md index 68de94d0..0944a033 100644 --- a/docs/OrderCalculated.md +++ b/docs/OrderCalculated.md @@ -5,30 +5,30 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] | -|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The order status. | [optional] | -|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] | -|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] | -|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] | -|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] | -|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | [optional] | -|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] | -|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] | -|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] | -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | [optional] | -|**referrerId** | **String** | Unique referrer ID. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**redemptions** | [**Map<String, OrderRedemptions>**](OrderRedemptions.md) | | [optional] | -|**customer** | [**CustomerId**](CustomerId.md) | | [optional] | -|**referrer** | [**CustomerId**](CustomerId.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | +|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | The order status. | +|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | +|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | +|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | +|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | +|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | +|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | +|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | +|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**referrerId** | **String** | Unique referrer ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**redemptions** | [**Map<String, OrderRedemptions>**](OrderRedemptions.md) | | +|**customer** | [**CustomerId**](CustomerId.md) | | +|**referrer** | [**CustomerId**](CustomerId.md) | | @@ -40,7 +40,6 @@ | PAID | "PAID" | | CANCELED | "CANCELED" | | FULFILLED | "FULFILLED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -49,7 +48,6 @@ | Name | Value | |---- | -----| | ORDER | "order" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/OrderCalculatedBase.md b/docs/OrderCalculatedBase.md index d8c8a319..faa9bbc4 100644 --- a/docs/OrderCalculatedBase.md +++ b/docs/OrderCalculatedBase.md @@ -6,28 +6,28 @@ Order information. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] | -|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The order status. | [optional] | -|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] | -|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] | -|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] | -|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] | -|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | [optional] | -|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] | -|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] | -|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] | -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | [optional] | -|**referrerId** | **String** | Unique referrer ID. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**redemptions** | [**Map<String, OrderRedemptions>**](OrderRedemptions.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | +|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | The order status. | +|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | +|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | +|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | +|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | +|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | +|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | +|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | +|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**referrerId** | **String** | Unique referrer ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**redemptions** | [**Map<String, OrderRedemptions>**](OrderRedemptions.md) | | @@ -39,7 +39,6 @@ Order information. | PAID | "PAID" | | CANCELED | "CANCELED" | | FULFILLED | "FULFILLED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -48,7 +47,6 @@ Order information. | Name | Value | |---- | -----| | ORDER | "order" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/OrderCalculatedNoCustomerData.md b/docs/OrderCalculatedNoCustomerData.md index 8dfbccb8..d1e82f15 100644 --- a/docs/OrderCalculatedNoCustomerData.md +++ b/docs/OrderCalculatedNoCustomerData.md @@ -5,30 +5,30 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] | -|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The order status. | [optional] | -|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] | -|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] | -|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] | -|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] | -|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | [optional] | -|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] | -|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] | -|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] | -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | [optional] | -|**referrerId** | **String** | Unique referrer ID. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**redemptions** | [**Map<String, OrderRedemptions>**](OrderRedemptions.md) | | [optional] | -|**customer** | **CustomerId** | | [optional] | -|**referrer** | **ReferrerId** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | +|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | The order status. | +|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | +|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | +|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | +|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | +|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | +|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | +|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | +|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**referrerId** | **String** | Unique referrer ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**redemptions** | [**Map<String, OrderRedemptions>**](OrderRedemptions.md) | | +|**customer** | **CustomerId** | | +|**referrer** | **ReferrerId** | | @@ -40,7 +40,6 @@ | PAID | "PAID" | | CANCELED | "CANCELED" | | FULFILLED | "FULFILLED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -49,7 +48,6 @@ | Name | Value | |---- | -----| | ORDER | "order" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/OrderItem.md b/docs/OrderItem.md index 948f85c9..09013ca4 100644 --- a/docs/OrderItem.md +++ b/docs/OrderItem.md @@ -5,22 +5,22 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**skuId** | **String** | A unique SKU ID assigned by Voucherify. | [optional] | -|**productId** | **String** | A unique product ID assigned by Voucherify. | [optional] | -|**relatedObject** | [**RelatedObjectEnum**](#RelatedObjectEnum) | Used along with the source_id property, can be set to either sku or product. | [optional] | -|**sourceId** | **String** | The merchant’s product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service. | [optional] | -|**quantity** | **Integer** | The quantity of the particular item in the cart. | [optional] | -|**discountQuantity** | **Integer** | Number of dicounted items. | [optional] | -|**initialQuantity** | **Integer** | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity. | [optional] | -|**amount** | **Integer** | The total amount of the order item (price * quantity). | [optional] | -|**discountAmount** | **Integer** | Sum of all order-item-level discounts applied to the order. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**price** | **Integer** | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [optional] | -|**product** | [**OrderItemCalculatedProduct**](OrderItemCalculatedProduct.md) | | [optional] | -|**sku** | [**OrderItemCalculatedSku**](OrderItemCalculatedSku.md) | | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**skuId** | **String** | A unique SKU ID assigned by Voucherify. | +|**productId** | **String** | A unique product ID assigned by Voucherify. | +|**relatedObject** | [**RelatedObjectEnum**](#RelatedObjectEnum) | Used along with the source_id property, can be set to either sku or product. | +|**sourceId** | **String** | The merchant’s product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service. | +|**quantity** | **Integer** | The quantity of the particular item in the cart. | +|**discountQuantity** | **Integer** | Number of dicounted items. | +|**initialQuantity** | **Integer** | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity. | +|**amount** | **Integer** | The total amount of the order item (price * quantity). | +|**discountAmount** | **Integer** | Sum of all order-item-level discounts applied to the order. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**price** | **Integer** | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | +|**product** | [**OrderItemCalculatedProduct**](OrderItemCalculatedProduct.md) | | +|**sku** | [**OrderItemCalculatedSku**](OrderItemCalculatedSku.md) | | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. | @@ -30,7 +30,6 @@ |---- | -----| | PRODUCT | "product" | | SKU | "sku" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/OrderItemCalculated.md b/docs/OrderItemCalculated.md index d3ee6261..980b01a9 100644 --- a/docs/OrderItemCalculated.md +++ b/docs/OrderItemCalculated.md @@ -5,26 +5,26 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**skuId** | **String** | A unique SKU ID assigned by Voucherify. | [optional] | -|**productId** | **String** | A unique product ID assigned by Voucherify. | [optional] | -|**relatedObject** | [**RelatedObjectEnum**](#RelatedObjectEnum) | Used along with the source_id property, can be set to either sku or product. | [optional] | -|**sourceId** | **String** | The merchant’s product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service. | [optional] | -|**quantity** | **Integer** | The quantity of the particular item in the cart. | [optional] | -|**discountQuantity** | **Integer** | Number of dicounted items. | [optional] | -|**initialQuantity** | **Integer** | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity. | [optional] | -|**amount** | **Integer** | The total amount of the order item (price * quantity). | [optional] | -|**discountAmount** | **Integer** | Sum of all order-item-level discounts applied to the order. | [optional] | -|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] | -|**price** | **Integer** | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [optional] | -|**subtotalAmount** | **Integer** | Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the `amount`. `subtotal_amount`=`amount`-`applied_discount_amount` | [optional] | -|**product** | [**OrderItemCalculatedProduct**](OrderItemCalculatedProduct.md) | | [optional] | -|**sku** | [**OrderItemCalculatedSku**](OrderItemCalculatedSku.md) | | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**skuId** | **String** | A unique SKU ID assigned by Voucherify. | +|**productId** | **String** | A unique product ID assigned by Voucherify. | +|**relatedObject** | [**RelatedObjectEnum**](#RelatedObjectEnum) | Used along with the source_id property, can be set to either sku or product. | +|**sourceId** | **String** | The merchant’s product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service. | +|**quantity** | **Integer** | The quantity of the particular item in the cart. | +|**discountQuantity** | **Integer** | Number of dicounted items. | +|**initialQuantity** | **Integer** | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity. | +|**amount** | **Integer** | The total amount of the order item (price * quantity). | +|**discountAmount** | **Integer** | Sum of all order-item-level discounts applied to the order. | +|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | +|**price** | **Integer** | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | +|**subtotalAmount** | **Integer** | Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the `amount`. `subtotal_amount`=`amount`-`applied_discount_amount` | +|**product** | [**OrderItemCalculatedProduct**](OrderItemCalculatedProduct.md) | | +|**sku** | [**OrderItemCalculatedSku**](OrderItemCalculatedSku.md) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. | @@ -34,7 +34,6 @@ |---- | -----| | PRODUCT | "product" | | SKU | "sku" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -43,7 +42,6 @@ | Name | Value | |---- | -----| | ORDER_ITEM | "order_item" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/OrderItemCalculatedProduct.md b/docs/OrderItemCalculatedProduct.md index 2fa1b593..aeafce2e 100644 --- a/docs/OrderItemCalculatedProduct.md +++ b/docs/OrderItemCalculatedProduct.md @@ -6,14 +6,14 @@ An object containing details of the related product. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | A unique identifier that represents the product and is assigned by Voucherify. | [optional] | -|**sourceId** | **String** | The merchant’s product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. | [optional] | -|**override** | **Boolean** | The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. | [optional] | -|**name** | **String** | Product name. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. | [optional] | -|**price** | **BigDecimal** | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | A unique identifier that represents the product and is assigned by Voucherify. | +|**sourceId** | **String** | The merchant’s product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. | +|**override** | **Boolean** | The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. | +|**name** | **String** | Product name. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. | +|**price** | **BigDecimal** | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). | diff --git a/docs/OrderItemCalculatedSku.md b/docs/OrderItemCalculatedSku.md index 62cc00c5..49b76fd2 100644 --- a/docs/OrderItemCalculatedSku.md +++ b/docs/OrderItemCalculatedSku.md @@ -6,13 +6,13 @@ An object containing details of the related SKU. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | [optional] | -|**sourceId** | **String** | The merchant’s SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. | [optional] | -|**override** | **Boolean** | The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. | [optional] | -|**sku** | **String** | The SKU name. | [optional] | -|**price** | **BigDecimal** | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | +|**sourceId** | **String** | The merchant’s SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. | +|**override** | **Boolean** | The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. | +|**sku** | **String** | The SKU name. | +|**price** | **BigDecimal** | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). | diff --git a/docs/OrderRedemptions.md b/docs/OrderRedemptions.md index 72b28f18..fc7101a8 100644 --- a/docs/OrderRedemptions.md +++ b/docs/OrderRedemptions.md @@ -5,16 +5,16 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format. | [optional] | -|**rollbackId** | **String** | Unique ID of the redemption rollback. | [optional] | -|**rollbackDate** | **OffsetDateTime** | Timestamp representing the date and tiem when the redemption rollback was created. The value is shown in the ISO 8601 format. | [optional] | -|**relatedObjectType** | **String** | The source of the incentive. | [optional] | -|**relatedObjectId** | **String** | Unique ID of the parent redemption. | [optional] | -|**relatedObjectParentId** | **String** | Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign. | [optional] | -|**stacked** | **List<String>** | Contains a list of unique IDs of child redemptions, which belong to the stacked incentives. | [optional] | -|**rollbackStacked** | **List<String>** | Lists the rollback redemption IDs of the particular child redemptions. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format. | +|**rollbackId** | **String** | Unique ID of the redemption rollback. | +|**rollbackDate** | **OffsetDateTime** | Timestamp representing the date and tiem when the redemption rollback was created. The value is shown in the ISO 8601 format. | +|**relatedObjectType** | **String** | The source of the incentive. | +|**relatedObjectId** | **String** | Unique ID of the parent redemption. | +|**relatedObjectParentId** | **String** | Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign. | +|**stacked** | **List<String>** | Contains a list of unique IDs of child redemptions, which belong to the stacked incentives. | +|**rollbackStacked** | **List<String>** | Lists the rollback redemption IDs of the particular child redemptions. | diff --git a/docs/OrdersApi.md b/docs/OrdersApi.md index 54cee7ed..6ed98f84 100644 --- a/docs/OrdersApi.md +++ b/docs/OrdersApi.md @@ -65,9 +65,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **ordersCreateRequestBody** | [**OrdersCreateRequestBody**](OrdersCreateRequestBody.md)| Specify the order parameters. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **ordersCreateRequestBody** | [**OrdersCreateRequestBody**](OrdersCreateRequestBody.md)| Specify the order parameters. | ### Return type @@ -140,9 +140,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **ordersExportCreateRequestBody** | [**OrdersExportCreateRequestBody**](OrdersExportCreateRequestBody.md)| Specify which order parameters you would like to export. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **ordersExportCreateRequestBody** | [**OrdersExportCreateRequestBody**](OrdersExportCreateRequestBody.md)| Specify which order parameters you would like to export. | ### Return type @@ -215,9 +215,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **orderId** | **String**| Unique Voucherify order ID or order source ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **orderId** | **String**| Unique Voucherify order ID or order source ID. | ### Return type @@ -290,9 +290,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **ordersImportCreateRequestBodyItem** | [**List<OrdersImportCreateRequestBodyItem>**](OrdersImportCreateRequestBodyItem.md)| The request body is sent in the form of an array of order objects. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **ordersImportCreateRequestBodyItem** | [**List<OrdersImportCreateRequestBodyItem>**](OrdersImportCreateRequestBodyItem.md)| The request body is sent in the form of an array of order objects. | ### Return type @@ -367,11 +367,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | -| **order** | [**ParameterOrderListOrders**](.md)| This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] [enum: created_at, -created_at, updated_at, -updated_at] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | +| **order** | [**ParameterOrderListOrders**](.md)| This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | ### Return type @@ -445,10 +445,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **orderId** | **String**| Unique Voucherify order ID or order source ID. | | -| **ordersUpdateRequestBody** | [**OrdersUpdateRequestBody**](OrdersUpdateRequestBody.md)| Specify the parameters of the order that are to be updated. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **orderId** | **String**| Unique Voucherify order ID or order source ID. | +| **ordersUpdateRequestBody** | [**OrdersUpdateRequestBody**](OrdersUpdateRequestBody.md)| Specify the parameters of the order that are to be updated. | ### Return type diff --git a/docs/OrdersCreateRequestBody.md b/docs/OrdersCreateRequestBody.md index 32b558ae..3233651e 100644 --- a/docs/OrdersCreateRequestBody.md +++ b/docs/OrdersCreateRequestBody.md @@ -6,20 +6,20 @@ Request body schema for **POST** `/orders`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] | -|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The order status. | [optional] | -|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**items** | [**List<OrderItem>**](OrderItem.md) | Array of items applied to the order. | [optional] | -|**customer** | [**Customer**](Customer.md) | | [optional] | -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | [optional] | -|**referrer** | [**Referrer**](Referrer.md) | | [optional] | -|**referrerId** | **String** | Unique referrer ID. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | +|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | +|**status** | [**StatusEnum**](#StatusEnum) | The order status. | +|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**items** | [**List<OrderItem>**](OrderItem.md) | Array of items applied to the order. | +|**customer** | [**Customer**](Customer.md) | | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**referrer** | [**Referrer**](Referrer.md) | | +|**referrerId** | **String** | Unique referrer ID. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | @@ -31,7 +31,6 @@ Request body schema for **POST** `/orders`. | PAID | "PAID" | | CANCELED | "CANCELED" | | FULFILLED | "FULFILLED" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/OrdersCreateResponseBody.md b/docs/OrdersCreateResponseBody.md index 17c69f96..ade701c0 100644 --- a/docs/OrdersCreateResponseBody.md +++ b/docs/OrdersCreateResponseBody.md @@ -6,30 +6,30 @@ Response body schema for **POST** `/orders`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] | -|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The order status. | [optional] | -|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] | -|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] | -|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] | -|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] | -|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | [optional] | -|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] | -|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] | -|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] | -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | [optional] | -|**referrerId** | **String** | Unique referrer ID. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**redemptions** | [**Map<String, OrderRedemptions>**](OrderRedemptions.md) | | [optional] | -|**customer** | [**CustomerId**](CustomerId.md) | | [optional] | -|**referrer** | [**CustomerId**](CustomerId.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | +|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | The order status. | +|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | +|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | +|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | +|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | +|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | +|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | +|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | +|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**referrerId** | **String** | Unique referrer ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**redemptions** | [**Map<String, OrderRedemptions>**](OrderRedemptions.md) | | +|**customer** | [**CustomerId**](CustomerId.md) | | +|**referrer** | [**CustomerId**](CustomerId.md) | | @@ -41,7 +41,6 @@ Response body schema for **POST** `/orders`. | PAID | "PAID" | | CANCELED | "CANCELED" | | FULFILLED | "FULFILLED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -50,7 +49,6 @@ Response body schema for **POST** `/orders`. | Name | Value | |---- | -----| | ORDER | "order" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/OrdersExportCreateRequestBody.md b/docs/OrdersExportCreateRequestBody.md index 28ebf3da..cade20d3 100644 --- a/docs/OrdersExportCreateRequestBody.md +++ b/docs/OrdersExportCreateRequestBody.md @@ -6,9 +6,9 @@ Request body schema for **POST** `/orders/export`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**parameters** | [**OrdersExportCreateRequestBodyParameters**](OrdersExportCreateRequestBodyParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**parameters** | [**OrdersExportCreateRequestBodyParameters**](OrdersExportCreateRequestBodyParameters.md) | | diff --git a/docs/OrdersExportCreateRequestBodyParameters.md b/docs/OrdersExportCreateRequestBodyParameters.md index cd95b8f4..ab32d45c 100644 --- a/docs/OrdersExportCreateRequestBodyParameters.md +++ b/docs/OrdersExportCreateRequestBodyParameters.md @@ -6,11 +6,11 @@ List of available fields and filters that can be exported with an order along wi ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**order** | **ExportOrderOrder** | | [optional] | -|**fields** | **List<ExportOrderFields>** | Array of strings containing the data in the export. These fields define the headers in the CSV file. | [optional] | -|**filters** | **Object** | Allowed additional properties must start with \"metadata.\" | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**order** | **ExportOrderOrder** | | +|**fields** | **List<ExportOrderFields>** | Array of strings containing the data in the export. These fields define the headers in the CSV file. | +|**filters** | **Object** | Allowed additional properties must start with \"metadata.\" | diff --git a/docs/OrdersExportCreateResponseBody.md b/docs/OrdersExportCreateResponseBody.md index f4d66dc2..cfbc0576 100644 --- a/docs/OrdersExportCreateResponseBody.md +++ b/docs/OrdersExportCreateResponseBody.md @@ -6,17 +6,17 @@ Response body schema for **POST** `/orders/export`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique export ID. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the export. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | | -|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | | -|**channel** | **String** | The channel through which the export was triggered. | [optional] | -|**result** | **Object** | Contains the URL of the CSV file. | | -|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | | -|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | The type of object to be exported. | | -|**parameters** | [**OrdersExportCreateRequestBodyParameters**](OrdersExportCreateRequestBodyParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique export ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the export. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | +|**channel** | **String** | The channel through which the export was triggered. | +|**result** | **Object** | Contains the URL of the CSV file. | +|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | +|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | The type of object to be exported. | +|**parameters** | [**OrdersExportCreateRequestBodyParameters**](OrdersExportCreateRequestBodyParameters.md) | | @@ -25,7 +25,6 @@ Response body schema for **POST** `/orders/export`. | Name | Value | |---- | -----| | EXPORT | "export" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -34,7 +33,6 @@ Response body schema for **POST** `/orders/export`. | Name | Value | |---- | -----| | SCHEDULED | "SCHEDULED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -43,7 +41,6 @@ Response body schema for **POST** `/orders/export`. | Name | Value | |---- | -----| | ORDER | "order" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/OrdersGetResponseBody.md b/docs/OrdersGetResponseBody.md index e02aed0b..c3c51a4f 100644 --- a/docs/OrdersGetResponseBody.md +++ b/docs/OrdersGetResponseBody.md @@ -6,30 +6,30 @@ Response body schema for **GET** `/orders/{orderId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] | -|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The order status. | [optional] | -|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] | -|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] | -|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] | -|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] | -|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | [optional] | -|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] | -|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] | -|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] | -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | [optional] | -|**referrerId** | **String** | Unique referrer ID. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**redemptions** | [**Map<String, OrderRedemptions>**](OrderRedemptions.md) | | [optional] | -|**customer** | **CustomerId** | | [optional] | -|**referrer** | **ReferrerId** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | +|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | The order status. | +|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | +|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | +|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | +|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | +|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | +|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | +|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | +|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**referrerId** | **String** | Unique referrer ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**redemptions** | [**Map<String, OrderRedemptions>**](OrderRedemptions.md) | | +|**customer** | **CustomerId** | | +|**referrer** | **ReferrerId** | | @@ -41,7 +41,6 @@ Response body schema for **GET** `/orders/{orderId}`. | PAID | "PAID" | | CANCELED | "CANCELED" | | FULFILLED | "FULFILLED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -50,7 +49,6 @@ Response body schema for **GET** `/orders/{orderId}`. | Name | Value | |---- | -----| | ORDER | "order" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/OrdersImportCreateRequestBodyItem.md b/docs/OrdersImportCreateRequestBodyItem.md index bad789e1..ff2923bb 100644 --- a/docs/OrdersImportCreateRequestBodyItem.md +++ b/docs/OrdersImportCreateRequestBodyItem.md @@ -5,19 +5,19 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | [**StatusEnum**](#StatusEnum) | The order status. | [optional] | -|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**items** | [**List<OrderItem>**](OrderItem.md) | Array of items applied to the order. | [optional] | -|**customer** | [**Customer**](Customer.md) | | [optional] | -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | [optional] | -|**referrer** | [**Referrer**](Referrer.md) | | [optional] | -|**referrerId** | **String** | Unique referrer ID. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] | -|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**status** | [**StatusEnum**](#StatusEnum) | The order status. | +|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**items** | [**List<OrderItem>**](OrderItem.md) | Array of items applied to the order. | +|**customer** | [**Customer**](Customer.md) | | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**referrer** | [**Referrer**](Referrer.md) | | +|**referrerId** | **String** | Unique referrer ID. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | +|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | @@ -29,7 +29,6 @@ | PAID | "PAID" | | CANCELED | "CANCELED" | | FULFILLED | "FULFILLED" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/OrdersImportCreateResponseBody.md b/docs/OrdersImportCreateResponseBody.md index 1f9d585b..75efcc15 100644 --- a/docs/OrdersImportCreateResponseBody.md +++ b/docs/OrdersImportCreateResponseBody.md @@ -6,9 +6,9 @@ Response body schema for **POST** `/orders/import`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | diff --git a/docs/OrdersListResponseBody.md b/docs/OrdersListResponseBody.md index 29ed6af5..0e1ca9c1 100644 --- a/docs/OrdersListResponseBody.md +++ b/docs/OrdersListResponseBody.md @@ -6,12 +6,12 @@ Response body schema representing **GET** `/orders`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about orders in a dictionary. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of order objects. | | -|**orders** | [**List<OrderCalculatedNoCustomerData>**](OrderCalculatedNoCustomerData.md) | Contains array of order objects. | | -|**total** | **Integer** | Total number of orders. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about orders in a dictionary. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of order objects. | +|**orders** | [**List<OrderCalculatedNoCustomerData>**](OrderCalculatedNoCustomerData.md) | Contains array of order objects. | +|**total** | **Integer** | Total number of orders. | @@ -20,7 +20,6 @@ Response body schema representing **GET** `/orders`. | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -29,7 +28,6 @@ Response body schema representing **GET** `/orders`. | Name | Value | |---- | -----| | ORDERS | "orders" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/OrdersUpdateRequestBody.md b/docs/OrdersUpdateRequestBody.md index f5b8b0c1..a3b2f888 100644 --- a/docs/OrdersUpdateRequestBody.md +++ b/docs/OrdersUpdateRequestBody.md @@ -6,18 +6,18 @@ Request body schema for **PUT** `/orders/{orderId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | [**StatusEnum**](#StatusEnum) | The order status. | [optional] | -|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**items** | [**List<OrderItem>**](OrderItem.md) | Array of items applied to the order. | [optional] | -|**customer** | [**Customer**](Customer.md) | | [optional] | -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | [optional] | -|**referrer** | [**Referrer**](Referrer.md) | | [optional] | -|**referrerId** | **String** | Unique referrer ID. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**status** | [**StatusEnum**](#StatusEnum) | The order status. | +|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**items** | [**List<OrderItem>**](OrderItem.md) | Array of items applied to the order. | +|**customer** | [**Customer**](Customer.md) | | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**referrer** | [**Referrer**](Referrer.md) | | +|**referrerId** | **String** | Unique referrer ID. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | @@ -29,7 +29,6 @@ Request body schema for **PUT** `/orders/{orderId}`. | PAID | "PAID" | | CANCELED | "CANCELED" | | FULFILLED | "FULFILLED" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/OrdersUpdateResponseBody.md b/docs/OrdersUpdateResponseBody.md index 278606f6..1261f5ac 100644 --- a/docs/OrdersUpdateResponseBody.md +++ b/docs/OrdersUpdateResponseBody.md @@ -6,30 +6,30 @@ Response body schema for **PUT** `/orders/{orderId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] | -|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The order status. | [optional] | -|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] | -|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] | -|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] | -|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] | -|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | [optional] | -|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] | -|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] | -|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] | -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | [optional] | -|**referrerId** | **String** | Unique referrer ID. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**redemptions** | [**Map<String, OrderRedemptions>**](OrderRedemptions.md) | | [optional] | -|**customer** | [**CustomerId**](CustomerId.md) | | [optional] | -|**referrer** | [**CustomerId**](CustomerId.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | +|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | The order status. | +|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | +|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | +|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | +|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | +|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | +|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | +|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | +|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**referrerId** | **String** | Unique referrer ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**redemptions** | [**Map<String, OrderRedemptions>**](OrderRedemptions.md) | | +|**customer** | [**CustomerId**](CustomerId.md) | | +|**referrer** | [**CustomerId**](CustomerId.md) | | @@ -41,7 +41,6 @@ Response body schema for **PUT** `/orders/{orderId}`. | PAID | "PAID" | | CANCELED | "CANCELED" | | FULFILLED | "FULFILLED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -50,7 +49,6 @@ Response body schema for **PUT** `/orders/{orderId}`. | Name | Value | |---- | -----| | ORDER | "order" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ParameterCampaignType.md b/docs/ParameterCampaignType.md index 8ed1a75e..3a8d8ad7 100644 --- a/docs/ParameterCampaignType.md +++ b/docs/ParameterCampaignType.md @@ -17,7 +17,5 @@ * `LUCKY_DRAW` (value: `"LUCKY_DRAW"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ParameterCreatedBeforeAfter.md b/docs/ParameterCreatedBeforeAfter.md index f69e6b5a..db49c08b 100644 --- a/docs/ParameterCreatedBeforeAfter.md +++ b/docs/ParameterCreatedBeforeAfter.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**before** | **OffsetDateTime** | Timestamp representing the date and time before the voucher was created. The value is shown in the ISO 8601 format. | [optional] | -|**after** | **OffsetDateTime** | Timestamp representing the date and time after the voucher was created. The value is shown in the ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**before** | **OffsetDateTime** | Timestamp representing the date and time before the voucher was created. The value is shown in the ISO 8601 format. | +|**after** | **OffsetDateTime** | Timestamp representing the date and time after the voucher was created. The value is shown in the ISO 8601 format. | diff --git a/docs/ParameterExpandListCampaigns.md b/docs/ParameterExpandListCampaigns.md index 3c9db22d..6cf7bb54 100644 --- a/docs/ParameterExpandListCampaigns.md +++ b/docs/ParameterExpandListCampaigns.md @@ -7,7 +7,5 @@ * `CATEGORY` (value: `"category"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ParameterFiltersListRedemptions.md b/docs/ParameterFiltersListRedemptions.md index 1027a5a3..3e1a23d3 100644 --- a/docs/ParameterFiltersListRedemptions.md +++ b/docs/ParameterFiltersListRedemptions.md @@ -5,18 +5,18 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**voucherCode** | [**ParameterFiltersListRedemptionsVoucherCode**](ParameterFiltersListRedemptionsVoucherCode.md) | | [optional] | -|**relatedObjectId** | [**ParameterFiltersListRedemptionsRelatedObjectId**](ParameterFiltersListRedemptionsRelatedObjectId.md) | | [optional] | -|**relatedObjectParentId** | [**ParameterFiltersListRedemptionsRelatedObjectParentId**](ParameterFiltersListRedemptionsRelatedObjectParentId.md) | | [optional] | -|**parentRedemptionId** | [**ParameterFiltersListRedemptionsParentRedemptionId**](ParameterFiltersListRedemptionsParentRedemptionId.md) | | [optional] | -|**failureCode** | [**ParameterFiltersListRedemptionsFailureCode**](ParameterFiltersListRedemptionsFailureCode.md) | | [optional] | -|**result** | [**ParameterFiltersListRedemptionsResult**](ParameterFiltersListRedemptionsResult.md) | | [optional] | -|**_object** | [**ParameterFiltersListRedemptionsObject**](ParameterFiltersListRedemptionsObject.md) | | [optional] | -|**customerId** | [**ParameterFiltersListRedemptionsCustomerId**](ParameterFiltersListRedemptionsCustomerId.md) | | [optional] | -|**campaignName** | [**ParameterFiltersListRedemptionsCampaignName**](ParameterFiltersListRedemptionsCampaignName.md) | | [optional] | -|**userLogin** | [**ParameterFiltersListRedemptionsUserLogin**](ParameterFiltersListRedemptionsUserLogin.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**voucherCode** | [**ParameterFiltersListRedemptionsVoucherCode**](ParameterFiltersListRedemptionsVoucherCode.md) | | +|**relatedObjectId** | [**ParameterFiltersListRedemptionsRelatedObjectId**](ParameterFiltersListRedemptionsRelatedObjectId.md) | | +|**relatedObjectParentId** | [**ParameterFiltersListRedemptionsRelatedObjectParentId**](ParameterFiltersListRedemptionsRelatedObjectParentId.md) | | +|**parentRedemptionId** | [**ParameterFiltersListRedemptionsParentRedemptionId**](ParameterFiltersListRedemptionsParentRedemptionId.md) | | +|**failureCode** | [**ParameterFiltersListRedemptionsFailureCode**](ParameterFiltersListRedemptionsFailureCode.md) | | +|**result** | [**ParameterFiltersListRedemptionsResult**](ParameterFiltersListRedemptionsResult.md) | | +|**_object** | [**ParameterFiltersListRedemptionsObject**](ParameterFiltersListRedemptionsObject.md) | | +|**customerId** | [**ParameterFiltersListRedemptionsCustomerId**](ParameterFiltersListRedemptionsCustomerId.md) | | +|**campaignName** | [**ParameterFiltersListRedemptionsCampaignName**](ParameterFiltersListRedemptionsCampaignName.md) | | +|**userLogin** | [**ParameterFiltersListRedemptionsUserLogin**](ParameterFiltersListRedemptionsUserLogin.md) | | diff --git a/docs/ParameterFiltersListRedemptionsCampaignName.md b/docs/ParameterFiltersListRedemptionsCampaignName.md index 96e10c17..5594d4c5 100644 --- a/docs/ParameterFiltersListRedemptionsCampaignName.md +++ b/docs/ParameterFiltersListRedemptionsCampaignName.md @@ -6,10 +6,10 @@ Campaign name. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] | -|**junction** | **Junction** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | +|**junction** | **Junction** | | diff --git a/docs/ParameterFiltersListRedemptionsCustomerId.md b/docs/ParameterFiltersListRedemptionsCustomerId.md index fd7bb808..8c34584f 100644 --- a/docs/ParameterFiltersListRedemptionsCustomerId.md +++ b/docs/ParameterFiltersListRedemptionsCustomerId.md @@ -6,10 +6,10 @@ Unique customer ID, i.e. cust_sehkNIi8Uq2qQuRqSr7xn4Zi. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] | -|**junction** | **Junction** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | +|**junction** | **Junction** | | diff --git a/docs/ParameterFiltersListRedemptionsFailureCode.md b/docs/ParameterFiltersListRedemptionsFailureCode.md index 120a4ed6..d4bc1347 100644 --- a/docs/ParameterFiltersListRedemptionsFailureCode.md +++ b/docs/ParameterFiltersListRedemptionsFailureCode.md @@ -6,10 +6,10 @@ Failure code, i.e. quantity_exceeded. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] | -|**junction** | **Junction** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | +|**junction** | **Junction** | | diff --git a/docs/ParameterFiltersListRedemptionsObject.md b/docs/ParameterFiltersListRedemptionsObject.md index c1c08daf..c407d2a3 100644 --- a/docs/ParameterFiltersListRedemptionsObject.md +++ b/docs/ParameterFiltersListRedemptionsObject.md @@ -6,10 +6,10 @@ Specify which type of object to return, i.e. `redemption` or `redemption_rollbac ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] | -|**junction** | **Junction** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | +|**junction** | **Junction** | | diff --git a/docs/ParameterFiltersListRedemptionsParentRedemptionId.md b/docs/ParameterFiltersListRedemptionsParentRedemptionId.md index b1a90ced..ba30e012 100644 --- a/docs/ParameterFiltersListRedemptionsParentRedemptionId.md +++ b/docs/ParameterFiltersListRedemptionsParentRedemptionId.md @@ -6,10 +6,10 @@ Unique parent redemption ID, i.e. r_0c5952900bcbfd54b6. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] | -|**junction** | **Junction** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | +|**junction** | **Junction** | | diff --git a/docs/ParameterFiltersListRedemptionsRelatedObjectId.md b/docs/ParameterFiltersListRedemptionsRelatedObjectId.md index 532e9fd7..0bec6da2 100644 --- a/docs/ParameterFiltersListRedemptionsRelatedObjectId.md +++ b/docs/ParameterFiltersListRedemptionsRelatedObjectId.md @@ -6,10 +6,10 @@ Unique related object ID, i.e. v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] | -|**junction** | **Junction** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | +|**junction** | **Junction** | | diff --git a/docs/ParameterFiltersListRedemptionsRelatedObjectParentId.md b/docs/ParameterFiltersListRedemptionsRelatedObjectParentId.md index 70758488..baefe16a 100644 --- a/docs/ParameterFiltersListRedemptionsRelatedObjectParentId.md +++ b/docs/ParameterFiltersListRedemptionsRelatedObjectParentId.md @@ -6,10 +6,10 @@ Unique related object parent ID, i.e. camp_22noMlhTADb7Fq2UL3vWu3d1. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] | -|**junction** | **Junction** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | +|**junction** | **Junction** | | diff --git a/docs/ParameterFiltersListRedemptionsResult.md b/docs/ParameterFiltersListRedemptionsResult.md index 33cada90..c81b08bb 100644 --- a/docs/ParameterFiltersListRedemptionsResult.md +++ b/docs/ParameterFiltersListRedemptionsResult.md @@ -6,10 +6,10 @@ Result, i.e. `SUCCESS` or `FAILURE`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] | -|**junction** | **Junction** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | +|**junction** | **Junction** | | diff --git a/docs/ParameterFiltersListRedemptionsUserLogin.md b/docs/ParameterFiltersListRedemptionsUserLogin.md index 349b80f6..470bebb4 100644 --- a/docs/ParameterFiltersListRedemptionsUserLogin.md +++ b/docs/ParameterFiltersListRedemptionsUserLogin.md @@ -6,10 +6,10 @@ User login used to login to Voucherify, i.e. name.lastname@email.com ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] | -|**junction** | **Junction** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | +|**junction** | **Junction** | | diff --git a/docs/ParameterFiltersListRedemptionsVoucherCode.md b/docs/ParameterFiltersListRedemptionsVoucherCode.md index d91fe5a4..02eb2e1b 100644 --- a/docs/ParameterFiltersListRedemptionsVoucherCode.md +++ b/docs/ParameterFiltersListRedemptionsVoucherCode.md @@ -6,10 +6,10 @@ Unique voucher code. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] | -|**junction** | **Junction** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | +|**junction** | **Junction** | | diff --git a/docs/ParameterOrder.md b/docs/ParameterOrder.md index 69c29853..4b96cebc 100644 --- a/docs/ParameterOrder.md +++ b/docs/ParameterOrder.md @@ -29,7 +29,5 @@ * `_CATEGORY` (value: `"-category"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ParameterOrderListAllPromotionStacks.md b/docs/ParameterOrderListAllPromotionStacks.md index 39c91975..d8318484 100644 --- a/docs/ParameterOrderListAllPromotionStacks.md +++ b/docs/ParameterOrderListAllPromotionStacks.md @@ -17,7 +17,5 @@ * `_NAME` (value: `"-name"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ParameterOrderListCampaigns.md b/docs/ParameterOrderListCampaigns.md index b3cb0e8b..a2f6378b 100644 --- a/docs/ParameterOrderListCampaigns.md +++ b/docs/ParameterOrderListCampaigns.md @@ -13,7 +13,5 @@ * `_UPDATED_AT` (value: `"-updated_at"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ParameterOrderListCustomers.md b/docs/ParameterOrderListCustomers.md index 221f8e87..79631888 100644 --- a/docs/ParameterOrderListCustomers.md +++ b/docs/ParameterOrderListCustomers.md @@ -17,7 +17,5 @@ * `_SOURCE_ID` (value: `"-source_id"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ParameterOrderListExports.md b/docs/ParameterOrderListExports.md index f55f54ea..af8ce589 100644 --- a/docs/ParameterOrderListExports.md +++ b/docs/ParameterOrderListExports.md @@ -13,7 +13,5 @@ * `_STATUS` (value: `"-status"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ParameterOrderListLoyaltyTiers.md b/docs/ParameterOrderListLoyaltyTiers.md index 263674af..738a1c81 100644 --- a/docs/ParameterOrderListLoyaltyTiers.md +++ b/docs/ParameterOrderListLoyaltyTiers.md @@ -13,7 +13,5 @@ * `_UPDATED_AT` (value: `"-updated_at"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ParameterOrderListOrders.md b/docs/ParameterOrderListOrders.md index b818db9a..f17a645c 100644 --- a/docs/ParameterOrderListOrders.md +++ b/docs/ParameterOrderListOrders.md @@ -13,7 +13,5 @@ * `_UPDATED_AT` (value: `"-updated_at"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ParameterOrderListPublications.md b/docs/ParameterOrderListPublications.md index f5552c0c..d374ae86 100644 --- a/docs/ParameterOrderListPublications.md +++ b/docs/ParameterOrderListPublications.md @@ -29,7 +29,5 @@ * `_CHANNEL` (value: `"-channel"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ParameterOrderListRedemptions.md b/docs/ParameterOrderListRedemptions.md index a9064c6f..d79ffd2f 100644 --- a/docs/ParameterOrderListRedemptions.md +++ b/docs/ParameterOrderListRedemptions.md @@ -25,7 +25,5 @@ * `_CUSTOMER_ID` (value: `"-customer_id"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ParameterOrderListValidationRuleAssignments.md b/docs/ParameterOrderListValidationRuleAssignments.md index d2449d47..7cccae48 100644 --- a/docs/ParameterOrderListValidationRuleAssignments.md +++ b/docs/ParameterOrderListValidationRuleAssignments.md @@ -9,7 +9,5 @@ * `_CREATED_AT` (value: `"-created_at"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ParameterOrderListValidationRules.md b/docs/ParameterOrderListValidationRules.md index 98d3a774..43285205 100644 --- a/docs/ParameterOrderListValidationRules.md +++ b/docs/ParameterOrderListValidationRules.md @@ -17,7 +17,5 @@ * `_NAME` (value: `"-name"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ParameterResultListPublications.md b/docs/ParameterResultListPublications.md index 5e9579ab..978c73f4 100644 --- a/docs/ParameterResultListPublications.md +++ b/docs/ParameterResultListPublications.md @@ -9,7 +9,5 @@ * `FAILURE` (value: `"FAILURE"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/ParameterUpdatedBeforeAfter.md b/docs/ParameterUpdatedBeforeAfter.md index e050f838..8f848a68 100644 --- a/docs/ParameterUpdatedBeforeAfter.md +++ b/docs/ParameterUpdatedBeforeAfter.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**before** | **OffsetDateTime** | Timestamp representing the date and time before the voucher was updated. The value is shown in the ISO 8601 format. | [optional] | -|**after** | **OffsetDateTime** | Timestamp representing the date and time after the voucher was updated. The value is shown in the ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**before** | **OffsetDateTime** | Timestamp representing the date and time before the voucher was updated. The value is shown in the ISO 8601 format. | +|**after** | **OffsetDateTime** | Timestamp representing the date and time after the voucher was updated. The value is shown in the ISO 8601 format. | diff --git a/docs/ParameterVoucherTypeListPublications.md b/docs/ParameterVoucherTypeListPublications.md index 9b0df20d..e7dceefb 100644 --- a/docs/ParameterVoucherTypeListPublications.md +++ b/docs/ParameterVoucherTypeListPublications.md @@ -11,7 +11,5 @@ * `LUCKY_DRAW` (value: `"lucky_draw"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/PointsExpirationTypes.md b/docs/PointsExpirationTypes.md index 9fe8535e..a227907d 100644 --- a/docs/PointsExpirationTypes.md +++ b/docs/PointsExpirationTypes.md @@ -11,7 +11,5 @@ * `NON_EXPIRING` (value: `"NON_EXPIRING"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/Product.md b/docs/Product.md index de48d7c3..1a0bacec 100644 --- a/docs/Product.md +++ b/docs/Product.md @@ -6,19 +6,19 @@ This is an object representing a product. This entity should be used to map p ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique product ID assigned by Voucherify. | | -|**sourceId** | **String** | Unique product source ID. | [optional] | -|**name** | **String** | Unique user-defined product name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the product. | | -|**skus** | [**SkusListForProduct**](SkusListForProduct.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique product ID assigned by Voucherify. | +|**sourceId** | **String** | Unique product source ID. | +|**name** | **String** | Unique user-defined product name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the product. | +|**skus** | [**SkusListForProduct**](SkusListForProduct.md) | | @@ -27,7 +27,6 @@ This is an object representing a product. This entity should be used to map p | Name | Value | |---- | -----| | PRODUCT | "product" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductCollectionsApi.md b/docs/ProductCollectionsApi.md index e686cfef..dd19c170 100644 --- a/docs/ProductCollectionsApi.md +++ b/docs/ProductCollectionsApi.md @@ -64,9 +64,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **productCollectionsCreateRequestBody** | [**ProductCollectionsCreateRequestBody**](ProductCollectionsCreateRequestBody.md)| | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **productCollectionsCreateRequestBody** | [**ProductCollectionsCreateRequestBody**](ProductCollectionsCreateRequestBody.md)| | ### Return type @@ -138,9 +138,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **productCollectionId** | **String**| A unique product collection ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **productCollectionId** | **String**| A unique product collection ID. | ### Return type @@ -213,9 +213,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **productCollectionId** | **String**| A unique product collection ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **productCollectionId** | **String**| A unique product collection ID. | ### Return type @@ -290,11 +290,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | -| **order** | [**ParameterOrder**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] [enum: created_at, -created_at, updated_at, -updated_at, type, -type, code, -code, campaign, -campaign, category, -category] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | +| **order** | [**ParameterOrder**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | ### Return type @@ -371,13 +371,13 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **productCollectionId** | **String**| Unique product collection ID. | | -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | -| **order** | [**ParameterOrder**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] [enum: created_at, -created_at, updated_at, -updated_at, type, -type, code, -code, campaign, -campaign, category, -category] | -| **startingAfter** | **OffsetDateTime**| Timestamp representing the date and time to use in starting_after cursor to get more data. Represented in ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **productCollectionId** | **String**| Unique product collection ID. | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | +| **order** | [**ParameterOrder**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | +| **startingAfter** | **OffsetDateTime**| Timestamp representing the date and time to use in starting_after cursor to get more data. Represented in ISO 8601 format. | ### Return type diff --git a/docs/ProductCollectionsCreateDynamicRequestBodyProductsItem.md b/docs/ProductCollectionsCreateDynamicRequestBodyProductsItem.md index d2e3cfa9..e2e095ca 100644 --- a/docs/ProductCollectionsCreateDynamicRequestBodyProductsItem.md +++ b/docs/ProductCollectionsCreateDynamicRequestBodyProductsItem.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The product ID. | | -|**productId** | **String** | Product ID for SKUs. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | Denotes the type of object represented by the ID. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | The product ID. | +|**productId** | **String** | Product ID for SKUs. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | Denotes the type of object represented by the ID. | @@ -19,7 +19,6 @@ |---- | -----| | SKU | "sku" | | PRODUCT | "product" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductCollectionsCreateRequestBody.md b/docs/ProductCollectionsCreateRequestBody.md index 532fe44a..762ca9a3 100644 --- a/docs/ProductCollectionsCreateRequestBody.md +++ b/docs/ProductCollectionsCreateRequestBody.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | Show that the product collection is static (manually selected products). | | -|**name** | **String** | Unique user-defined product collection name. | | -|**products** | [**List<ProductCollectionsCreateDynamicRequestBodyProductsItem>**](ProductCollectionsCreateDynamicRequestBodyProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | [optional] | -|**filter** | [**ProductCollectionsCreateRequestBodyFilter**](ProductCollectionsCreateRequestBodyFilter.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**type** | [**TypeEnum**](#TypeEnum) | Show that the product collection is static (manually selected products). | +|**name** | **String** | Unique user-defined product collection name. | +|**products** | [**List<ProductCollectionsCreateDynamicRequestBodyProductsItem>**](ProductCollectionsCreateDynamicRequestBodyProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | +|**filter** | [**ProductCollectionsCreateRequestBodyFilter**](ProductCollectionsCreateRequestBodyFilter.md) | | @@ -19,7 +19,6 @@ | Name | Value | |---- | -----| | STATIC | "STATIC" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductCollectionsCreateRequestBodyFilter.md b/docs/ProductCollectionsCreateRequestBodyFilter.md index 033b4832..eb13c876 100644 --- a/docs/ProductCollectionsCreateRequestBodyFilter.md +++ b/docs/ProductCollectionsCreateRequestBodyFilter.md @@ -6,21 +6,21 @@ Defines a set of criteria and boundary conditions for an `AUTO_UPDATE` product c ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**junction** | **Junction** | | | -|**id** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**productId** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**sourceId** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**name** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**price** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**_object** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**attributes** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**metadata** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**imageUrl** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**skus** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**createdAt** | [**FieldConditions**](FieldConditions.md) | | [optional] | -|**updatedAt** | [**FieldConditions**](FieldConditions.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**junction** | **Junction** | | +|**id** | [**FieldConditions**](FieldConditions.md) | | +|**productId** | [**FieldConditions**](FieldConditions.md) | | +|**sourceId** | [**FieldConditions**](FieldConditions.md) | | +|**name** | [**FieldConditions**](FieldConditions.md) | | +|**price** | [**FieldConditions**](FieldConditions.md) | | +|**_object** | [**FieldConditions**](FieldConditions.md) | | +|**attributes** | [**FieldConditions**](FieldConditions.md) | | +|**metadata** | [**FieldConditions**](FieldConditions.md) | | +|**imageUrl** | [**FieldConditions**](FieldConditions.md) | | +|**skus** | [**FieldConditions**](FieldConditions.md) | | +|**createdAt** | [**FieldConditions**](FieldConditions.md) | | +|**updatedAt** | [**FieldConditions**](FieldConditions.md) | | diff --git a/docs/ProductCollectionsCreateResponseBody.md b/docs/ProductCollectionsCreateResponseBody.md index 09e6f6e0..b17c0393 100644 --- a/docs/ProductCollectionsCreateResponseBody.md +++ b/docs/ProductCollectionsCreateResponseBody.md @@ -6,15 +6,15 @@ Response body schema for **POST** `/product-collections`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Product collection ID. | | -|**name** | **String** | Unique user-defined product collection name. | | -|**type** | [**TypeEnum**](#TypeEnum) | Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). | | -|**filter** | [**ProductCollectionsCreateRequestBodyFilter**](ProductCollectionsCreateRequestBodyFilter.md) | | [optional] | -|**products** | [**List<ProductCollectionsItemProductsItem>**](ProductCollectionsItemProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the static product collection. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Product collection ID. | +|**name** | **String** | Unique user-defined product collection name. | +|**type** | [**TypeEnum**](#TypeEnum) | Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). | +|**filter** | [**ProductCollectionsCreateRequestBodyFilter**](ProductCollectionsCreateRequestBodyFilter.md) | | +|**products** | [**List<ProductCollectionsItemProductsItem>**](ProductCollectionsItemProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the static product collection. | @@ -24,7 +24,6 @@ Response body schema for **POST** `/product-collections`. |---- | -----| | STATIC | "STATIC" | | AUTO_UPDATE | "AUTO_UPDATE" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ Response body schema for **POST** `/product-collections`. | Name | Value | |---- | -----| | PRODUCTS_COLLECTION | "products_collection" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductCollectionsGetResponseBody.md b/docs/ProductCollectionsGetResponseBody.md index c667a89e..f69c4501 100644 --- a/docs/ProductCollectionsGetResponseBody.md +++ b/docs/ProductCollectionsGetResponseBody.md @@ -6,15 +6,15 @@ Response body schema for **GET** `/product-collections/{productCollectionId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Product collection ID. | | -|**name** | **String** | Unique user-defined product collection name. | | -|**type** | [**TypeEnum**](#TypeEnum) | Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). | | -|**filter** | [**ProductCollectionsCreateRequestBodyFilter**](ProductCollectionsCreateRequestBodyFilter.md) | | [optional] | -|**products** | [**List<ProductCollectionsItemProductsItem>**](ProductCollectionsItemProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the static product collection. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Product collection ID. | +|**name** | **String** | Unique user-defined product collection name. | +|**type** | [**TypeEnum**](#TypeEnum) | Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). | +|**filter** | [**ProductCollectionsCreateRequestBodyFilter**](ProductCollectionsCreateRequestBodyFilter.md) | | +|**products** | [**List<ProductCollectionsItemProductsItem>**](ProductCollectionsItemProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the static product collection. | @@ -24,7 +24,6 @@ Response body schema for **GET** `/product-collections/{productCollectionId}`. |---- | -----| | STATIC | "STATIC" | | AUTO_UPDATE | "AUTO_UPDATE" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ Response body schema for **GET** `/product-collections/{productCollectionId}`. | Name | Value | |---- | -----| | PRODUCTS_COLLECTION | "products_collection" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductCollectionsItem.md b/docs/ProductCollectionsItem.md index 07bb0c57..5f7c10f9 100644 --- a/docs/ProductCollectionsItem.md +++ b/docs/ProductCollectionsItem.md @@ -6,15 +6,15 @@ This is an object representing a product collection base. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Product collection ID. | | -|**name** | **String** | Unique user-defined product collection name. | | -|**type** | [**TypeEnum**](#TypeEnum) | Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). | | -|**filter** | [**ProductCollectionsCreateRequestBodyFilter**](ProductCollectionsCreateRequestBodyFilter.md) | | [optional] | -|**products** | [**List<ProductCollectionsItemProductsItem>**](ProductCollectionsItemProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the static product collection. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Product collection ID. | +|**name** | **String** | Unique user-defined product collection name. | +|**type** | [**TypeEnum**](#TypeEnum) | Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). | +|**filter** | [**ProductCollectionsCreateRequestBodyFilter**](ProductCollectionsCreateRequestBodyFilter.md) | | +|**products** | [**List<ProductCollectionsItemProductsItem>**](ProductCollectionsItemProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the static product collection. | @@ -24,7 +24,6 @@ This is an object representing a product collection base. |---- | -----| | STATIC | "STATIC" | | AUTO_UPDATE | "AUTO_UPDATE" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ This is an object representing a product collection base. | Name | Value | |---- | -----| | PRODUCTS_COLLECTION | "products_collection" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductCollectionsItemProductsItem.md b/docs/ProductCollectionsItemProductsItem.md index 6b0722ce..bf35b999 100644 --- a/docs/ProductCollectionsItemProductsItem.md +++ b/docs/ProductCollectionsItemProductsItem.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The product ID. | | -|**productId** | **String** | Product ID for SKUs. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | Denotes the type of object represented by the ID. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | The product ID. | +|**productId** | **String** | Product ID for SKUs. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | Denotes the type of object represented by the ID. | @@ -19,7 +19,6 @@ |---- | -----| | SKU | "sku" | | PRODUCT | "product" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductCollectionsList.md b/docs/ProductCollectionsList.md index 88d403c6..8208e97f 100644 --- a/docs/ProductCollectionsList.md +++ b/docs/ProductCollectionsList.md @@ -6,12 +6,12 @@ Schema representing list of product collections ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about product collections. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the JSON property that contains the array of product collections. | | -|**data** | [**List<ProductCollectionsItem>**](ProductCollectionsItem.md) | A dictionary that contains an array of product collections and their details. | | -|**total** | **Integer** | Total number of product collections. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about product collections. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the JSON property that contains the array of product collections. | +|**data** | [**List<ProductCollectionsItem>**](ProductCollectionsItem.md) | A dictionary that contains an array of product collections and their details. | +|**total** | **Integer** | Total number of product collections. | @@ -20,7 +20,6 @@ Schema representing list of product collections | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -29,7 +28,6 @@ Schema representing list of product collections | Name | Value | |---- | -----| | DATA | "data" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductCollectionsListResponseBody.md b/docs/ProductCollectionsListResponseBody.md index 6fe3edb4..fa9fb390 100644 --- a/docs/ProductCollectionsListResponseBody.md +++ b/docs/ProductCollectionsListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/product-collections`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about product collections. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the JSON property that contains the array of product collections. | | -|**data** | [**List<ProductCollectionsItem>**](ProductCollectionsItem.md) | A dictionary that contains an array of product collections and their details. | | -|**total** | **Integer** | Total number of product collections. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about product collections. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the JSON property that contains the array of product collections. | +|**data** | [**List<ProductCollectionsItem>**](ProductCollectionsItem.md) | A dictionary that contains an array of product collections and their details. | +|**total** | **Integer** | Total number of product collections. | @@ -20,7 +20,6 @@ Response body schema for **GET** `/product-collections`. | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -29,7 +28,6 @@ Response body schema for **GET** `/product-collections`. | Name | Value | |---- | -----| | DATA | "data" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductCollectionsProductsList.md b/docs/ProductCollectionsProductsList.md index fcbbe258..637f7bcb 100644 --- a/docs/ProductCollectionsProductsList.md +++ b/docs/ProductCollectionsProductsList.md @@ -6,12 +6,12 @@ Response body schema for **GET** /product-collections/{productCollectionID}/prod ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about products and SKUs. | | -|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of products and SKUs. | | -|**data** | [**List<ProductCollectionsProductsListDataItem>**](ProductCollectionsProductsListDataItem.md) | | | -|**total** | **Integer** | Total number of products & SKUs in the product collection. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about products and SKUs. | +|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of products and SKUs. | +|**data** | [**List<ProductCollectionsProductsListDataItem>**](ProductCollectionsProductsListDataItem.md) | | +|**total** | **Integer** | Total number of products & SKUs in the product collection. | diff --git a/docs/ProductCollectionsProductsListDataItem.md b/docs/ProductCollectionsProductsListDataItem.md index e4440ae9..194f6013 100644 --- a/docs/ProductCollectionsProductsListDataItem.md +++ b/docs/ProductCollectionsProductsListDataItem.md @@ -5,22 +5,22 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**sourceId** | **String** | | [optional] | -|**name** | **String** | Unique user-defined product name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | [optional] | -|**metadata** | **Object** | | [optional] | -|**imageUrl** | **String** | | [optional] | -|**createdAt** | **String** | | [optional] | -|**updatedAt** | **String** | | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | | [optional] | -|**productId** | **String** | The parent product's unique ID. | [optional] | -|**sku** | **String** | Unique user-defined SKU name. | [optional] | -|**currency** | **String** | SKU price currency. | [optional] | -|**product** | [**ProductWithoutSkus**](ProductWithoutSkus.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | | +|**sourceId** | **String** | | +|**name** | **String** | Unique user-defined product name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | +|**metadata** | **Object** | | +|**imageUrl** | **String** | | +|**createdAt** | **String** | | +|**updatedAt** | **String** | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | | +|**productId** | **String** | The parent product's unique ID. | +|**sku** | **String** | Unique user-defined SKU name. | +|**currency** | **String** | SKU price currency. | +|**product** | [**ProductWithoutSkus**](ProductWithoutSkus.md) | | @@ -30,7 +30,6 @@ |---- | -----| | PRODUCT | "product" | | SKU | "sku" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductCollectionsProductsListResponseBody.md b/docs/ProductCollectionsProductsListResponseBody.md index 1226f613..a696bbe5 100644 --- a/docs/ProductCollectionsProductsListResponseBody.md +++ b/docs/ProductCollectionsProductsListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/product-collections/{productCollectionId}/pro ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about products and SKUs. | | -|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of products and SKUs. | | -|**data** | [**List<ProductCollectionsProductsListDataItem>**](ProductCollectionsProductsListDataItem.md) | | | -|**total** | **Integer** | Total number of products & SKUs in the product collection. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about products and SKUs. | +|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of products and SKUs. | +|**data** | [**List<ProductCollectionsProductsListDataItem>**](ProductCollectionsProductsListDataItem.md) | | +|**total** | **Integer** | Total number of products & SKUs in the product collection. | diff --git a/docs/ProductWithoutSkus.md b/docs/ProductWithoutSkus.md index b868e5c6..d9723717 100644 --- a/docs/ProductWithoutSkus.md +++ b/docs/ProductWithoutSkus.md @@ -5,18 +5,18 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique product ID assigned by Voucherify. | | -|**sourceId** | **String** | Unique product source ID. | [optional] | -|**name** | **String** | Unique user-defined product name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the product. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique product ID assigned by Voucherify. | +|**sourceId** | **String** | Unique product source ID. | +|**name** | **String** | Unique user-defined product name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the product. | @@ -25,7 +25,6 @@ | Name | Value | |---- | -----| | PRODUCT | "product" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductsApi.md b/docs/ProductsApi.md index d412f49a..7ce94588 100644 --- a/docs/ProductsApi.md +++ b/docs/ProductsApi.md @@ -73,9 +73,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **productsCreateRequestBody** | [**ProductsCreateRequestBody**](ProductsCreateRequestBody.md)| Specify the product parameters. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **productsCreateRequestBody** | [**ProductsCreateRequestBody**](ProductsCreateRequestBody.md)| Specify the product parameters. | ### Return type @@ -149,10 +149,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **productId** | **String**| A Voucherify <!-- [product](OpenAPI.json/components/schemas/Product) -->[product](ref:get-product) ID or product source ID. | | -| **productsSkusCreateRequestBody** | [**ProductsSkusCreateRequestBody**](ProductsSkusCreateRequestBody.md)| Specify the SKU parameters to be created. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **productId** | **String**| A Voucherify <!-- [product](OpenAPI.json/components/schemas/Product) -->[product](ref:get-product) ID or product source ID. | +| **productsSkusCreateRequestBody** | [**ProductsSkusCreateRequestBody**](ProductsSkusCreateRequestBody.md)| Specify the SKU parameters to be created. | ### Return type @@ -225,10 +225,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **productId** | **String**| A Voucherify product ID or source ID. | | -| **force** | **Boolean**| If this flag is set to `true`, the product and all related SKUs will be removed permanently. If it is set to `false` or not set at all, the product and all related SKUs will be moved to the bin. Going forward, the user will be able to create another product with exactly the same `source_id`. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **productId** | **String**| A Voucherify product ID or source ID. | +| **force** | **Boolean**| If this flag is set to `true`, the product and all related SKUs will be removed permanently. If it is set to `false` or not set at all, the product and all related SKUs will be moved to the bin. Going forward, the user will be able to create another product with exactly the same `source_id`. | ### Return type @@ -302,11 +302,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **productId** | **String**| A unique Voucherify <!-- [product](OpenAPI.json/components/schemas/Product) -->[product](ref:get-product) ID or product source ID. | | -| **skuId** | **String**| A Voucherify <!-- [SKU](OpenAPI.json/components/schemas/Sku) -->[SKU ID](ref:get-sku) or SKU source ID. | | -| **force** | **Boolean**| If this flag is set to `true`, the SKU will be removed permanently. If it is set to `false` or not set at all, the SKU will be moved to the bin. Going forward, the user will be able to create another SKU with exactly the same `source_id`. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **productId** | **String**| A unique Voucherify <!-- [product](OpenAPI.json/components/schemas/Product) -->[product](ref:get-product) ID or product source ID. | +| **skuId** | **String**| A Voucherify <!-- [SKU](OpenAPI.json/components/schemas/Sku) -->[SKU ID](ref:get-sku) or SKU source ID. | +| **force** | **Boolean**| If this flag is set to `true`, the SKU will be removed permanently. If it is set to `false` or not set at all, the SKU will be moved to the bin. Going forward, the user will be able to create another SKU with exactly the same `source_id`. | ### Return type @@ -379,9 +379,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **productId** | **String**| A Voucherify product ID or source ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **productId** | **String**| A Voucherify product ID or source ID. | ### Return type @@ -454,9 +454,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **skuId** | **String**| A Voucherify SKU identifier or SKU source ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **skuId** | **String**| A Voucherify SKU identifier or SKU source ID. | ### Return type @@ -529,9 +529,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **_file** | **File**| File path. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **_file** | **File**| File path. | ### Return type @@ -604,9 +604,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **_file** | **File**| File path. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **_file** | **File**| File path. | ### Return type @@ -683,13 +683,13 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | -| **order** | [**ParameterOrder**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] [enum: created_at, -created_at, updated_at, -updated_at, type, -type, code, -code, campaign, -campaign, category, -category] | -| **startDate** | **OffsetDateTime**| Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | [optional] | -| **endDate** | **OffsetDateTime**| Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | +| **order** | [**ParameterOrder**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | +| **startDate** | **OffsetDateTime**| Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | +| **endDate** | **OffsetDateTime**| Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | ### Return type @@ -767,14 +767,14 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **productId** | **String**| A Voucherify <!-- [product](OpenAPI.json/components/schemas/Product) -->[product](ref:get-product) ID or product source ID. | | -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | -| **order** | [**ParameterOrder**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] [enum: created_at, -created_at, updated_at, -updated_at, type, -type, code, -code, campaign, -campaign, category, -category] | -| **startDate** | **OffsetDateTime**| Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | [optional] | -| **endDate** | **OffsetDateTime**| Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **productId** | **String**| A Voucherify <!-- [product](OpenAPI.json/components/schemas/Product) -->[product](ref:get-product) ID or product source ID. | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | +| **order** | [**ParameterOrder**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | +| **startDate** | **OffsetDateTime**| Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | +| **endDate** | **OffsetDateTime**| Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | ### Return type @@ -848,10 +848,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **productId** | **String**| A Voucherify product ID or source ID. | | -| **productsUpdateRequestBody** | [**ProductsUpdateRequestBody**](ProductsUpdateRequestBody.md)| Specify the parameters of the product that are to be updated. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **productId** | **String**| A Voucherify product ID or source ID. | +| **productsUpdateRequestBody** | [**ProductsUpdateRequestBody**](ProductsUpdateRequestBody.md)| Specify the parameters of the product that are to be updated. | ### Return type @@ -924,9 +924,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **productsUpdateInBulkRequestBody** | [**List<ProductsUpdateInBulkRequestBody>**](ProductsUpdateInBulkRequestBody.md)| Create an array of product objects, each with the parameters which you want to update. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **productsUpdateInBulkRequestBody** | [**List<ProductsUpdateInBulkRequestBody>**](ProductsUpdateInBulkRequestBody.md)| Create an array of product objects, each with the parameters which you want to update. | ### Return type @@ -999,9 +999,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **productsMetadataUpdateInBulkRequestBody** | [**ProductsMetadataUpdateInBulkRequestBody**](ProductsMetadataUpdateInBulkRequestBody.md)| Specify the list of product source IDs and the metadata key value pairs to be udpated for these products. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **productsMetadataUpdateInBulkRequestBody** | [**ProductsMetadataUpdateInBulkRequestBody**](ProductsMetadataUpdateInBulkRequestBody.md)| Specify the list of product source IDs and the metadata key value pairs to be udpated for these products. | ### Return type @@ -1076,11 +1076,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **productId** | **String**| A unique Voucherify <!-- [product](OpenAPI.json/components/schemas/Product) -->[product](ref:get-product) ID or product source ID. | | -| **skuId** | **String**| A Voucherify <!-- [SKU](OpenAPI.json/components/schemas/Sku) -->[SKU ID](ref:get-sku) or SKU source ID. | | -| **productsSkusUpdateRequestBody** | [**ProductsSkusUpdateRequestBody**](ProductsSkusUpdateRequestBody.md)| Specify the parameters to be updated. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **productId** | **String**| A unique Voucherify <!-- [product](OpenAPI.json/components/schemas/Product) -->[product](ref:get-product) ID or product source ID. | +| **skuId** | **String**| A Voucherify <!-- [SKU](OpenAPI.json/components/schemas/Sku) -->[SKU ID](ref:get-sku) or SKU source ID. | +| **productsSkusUpdateRequestBody** | [**ProductsSkusUpdateRequestBody**](ProductsSkusUpdateRequestBody.md)| Specify the parameters to be updated. | ### Return type diff --git a/docs/ProductsCreateRequestBody.md b/docs/ProductsCreateRequestBody.md index 601e84f6..26d3894b 100644 --- a/docs/ProductsCreateRequestBody.md +++ b/docs/ProductsCreateRequestBody.md @@ -6,15 +6,15 @@ Request schema for **POST** `/products`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | A unique identifier that represents the product and is assigned by Voucherify. | [optional] | -|**sourceId** | **String** | Unique product source ID. | [optional] | -|**name** | **String** | Unique user-defined product name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional] | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | A unique identifier that represents the product and is assigned by Voucherify. | +|**sourceId** | **String** | Unique product source ID. | +|**name** | **String** | Unique user-defined product name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | diff --git a/docs/ProductsCreateResponseBody.md b/docs/ProductsCreateResponseBody.md index 15dd8f8f..585cf2bf 100644 --- a/docs/ProductsCreateResponseBody.md +++ b/docs/ProductsCreateResponseBody.md @@ -6,19 +6,19 @@ Response body schema for **POST** `/products`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique product ID assigned by Voucherify. | | -|**sourceId** | **String** | Unique product source ID. | [optional] | -|**name** | **String** | Unique user-defined product name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the product. | | -|**skus** | [**SkusListForProduct**](SkusListForProduct.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique product ID assigned by Voucherify. | +|**sourceId** | **String** | Unique product source ID. | +|**name** | **String** | Unique user-defined product name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the product. | +|**skus** | [**SkusListForProduct**](SkusListForProduct.md) | | @@ -27,7 +27,6 @@ Response body schema for **POST** `/products`. | Name | Value | |---- | -----| | PRODUCT | "product" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductsGetResponseBody.md b/docs/ProductsGetResponseBody.md index 821acfe3..3f407a40 100644 --- a/docs/ProductsGetResponseBody.md +++ b/docs/ProductsGetResponseBody.md @@ -6,19 +6,19 @@ Response body schema for **GET** `/products/{productId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique product ID assigned by Voucherify. | | -|**sourceId** | **String** | Unique product source ID. | [optional] | -|**name** | **String** | Unique user-defined product name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the product. | | -|**skus** | [**SkusListForProduct**](SkusListForProduct.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique product ID assigned by Voucherify. | +|**sourceId** | **String** | Unique product source ID. | +|**name** | **String** | Unique user-defined product name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the product. | +|**skus** | [**SkusListForProduct**](SkusListForProduct.md) | | @@ -27,7 +27,6 @@ Response body schema for **GET** `/products/{productId}`. | Name | Value | |---- | -----| | PRODUCT | "product" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductsImportCsvCreateResponseBody.md b/docs/ProductsImportCsvCreateResponseBody.md index 17aeda78..3f77c969 100644 --- a/docs/ProductsImportCsvCreateResponseBody.md +++ b/docs/ProductsImportCsvCreateResponseBody.md @@ -6,9 +6,9 @@ Response body schema for **POST** `/products/importCSV`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | diff --git a/docs/ProductsListResponseBody.md b/docs/ProductsListResponseBody.md index f6398ced..f97eabd1 100644 --- a/docs/ProductsListResponseBody.md +++ b/docs/ProductsListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/products`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about products in a dictionary. | | -|**dataRef** | **String** | Identifies the name of the attribute that contains the array of product objects. | | -|**products** | [**List<Product>**](Product.md) | Contains array of product objects. | | -|**total** | **Integer** | Total number of product objects. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about products in a dictionary. | +|**dataRef** | **String** | Identifies the name of the attribute that contains the array of product objects. | +|**products** | [**List<Product>**](Product.md) | Contains array of product objects. | +|**total** | **Integer** | Total number of product objects. | diff --git a/docs/ProductsMetadataUpdateInBulkRequestBody.md b/docs/ProductsMetadataUpdateInBulkRequestBody.md index 767d898d..3d885219 100644 --- a/docs/ProductsMetadataUpdateInBulkRequestBody.md +++ b/docs/ProductsMetadataUpdateInBulkRequestBody.md @@ -6,10 +6,10 @@ Request schema for **POST** `/products/metadata/async`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**sourceIds** | **List<String>** | Array of unique product source IDs. | | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**sourceIds** | **List<String>** | Array of unique product source IDs. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | diff --git a/docs/ProductsMetadataUpdateInBulkResponseBody.md b/docs/ProductsMetadataUpdateInBulkResponseBody.md index d89f8179..05f50787 100644 --- a/docs/ProductsMetadataUpdateInBulkResponseBody.md +++ b/docs/ProductsMetadataUpdateInBulkResponseBody.md @@ -6,9 +6,9 @@ Response body schema for **POST** `/products/metadata/async`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | diff --git a/docs/ProductsSkusCreateRequestBody.md b/docs/ProductsSkusCreateRequestBody.md index 1dfed64b..47e43ade 100644 --- a/docs/ProductsSkusCreateRequestBody.md +++ b/docs/ProductsSkusCreateRequestBody.md @@ -6,16 +6,16 @@ Request body schema for **POST** `/products/{productId}/skus ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique SKU ID. | [optional] | -|**sourceId** | **String** | A unique SKU identifier from your inventory system. | [optional] | -|**sku** | **String** | Unique user-defined SKU name. | [optional] | -|**price** | **Integer** | SKU unit price. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [optional] | -|**currency** | **String** | SKU price currency. | [optional] | -|**attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | [optional] | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique SKU ID. | +|**sourceId** | **String** | A unique SKU identifier from your inventory system. | +|**sku** | **String** | Unique user-defined SKU name. | +|**price** | **Integer** | SKU unit price. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | +|**currency** | **String** | SKU price currency. | +|**attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | diff --git a/docs/ProductsSkusCreateResponseBody.md b/docs/ProductsSkusCreateResponseBody.md index 89167d71..9d64c5d7 100644 --- a/docs/ProductsSkusCreateResponseBody.md +++ b/docs/ProductsSkusCreateResponseBody.md @@ -6,20 +6,20 @@ Response body schema for **PUT** `/products/{productId}/skus`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | | -|**sourceId** | **String** | A unique SKU identifier from your inventory system. | [optional] | -|**productId** | **String** | The parent product's unique ID. | | -|**sku** | **String** | Unique user-defined SKU name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**currency** | **String** | SKU price currency. | [optional] | -|**attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the `SKU`. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | +|**sourceId** | **String** | A unique SKU identifier from your inventory system. | +|**productId** | **String** | The parent product's unique ID. | +|**sku** | **String** | Unique user-defined SKU name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**currency** | **String** | SKU price currency. | +|**attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the `SKU`. | @@ -28,7 +28,6 @@ Response body schema for **PUT** `/products/{productId}/skus`. | Name | Value | |---- | -----| | SKU | "sku" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductsSkusListResponseBody.md b/docs/ProductsSkusListResponseBody.md index 882cab68..d62d15c9 100644 --- a/docs/ProductsSkusListResponseBody.md +++ b/docs/ProductsSkusListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/products/{productId}/skus`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about SKUs. | | -|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of SKUs. | | -|**skus** | [**List<Sku>**](Sku.md) | A dictionary that contains an array of SKUs. | | -|**total** | **Integer** | Total number of SKUs in the product. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about SKUs. | +|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of SKUs. | +|**skus** | [**List<Sku>**](Sku.md) | A dictionary that contains an array of SKUs. | +|**total** | **Integer** | Total number of SKUs in the product. | diff --git a/docs/ProductsSkusUpdateRequestBody.md b/docs/ProductsSkusUpdateRequestBody.md index fdf7993d..39205183 100644 --- a/docs/ProductsSkusUpdateRequestBody.md +++ b/docs/ProductsSkusUpdateRequestBody.md @@ -6,14 +6,14 @@ Request body schema for **PUT** `/products/{productId}/skus/{skuId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**sku** | **String** | Unique user-defined SKU name. | [optional] | -|**price** | **Integer** | SKU unit price. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [optional] | -|**currency** | **String** | SKU price currency. | [optional] | -|**attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | [optional] | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**sku** | **String** | Unique user-defined SKU name. | +|**price** | **Integer** | SKU unit price. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | +|**currency** | **String** | SKU price currency. | +|**attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | diff --git a/docs/ProductsSkusUpdateResponseBody.md b/docs/ProductsSkusUpdateResponseBody.md index 1a4508b1..330bc1b4 100644 --- a/docs/ProductsSkusUpdateResponseBody.md +++ b/docs/ProductsSkusUpdateResponseBody.md @@ -6,20 +6,20 @@ Response body schema for **PUT** `/products/{productId}/skus/{skuId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | | -|**sourceId** | **String** | A unique SKU identifier from your inventory system. | [optional] | -|**productId** | **String** | The parent product's unique ID. | | -|**sku** | **String** | Unique user-defined SKU name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**currency** | **String** | SKU price currency. | [optional] | -|**attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the `SKU`. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | +|**sourceId** | **String** | A unique SKU identifier from your inventory system. | +|**productId** | **String** | The parent product's unique ID. | +|**sku** | **String** | Unique user-defined SKU name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**currency** | **String** | SKU price currency. | +|**attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the `SKU`. | @@ -28,7 +28,6 @@ Response body schema for **PUT** `/products/{productId}/skus/{skuId}`. | Name | Value | |---- | -----| | SKU | "sku" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ProductsUpdateInBulkRequestBody.md b/docs/ProductsUpdateInBulkRequestBody.md index fad2cd3e..b9888d11 100644 --- a/docs/ProductsUpdateInBulkRequestBody.md +++ b/docs/ProductsUpdateInBulkRequestBody.md @@ -6,14 +6,14 @@ Request schema for **POST** `/products/bulk/async`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**sourceId** | **String** | Unique product source ID from your inventory system. | | -|**name** | **String** | Unique user-defined product name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | [optional] | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**sourceId** | **String** | Unique product source ID from your inventory system. | +|**name** | **String** | Unique user-defined product name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | diff --git a/docs/ProductsUpdateInBulkResponseBody.md b/docs/ProductsUpdateInBulkResponseBody.md index d71b1a77..7f6f9311 100644 --- a/docs/ProductsUpdateInBulkResponseBody.md +++ b/docs/ProductsUpdateInBulkResponseBody.md @@ -6,9 +6,9 @@ Response body schema for **POST** `/products/bulk/async`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | diff --git a/docs/ProductsUpdateRequestBody.md b/docs/ProductsUpdateRequestBody.md index e4ee05f8..39f2e3c4 100644 --- a/docs/ProductsUpdateRequestBody.md +++ b/docs/ProductsUpdateRequestBody.md @@ -6,13 +6,13 @@ Request schema for **PUT** `/products`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Unique user-defined product name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional] | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Unique user-defined product name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | diff --git a/docs/ProductsUpdateResponseBody.md b/docs/ProductsUpdateResponseBody.md index 8290ba55..fc4d3f72 100644 --- a/docs/ProductsUpdateResponseBody.md +++ b/docs/ProductsUpdateResponseBody.md @@ -6,19 +6,19 @@ Response body schema for **PUT** `/products/{productId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique product ID assigned by Voucherify. | | -|**sourceId** | **String** | Unique product source ID. | [optional] | -|**name** | **String** | Unique user-defined product name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the product. | | -|**skus** | [**SkusListForProduct**](SkusListForProduct.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique product ID assigned by Voucherify. | +|**sourceId** | **String** | Unique product source ID. | +|**name** | **String** | Unique user-defined product name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the product. | +|**skus** | [**SkusListForProduct**](SkusListForProduct.md) | | @@ -27,7 +27,6 @@ Response body schema for **PUT** `/products/{productId}`. | Name | Value | |---- | -----| | PRODUCT | "product" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/PromotionStack.md b/docs/PromotionStack.md index 389c444b..58f4f613 100644 --- a/docs/PromotionStack.md +++ b/docs/PromotionStack.md @@ -5,17 +5,17 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Promotion stack name. | | -|**tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | | -|**id** | **String** | Unique promotion stack ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion stack was updated. The value is shown in the ISO 8601 format. | [optional] | -|**campaignId** | **String** | Promotion stack's parent campaign's unique ID. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**categoryId** | **String** | Promotion stack category ID. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Details about the category assigned to the promotion stack. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Promotion stack name. | +|**tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | +|**id** | **String** | Unique promotion stack ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion stack was updated. The value is shown in the ISO 8601 format. | +|**campaignId** | **String** | Promotion stack's parent campaign's unique ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**categoryId** | **String** | Promotion stack category ID. | +|**categories** | [**List<Category>**](Category.md) | Details about the category assigned to the promotion stack. | @@ -24,7 +24,6 @@ | Name | Value | |---- | -----| | PROMOTION_STACK | "promotion_stack" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/PromotionStackBase.md b/docs/PromotionStackBase.md index e8d4f60f..096237c4 100644 --- a/docs/PromotionStackBase.md +++ b/docs/PromotionStackBase.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Promotion stack name. | | -|**tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Promotion stack name. | +|**tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | diff --git a/docs/PromotionStackBaseTiers.md b/docs/PromotionStackBaseTiers.md index 0e14c7e4..023f2a2d 100644 --- a/docs/PromotionStackBaseTiers.md +++ b/docs/PromotionStackBaseTiers.md @@ -6,10 +6,10 @@ Contains the tier configuration. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ids** | **List<String>** | Contains the list of tiers in a pre-defined sequence. | | -|**hierarchyMode** | [**HierarchyModeEnum**](#HierarchyModeEnum) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**ids** | **List<String>** | Contains the list of tiers in a pre-defined sequence. | +|**hierarchyMode** | [**HierarchyModeEnum**](#HierarchyModeEnum) | | @@ -18,7 +18,6 @@ Contains the tier configuration. | Name | Value | |---- | -----| | MANUAL | "MANUAL" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/PromotionTier.md b/docs/PromotionTier.md index 2061e9d3..08252c6a 100644 --- a/docs/PromotionTier.md +++ b/docs/PromotionTier.md @@ -6,30 +6,30 @@ This is an object representing a promotion tier. Promotion tiers are always assi ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique promotion tier ID. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. | [optional] | -|**name** | **String** | Name of the promotion tier. | [optional] | -|**banner** | **String** | Text to be displayed to your customers on your website. | [optional] | -|**action** | [**PromotionTierAction**](PromotionTierAction.md) | | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | [optional] | -|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional] | -|**promotionId** | **String** | Promotion unique ID. | [optional] | -|**campaign** | [**PromotionTierCampaign**](PromotionTierCampaign.md) | | [optional] | -|**campaignId** | **String** | Promotion tier's parent campaign's unique ID. | [optional] | -|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | **List<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**summary** | [**PromotionTierSummary**](PromotionTierSummary.md) | | [optional] | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the promotion tier. | [optional] | -|**validationRuleAssignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | [optional] | -|**categoryId** | **String** | Promotion tier category ID. | [optional] | -|**categories** | [**List<Category>**](Category.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique promotion tier ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. | +|**name** | **String** | Name of the promotion tier. | +|**banner** | **String** | Text to be displayed to your customers on your website. | +|**action** | [**PromotionTierAction**](PromotionTierAction.md) | | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | +|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | +|**promotionId** | **String** | Promotion unique ID. | +|**campaign** | [**PromotionTierCampaign**](PromotionTierCampaign.md) | | +|**campaignId** | **String** | Promotion tier's parent campaign's unique ID. | +|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | +|**validityTimeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | +|**validityDayOfWeek** | **List<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**summary** | [**PromotionTierSummary**](PromotionTierSummary.md) | | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the promotion tier. | +|**validationRuleAssignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | +|**categoryId** | **String** | Promotion tier category ID. | +|**categories** | [**List<Category>**](Category.md) | | diff --git a/docs/PromotionTierAction.md b/docs/PromotionTierAction.md index d3687ee5..a4ee1e50 100644 --- a/docs/PromotionTierAction.md +++ b/docs/PromotionTierAction.md @@ -6,9 +6,9 @@ Contains details about the discount applied by the promotion tier. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**discount** | [**Discount**](Discount.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**discount** | [**Discount**](Discount.md) | | diff --git a/docs/PromotionTierCampaign.md b/docs/PromotionTierCampaign.md index 583ba4b1..33c734ac 100644 --- a/docs/PromotionTierCampaign.md +++ b/docs/PromotionTierCampaign.md @@ -6,17 +6,17 @@ Contains details about promotion tier's parent campaign. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique campaign ID. | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**PromotionTierCampaignValidityTimeframe**](PromotionTierCampaignValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the `start_date` and `expiration_date` using the <!-- [Disable Campaign](OpenAPI.json/paths/~1campaigns~1{campaignId}~1disable) -->[Disable Campaign](ref:disable-campaign) endpoint. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] | -|**categoryId** | **String** | Unique category ID that this campaign belongs to. | [optional] | -|**_object** | **String** | The type of the object represented by the campaign object. This object stores information about the campaign. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique campaign ID. | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | +|**validityTimeframe** | [**PromotionTierCampaignValidityTimeframe**](PromotionTierCampaignValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the `start_date` and `expiration_date` using the <!-- [Disable Campaign](OpenAPI.json/paths/~1campaigns~1{campaignId}~1disable) -->[Disable Campaign](ref:disable-campaign) endpoint. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | +|**categoryId** | **String** | Unique category ID that this campaign belongs to. | +|**_object** | **String** | The type of the object represented by the campaign object. This object stores information about the campaign. | @@ -31,7 +31,6 @@ Contains details about promotion tier's parent campaign. | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/PromotionTierCampaignValidityTimeframe.md b/docs/PromotionTierCampaignValidityTimeframe.md index dda14d42..1cdf0bf9 100644 --- a/docs/PromotionTierCampaignValidityTimeframe.md +++ b/docs/PromotionTierCampaignValidityTimeframe.md @@ -6,10 +6,10 @@ Recurrent time periods when the campaign is valid. For example, valid for 1 hour ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | [optional] | -|**duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | +|**duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | diff --git a/docs/PromotionTierCreateParams.md b/docs/PromotionTierCreateParams.md index d6e907b7..18a6e57d 100644 --- a/docs/PromotionTierCreateParams.md +++ b/docs/PromotionTierCreateParams.md @@ -6,22 +6,22 @@ This is an object representing a promotion tier create params. Promotion tiers a ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Name of the promotion tier. | | -|**banner** | **String** | Text to be displayed to your customers on your website. | [optional] | -|**action** | [**PromotionTierAction**](PromotionTierAction.md) | | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | [optional] | -|**validationRules** | **List<String>** | Array containing the ID of the validation rule associated with the promotion tier. | [optional] | -|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional] | -|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**category** | **String** | Assign category to the promotion tier. | [optional] | -|**categoryId** | **String** | Instead of using the category name, you can alternatively assign a new category to a promotion tier using a unique category ID, i.e. `cat_0c9da30e7116ba6bba`. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Name of the promotion tier. | +|**banner** | **String** | Text to be displayed to your customers on your website. | +|**action** | [**PromotionTierAction**](PromotionTierAction.md) | | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | +|**validationRules** | **List<String>** | Array containing the ID of the validation rule associated with the promotion tier. | +|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | +|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | +|**validityTimeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**category** | **String** | Assign category to the promotion tier. | +|**categoryId** | **String** | Instead of using the category name, you can alternatively assign a new category to a promotion tier using a unique category ID, i.e. `cat_0c9da30e7116ba6bba`. | @@ -36,7 +36,6 @@ This is an object representing a promotion tier create params. Promotion tiers a | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/PromotionTierSummary.md b/docs/PromotionTierSummary.md index 74e22aa3..9102dd9f 100644 --- a/docs/PromotionTierSummary.md +++ b/docs/PromotionTierSummary.md @@ -6,10 +6,10 @@ Contains statistics about promotion tier redemptions and orders. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redemptions** | [**PromotionTierSummaryRedemptions**](PromotionTierSummaryRedemptions.md) | | [optional] | -|**orders** | [**PromotionTierSummaryOrders**](PromotionTierSummaryOrders.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redemptions** | [**PromotionTierSummaryRedemptions**](PromotionTierSummaryRedemptions.md) | | +|**orders** | [**PromotionTierSummaryOrders**](PromotionTierSummaryOrders.md) | | diff --git a/docs/PromotionTierSummaryOrders.md b/docs/PromotionTierSummaryOrders.md index 258f5514..69cee9f1 100644 --- a/docs/PromotionTierSummaryOrders.md +++ b/docs/PromotionTierSummaryOrders.md @@ -6,10 +6,10 @@ Contains statistics about orders related to the promotion tier. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**totalAmount** | **Integer** | Sum of order totals. | [optional] | -|**totalDiscountAmount** | **Integer** | Sum of total discount applied using the promotion tier. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**totalAmount** | **Integer** | Sum of order totals. | +|**totalDiscountAmount** | **Integer** | Sum of total discount applied using the promotion tier. | diff --git a/docs/PromotionTierSummaryRedemptions.md b/docs/PromotionTierSummaryRedemptions.md index a47fc3e5..5dd750d2 100644 --- a/docs/PromotionTierSummaryRedemptions.md +++ b/docs/PromotionTierSummaryRedemptions.md @@ -6,9 +6,9 @@ Contains statistics about promotion tier redemptions. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**totalRedeemed** | **Integer** | Number of times the promotion tier was redeemed. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**totalRedeemed** | **Integer** | Number of times the promotion tier was redeemed. | diff --git a/docs/PromotionTierValidityTimeframe.md b/docs/PromotionTierValidityTimeframe.md index bb4eac68..1c339e0c 100644 --- a/docs/PromotionTierValidityTimeframe.md +++ b/docs/PromotionTierValidityTimeframe.md @@ -6,10 +6,10 @@ Set recurrent time periods when the promotion tier is valid. For example, valid ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a promotion tier with an `interval` of `P2D` will be active every other day. | [optional] | -|**duration** | **String** | Defines the amount of time the promotion tier will be active in ISO 8601 format. For example, a promotion tier with a `duration` of `P1D` will be valid for a duration of one day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a promotion tier with an `interval` of `P2D` will be active every other day. | +|**duration** | **String** | Defines the amount of time the promotion tier will be active in ISO 8601 format. For example, a promotion tier with a `duration` of `P1D` will be valid for a duration of one day. | diff --git a/docs/PromotionTiersList.md b/docs/PromotionTiersList.md index 0e8cb96c..385ebbee 100644 --- a/docs/PromotionTiersList.md +++ b/docs/PromotionTiersList.md @@ -6,13 +6,13 @@ Promotion Tiers ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about promotion tiers in a dictionary. | [optional] | -|**dataRef** | **String** | Identifies the name of the attribute that contains the array of promotion tier objects. | [optional] | -|**tiers** | [**List<PromotionTier>**](PromotionTier.md) | Contains array of promotion tier objects. | [optional] | -|**total** | **Integer** | Total number of promotion tiers. | [optional] | -|**hasMore** | **Boolean** | 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 (with a different page or a different start date filter) to get more records returned in the results. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about promotion tiers in a dictionary. | +|**dataRef** | **String** | Identifies the name of the attribute that contains the array of promotion tier objects. | +|**tiers** | [**List<PromotionTier>**](PromotionTier.md) | Contains array of promotion tier objects. | +|**total** | **Integer** | Total number of promotion tiers. | +|**hasMore** | **Boolean** | 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 (with a different page or a different start date filter) to get more records returned in the results. | diff --git a/docs/PromotionsApi.md b/docs/PromotionsApi.md index c31d066a..4c651595 100644 --- a/docs/PromotionsApi.md +++ b/docs/PromotionsApi.md @@ -70,10 +70,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| Unique campaign ID. | | -| **promotionsStacksCreateRequestBody** | [**PromotionsStacksCreateRequestBody**](PromotionsStacksCreateRequestBody.md)| Specify the order of promotion tiers for the promotion stack. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| Unique campaign ID. | +| **promotionsStacksCreateRequestBody** | [**PromotionsStacksCreateRequestBody**](PromotionsStacksCreateRequestBody.md)| Specify the order of promotion tiers for the promotion stack. | ### Return type @@ -146,10 +146,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty Campaign`. | | -| **stackId** | **String**| Promotion stack ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty Campaign`. | +| **stackId** | **String**| Promotion stack ID. | ### Return type @@ -222,9 +222,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **promotionTierId** | **String**| Unique promotion tier ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **promotionTierId** | **String**| Unique promotion tier ID. | ### Return type @@ -297,9 +297,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **promotionTierId** | **String**| Unique promotion tier ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **promotionTierId** | **String**| Unique promotion tier ID. | ### Return type @@ -373,10 +373,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty Campaign`. | | -| **stackId** | **String**| Promotion stack ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty Campaign`. | +| **stackId** | **String**| Promotion stack ID. | ### Return type @@ -449,9 +449,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **promotionTierId** | **String**| Unique promotion tier ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **promotionTierId** | **String**| Unique promotion tier ID. | ### Return type @@ -528,13 +528,13 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | -| **order** | [**ParameterOrderListAllPromotionStacks**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] [enum: created_at, -created_at, updated_at, -updated_at, name, -name] | -| **createdAt** | [**ParameterCreatedBeforeAfter**](.md)| A filter on the list based on the object `created_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[created_at][before]=2017-09-08T13:52:18.227Z` | [optional] | -| **updatedAt** | [**ParameterUpdatedBeforeAfter**](.md)| A filter on the list based on the object `updated_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[updated_at][before]=2017-09-08T13:52:18.227Z` | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | +| **order** | [**ParameterOrderListAllPromotionStacks**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | +| **createdAt** | [**ParameterCreatedBeforeAfter**](.md)| A filter on the list based on the object `created_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[created_at][before]=2017-09-08T13:52:18.227Z` | +| **updatedAt** | [**ParameterUpdatedBeforeAfter**](.md)| A filter on the list based on the object `updated_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[updated_at][before]=2017-09-08T13:52:18.227Z` | ### Return type @@ -607,9 +607,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| Unique campaign ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| Unique campaign ID. | ### Return type @@ -682,9 +682,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| Unique campaign ID assigned by Voucherify. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| Unique campaign ID assigned by Voucherify. | ### Return type @@ -759,11 +759,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty Campaign`. | | -| **stackId** | **String**| Promotion stack ID. | | -| **promotionsStacksUpdateRequestBody** | [**PromotionsStacksUpdateRequestBody**](PromotionsStacksUpdateRequestBody.md)| Specify the promotion stack parameters that you would like to update. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **campaignId** | **String**| ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty Campaign`. | +| **stackId** | **String**| Promotion stack ID. | +| **promotionsStacksUpdateRequestBody** | [**PromotionsStacksUpdateRequestBody**](PromotionsStacksUpdateRequestBody.md)| Specify the promotion stack parameters that you would like to update. | ### Return type diff --git a/docs/PromotionsStacksCreateRequestBody.md b/docs/PromotionsStacksCreateRequestBody.md index 71b999b1..236715ee 100644 --- a/docs/PromotionsStacksCreateRequestBody.md +++ b/docs/PromotionsStacksCreateRequestBody.md @@ -6,11 +6,11 @@ Request body schema for **POST** `/promotions/{campaignId}/stacks`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Promotion stack name. | | -|**tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | | -|**categoryId** | **String** | Promotion stack category ID. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Promotion stack name. | +|**tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | +|**categoryId** | **String** | Promotion stack category ID. | diff --git a/docs/PromotionsStacksCreateResponseBody.md b/docs/PromotionsStacksCreateResponseBody.md index 4bf4f215..f0d77622 100644 --- a/docs/PromotionsStacksCreateResponseBody.md +++ b/docs/PromotionsStacksCreateResponseBody.md @@ -6,16 +6,16 @@ Response body schema for **POST** `/promotions/{campaignId}/stacks`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Promotion stack name. | | -|**tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | | -|**id** | **String** | Unique promotion stack ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format. | | -|**campaignId** | **String** | Promotion stack's parent campaign's unique ID. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**categoryId** | **String** | Promotion stack category ID. | [optional] | -|**categories** | [**List<PromotionStackBase>**](PromotionStackBase.md) | Details about the category assigned to the promotion stack. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Promotion stack name. | +|**tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | +|**id** | **String** | Unique promotion stack ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format. | +|**campaignId** | **String** | Promotion stack's parent campaign's unique ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**categoryId** | **String** | Promotion stack category ID. | +|**categories** | [**List<PromotionStackBase>**](PromotionStackBase.md) | Details about the category assigned to the promotion stack. | @@ -24,7 +24,6 @@ Response body schema for **POST** `/promotions/{campaignId}/stacks`. | Name | Value | |---- | -----| | PROMOTION_STACK | "promotion_stack" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/PromotionsStacksGetResponseBody.md b/docs/PromotionsStacksGetResponseBody.md index 1da87cd1..8b70b106 100644 --- a/docs/PromotionsStacksGetResponseBody.md +++ b/docs/PromotionsStacksGetResponseBody.md @@ -6,17 +6,17 @@ Response body schema for **GET** `/promotions/{campaignId}/stacks/{stackId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Promotion stack name. | | -|**tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | | -|**id** | **String** | Unique promotion stack ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion stack was updated. The value is shown in the ISO 8601 format. | [optional] | -|**campaignId** | **String** | Promotion stack's parent campaign's unique ID. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**categoryId** | **String** | Promotion stack category ID. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Details about the category assigned to the promotion stack. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Promotion stack name. | +|**tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | +|**id** | **String** | Unique promotion stack ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion stack was updated. The value is shown in the ISO 8601 format. | +|**campaignId** | **String** | Promotion stack's parent campaign's unique ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**categoryId** | **String** | Promotion stack category ID. | +|**categories** | [**List<Category>**](Category.md) | Details about the category assigned to the promotion stack. | @@ -25,7 +25,6 @@ Response body schema for **GET** `/promotions/{campaignId}/stacks/{stackId}`. | Name | Value | |---- | -----| | PROMOTION_STACK | "promotion_stack" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/PromotionsStacksListResponseBody.md b/docs/PromotionsStacksListResponseBody.md index b592c17e..cfab10c8 100644 --- a/docs/PromotionsStacksListResponseBody.md +++ b/docs/PromotionsStacksListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/promotions/stacks` and for **GET** `/promotio ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about promotion stacks in a dictionary. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of promotion stack objects. | | -|**data** | [**List<PromotionStack>**](PromotionStack.md) | Contains array of promotion stack objects. | | -|**total** | **Integer** | Total number of promotion stacks. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about promotion stacks in a dictionary. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of promotion stack objects. | +|**data** | [**List<PromotionStack>**](PromotionStack.md) | Contains array of promotion stack objects. | +|**total** | **Integer** | Total number of promotion stacks. | @@ -20,7 +20,6 @@ Response body schema for **GET** `/promotions/stacks` and for **GET** `/promotio | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -29,7 +28,6 @@ Response body schema for **GET** `/promotions/stacks` and for **GET** `/promotio | Name | Value | |---- | -----| | DATA | "data" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/PromotionsStacksUpdateRequestBody.md b/docs/PromotionsStacksUpdateRequestBody.md index 8fc042ec..37015666 100644 --- a/docs/PromotionsStacksUpdateRequestBody.md +++ b/docs/PromotionsStacksUpdateRequestBody.md @@ -6,11 +6,11 @@ Request Body schema for **put** `/promotions/{campaignId}/stacks/{stackId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Promotion stack name. | [optional] | -|**tiers** | [**PromotionsStacksUpdateRequestBodyTiers**](PromotionsStacksUpdateRequestBodyTiers.md) | | [optional] | -|**categoryId** | **String** | Promotion stack category ID. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Promotion stack name. | +|**tiers** | [**PromotionsStacksUpdateRequestBodyTiers**](PromotionsStacksUpdateRequestBodyTiers.md) | | +|**categoryId** | **String** | Promotion stack category ID. | diff --git a/docs/PromotionsStacksUpdateRequestBodyTiers.md b/docs/PromotionsStacksUpdateRequestBodyTiers.md index cdc80f4b..05aaa571 100644 --- a/docs/PromotionsStacksUpdateRequestBodyTiers.md +++ b/docs/PromotionsStacksUpdateRequestBodyTiers.md @@ -6,10 +6,10 @@ Contains the tier configuration. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ids** | **List<String>** | Contains the list of tiers in a pre-defined sequence. | [optional] | -|**hierarchyMode** | [**HierarchyModeEnum**](#HierarchyModeEnum) | Category hierarchy. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**ids** | **List<String>** | Contains the list of tiers in a pre-defined sequence. | +|**hierarchyMode** | [**HierarchyModeEnum**](#HierarchyModeEnum) | Category hierarchy. | @@ -18,7 +18,6 @@ Contains the tier configuration. | Name | Value | |---- | -----| | MANUAL | "MANUAL" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/PromotionsStacksUpdateResponseBody.md b/docs/PromotionsStacksUpdateResponseBody.md index 7cf0137a..a8549bd3 100644 --- a/docs/PromotionsStacksUpdateResponseBody.md +++ b/docs/PromotionsStacksUpdateResponseBody.md @@ -6,17 +6,17 @@ Response body schema for **PUT** `/promotions/{campaignId}/stacks/{stackId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Promotion stack name. | | -|**tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | | -|**id** | **String** | Unique promotion stack ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion stack was updated. The value is shown in the ISO 8601 format. | | -|**campaignId** | **String** | Promotion stack's parent campaign's unique ID. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | -|**categoryId** | **String** | Promotion stack category ID. | [optional] | -|**categories** | [**List<PromotionStackBase>**](PromotionStackBase.md) | Details about the category assigned to the promotion stack. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Promotion stack name. | +|**tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | +|**id** | **String** | Unique promotion stack ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion stack was updated. The value is shown in the ISO 8601 format. | +|**campaignId** | **String** | Promotion stack's parent campaign's unique ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**categoryId** | **String** | Promotion stack category ID. | +|**categories** | [**List<PromotionStackBase>**](PromotionStackBase.md) | Details about the category assigned to the promotion stack. | @@ -25,7 +25,6 @@ Response body schema for **PUT** `/promotions/{campaignId}/stacks/{stackId}`. | Name | Value | |---- | -----| | PROMOTION_STACK | "promotion_stack" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/PromotionsTiersDisableResponseBody.md b/docs/PromotionsTiersDisableResponseBody.md index 1c84af7a..4984788e 100644 --- a/docs/PromotionsTiersDisableResponseBody.md +++ b/docs/PromotionsTiersDisableResponseBody.md @@ -6,30 +6,30 @@ Response body schema for **POST** `/promotions/tiers/{promotionTierId}/disable`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique promotion tier ID. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. | [optional] | -|**name** | **String** | Name of the promotion tier. | [optional] | -|**banner** | **String** | Text to be displayed to your customers on your website. | [optional] | -|**action** | [**PromotionTierAction**](PromotionTierAction.md) | | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | [optional] | -|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional] | -|**promotionId** | **String** | Promotion unique ID. | [optional] | -|**campaign** | [**PromotionTierCampaign**](PromotionTierCampaign.md) | | [optional] | -|**campaignId** | **String** | Promotion tier's parent campaign's unique ID. | [optional] | -|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | **List<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**summary** | [**PromotionTierSummary**](PromotionTierSummary.md) | | [optional] | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the promotion tier. | [optional] | -|**validationRuleAssignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | [optional] | -|**categoryId** | **String** | Promotion tier category ID. | [optional] | -|**categories** | [**List<Category>**](Category.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique promotion tier ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. | +|**name** | **String** | Name of the promotion tier. | +|**banner** | **String** | Text to be displayed to your customers on your website. | +|**action** | [**PromotionTierAction**](PromotionTierAction.md) | | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | +|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | +|**promotionId** | **String** | Promotion unique ID. | +|**campaign** | [**PromotionTierCampaign**](PromotionTierCampaign.md) | | +|**campaignId** | **String** | Promotion tier's parent campaign's unique ID. | +|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | +|**validityTimeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | +|**validityDayOfWeek** | **List<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**summary** | [**PromotionTierSummary**](PromotionTierSummary.md) | | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the promotion tier. | +|**validationRuleAssignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | +|**categoryId** | **String** | Promotion tier category ID. | +|**categories** | [**List<Category>**](Category.md) | | diff --git a/docs/PromotionsTiersEnableResponseBody.md b/docs/PromotionsTiersEnableResponseBody.md index 0a3a6191..684cb724 100644 --- a/docs/PromotionsTiersEnableResponseBody.md +++ b/docs/PromotionsTiersEnableResponseBody.md @@ -6,30 +6,30 @@ Response body schema for **POST** `/promotions/tiers/{promotionTierId}/enable`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique promotion tier ID. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. | [optional] | -|**name** | **String** | Name of the promotion tier. | [optional] | -|**banner** | **String** | Text to be displayed to your customers on your website. | [optional] | -|**action** | [**PromotionTierAction**](PromotionTierAction.md) | | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | [optional] | -|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional] | -|**promotionId** | **String** | Promotion unique ID. | [optional] | -|**campaign** | [**PromotionTierCampaign**](PromotionTierCampaign.md) | | [optional] | -|**campaignId** | **String** | Promotion tier's parent campaign's unique ID. | [optional] | -|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | **List<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**summary** | [**PromotionTierSummary**](PromotionTierSummary.md) | | [optional] | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the promotion tier. | [optional] | -|**validationRuleAssignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | [optional] | -|**categoryId** | **String** | Promotion tier category ID. | [optional] | -|**categories** | [**List<Category>**](Category.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique promotion tier ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. | +|**name** | **String** | Name of the promotion tier. | +|**banner** | **String** | Text to be displayed to your customers on your website. | +|**action** | [**PromotionTierAction**](PromotionTierAction.md) | | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | +|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | +|**promotionId** | **String** | Promotion unique ID. | +|**campaign** | [**PromotionTierCampaign**](PromotionTierCampaign.md) | | +|**campaignId** | **String** | Promotion tier's parent campaign's unique ID. | +|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | +|**validityTimeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | +|**validityDayOfWeek** | **List<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**summary** | [**PromotionTierSummary**](PromotionTierSummary.md) | | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the promotion tier. | +|**validationRuleAssignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | +|**categoryId** | **String** | Promotion tier category ID. | +|**categories** | [**List<Category>**](Category.md) | | diff --git a/docs/PromotionsTiersGetResponseBody.md b/docs/PromotionsTiersGetResponseBody.md index 8d837238..81ec651f 100644 --- a/docs/PromotionsTiersGetResponseBody.md +++ b/docs/PromotionsTiersGetResponseBody.md @@ -6,30 +6,30 @@ Response body schema for **GET** `/promotions/tiers/{promotionTierId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique promotion tier ID. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. | [optional] | -|**name** | **String** | Name of the promotion tier. | [optional] | -|**banner** | **String** | Text to be displayed to your customers on your website. | [optional] | -|**action** | [**PromotionTierAction**](PromotionTierAction.md) | | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | [optional] | -|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional] | -|**promotionId** | **String** | Promotion unique ID. | [optional] | -|**campaign** | [**PromotionTierCampaign**](PromotionTierCampaign.md) | | [optional] | -|**campaignId** | **String** | Promotion tier's parent campaign's unique ID. | [optional] | -|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | **List<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**summary** | [**PromotionTierSummary**](PromotionTierSummary.md) | | [optional] | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the promotion tier. | [optional] | -|**validationRuleAssignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | [optional] | -|**categoryId** | **String** | Promotion tier category ID. | [optional] | -|**categories** | [**List<Category>**](Category.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique promotion tier ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. | +|**name** | **String** | Name of the promotion tier. | +|**banner** | **String** | Text to be displayed to your customers on your website. | +|**action** | [**PromotionTierAction**](PromotionTierAction.md) | | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | +|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | +|**promotionId** | **String** | Promotion unique ID. | +|**campaign** | [**PromotionTierCampaign**](PromotionTierCampaign.md) | | +|**campaignId** | **String** | Promotion tier's parent campaign's unique ID. | +|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | +|**validityTimeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | +|**validityDayOfWeek** | **List<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**summary** | [**PromotionTierSummary**](PromotionTierSummary.md) | | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the promotion tier. | +|**validationRuleAssignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | +|**categoryId** | **String** | Promotion tier category ID. | +|**categories** | [**List<Category>**](Category.md) | | diff --git a/docs/PromotionsTiersListResponseBody.md b/docs/PromotionsTiersListResponseBody.md index e0744d3c..cc1fcc4e 100644 --- a/docs/PromotionsTiersListResponseBody.md +++ b/docs/PromotionsTiersListResponseBody.md @@ -6,13 +6,13 @@ Response body schema for **GET** `/promotions/{campaignId}/tiers`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about promotion tiers in a dictionary. | [optional] | -|**dataRef** | **String** | Identifies the name of the attribute that contains the array of promotion tier objects. | [optional] | -|**tiers** | [**List<PromotionTier>**](PromotionTier.md) | Contains array of promotion tier objects. | [optional] | -|**total** | **Integer** | Total number of promotion tiers. | [optional] | -|**hasMore** | **Boolean** | 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 (with a different page or a different start date filter) to get more records returned in the results. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about promotion tiers in a dictionary. | +|**dataRef** | **String** | Identifies the name of the attribute that contains the array of promotion tier objects. | +|**tiers** | [**List<PromotionTier>**](PromotionTier.md) | Contains array of promotion tier objects. | +|**total** | **Integer** | Total number of promotion tiers. | +|**hasMore** | **Boolean** | 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 (with a different page or a different start date filter) to get more records returned in the results. | diff --git a/docs/PublicationsApi.md b/docs/PublicationsApi.md index 33cd6059..321d5f0f 100644 --- a/docs/PublicationsApi.md +++ b/docs/PublicationsApi.md @@ -62,10 +62,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **joinOnce** | **Boolean**| Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer. | [optional] | -| **publicationsCreateRequestBody** | [**PublicationsCreateRequestBody**](PublicationsCreateRequestBody.md)| Specify the publication parameters. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **joinOnce** | **Boolean**| Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer. | +| **publicationsCreateRequestBody** | [**PublicationsCreateRequestBody**](PublicationsCreateRequestBody.md)| Specify the publication parameters. | ### Return type @@ -148,19 +148,19 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | -| **order** | [**ParameterOrderListPublications**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] [enum: id, -id, voucher_code, -voucher_code, tracking_id, -tracking_id, customer_id, -customer_id, created_at, -created_at, channel, -channel] | -| **campaign** | **String**| Filters by a given campaign name. | [optional] | -| **customer** | **String**| Filters by a unique customer ID. | [optional] | -| **voucher** | **String**| Filters by a given voucher code. | [optional] | -| **result** | [**ParameterResultListPublications**](.md)| Filters by a publication result. | [optional] [enum: SUCCESS, FAILURE] | -| **voucherType** | [**ParameterVoucherTypeListPublications**](.md)| Filters by a voucher type. | [optional] [enum: discount, loyalty, lucky_draw] | -| **isReferralCode** | **Boolean**| This filter works only for the `true` option. If set to `true`, the query returns only publications of codes from referral campaigns. | [optional] | -| **filters** | **String**| Allows for combining the filters mentioned in the endpoint description. | [optional] | -| **sourceId** | **String**| Using this endpoint with a particular publication `source_id`, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular `source_id`. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | +| **order** | [**ParameterOrderListPublications**](.md)| Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | +| **campaign** | **String**| Filters by a given campaign name. | +| **customer** | **String**| Filters by a unique customer ID. | +| **voucher** | **String**| Filters by a given voucher code. | +| **result** | [**ParameterResultListPublications**](.md)| Filters by a publication result. | +| **voucherType** | [**ParameterVoucherTypeListPublications**](.md)| Filters by a voucher type. | +| **isReferralCode** | **Boolean**| This filter works only for the `true` option. If set to `true`, the query returns only publications of codes from referral campaigns. | +| **filters** | **String**| Allows for combining the filters mentioned in the endpoint description. | +| **sourceId** | **String**| Using this endpoint with a particular publication `source_id`, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular `source_id`. | ### Return type diff --git a/docs/PublicationsCreateRequestBody.md b/docs/PublicationsCreateRequestBody.md index d8437c6e..73870aab 100644 --- a/docs/PublicationsCreateRequestBody.md +++ b/docs/PublicationsCreateRequestBody.md @@ -5,13 +5,13 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**voucher** | **String** | Code of voucher being published. | [optional] | -|**sourceId** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If `source_id` is provided only 1 voucher can be published per request. | [optional] | -|**customer** | [**PublicationsCreateRequestBodyCustomer**](PublicationsCreateRequestBodyCustomer.md) | | [optional] | -|**metadata** | **Object** | | [optional] | -|**campaign** | [**CreatePublicationCampaign**](CreatePublicationCampaign.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**voucher** | **String** | Code of voucher being published. | +|**sourceId** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If `source_id` is provided only 1 voucher can be published per request. | +|**customer** | [**PublicationsCreateRequestBodyCustomer**](PublicationsCreateRequestBodyCustomer.md) | | +|**metadata** | **Object** | | +|**campaign** | [**CreatePublicationCampaign**](CreatePublicationCampaign.md) | | diff --git a/docs/PublicationsCreateRequestBodyCustomer.md b/docs/PublicationsCreateRequestBodyCustomer.md index c6316312..7d5d38b6 100644 --- a/docs/PublicationsCreateRequestBodyCustomer.md +++ b/docs/PublicationsCreateRequestBodyCustomer.md @@ -5,18 +5,18 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The ID of an existing customer. | [optional] | -|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] | -|**name** | **String** | Customer's first and last name. | [optional] | -|**description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] | -|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | [optional] | -|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | [optional] | -|**address** | [**PublicationsCreateRequestBodyCustomerAddress**](PublicationsCreateRequestBodyCustomerAddress.md) | | [optional] | -|**metadata** | **Object** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | The ID of an existing customer. | +|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | +|**name** | **String** | Customer's first and last name. | +|**description** | **String** | An arbitrary string that you can attach to a customer object. | +|**email** | **String** | Customer's email address. | +|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | +|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | +|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | +|**address** | [**PublicationsCreateRequestBodyCustomerAddress**](PublicationsCreateRequestBodyCustomerAddress.md) | | +|**metadata** | **Object** | | diff --git a/docs/PublicationsCreateRequestBodyCustomerAddress.md b/docs/PublicationsCreateRequestBodyCustomerAddress.md index a6123317..462361bd 100644 --- a/docs/PublicationsCreateRequestBodyCustomerAddress.md +++ b/docs/PublicationsCreateRequestBodyCustomerAddress.md @@ -5,14 +5,14 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**city** | **String** | City | [optional] | -|**state** | **String** | State | [optional] | -|**line1** | **String** | First line of address. | [optional] | -|**line2** | **String** | Second line of address. | [optional] | -|**country** | **String** | Country. | [optional] | -|**postalCode** | **String** | Postal code. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**city** | **String** | City | +|**state** | **String** | State | +|**line1** | **String** | First line of address. | +|**line2** | **String** | Second line of address. | +|**country** | **String** | Country. | +|**postalCode** | **String** | Postal code. | diff --git a/docs/PublicationsCreateResponseBody.md b/docs/PublicationsCreateResponseBody.md index 9b272a12..c8a1dee7 100644 --- a/docs/PublicationsCreateResponseBody.md +++ b/docs/PublicationsCreateResponseBody.md @@ -5,21 +5,21 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique publication ID, assigned by Voucherify. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the `publication`. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the publication was created. The value is shown in the ISO 8601 format. | [optional] | -|**customerId** | **String** | Unique customer ID of the customer receiving the publication. | [optional] | -|**trackingId** | **String** | Customer's `source_id`. | [optional] | -|**metadata** | **Object** | | [optional] | -|**channel** | [**ChannelEnum**](#ChannelEnum) | How the publication was originated. It can be your own custom channel or an example value provided here. | [optional] | -|**sourceId** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. | [optional] | -|**result** | [**ResultEnum**](#ResultEnum) | Status of the publication attempt. | [optional] | -|**customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | [optional] | -|**vouchersId** | **List<String>** | Contains the unique internal voucher ID that was assigned by Voucherify. | [optional] | -|**voucher** | [**Voucher**](Voucher.md) | | [optional] | -|**vouchers** | **List<String>** | Contains the unique voucher codes that was assigned by Voucherify. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique publication ID, assigned by Voucherify. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the `publication`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the publication was created. The value is shown in the ISO 8601 format. | +|**customerId** | **String** | Unique customer ID of the customer receiving the publication. | +|**trackingId** | **String** | Customer's `source_id`. | +|**metadata** | **Object** | | +|**channel** | [**ChannelEnum**](#ChannelEnum) | How the publication was originated. It can be your own custom channel or an example value provided here. | +|**sourceId** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. | +|**result** | [**ResultEnum**](#ResultEnum) | Status of the publication attempt. | +|**customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | +|**vouchersId** | **List<String>** | Contains the unique internal voucher ID that was assigned by Voucherify. | +|**voucher** | [**Voucher**](Voucher.md) | | +|**vouchers** | **List<String>** | Contains the unique voucher codes that was assigned by Voucherify. | @@ -28,7 +28,6 @@ | Name | Value | |---- | -----| | PUBLICATION | "publication" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -37,7 +36,6 @@ | Name | Value | |---- | -----| | API | "API" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -46,7 +44,6 @@ | Name | Value | |---- | -----| | SUCCESS | "SUCCESS" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/PublicationsListResponseBody.md b/docs/PublicationsListResponseBody.md index 9c5baef7..720246ce 100644 --- a/docs/PublicationsListResponseBody.md +++ b/docs/PublicationsListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for listing publications using **GET** `/publications`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about publications in a dictionary. | | -|**dataRef** | **String** | Identifies the name of the attribute that contains the array of publications. | | -|**publications** | [**List<PublicationsListResponseBodyPublicationsItem>**](PublicationsListResponseBodyPublicationsItem.md) | Response schema model for publishing vouchers to a specific customer. | | -|**total** | **Integer** | Total number of publications. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about publications in a dictionary. | +|**dataRef** | **String** | Identifies the name of the attribute that contains the array of publications. | +|**publications** | [**List<PublicationsListResponseBodyPublicationsItem>**](PublicationsListResponseBodyPublicationsItem.md) | Response schema model for publishing vouchers to a specific customer. | +|**total** | **Integer** | Total number of publications. | diff --git a/docs/PublicationsListResponseBodyPublicationsItem.md b/docs/PublicationsListResponseBodyPublicationsItem.md index 74de3f33..94aee73f 100644 --- a/docs/PublicationsListResponseBodyPublicationsItem.md +++ b/docs/PublicationsListResponseBodyPublicationsItem.md @@ -5,23 +5,23 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique publication ID, assigned by Voucherify. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the `publication`. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the publication was created. The value is shown in the ISO 8601 format. | [optional] | -|**customerId** | **String** | Unique customer ID of the customer receiving the publication. | [optional] | -|**trackingId** | **String** | Customer's `source_id`. | [optional] | -|**metadata** | [**PublicationsListResponseBodyPublicationsItemMetadata**](PublicationsListResponseBodyPublicationsItemMetadata.md) | | [optional] | -|**channel** | **String** | How the publication was originated. It can be your own custom channel or an example value provided here. | [optional] | -|**sourceId** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. | [optional] | -|**customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | [optional] | -|**vouchers** | **List<String>** | Contains the voucher IDs that was assigned by Voucherify. and Contains the unique voucher codes that was assigned by Voucherify. | [optional] | -|**vouchersId** | **List<String>** | Contains the unique internal voucher IDs that was assigned by Voucherify. | [optional] | -|**result** | [**ResultEnum**](#ResultEnum) | | [optional] | -|**voucher** | [**ListPublicationsItemVoucher**](ListPublicationsItemVoucher.md) | | [optional] | -|**failureCode** | **String** | Generic reason as to why the create publication operation failed. | [optional] | -|**failureMessage** | **String** | This parameter will provide more expanded reason as to why the create publication operation failed. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique publication ID, assigned by Voucherify. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the `publication`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the publication was created. The value is shown in the ISO 8601 format. | +|**customerId** | **String** | Unique customer ID of the customer receiving the publication. | +|**trackingId** | **String** | Customer's `source_id`. | +|**metadata** | [**PublicationsListResponseBodyPublicationsItemMetadata**](PublicationsListResponseBodyPublicationsItemMetadata.md) | | +|**channel** | **String** | How the publication was originated. It can be your own custom channel or an example value provided here. | +|**sourceId** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. | +|**customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | +|**vouchers** | **List<String>** | Contains the voucher IDs that was assigned by Voucherify. and Contains the unique voucher codes that was assigned by Voucherify. | +|**vouchersId** | **List<String>** | Contains the unique internal voucher IDs that was assigned by Voucherify. | +|**result** | [**ResultEnum**](#ResultEnum) | | +|**voucher** | [**ListPublicationsItemVoucher**](ListPublicationsItemVoucher.md) | | +|**failureCode** | **String** | Generic reason as to why the create publication operation failed. | +|**failureMessage** | **String** | This parameter will provide more expanded reason as to why the create publication operation failed. | @@ -30,7 +30,6 @@ | Name | Value | |---- | -----| | PUBLICATION | "publication" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -40,7 +39,6 @@ |---- | -----| | SUCCESS | "SUCCESS" | | FAILURE | "FAILURE" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/PublicationsListResponseBodyPublicationsItemMetadata.md b/docs/PublicationsListResponseBodyPublicationsItemMetadata.md index 220a5397..415617fa 100644 --- a/docs/PublicationsListResponseBodyPublicationsItemMetadata.md +++ b/docs/PublicationsListResponseBodyPublicationsItemMetadata.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**sourceType** | **String** | Defines the type of the distribution source. | [optional] | -|**sourceId** | **String** | Unique identifier of the distribution source. | [optional] | -|**distributionId** | **String** | Unique identifier of the distribution. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**sourceType** | **String** | Defines the type of the distribution source. | +|**sourceId** | **String** | Unique identifier of the distribution source. | +|**distributionId** | **String** | Unique identifier of the distribution. | diff --git a/docs/QualificationsApi.md b/docs/QualificationsApi.md index 793a9fe2..a99d698a 100644 --- a/docs/QualificationsApi.md +++ b/docs/QualificationsApi.md @@ -60,9 +60,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **qualificationsCheckEligibilityRequestBody** | [**QualificationsCheckEligibilityRequestBody**](QualificationsCheckEligibilityRequestBody.md)| Define order and customer context. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **qualificationsCheckEligibilityRequestBody** | [**QualificationsCheckEligibilityRequestBody**](QualificationsCheckEligibilityRequestBody.md)| Define order and customer context. | ### Return type diff --git a/docs/QualificationsCampaignTypeConditions.md b/docs/QualificationsCampaignTypeConditions.md index 18f3e882..b4894de1 100644 --- a/docs/QualificationsCampaignTypeConditions.md +++ b/docs/QualificationsCampaignTypeConditions.md @@ -6,9 +6,9 @@ Returns both campaigns and their vouchers or promotion tiers. Use other filters, ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**QualificationsCampaignTypeConditionsConditions**](QualificationsCampaignTypeConditionsConditions.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**QualificationsCampaignTypeConditionsConditions**](QualificationsCampaignTypeConditionsConditions.md) | | diff --git a/docs/QualificationsCampaignTypeConditionsConditions.md b/docs/QualificationsCampaignTypeConditionsConditions.md index 265aa951..90315ff5 100644 --- a/docs/QualificationsCampaignTypeConditionsConditions.md +++ b/docs/QualificationsCampaignTypeConditionsConditions.md @@ -6,12 +6,12 @@ Data filters used to narrow the data records to be returned in the result. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**$is** | **List<ParameterCampaignType>** | | [optional] | -|**$isNot** | **List<ParameterCampaignType>** | | [optional] | -|**$in** | **List<ParameterCampaignType>** | | [optional] | -|**$notIn** | **List<ParameterCampaignType>** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**$is** | **List<ParameterCampaignType>** | | +|**$isNot** | **List<ParameterCampaignType>** | | +|**$in** | **List<ParameterCampaignType>** | | +|**$notIn** | **List<ParameterCampaignType>** | | diff --git a/docs/QualificationsCheckEligibilityRequestBody.md b/docs/QualificationsCheckEligibilityRequestBody.md index eed2877c..917409f2 100644 --- a/docs/QualificationsCheckEligibilityRequestBody.md +++ b/docs/QualificationsCheckEligibilityRequestBody.md @@ -6,14 +6,14 @@ Request body schema for **POST** `/qualifications`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**customer** | [**Customer**](Customer.md) | | [optional] | -|**order** | [**Order**](Order.md) | | [optional] | -|**trackingId** | **String** | Is correspondent to Customer's source_id | [optional] | -|**scenario** | [**ScenarioEnum**](#ScenarioEnum) | Defines the scenario Voucherify should consider during the qualification process. - `ALL` - Scenario that returns all redeemables available for the customer in one API request. This scenario is used by default when no value is selected. - `CUSTOMER_WALLET` - returns vouchers applicable to the customer’s cart based on the vouchers assigned to the customer’s profile. - `AUDIENCE_ONLY` - returns all vouchers, promotion tiers, and campaigns available to the customer. Voucherify validates the rules based on the customer profile only. - `PRODUCTS` - returns all promotions available for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule). - `PRODUCTS_DISCOUNT` - returns all promotions available for products when a discount is defined as applicable to specific item(s). - `PROMOTION_STACKS` - returns the applicable promotion stacks. - `PRODUCTS_BY_CUSTOMER` - returns all promotions available for a customer for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule). - `PRODUCTS_DISCOUNT_BY_CUSTOMER` - returns all promotions available for a customer for products when a discount is defined as applicable to specific item(s). | [optional] | -|**options** | [**QualificationsOption**](QualificationsOption.md) | | [optional] | -|**metadata** | **Object** | A set of key/value pairs that you can send in the request body to check against redeemables requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the <!-- [Create Validation Rules](https://docs.voucherify.io/reference/create-validation-rules) -->[Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule). | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**customer** | [**Customer**](Customer.md) | | +|**order** | [**Order**](Order.md) | | +|**trackingId** | **String** | Is correspondent to Customer's source_id | +|**scenario** | [**ScenarioEnum**](#ScenarioEnum) | Defines the scenario Voucherify should consider during the qualification process. - `ALL` - Scenario that returns all redeemables available for the customer in one API request. This scenario is used by default when no value is selected. - `CUSTOMER_WALLET` - returns vouchers applicable to the customer’s cart based on the vouchers assigned to the customer’s profile. - `AUDIENCE_ONLY` - returns all vouchers, promotion tiers, and campaigns available to the customer. Voucherify validates the rules based on the customer profile only. - `PRODUCTS` - returns all promotions available for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule). - `PRODUCTS_DISCOUNT` - returns all promotions available for products when a discount is defined as applicable to specific item(s). - `PROMOTION_STACKS` - returns the applicable promotion stacks. - `PRODUCTS_BY_CUSTOMER` - returns all promotions available for a customer for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule). - `PRODUCTS_DISCOUNT_BY_CUSTOMER` - returns all promotions available for a customer for products when a discount is defined as applicable to specific item(s). | +|**options** | [**QualificationsOption**](QualificationsOption.md) | | +|**metadata** | **Object** | A set of key/value pairs that you can send in the request body to check against redeemables requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the <!-- [Create Validation Rules](https://docs.voucherify.io/reference/create-validation-rules) -->[Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule). | @@ -29,7 +29,6 @@ Request body schema for **POST** `/qualifications`. | PROMOTION_STACKS | "PROMOTION_STACKS" | | PRODUCTS_BY_CUSTOMER | "PRODUCTS_BY_CUSTOMER" | | PRODUCTS_DISCOUNT_BY_CUSTOMER | "PRODUCTS_DISCOUNT_BY_CUSTOMER" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/QualificationsCheckEligibilityResponseBody.md b/docs/QualificationsCheckEligibilityResponseBody.md index ee65fd32..9cd08e0b 100644 --- a/docs/QualificationsCheckEligibilityResponseBody.md +++ b/docs/QualificationsCheckEligibilityResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **POST** `/qualifications`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redeemables** | [**QualificationsRedeemables**](QualificationsRedeemables.md) | | [optional] | -|**trackingId** | **String** | This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID. | [optional] | -|**order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] | -|**stackingRules** | [**StackingRules**](StackingRules.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redeemables** | [**QualificationsRedeemables**](QualificationsRedeemables.md) | | +|**trackingId** | **String** | This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID. | +|**order** | [**OrderCalculated**](OrderCalculated.md) | | +|**stackingRules** | [**StackingRules**](StackingRules.md) | | diff --git a/docs/QualificationsFieldConditions.md b/docs/QualificationsFieldConditions.md index e8bea4e7..e48b966e 100644 --- a/docs/QualificationsFieldConditions.md +++ b/docs/QualificationsFieldConditions.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**QualificationsFiltersCondition**](QualificationsFiltersCondition.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**QualificationsFiltersCondition**](QualificationsFiltersCondition.md) | | diff --git a/docs/QualificationsFiltersCondition.md b/docs/QualificationsFiltersCondition.md index 6742a90c..d9975203 100644 --- a/docs/QualificationsFiltersCondition.md +++ b/docs/QualificationsFiltersCondition.md @@ -5,14 +5,14 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**$is** | **List<String>** | | [optional] | -|**$isNot** | **List<String>** | | [optional] | -|**$hasValue** | **Object** | | [optional] | -|**$isUnknown** | **Object** | | [optional] | -|**$in** | **List<String>** | | [optional] | -|**$notIn** | **List<String>** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**$is** | **List<String>** | | +|**$isNot** | **List<String>** | | +|**$hasValue** | **Object** | | +|**$isUnknown** | **Object** | | +|**$in** | **List<String>** | | +|**$notIn** | **List<String>** | | diff --git a/docs/QualificationsOption.md b/docs/QualificationsOption.md index 09aa704c..c1285f40 100644 --- a/docs/QualificationsOption.md +++ b/docs/QualificationsOption.md @@ -6,13 +6,13 @@ Configure parameters returned in the response. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**limit** | **Integer** | The maximum number of redeemables to be returned in the API request. The actual number of returned redeemables will be determined by the API. The default value is set to 5 | [optional] | -|**startingAfter** | **OffsetDateTime** | Cursor used for paging. | [optional] | -|**filters** | [**QualificationsOptionFilters**](QualificationsOptionFilters.md) | | [optional] | -|**expand** | [**List<ExpandEnum>**](#List<ExpandEnum>) | The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [\"redeemable\"] | - Returns the redeemables' metadata. | | [\"category\"] | - Returns an expanded `categories` object, showing details about the category. | | [\"validation_rules\"] | - Returns an expanded `validation_rules` object, showing details about the validation rules. | | [optional] | -|**sortingRule** | [**SortingRuleEnum**](#SortingRuleEnum) | Is used to determine the order in which data is displayed in the result array. - `DEFAULT` - Sorting descending by `created_at` - `BEST_DEAL` - Sorting descending by `total_applied_discount_amount` - `LEAST_DEAL` - Sorting ascending by `total_applied_discount_amount` | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**limit** | **Integer** | The maximum number of redeemables to be returned in the API request. The actual number of returned redeemables will be determined by the API. The default value is set to 5 | +|**startingAfter** | **OffsetDateTime** | Cursor used for paging. | +|**filters** | [**QualificationsOptionFilters**](QualificationsOptionFilters.md) | | +|**expand** | [**List<ExpandEnum>**](#List<ExpandEnum>) | The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [\"redeemable\"] | - Returns the redeemables' metadata. | | [\"category\"] | - Returns an expanded `categories` object, showing details about the category. | | [\"validation_rules\"] | - Returns an expanded `validation_rules` object, showing details about the validation rules. | | +|**sortingRule** | [**SortingRuleEnum**](#SortingRuleEnum) | Is used to determine the order in which data is displayed in the result array. - `DEFAULT` - Sorting descending by `created_at` - `BEST_DEAL` - Sorting descending by `total_applied_discount_amount` - `LEAST_DEAL` - Sorting ascending by `total_applied_discount_amount` | @@ -23,7 +23,6 @@ Configure parameters returned in the response. | REDEEMABLE | "redeemable" | | CATEGORY | "category" | | VALIDATION_RULES | "validation_rules" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -34,7 +33,6 @@ Configure parameters returned in the response. | BEST_DEAL | "BEST_DEAL" | | LEAST_DEAL | "LEAST_DEAL" | | DEFAULT | "DEFAULT" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/QualificationsOptionFilters.md b/docs/QualificationsOptionFilters.md index 48a74e93..941bcc45 100644 --- a/docs/QualificationsOptionFilters.md +++ b/docs/QualificationsOptionFilters.md @@ -6,16 +6,16 @@ A set of filters to return only a specific category or type of redeemable. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**junction** | **Junction** | | [optional] | -|**categoryId** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] | -|**campaignId** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] | -|**campaignType** | [**QualificationsCampaignTypeConditions**](QualificationsCampaignTypeConditions.md) | | [optional] | -|**resourceId** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] | -|**resourceType** | [**QualificationsOptionFiltersResourceType**](QualificationsOptionFiltersResourceType.md) | | [optional] | -|**voucherType** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] | -|**code** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**junction** | **Junction** | | +|**categoryId** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | +|**campaignId** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | +|**campaignType** | [**QualificationsCampaignTypeConditions**](QualificationsCampaignTypeConditions.md) | | +|**resourceId** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | +|**resourceType** | [**QualificationsOptionFiltersResourceType**](QualificationsOptionFiltersResourceType.md) | | +|**voucherType** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | +|**code** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | diff --git a/docs/QualificationsOptionFiltersResourceType.md b/docs/QualificationsOptionFiltersResourceType.md index 6b5efc8e..04d595cb 100644 --- a/docs/QualificationsOptionFiltersResourceType.md +++ b/docs/QualificationsOptionFiltersResourceType.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**QualificationsOptionFiltersResourceTypeConditions**](QualificationsOptionFiltersResourceTypeConditions.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**QualificationsOptionFiltersResourceTypeConditions**](QualificationsOptionFiltersResourceTypeConditions.md) | | diff --git a/docs/QualificationsOptionFiltersResourceTypeConditions.md b/docs/QualificationsOptionFiltersResourceTypeConditions.md index 7a23cf6b..ae37a721 100644 --- a/docs/QualificationsOptionFiltersResourceTypeConditions.md +++ b/docs/QualificationsOptionFiltersResourceTypeConditions.md @@ -6,12 +6,12 @@ Data filters used to narrow the data records to be returned in the result. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**$is** | **List<ResourceTypes>** | | [optional] | -|**$isNot** | **List<ResourceTypes>** | | [optional] | -|**$in** | **List<ResourceTypes>** | | [optional] | -|**$notIn** | **List<ResourceTypes>** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**$is** | **List<ResourceTypes>** | | +|**$isNot** | **List<ResourceTypes>** | | +|**$in** | **List<ResourceTypes>** | | +|**$notIn** | **List<ResourceTypes>** | | diff --git a/docs/QualificationsRedeemable.md b/docs/QualificationsRedeemable.md index 9c75b436..bb851087 100644 --- a/docs/QualificationsRedeemable.md +++ b/docs/QualificationsRedeemable.md @@ -5,24 +5,24 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Id of the redeemable. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | Object type of the redeemable. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional] | -|**result** | [**RedeemableResult**](RedeemableResult.md) | | [optional] | -|**order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] | -|**validationRuleId** | **String** | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. | [optional] | -|**applicableTo** | [**ApplicableToResultList**](ApplicableToResultList.md) | | [optional] | -|**inapplicableTo** | [**InapplicableToResultList**](InapplicableToResultList.md) | | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional] | -|**categories** | [**List<Category>**](Category.md) | List of category information. | [optional] | -|**banner** | **String** | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. | [optional] | -|**name** | **String** | Name of the redeemable. | [optional] | -|**campaignName** | **String** | Name of the campaign associated to the redeemable. This field is available only if object is not `campaign` | [optional] | -|**campaignId** | **String** | Id of the campaign associated to the redeemable. This field is available only if object is not `campaign` | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | -|**redeemables** | [**List<QualificationsRedeemableBase>**](QualificationsRedeemableBase.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Id of the redeemable. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | Object type of the redeemable. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | +|**result** | [**RedeemableResult**](RedeemableResult.md) | | +|**order** | [**OrderCalculated**](OrderCalculated.md) | | +|**validationRuleId** | **String** | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. | +|**applicableTo** | [**ApplicableToResultList**](ApplicableToResultList.md) | | +|**inapplicableTo** | [**InapplicableToResultList**](InapplicableToResultList.md) | | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | +|**categories** | [**List<Category>**](Category.md) | List of category information. | +|**banner** | **String** | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. | +|**name** | **String** | Name of the redeemable. | +|**campaignName** | **String** | Name of the campaign associated to the redeemable. This field is available only if object is not `campaign` | +|**campaignId** | **String** | Id of the campaign associated to the redeemable. This field is available only if object is not `campaign` | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | +|**redeemables** | [**List<QualificationsRedeemableBase>**](QualificationsRedeemableBase.md) | | @@ -34,7 +34,6 @@ | PROMOTION_TIER | "promotion_tier" | | PROMOTION_STACK | "promotion_stack" | | VOUCHER | "voucher" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/QualificationsRedeemableBase.md b/docs/QualificationsRedeemableBase.md index e774dbad..425ab6ad 100644 --- a/docs/QualificationsRedeemableBase.md +++ b/docs/QualificationsRedeemableBase.md @@ -6,23 +6,23 @@ Data of single redeemable which was properly qualified. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Id of the redeemable. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | Object type of the redeemable. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional] | -|**result** | [**RedeemableResult**](RedeemableResult.md) | | [optional] | -|**order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] | -|**validationRuleId** | **String** | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. | [optional] | -|**applicableTo** | [**ApplicableToResultList**](ApplicableToResultList.md) | | [optional] | -|**inapplicableTo** | [**InapplicableToResultList**](InapplicableToResultList.md) | | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional] | -|**categories** | [**List<Category>**](Category.md) | List of category information. | [optional] | -|**banner** | **String** | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. | [optional] | -|**name** | **String** | Name of the redeemable. | [optional] | -|**campaignName** | **String** | Name of the campaign associated to the redeemable. This field is available only if object is not `campaign` | [optional] | -|**campaignId** | **String** | Id of the campaign associated to the redeemable. This field is available only if object is not `campaign` | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Id of the redeemable. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | Object type of the redeemable. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | +|**result** | [**RedeemableResult**](RedeemableResult.md) | | +|**order** | [**OrderCalculated**](OrderCalculated.md) | | +|**validationRuleId** | **String** | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. | +|**applicableTo** | [**ApplicableToResultList**](ApplicableToResultList.md) | | +|**inapplicableTo** | [**InapplicableToResultList**](InapplicableToResultList.md) | | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | +|**categories** | [**List<Category>**](Category.md) | List of category information. | +|**banner** | **String** | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. | +|**name** | **String** | Name of the redeemable. | +|**campaignName** | **String** | Name of the campaign associated to the redeemable. This field is available only if object is not `campaign` | +|**campaignId** | **String** | Id of the campaign associated to the redeemable. This field is available only if object is not `campaign` | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | @@ -34,7 +34,6 @@ Data of single redeemable which was properly qualified. | PROMOTION_TIER | "promotion_tier" | | PROMOTION_STACK | "promotion_stack" | | VOUCHER | "voucher" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/QualificationsRedeemables.md b/docs/QualificationsRedeemables.md index ea57635f..426d55d0 100644 --- a/docs/QualificationsRedeemables.md +++ b/docs/QualificationsRedeemables.md @@ -6,14 +6,14 @@ List of redeemables for examine qualification. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is `list`. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of qualified redeemables. | | -|**data** | [**List<QualificationsRedeemable>**](QualificationsRedeemable.md) | Array of qualified redeemables. | | -|**total** | **Integer** | The number of redeemables returned in the API request. | | -|**hasMore** | **Boolean** | As results are always limited, the `has_more` flag indicates if there are more records for given parameters. This lets you know if you can run another request (with different options) to get more records returned in the results. | | -|**moreStartingAfter** | **OffsetDateTime** | Timestamp representing the date and time to use in `starting_after` cursor to get more redeemables. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is `list`. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of qualified redeemables. | +|**data** | [**List<QualificationsRedeemable>**](QualificationsRedeemable.md) | Array of qualified redeemables. | +|**total** | **Integer** | The number of redeemables returned in the API request. | +|**hasMore** | **Boolean** | As results are always limited, the `has_more` flag indicates if there are more records for given parameters. This lets you know if you can run another request (with different options) to get more records returned in the results. | +|**moreStartingAfter** | **OffsetDateTime** | Timestamp representing the date and time to use in `starting_after` cursor to get more redeemables. | @@ -22,7 +22,6 @@ List of redeemables for examine qualification. | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -31,7 +30,6 @@ List of redeemables for examine qualification. | Name | Value | |---- | -----| | DATA | "data" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedeemableGift.md b/docs/RedeemableGift.md index fa762a4f..0786bf36 100644 --- a/docs/RedeemableGift.md +++ b/docs/RedeemableGift.md @@ -6,10 +6,10 @@ Contains current gift card balance information. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**balance** | **BigDecimal** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] | -|**credits** | **BigDecimal** | The number of credits that the user wants to use from the gift card to fulfil the order. The value of credits cannot be higher than the current balance on the gift card. If the user gives more points than he has on the gift card, the application will return an error code in response. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**balance** | **BigDecimal** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | +|**credits** | **BigDecimal** | The number of credits that the user wants to use from the gift card to fulfil the order. The value of credits cannot be higher than the current balance on the gift card. If the user gives more points than he has on the gift card, the application will return an error code in response. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | diff --git a/docs/RedeemableLoyaltyCard.md b/docs/RedeemableLoyaltyCard.md index 865ded0c..4e8c913c 100644 --- a/docs/RedeemableLoyaltyCard.md +++ b/docs/RedeemableLoyaltyCard.md @@ -6,13 +6,13 @@ Redeemable loyalty card object response ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Total points incurred over lifespan of loyalty card. | [optional] | -|**balance** | **Integer** | Points available for reward redemption. | [optional] | -|**exchangeRatio** | **BigDecimal** | The cash equivalent of the points defined in the points_ratio property. | [optional] | -|**pointsRatio** | **Integer** | The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property. | [optional] | -|**transfers** | [**List<LoyaltiesTransferPoints>**](LoyaltiesTransferPoints.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Total points incurred over lifespan of loyalty card. | +|**balance** | **Integer** | Points available for reward redemption. | +|**exchangeRatio** | **BigDecimal** | The cash equivalent of the points defined in the points_ratio property. | +|**pointsRatio** | **Integer** | The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property. | +|**transfers** | [**List<LoyaltiesTransferPoints>**](LoyaltiesTransferPoints.md) | | diff --git a/docs/RedeemableResult.md b/docs/RedeemableResult.md index 4c62bbde..1b596cf1 100644 --- a/docs/RedeemableResult.md +++ b/docs/RedeemableResult.md @@ -6,12 +6,12 @@ Information about redeemable result. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**gift** | [**RedeemableGift**](RedeemableGift.md) | | [optional] | -|**loyaltyCard** | [**RedeemableLoyaltyCard**](RedeemableLoyaltyCard.md) | | [optional] | -|**error** | [**Error**](Error.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**discount** | [**Discount**](Discount.md) | | +|**gift** | [**RedeemableGift**](RedeemableGift.md) | | +|**loyaltyCard** | [**RedeemableLoyaltyCard**](RedeemableLoyaltyCard.md) | | +|**error** | [**Error**](Error.md) | | diff --git a/docs/Redemption.md b/docs/Redemption.md index afd5befa..394f5b45 100644 --- a/docs/Redemption.md +++ b/docs/Redemption.md @@ -6,31 +6,31 @@ This is an object representing a redemption. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique redemption ID. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON | | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | | -|**customerId** | **String** | Unique customer ID of the redeeming customer. | [optional] | -|**trackingId** | **String** | Hashed customer source ID. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the redemption. | [optional] | -|**amount** | **Integer** | For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction. | [optional] | -|**redemption** | **String** | Unique redemption ID of the parent redemption. | [optional] | -|**result** | [**ResultEnum**](#ResultEnum) | Redemption result. | | -|**status** | [**StatusEnum**](#StatusEnum) | Redemption status. | | -|**relatedRedemptions** | [**RedemptionRelatedRedemptions**](RedemptionRelatedRedemptions.md) | | [optional] | -|**failureCode** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | [optional] | -|**failureMessage** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | [optional] | -|**order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | [optional] | -|**channel** | [**RedemptionChannel**](RedemptionChannel.md) | | | -|**customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object. | | -|**relatedObjectId** | **String** | Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. | | -|**voucher** | [**RedemptionVoucher**](RedemptionVoucher.md) | | [optional] | -|**promotionTier** | [**PromotionTier**](PromotionTier.md) | | [optional] | -|**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional] | -|**gift** | [**RedemptionGift**](RedemptionGift.md) | | [optional] | -|**loyaltyCard** | [**RedemptionLoyaltyCard**](RedemptionLoyaltyCard.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique redemption ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | +|**customerId** | **String** | Unique customer ID of the redeeming customer. | +|**trackingId** | **String** | Hashed customer source ID. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the redemption. | +|**amount** | **Integer** | For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction. | +|**redemption** | **String** | Unique redemption ID of the parent redemption. | +|**result** | [**ResultEnum**](#ResultEnum) | Redemption result. | +|**status** | [**StatusEnum**](#StatusEnum) | Redemption status. | +|**relatedRedemptions** | [**RedemptionRelatedRedemptions**](RedemptionRelatedRedemptions.md) | | +|**failureCode** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | +|**failureMessage** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | +|**order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | +|**channel** | [**RedemptionChannel**](RedemptionChannel.md) | | +|**customer** | [**SimpleCustomer**](SimpleCustomer.md) | | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object. | +|**relatedObjectId** | **String** | Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. | +|**voucher** | [**RedemptionVoucher**](RedemptionVoucher.md) | | +|**promotionTier** | [**PromotionTier**](PromotionTier.md) | | +|**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | +|**gift** | [**RedemptionGift**](RedemptionGift.md) | | +|**loyaltyCard** | [**RedemptionLoyaltyCard**](RedemptionLoyaltyCard.md) | | @@ -39,7 +39,6 @@ This is an object representing a redemption. | Name | Value | |---- | -----| | REDEMPTION | "redemption" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -49,7 +48,6 @@ This is an object representing a redemption. |---- | -----| | SUCCESS | "SUCCESS" | | FAILURE | "FAILURE" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -60,7 +58,6 @@ This is an object representing a redemption. | SUCCEEDED | "SUCCEEDED" | | FAILED | "FAILED" | | ROLLED_BACK | "ROLLED_BACK" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -71,7 +68,6 @@ This is an object representing a redemption. | VOUCHER | "voucher" | | PROMOTION_TIER | "promotion_tier" | | REDEMPTION | "redemption" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionChannel.md b/docs/RedemptionChannel.md index a5dcc2ca..8de551e4 100644 --- a/docs/RedemptionChannel.md +++ b/docs/RedemptionChannel.md @@ -6,10 +6,10 @@ Defines the details of the channel through which the redemption was issued. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**channelId** | **String** | Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. | [optional] | -|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**channelId** | **String** | Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. | +|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | @@ -19,7 +19,6 @@ Defines the details of the channel through which the redemption was issued. |---- | -----| | USER | "USER" | | API | "API" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionGift.md b/docs/RedemptionGift.md index 97c7e9cc..81b11198 100644 --- a/docs/RedemptionGift.md +++ b/docs/RedemptionGift.md @@ -6,9 +6,9 @@ Contains the amount subtracted from the gift card for the redemption. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Integer** | Amount subtracted from the gift card as a result of the redemption. The amount is expressed as the smallest currency unit (e.g. 100 cents for $1.00). | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**amount** | **Integer** | Amount subtracted from the gift card as a result of the redemption. The amount is expressed as the smallest currency unit (e.g. 100 cents for $1.00). | diff --git a/docs/RedemptionLoyaltyCard.md b/docs/RedemptionLoyaltyCard.md index ee3009b4..a361e595 100644 --- a/docs/RedemptionLoyaltyCard.md +++ b/docs/RedemptionLoyaltyCard.md @@ -6,9 +6,9 @@ Contains the number of points subtracted from the loyalty card for the redemptio ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Number of points subtracted from the loyalty card as a result of the redemption. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Number of points subtracted from the loyalty card as a result of the redemption. | diff --git a/docs/RedemptionRelatedRedemptions.md b/docs/RedemptionRelatedRedemptions.md index b2e629c2..686d6e86 100644 --- a/docs/RedemptionRelatedRedemptions.md +++ b/docs/RedemptionRelatedRedemptions.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**rollbacks** | [**List<RedemptionRelatedRedemptionsRollbacksItem>**](RedemptionRelatedRedemptionsRollbacksItem.md) | | [optional] | -|**redemptions** | [**List<RedemptionRelatedRedemptionsItem>**](RedemptionRelatedRedemptionsItem.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**rollbacks** | [**List<RedemptionRelatedRedemptionsRollbacksItem>**](RedemptionRelatedRedemptionsRollbacksItem.md) | | +|**redemptions** | [**List<RedemptionRelatedRedemptionsItem>**](RedemptionRelatedRedemptionsItem.md) | | diff --git a/docs/RedemptionRelatedRedemptionsItem.md b/docs/RedemptionRelatedRedemptionsItem.md index b2a5e275..7e520040 100644 --- a/docs/RedemptionRelatedRedemptionsItem.md +++ b/docs/RedemptionRelatedRedemptionsItem.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique redemption ID. | [optional] | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique redemption ID. | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | diff --git a/docs/RedemptionRelatedRedemptionsRollbacksItem.md b/docs/RedemptionRelatedRedemptionsRollbacksItem.md index cbec03e2..8d86ca79 100644 --- a/docs/RedemptionRelatedRedemptionsRollbacksItem.md +++ b/docs/RedemptionRelatedRedemptionsRollbacksItem.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique rollback redemption ID. | [optional] | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique rollback redemption ID. | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | diff --git a/docs/RedemptionRewardResult.md b/docs/RedemptionRewardResult.md index 2e2ee6dd..b8816f6d 100644 --- a/docs/RedemptionRewardResult.md +++ b/docs/RedemptionRewardResult.md @@ -5,21 +5,21 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] | -|**assignmentId** | **String** | Unique reward assignment ID assigned by Voucherify. | [optional] | -|**voucher** | [**RedemptionRewardResultVoucher**](RedemptionRewardResultVoucher.md) | | [optional] | -|**product** | [**RedemptionRewardResultProduct**](RedemptionRewardResultProduct.md) | | [optional] | -|**sku** | [**RedemptionRewardResultSku**](RedemptionRewardResultSku.md) | | [optional] | -|**loyaltyTierId** | **String** | Unique loyalty tier ID assigned by Voucherify. | [optional] | -|**id** | **String** | Unique reward ID. | [optional] | -|**name** | **String** | Name of the reward. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp in ISO 8601 format indicating when the reward was updated. | [optional] | -|**parameters** | [**RedemptionRewardResultParameters**](RedemptionRewardResultParameters.md) | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Reward type. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**customer** | [**SimpleCustomer**](SimpleCustomer.md) | | +|**assignmentId** | **String** | Unique reward assignment ID assigned by Voucherify. | +|**voucher** | [**RedemptionRewardResultVoucher**](RedemptionRewardResultVoucher.md) | | +|**product** | [**RedemptionRewardResultProduct**](RedemptionRewardResultProduct.md) | | +|**sku** | [**RedemptionRewardResultSku**](RedemptionRewardResultSku.md) | | +|**loyaltyTierId** | **String** | Unique loyalty tier ID assigned by Voucherify. | +|**id** | **String** | Unique reward ID. | +|**name** | **String** | Name of the reward. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp in ISO 8601 format indicating when the reward was updated. | +|**parameters** | [**RedemptionRewardResultParameters**](RedemptionRewardResultParameters.md) | | +|**type** | [**TypeEnum**](#TypeEnum) | Reward type. | @@ -28,7 +28,6 @@ | Name | Value | |---- | -----| | REWARD | "reward" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -39,7 +38,6 @@ | CAMPAIGN | "CAMPAIGN" | | COIN | "COIN" | | MATERIAL | "MATERIAL" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionRewardResultParameters.md b/docs/RedemptionRewardResultParameters.md index 9748e2ef..56812202 100644 --- a/docs/RedemptionRewardResultParameters.md +++ b/docs/RedemptionRewardResultParameters.md @@ -6,11 +6,11 @@ These are parameters representing a material reward. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**campaign** | [**RedemptionRewardResultParametersCampaign**](RedemptionRewardResultParametersCampaign.md) | | [optional] | -|**product** | [**RedemptionRewardResultParametersProduct**](RedemptionRewardResultParametersProduct.md) | | [optional] | -|**coin** | [**RedemptionRewardResultParametersCoin**](RedemptionRewardResultParametersCoin.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**campaign** | [**RedemptionRewardResultParametersCampaign**](RedemptionRewardResultParametersCampaign.md) | | +|**product** | [**RedemptionRewardResultParametersProduct**](RedemptionRewardResultParametersProduct.md) | | +|**coin** | [**RedemptionRewardResultParametersCoin**](RedemptionRewardResultParametersCoin.md) | | diff --git a/docs/RedemptionRewardResultParametersCampaign.md b/docs/RedemptionRewardResultParametersCampaign.md index a67a8476..e7fb79a4 100644 --- a/docs/RedemptionRewardResultParametersCampaign.md +++ b/docs/RedemptionRewardResultParametersCampaign.md @@ -6,11 +6,11 @@ Defines the product redeemed as a reward. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Campaign unique ID. | [optional] | -|**balance** | **Integer** | Points available for reward redemption. | [optional] | -|**type** | **String** | Defines the type of the campaign. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Campaign unique ID. | +|**balance** | **Integer** | Points available for reward redemption. | +|**type** | **String** | Defines the type of the campaign. | diff --git a/docs/RedemptionRewardResultParametersCoin.md b/docs/RedemptionRewardResultParametersCoin.md index ca819f2e..c428ee37 100644 --- a/docs/RedemptionRewardResultParametersCoin.md +++ b/docs/RedemptionRewardResultParametersCoin.md @@ -6,10 +6,10 @@ Defines the ratio by mapping the number of loyalty points in `points_ratio` to a ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**exchangeRatio** | **Integer** | The cash equivalent of the points defined in the `points_ratio` property. | [optional] | -|**pointsRatio** | **Integer** | The number of loyalty points that will map to the predefined cash amount defined by the `exchange_ratio` property. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**exchangeRatio** | **Integer** | The cash equivalent of the points defined in the `points_ratio` property. | +|**pointsRatio** | **Integer** | The number of loyalty points that will map to the predefined cash amount defined by the `exchange_ratio` property. | diff --git a/docs/RedemptionRewardResultParametersProduct.md b/docs/RedemptionRewardResultParametersProduct.md index 1ab39dd6..8918e718 100644 --- a/docs/RedemptionRewardResultParametersProduct.md +++ b/docs/RedemptionRewardResultParametersProduct.md @@ -6,10 +6,10 @@ Defines the product redeemed as a reward. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique product ID, assigned by Voucherify. | [optional] | -|**skuId** | **String** | A unique SKU ID assigned by Voucherify. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique product ID, assigned by Voucherify. | +|**skuId** | **String** | A unique SKU ID assigned by Voucherify. | diff --git a/docs/RedemptionRewardResultProduct.md b/docs/RedemptionRewardResultProduct.md index a5e5cee3..5ea930c1 100644 --- a/docs/RedemptionRewardResultProduct.md +++ b/docs/RedemptionRewardResultProduct.md @@ -6,19 +6,19 @@ Defines of the product. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique product ID assigned by Voucherify. | | -|**sourceId** | **String** | Unique product source ID. | [optional] | -|**name** | **String** | Unique user-defined product name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the product. | | -|**skus** | [**SkusListForProduct**](SkusListForProduct.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique product ID assigned by Voucherify. | +|**sourceId** | **String** | Unique product source ID. | +|**name** | **String** | Unique user-defined product name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**attributes** | **List<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the product. | +|**skus** | [**SkusListForProduct**](SkusListForProduct.md) | | @@ -27,7 +27,6 @@ Defines of the product. | Name | Value | |---- | -----| | PRODUCT | "product" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionRewardResultSku.md b/docs/RedemptionRewardResultSku.md index d1851210..e7543540 100644 --- a/docs/RedemptionRewardResultSku.md +++ b/docs/RedemptionRewardResultSku.md @@ -6,20 +6,20 @@ Defines of the sku. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | | -|**sourceId** | **String** | A unique SKU identifier from your inventory system. | [optional] | -|**productId** | **String** | The parent product's unique ID. | | -|**sku** | **String** | Unique user-defined SKU name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**currency** | **String** | SKU price currency. | [optional] | -|**attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the `SKU`. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | +|**sourceId** | **String** | A unique SKU identifier from your inventory system. | +|**productId** | **String** | The parent product's unique ID. | +|**sku** | **String** | Unique user-defined SKU name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**currency** | **String** | SKU price currency. | +|**attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the `SKU`. | @@ -28,7 +28,6 @@ Defines of the sku. | Name | Value | |---- | -----| | SKU | "sku" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionRewardResultVoucher.md b/docs/RedemptionRewardResultVoucher.md index 53946bc0..b2bf23e4 100644 --- a/docs/RedemptionRewardResultVoucher.md +++ b/docs/RedemptionRewardResultVoucher.md @@ -6,37 +6,37 @@ Defines of the voucher. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] | -|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] | -|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] | -|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] | -|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] | -|**categoryId** | **String** | Unique category ID assigned by Voucherify. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | [optional] | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | [optional] | -|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] | -|**assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] | -|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | [optional] | -|**referrerId** | **String** | Unique identifier of the referring person. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | -|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | [optional] | -|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | +|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | +|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | +|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | +|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | +|**categoryId** | **String** | Unique category ID assigned by Voucherify. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | +|**discount** | [**Discount**](Discount.md) | | +|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | +|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | +|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | +|**assets** | [**VoucherAssets**](VoucherAssets.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | +|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | +|**referrerId** | **String** | Unique identifier of the referring person. | +|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | +|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | +|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | @@ -47,7 +47,6 @@ Defines of the voucher. | GIFT_VOUCHER | "GIFT_VOUCHER" | | DISCOUNT_VOUCHER | "DISCOUNT_VOUCHER" | | LOYALTY_CARD | "LOYALTY_CARD" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -62,7 +61,6 @@ Defines of the voucher. | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/RedemptionRollback.md b/docs/RedemptionRollback.md index 39115ed2..dfb674b9 100644 --- a/docs/RedemptionRollback.md +++ b/docs/RedemptionRollback.md @@ -6,32 +6,32 @@ This is an object representing a redemption rollback. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique identifier of the redemption rollback. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON | | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | | -|**customerId** | **String** | Unique customer ID of the redeeming customer. | [optional] | -|**trackingId** | **String** | Hashed customer source ID. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the redemption. | [optional] | -|**amount** | **Integer** | For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer. | [optional] | -|**redemption** | **String** | Unique redemption ID of the parent redemption. | [optional] | -|**reason** | **String** | System generated cause for the redemption being invalid in the context of the provided parameters. | [optional] | -|**result** | [**ResultEnum**](#ResultEnum) | Redemption result. | | -|**status** | [**StatusEnum**](#StatusEnum) | Redemption status. | | -|**relatedRedemptions** | [**RedemptionRollbackRelatedRedemptions**](RedemptionRollbackRelatedRedemptions.md) | | [optional] | -|**failureCode** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | [optional] | -|**failureMessage** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | [optional] | -|**order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | [optional] | -|**channel** | [**RedemptionRollbackChannel**](RedemptionRollbackChannel.md) | | | -|**customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object. | | -|**relatedObjectId** | **String** | Unique identifier of the related object. It is assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher. | | -|**voucher** | [**Voucher**](Voucher.md) | | [optional] | -|**promotionTier** | [**PromotionTier**](PromotionTier.md) | | [optional] | -|**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional] | -|**gift** | [**RedemptionRollbackGift**](RedemptionRollbackGift.md) | | [optional] | -|**loyaltyCard** | [**RedemptionRollbackLoyaltyCard**](RedemptionRollbackLoyaltyCard.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique identifier of the redemption rollback. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | +|**customerId** | **String** | Unique customer ID of the redeeming customer. | +|**trackingId** | **String** | Hashed customer source ID. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the redemption. | +|**amount** | **Integer** | For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer. | +|**redemption** | **String** | Unique redemption ID of the parent redemption. | +|**reason** | **String** | System generated cause for the redemption being invalid in the context of the provided parameters. | +|**result** | [**ResultEnum**](#ResultEnum) | Redemption result. | +|**status** | [**StatusEnum**](#StatusEnum) | Redemption status. | +|**relatedRedemptions** | [**RedemptionRollbackRelatedRedemptions**](RedemptionRollbackRelatedRedemptions.md) | | +|**failureCode** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | +|**failureMessage** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | +|**order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | +|**channel** | [**RedemptionRollbackChannel**](RedemptionRollbackChannel.md) | | +|**customer** | [**SimpleCustomer**](SimpleCustomer.md) | | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object. | +|**relatedObjectId** | **String** | Unique identifier of the related object. It is assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher. | +|**voucher** | [**Voucher**](Voucher.md) | | +|**promotionTier** | [**PromotionTier**](PromotionTier.md) | | +|**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | +|**gift** | [**RedemptionRollbackGift**](RedemptionRollbackGift.md) | | +|**loyaltyCard** | [**RedemptionRollbackLoyaltyCard**](RedemptionRollbackLoyaltyCard.md) | | @@ -40,7 +40,6 @@ This is an object representing a redemption rollback. | Name | Value | |---- | -----| | REDEMPTION_ROLLBACK | "redemption_rollback" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -50,7 +49,6 @@ This is an object representing a redemption rollback. |---- | -----| | SUCCESS | "SUCCESS" | | FAILURE | "FAILURE" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -60,7 +58,6 @@ This is an object representing a redemption rollback. |---- | -----| | SUCCEEDED | "SUCCEEDED" | | FAILED | "FAILED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -71,7 +68,6 @@ This is an object representing a redemption rollback. | VOUCHER | "voucher" | | PROMOTION_TIER | "promotion_tier" | | REDEMPTION | "redemption" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionRollbackChannel.md b/docs/RedemptionRollbackChannel.md index d96c19a5..d6422230 100644 --- a/docs/RedemptionRollbackChannel.md +++ b/docs/RedemptionRollbackChannel.md @@ -6,10 +6,10 @@ Defines the details of the channel through which the redemption was issued. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**channelId** | **String** | Unique identifier of the channel which was used by the user performing the redemption rollback. This is either a user ID from the user using the Voucherify Dashboard or an X-APP-Id of a user using the API. | [optional] | -|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**channelId** | **String** | Unique identifier of the channel which was used by the user performing the redemption rollback. This is either a user ID from the user using the Voucherify Dashboard or an X-APP-Id of a user using the API. | +|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | @@ -19,7 +19,6 @@ Defines the details of the channel through which the redemption was issued. |---- | -----| | USER | "USER" | | API | "API" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionRollbackGift.md b/docs/RedemptionRollbackGift.md index 1027c1d9..1deadbbf 100644 --- a/docs/RedemptionRollbackGift.md +++ b/docs/RedemptionRollbackGift.md @@ -6,9 +6,9 @@ Contains the amount returned to the gift card in the redemption rollback. It is ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Integer** | Amount returned to the gift card as a result of the redemption rollback and expressed as a negative integer. The amount is expressed as the smallest currency unit (e.g. -100 cents for $1.00 returned). | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**amount** | **Integer** | Amount returned to the gift card as a result of the redemption rollback and expressed as a negative integer. The amount is expressed as the smallest currency unit (e.g. -100 cents for $1.00 returned). | diff --git a/docs/RedemptionRollbackLoyaltyCard.md b/docs/RedemptionRollbackLoyaltyCard.md index 1a4f8e86..8f93a4ea 100644 --- a/docs/RedemptionRollbackLoyaltyCard.md +++ b/docs/RedemptionRollbackLoyaltyCard.md @@ -6,9 +6,9 @@ Contains the number of points returned to the loyalty card in the reward redempt ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Number of points being returned to the loyalty card for the reward redemption rollback. It is expressed as a negative integer. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Number of points being returned to the loyalty card for the reward redemption rollback. It is expressed as a negative integer. | diff --git a/docs/RedemptionRollbackRelatedRedemptions.md b/docs/RedemptionRollbackRelatedRedemptions.md index 58f39f9e..cf9e37b4 100644 --- a/docs/RedemptionRollbackRelatedRedemptions.md +++ b/docs/RedemptionRollbackRelatedRedemptions.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**rollbacks** | [**List<RedemptionRollbackRelatedRedemptionsRollbacksItem>**](RedemptionRollbackRelatedRedemptionsRollbacksItem.md) | | [optional] | -|**redemptions** | [**List<RedemptionRollbackRelatedRedemptionsItem>**](RedemptionRollbackRelatedRedemptionsItem.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**rollbacks** | [**List<RedemptionRollbackRelatedRedemptionsRollbacksItem>**](RedemptionRollbackRelatedRedemptionsRollbacksItem.md) | | +|**redemptions** | [**List<RedemptionRollbackRelatedRedemptionsItem>**](RedemptionRollbackRelatedRedemptionsItem.md) | | diff --git a/docs/RedemptionRollbackRelatedRedemptionsItem.md b/docs/RedemptionRollbackRelatedRedemptionsItem.md index 293eaaae..7cb2acfe 100644 --- a/docs/RedemptionRollbackRelatedRedemptionsItem.md +++ b/docs/RedemptionRollbackRelatedRedemptionsItem.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique redemption ID. | [optional] | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique redemption ID. | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | diff --git a/docs/RedemptionRollbackRelatedRedemptionsRollbacksItem.md b/docs/RedemptionRollbackRelatedRedemptionsRollbacksItem.md index 5a565279..268f6446 100644 --- a/docs/RedemptionRollbackRelatedRedemptionsRollbacksItem.md +++ b/docs/RedemptionRollbackRelatedRedemptionsRollbacksItem.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique identifier of the redemption rollback. | [optional] | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique identifier of the redemption rollback. | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | diff --git a/docs/RedemptionVoucher.md b/docs/RedemptionVoucher.md index db5f5749..f7063778 100644 --- a/docs/RedemptionVoucher.md +++ b/docs/RedemptionVoucher.md @@ -6,38 +6,38 @@ Defines the details of the voucher being redeemed. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] | -|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] | -|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] | -|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] | -|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] | -|**categoryId** | **String** | Unique category ID assigned by Voucherify. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | [optional] | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | [optional] | -|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] | -|**assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] | -|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | [optional] | -|**referrerId** | **String** | Unique identifier of the referring person. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | -|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | [optional] | -|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | [optional] | -|**holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | +|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | +|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | +|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | +|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | +|**categoryId** | **String** | Unique category ID assigned by Voucherify. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | +|**discount** | [**Discount**](Discount.md) | | +|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | +|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | +|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | +|**assets** | [**VoucherAssets**](VoucherAssets.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | +|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | +|**referrerId** | **String** | Unique identifier of the referring person. | +|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | +|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | +|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | +|**holder** | [**SimpleCustomer**](SimpleCustomer.md) | | @@ -48,7 +48,6 @@ Defines the details of the voucher being redeemed. | GIFT_VOUCHER | "GIFT_VOUCHER" | | DISCOUNT_VOUCHER | "DISCOUNT_VOUCHER" | | LOYALTY_CARD | "LOYALTY_CARD" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -63,7 +62,6 @@ Defines the details of the voucher being redeemed. | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/RedemptionsApi.md b/docs/RedemptionsApi.md index 4528a9c8..08b2e1ea 100644 --- a/docs/RedemptionsApi.md +++ b/docs/RedemptionsApi.md @@ -65,9 +65,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **redemptionId** | **String**| ID of previously created redemption. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **redemptionId** | **String**| ID of previously created redemption. | ### Return type @@ -140,9 +140,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **code** | **String**| A **code** that identifies the voucher. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **code** | **String**| A **code** that identifies the voucher. | ### Return type @@ -222,16 +222,16 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | -| **result** | **String**| A filter on the list based on the redemption result. Available options are: `SUCCESS`, `FAILURE`. You can provide multiple values by repeating the param. | [optional] | -| **campaign** | **String**| A filter by the campaign **name** that the redemption resources originate from. | [optional] | -| **customer** | **String**| Return redemptions performed by the customer with given `id` or `source_id`. | [optional] | -| **order** | [**ParameterOrderListRedemptions**](.md)| Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] [enum: created_at, -created_at, id, -id, voucher_code, -voucher_code, tracking_id, -tracking_id, customer_id, -customer_id] | -| **createdAt** | [**ParameterCreatedBeforeAfter**](.md)| A filter on the list based on the object `created_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[created_at][before]=2017-09-08T13:52:18.227Z` | [optional] | -| **filters** | [**ParameterFiltersListRedemptions**](.md)| Filters for listing responses. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | +| **result** | **String**| A filter on the list based on the redemption result. Available options are: `SUCCESS`, `FAILURE`. You can provide multiple values by repeating the param. | +| **campaign** | **String**| A filter by the campaign **name** that the redemption resources originate from. | +| **customer** | **String**| Return redemptions performed by the customer with given `id` or `source_id`. | +| **order** | [**ParameterOrderListRedemptions**](.md)| Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | +| **createdAt** | [**ParameterCreatedBeforeAfter**](.md)| A filter on the list based on the object `created_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[created_at][before]=2017-09-08T13:52:18.227Z` | +| **filters** | [**ParameterFiltersListRedemptions**](.md)| Filters for listing responses. | ### Return type @@ -304,9 +304,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **redemptionsRedeemRequestBody** | [**RedemptionsRedeemRequestBody**](RedemptionsRedeemRequestBody.md)| | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **redemptionsRedeemRequestBody** | [**RedemptionsRedeemRequestBody**](RedemptionsRedeemRequestBody.md)| | ### Return type @@ -382,12 +382,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **redemptionId** | **String**| The original redemption ID to be rolled back (undone). | | -| **reason** | **String**| Reason for the rollback. | [optional] | -| **trackingId** | **String**| Customer's `source_id`. | [optional] | -| **redemptionsRollbackCreateRequestBody** | [**RedemptionsRollbackCreateRequestBody**](RedemptionsRollbackCreateRequestBody.md)| Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **redemptionId** | **String**| The original redemption ID to be rolled back (undone). | +| **reason** | **String**| Reason for the rollback. | +| **trackingId** | **String**| Customer's `source_id`. | +| **redemptionsRollbackCreateRequestBody** | [**RedemptionsRollbackCreateRequestBody**](RedemptionsRollbackCreateRequestBody.md)| Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. | ### Return type @@ -463,12 +463,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **parentRedemptionId** | **String**| Unique identifier of a parent redemption, e.g. `r_JQfm73zWSJFQxs3bGxweYjgm`. | | -| **reason** | **String**| Reason for the rollback. | [optional] | -| **trackingId** | **String**| Customer's `source_id`. | [optional] | -| **redemptionsRollbacksCreateRequestBody** | [**RedemptionsRollbacksCreateRequestBody**](RedemptionsRollbacksCreateRequestBody.md)| Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **parentRedemptionId** | **String**| Unique identifier of a parent redemption, e.g. `r_JQfm73zWSJFQxs3bGxweYjgm`. | +| **reason** | **String**| Reason for the rollback. | +| **trackingId** | **String**| Customer's `source_id`. | +| **redemptionsRollbacksCreateRequestBody** | [**RedemptionsRollbacksCreateRequestBody**](RedemptionsRollbacksCreateRequestBody.md)| Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. | ### Return type diff --git a/docs/RedemptionsGetResponseBody.md b/docs/RedemptionsGetResponseBody.md index 0a44d300..b7473bdf 100644 --- a/docs/RedemptionsGetResponseBody.md +++ b/docs/RedemptionsGetResponseBody.md @@ -5,32 +5,32 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | | | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | | -|**customerId** | **String** | Unique customer ID of the redeeming customer. | [optional] | -|**trackingId** | **String** | Hashed customer source ID. | [optional] | -|**metadata** | **Object** | | [optional] | -|**amount** | **Integer** | For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer. | [optional] | -|**redemption** | **String** | Unique redemption ID of the parent redemption. | [optional] | -|**result** | [**ResultEnum**](#ResultEnum) | Redemption result. | | -|**status** | [**StatusEnum**](#StatusEnum) | | | -|**relatedRedemptions** | [**RedemptionsGetResponseBodyRelatedRedemptions**](RedemptionsGetResponseBodyRelatedRedemptions.md) | | [optional] | -|**failureCode** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | [optional] | -|**failureMessage** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | [optional] | -|**order** | [**RedemptionsGetResponseBodyOrder**](RedemptionsGetResponseBodyOrder.md) | | [optional] | -|**channel** | [**RedemptionsGetResponseBodyChannel**](RedemptionsGetResponseBodyChannel.md) | | | -|**customer** | [**RedemptionsGetResponseBodyCustomer**](RedemptionsGetResponseBodyCustomer.md) | | [optional] | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object. | | -|**relatedObjectId** | **String** | | | -|**voucher** | [**RedemptionsGetResponseBodyVoucher**](RedemptionsGetResponseBodyVoucher.md) | | [optional] | -|**promotionTier** | [**RedemptionsGetResponseBodyPromotionTier**](RedemptionsGetResponseBodyPromotionTier.md) | | [optional] | -|**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional] | -|**gift** | [**RedemptionsGetResponseBodyGift**](RedemptionsGetResponseBodyGift.md) | | [optional] | -|**loyaltyCard** | [**RedemptionsGetResponseBodyLoyaltyCard**](RedemptionsGetResponseBodyLoyaltyCard.md) | | [optional] | -|**reason** | **String** | System generated cause for the redemption being invalid in the context of the provided parameters. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | +|**customerId** | **String** | Unique customer ID of the redeeming customer. | +|**trackingId** | **String** | Hashed customer source ID. | +|**metadata** | **Object** | | +|**amount** | **Integer** | For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer. | +|**redemption** | **String** | Unique redemption ID of the parent redemption. | +|**result** | [**ResultEnum**](#ResultEnum) | Redemption result. | +|**status** | [**StatusEnum**](#StatusEnum) | | +|**relatedRedemptions** | [**RedemptionsGetResponseBodyRelatedRedemptions**](RedemptionsGetResponseBodyRelatedRedemptions.md) | | +|**failureCode** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | +|**failureMessage** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | +|**order** | [**RedemptionsGetResponseBodyOrder**](RedemptionsGetResponseBodyOrder.md) | | +|**channel** | [**RedemptionsGetResponseBodyChannel**](RedemptionsGetResponseBodyChannel.md) | | +|**customer** | [**RedemptionsGetResponseBodyCustomer**](RedemptionsGetResponseBodyCustomer.md) | | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object. | +|**relatedObjectId** | **String** | | +|**voucher** | [**RedemptionsGetResponseBodyVoucher**](RedemptionsGetResponseBodyVoucher.md) | | +|**promotionTier** | [**RedemptionsGetResponseBodyPromotionTier**](RedemptionsGetResponseBodyPromotionTier.md) | | +|**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | +|**gift** | [**RedemptionsGetResponseBodyGift**](RedemptionsGetResponseBodyGift.md) | | +|**loyaltyCard** | [**RedemptionsGetResponseBodyLoyaltyCard**](RedemptionsGetResponseBodyLoyaltyCard.md) | | +|**reason** | **String** | System generated cause for the redemption being invalid in the context of the provided parameters. | @@ -40,7 +40,6 @@ |---- | -----| | REDEMPTION | "redemption" | | REDEMPTION_ROLLBACK | "redemption_rollback" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -50,7 +49,6 @@ |---- | -----| | SUCCESS | "SUCCESS" | | FAILURE | "FAILURE" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -61,7 +59,6 @@ | SUCCEEDED | "SUCCEEDED" | | FAILED | "FAILED" | | ROLLED_BACK | "ROLLED_BACK" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -72,7 +69,6 @@ | VOUCHER | "voucher" | | PROMOTION_TIER | "promotion_tier" | | REDEMPTION | "redemption" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionsGetResponseBodyChannel.md b/docs/RedemptionsGetResponseBodyChannel.md index afd89bc6..3b56f542 100644 --- a/docs/RedemptionsGetResponseBodyChannel.md +++ b/docs/RedemptionsGetResponseBodyChannel.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**channelId** | **String** | | [optional] | -|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**channelId** | **String** | | +|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | @@ -18,7 +18,6 @@ |---- | -----| | USER | "USER" | | API | "API" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionsGetResponseBodyCustomer.md b/docs/RedemptionsGetResponseBodyCustomer.md index c2acf0d4..72cafedd 100644 --- a/docs/RedemptionsGetResponseBodyCustomer.md +++ b/docs/RedemptionsGetResponseBodyCustomer.md @@ -5,14 +5,14 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | [optional] | -|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] | -|**name** | **String** | Customer's first and last name. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**metadata** | **Object** | | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | +|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | +|**name** | **String** | Customer's first and last name. | +|**email** | **String** | Customer's email address. | +|**metadata** | **Object** | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | @@ -21,7 +21,6 @@ | Name | Value | |---- | -----| | CUSTOMER | "customer" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionsGetResponseBodyGift.md b/docs/RedemptionsGetResponseBodyGift.md index 0208061d..c7516444 100644 --- a/docs/RedemptionsGetResponseBodyGift.md +++ b/docs/RedemptionsGetResponseBodyGift.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Integer** | Amount subtracted from the gift card as a result of the redemption. The amount is expressed as the smallest currency unit (e.g. 100 cents for $1.00). and Amount returned to the gift card as a result of the redemption rollback and expressed as a negative integer. The amount is expressed as the smallest currency unit (e.g. -100 cents for $1.00 returned). | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**amount** | **Integer** | Amount subtracted from the gift card as a result of the redemption. The amount is expressed as the smallest currency unit (e.g. 100 cents for $1.00). and Amount returned to the gift card as a result of the redemption rollback and expressed as a negative integer. The amount is expressed as the smallest currency unit (e.g. -100 cents for $1.00 returned). | diff --git a/docs/RedemptionsGetResponseBodyLoyaltyCard.md b/docs/RedemptionsGetResponseBodyLoyaltyCard.md index e9d68f1d..1b1bd1a5 100644 --- a/docs/RedemptionsGetResponseBodyLoyaltyCard.md +++ b/docs/RedemptionsGetResponseBodyLoyaltyCard.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Number of points subtracted from the loyalty card as a result of the redemption. and Number of points being returned to the loyalty card for the reward redemption rollback. It is expressed as a negative integer. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Number of points subtracted from the loyalty card as a result of the redemption. and Number of points being returned to the loyalty card for the reward redemption rollback. It is expressed as a negative integer. | diff --git a/docs/RedemptionsGetResponseBodyOrder.md b/docs/RedemptionsGetResponseBodyOrder.md index 9d525a32..d643cb9c 100644 --- a/docs/RedemptionsGetResponseBodyOrder.md +++ b/docs/RedemptionsGetResponseBodyOrder.md @@ -5,30 +5,30 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] | -|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The order status. | [optional] | -|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] | -|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] | -|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] | -|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] | -|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | [optional] | -|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] | -|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] | -|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] | -|**metadata** | **Object** | | [optional] | -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | [optional] | -|**referrerId** | **String** | Unique referrer ID. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | [optional] | -|**redemptions** | **Object** | | [optional] | -|**customer** | **CustomerId** | | [optional] | -|**referrer** | **ReferrerId** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | +|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | The order status. | +|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | +|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | +|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | +|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | +|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | +|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | +|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | +|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | +|**metadata** | **Object** | | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**referrerId** | **String** | Unique referrer ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**redemptions** | **Object** | | +|**customer** | **CustomerId** | | +|**referrer** | **ReferrerId** | | @@ -40,7 +40,6 @@ | PAID | "PAID" | | CANCELED | "CANCELED" | | FULFILLED | "FULFILLED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -49,7 +48,6 @@ | Name | Value | |---- | -----| | ORDER | "order" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionsGetResponseBodyPromotionTier.md b/docs/RedemptionsGetResponseBodyPromotionTier.md index 708e7bd1..f8d0a5ff 100644 --- a/docs/RedemptionsGetResponseBodyPromotionTier.md +++ b/docs/RedemptionsGetResponseBodyPromotionTier.md @@ -5,30 +5,30 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique promotion tier ID. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. | [optional] | -|**name** | **String** | Name of the promotion tier. | [optional] | -|**banner** | **String** | Text to be displayed to your customers on your website. | [optional] | -|**action** | [**RedemptionsGetResponseBodyPromotionTierAction**](RedemptionsGetResponseBodyPromotionTierAction.md) | | [optional] | -|**metadata** | **Object** | | [optional] | -|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional] | -|**promotionId** | **String** | Promotion unique ID. | [optional] | -|**campaign** | [**RedemptionsGetResponseBodyPromotionTierCampaign**](RedemptionsGetResponseBodyPromotionTierCampaign.md) | | [optional] | -|**campaignId** | **String** | Promotion tier's parent campaign's unique ID. | [optional] | -|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**RedemptionsGetResponseBodyPromotionTierValidityTimeframe**](RedemptionsGetResponseBodyPromotionTierValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | **List<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**summary** | [**RedemptionsGetResponseBodyPromotionTierSummary**](RedemptionsGetResponseBodyPromotionTierSummary.md) | | [optional] | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the promotion tier. | [optional] | -|**validationRuleAssignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | [optional] | -|**categoryId** | **String** | Promotion tier category ID. | [optional] | -|**categories** | [**List<Category>**](Category.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique promotion tier ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. | +|**name** | **String** | Name of the promotion tier. | +|**banner** | **String** | Text to be displayed to your customers on your website. | +|**action** | [**RedemptionsGetResponseBodyPromotionTierAction**](RedemptionsGetResponseBodyPromotionTierAction.md) | | +|**metadata** | **Object** | | +|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | +|**promotionId** | **String** | Promotion unique ID. | +|**campaign** | [**RedemptionsGetResponseBodyPromotionTierCampaign**](RedemptionsGetResponseBodyPromotionTierCampaign.md) | | +|**campaignId** | **String** | Promotion tier's parent campaign's unique ID. | +|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | +|**validityTimeframe** | [**RedemptionsGetResponseBodyPromotionTierValidityTimeframe**](RedemptionsGetResponseBodyPromotionTierValidityTimeframe.md) | | +|**validityDayOfWeek** | **List<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**summary** | [**RedemptionsGetResponseBodyPromotionTierSummary**](RedemptionsGetResponseBodyPromotionTierSummary.md) | | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the promotion tier. | +|**validationRuleAssignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | +|**categoryId** | **String** | Promotion tier category ID. | +|**categories** | [**List<Category>**](Category.md) | | diff --git a/docs/RedemptionsGetResponseBodyPromotionTierAction.md b/docs/RedemptionsGetResponseBodyPromotionTierAction.md index 319c58a1..9cf68188 100644 --- a/docs/RedemptionsGetResponseBodyPromotionTierAction.md +++ b/docs/RedemptionsGetResponseBodyPromotionTierAction.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**discount** | [**Discount**](Discount.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**discount** | [**Discount**](Discount.md) | | diff --git a/docs/RedemptionsGetResponseBodyPromotionTierCampaign.md b/docs/RedemptionsGetResponseBodyPromotionTierCampaign.md index 1e48d94d..deb4e7b1 100644 --- a/docs/RedemptionsGetResponseBodyPromotionTierCampaign.md +++ b/docs/RedemptionsGetResponseBodyPromotionTierCampaign.md @@ -5,17 +5,17 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique campaign ID. | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**RedemptionsGetResponseBodyPromotionTierCampaignValidityTimeframe**](RedemptionsGetResponseBodyPromotionTierCampaignValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the `start_date` and `expiration_date` using the <!-- [Disable Campaign](OpenAPI.json/paths/~1campaigns~1{campaignId}~1disable) -->[Disable Campaign](ref:disable-campaign) endpoint. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] | -|**categoryId** | **String** | Unique category ID that this campaign belongs to. | [optional] | -|**_object** | **String** | The type of the object represented by the campaign object. This object stores information about the campaign. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique campaign ID. | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | +|**validityTimeframe** | [**RedemptionsGetResponseBodyPromotionTierCampaignValidityTimeframe**](RedemptionsGetResponseBodyPromotionTierCampaignValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the `start_date` and `expiration_date` using the <!-- [Disable Campaign](OpenAPI.json/paths/~1campaigns~1{campaignId}~1disable) -->[Disable Campaign](ref:disable-campaign) endpoint. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | +|**categoryId** | **String** | Unique category ID that this campaign belongs to. | +|**_object** | **String** | The type of the object represented by the campaign object. This object stores information about the campaign. | @@ -30,7 +30,6 @@ | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/RedemptionsGetResponseBodyPromotionTierCampaignValidityTimeframe.md b/docs/RedemptionsGetResponseBodyPromotionTierCampaignValidityTimeframe.md index 716d9749..0007ee26 100644 --- a/docs/RedemptionsGetResponseBodyPromotionTierCampaignValidityTimeframe.md +++ b/docs/RedemptionsGetResponseBodyPromotionTierCampaignValidityTimeframe.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | [optional] | -|**duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | +|**duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | diff --git a/docs/RedemptionsGetResponseBodyPromotionTierSummary.md b/docs/RedemptionsGetResponseBodyPromotionTierSummary.md index 82fdd368..f788294b 100644 --- a/docs/RedemptionsGetResponseBodyPromotionTierSummary.md +++ b/docs/RedemptionsGetResponseBodyPromotionTierSummary.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redemptions** | [**RedemptionsGetResponseBodyPromotionTierSummaryRedemptions**](RedemptionsGetResponseBodyPromotionTierSummaryRedemptions.md) | | [optional] | -|**orders** | [**RedemptionsGetResponseBodyPromotionTierSummaryOrders**](RedemptionsGetResponseBodyPromotionTierSummaryOrders.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redemptions** | [**RedemptionsGetResponseBodyPromotionTierSummaryRedemptions**](RedemptionsGetResponseBodyPromotionTierSummaryRedemptions.md) | | +|**orders** | [**RedemptionsGetResponseBodyPromotionTierSummaryOrders**](RedemptionsGetResponseBodyPromotionTierSummaryOrders.md) | | diff --git a/docs/RedemptionsGetResponseBodyPromotionTierSummaryOrders.md b/docs/RedemptionsGetResponseBodyPromotionTierSummaryOrders.md index 8dfaedda..35906d4b 100644 --- a/docs/RedemptionsGetResponseBodyPromotionTierSummaryOrders.md +++ b/docs/RedemptionsGetResponseBodyPromotionTierSummaryOrders.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**totalAmount** | **Integer** | Sum of order totals. | [optional] | -|**totalDiscountAmount** | **Integer** | Sum of total discount applied using the promotion tier. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**totalAmount** | **Integer** | Sum of order totals. | +|**totalDiscountAmount** | **Integer** | Sum of total discount applied using the promotion tier. | diff --git a/docs/RedemptionsGetResponseBodyPromotionTierSummaryRedemptions.md b/docs/RedemptionsGetResponseBodyPromotionTierSummaryRedemptions.md index be95b431..08655854 100644 --- a/docs/RedemptionsGetResponseBodyPromotionTierSummaryRedemptions.md +++ b/docs/RedemptionsGetResponseBodyPromotionTierSummaryRedemptions.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**totalRedeemed** | **Integer** | Number of times the promotion tier was redeemed. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**totalRedeemed** | **Integer** | Number of times the promotion tier was redeemed. | diff --git a/docs/RedemptionsGetResponseBodyPromotionTierValidityTimeframe.md b/docs/RedemptionsGetResponseBodyPromotionTierValidityTimeframe.md index af05e49d..2003686c 100644 --- a/docs/RedemptionsGetResponseBodyPromotionTierValidityTimeframe.md +++ b/docs/RedemptionsGetResponseBodyPromotionTierValidityTimeframe.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a promotion tier with an `interval` of `P2D` will be active every other day. | [optional] | -|**duration** | **String** | Defines the amount of time the promotion tier will be active in ISO 8601 format. For example, a promotion tier with a `duration` of `P1D` will be valid for a duration of one day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a promotion tier with an `interval` of `P2D` will be active every other day. | +|**duration** | **String** | Defines the amount of time the promotion tier will be active in ISO 8601 format. For example, a promotion tier with a `duration` of `P1D` will be valid for a duration of one day. | diff --git a/docs/RedemptionsGetResponseBodyRelatedRedemptions.md b/docs/RedemptionsGetResponseBodyRelatedRedemptions.md index 9145fabc..420852e5 100644 --- a/docs/RedemptionsGetResponseBodyRelatedRedemptions.md +++ b/docs/RedemptionsGetResponseBodyRelatedRedemptions.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**rollbacks** | [**List<RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem>**](RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem.md) | | [optional] | -|**redemptions** | [**List<RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem>**](RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**rollbacks** | [**List<RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem>**](RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem.md) | | +|**redemptions** | [**List<RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem>**](RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem.md) | | diff --git a/docs/RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem.md b/docs/RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem.md index d61a3cbd..32c262e0 100644 --- a/docs/RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem.md +++ b/docs/RedemptionsGetResponseBodyRelatedRedemptionsRedemptionsItem.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique redemption ID. | [optional] | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique redemption ID. | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | diff --git a/docs/RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem.md b/docs/RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem.md index d6105c94..d7b40226 100644 --- a/docs/RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem.md +++ b/docs/RedemptionsGetResponseBodyRelatedRedemptionsRollbacksItem.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | diff --git a/docs/RedemptionsGetResponseBodyVoucher.md b/docs/RedemptionsGetResponseBodyVoucher.md index 8965daba..1af530b4 100644 --- a/docs/RedemptionsGetResponseBodyVoucher.md +++ b/docs/RedemptionsGetResponseBodyVoucher.md @@ -5,38 +5,38 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] | -|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] | -|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] | -|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] | -|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] | -|**categoryId** | **String** | Unique category ID assigned by Voucherify. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | [optional] | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**gift** | [**RedemptionsGetResponseBodyVoucherGift**](RedemptionsGetResponseBodyVoucherGift.md) | | [optional] | -|**loyaltyCard** | [**RedemptionsGetResponseBodyVoucherLoyaltyCard**](RedemptionsGetResponseBodyVoucherLoyaltyCard.md) | | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**RedemptionsGetResponseBodyVoucherValidityTimeframe**](RedemptionsGetResponseBodyVoucherValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**metadata** | **Object** | | [optional] | -|**assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] | -|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | [optional] | -|**referrerId** | **String** | Unique identifier of the referring person. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | -|**publish** | [**RedemptionsGetResponseBodyVoucherPublish**](RedemptionsGetResponseBodyVoucherPublish.md) | | [optional] | -|**redemption** | [**RedemptionsGetResponseBodyVoucherRedemption**](RedemptionsGetResponseBodyVoucherRedemption.md) | | [optional] | -|**holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | +|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | +|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | +|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | +|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | +|**categoryId** | **String** | Unique category ID assigned by Voucherify. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | +|**discount** | [**Discount**](Discount.md) | | +|**gift** | [**RedemptionsGetResponseBodyVoucherGift**](RedemptionsGetResponseBodyVoucherGift.md) | | +|**loyaltyCard** | [**RedemptionsGetResponseBodyVoucherLoyaltyCard**](RedemptionsGetResponseBodyVoucherLoyaltyCard.md) | | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | +|**validityTimeframe** | [**RedemptionsGetResponseBodyVoucherValidityTimeframe**](RedemptionsGetResponseBodyVoucherValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**metadata** | **Object** | | +|**assets** | [**VoucherAssets**](VoucherAssets.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | +|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | +|**referrerId** | **String** | Unique identifier of the referring person. | +|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | +|**publish** | [**RedemptionsGetResponseBodyVoucherPublish**](RedemptionsGetResponseBodyVoucherPublish.md) | | +|**redemption** | [**RedemptionsGetResponseBodyVoucherRedemption**](RedemptionsGetResponseBodyVoucherRedemption.md) | | +|**holder** | [**SimpleCustomer**](SimpleCustomer.md) | | @@ -47,7 +47,6 @@ | GIFT_VOUCHER | "GIFT_VOUCHER" | | DISCOUNT_VOUCHER | "DISCOUNT_VOUCHER" | | LOYALTY_CARD | "LOYALTY_CARD" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -62,7 +61,6 @@ | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/RedemptionsGetResponseBodyVoucherGift.md b/docs/RedemptionsGetResponseBodyVoucherGift.md index 4283447f..03e0a6bc 100644 --- a/docs/RedemptionsGetResponseBodyVoucherGift.md +++ b/docs/RedemptionsGetResponseBodyVoucherGift.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Integer** | Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] | -|**balance** | **Integer** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] | -|**effect** | [**EffectEnum**](#EffectEnum) | Defines how the credits are applied to the customer's order. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**amount** | **Integer** | Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | +|**balance** | **Integer** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | +|**effect** | [**EffectEnum**](#EffectEnum) | Defines how the credits are applied to the customer's order. | @@ -19,7 +19,6 @@ |---- | -----| | ORDER | "APPLY_TO_ORDER" | | ITEMS | "APPLY_TO_ITEMS" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionsGetResponseBodyVoucherLoyaltyCard.md b/docs/RedemptionsGetResponseBodyVoucherLoyaltyCard.md index b8697132..50d7cba0 100644 --- a/docs/RedemptionsGetResponseBodyVoucherLoyaltyCard.md +++ b/docs/RedemptionsGetResponseBodyVoucherLoyaltyCard.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Total points incurred over lifespan of loyalty card. | [optional] | -|**balance** | **Integer** | Points available for reward redemption. | [optional] | -|**nextExpirationDate** | **LocalDate** | The next closest date when the next set of points are due to expire. | [optional] | -|**nextExpirationPoints** | **Integer** | The amount of points that are set to expire next. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Total points incurred over lifespan of loyalty card. | +|**balance** | **Integer** | Points available for reward redemption. | +|**nextExpirationDate** | **LocalDate** | The next closest date when the next set of points are due to expire. | +|**nextExpirationPoints** | **Integer** | The amount of points that are set to expire next. | diff --git a/docs/RedemptionsGetResponseBodyVoucherPublish.md b/docs/RedemptionsGetResponseBodyVoucherPublish.md index f6d66755..9c8e12f6 100644 --- a/docs/RedemptionsGetResponseBodyVoucherPublish.md +++ b/docs/RedemptionsGetResponseBodyVoucherPublish.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] | -|**count** | **Integer** | Publication events counter. | [optional] | -|**url** | **String** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | +|**count** | **Integer** | Publication events counter. | +|**url** | **String** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | diff --git a/docs/RedemptionsGetResponseBodyVoucherRedemption.md b/docs/RedemptionsGetResponseBodyVoucherRedemption.md index 32f1f5db..cc292d4d 100644 --- a/docs/RedemptionsGetResponseBodyVoucherRedemption.md +++ b/docs/RedemptionsGetResponseBodyVoucherRedemption.md @@ -5,13 +5,13 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | [optional] | -|**redeemedQuantity** | **Integer** | How many times a voucher has already been redeemed. | [optional] | -|**redeemedPoints** | **Integer** | Total loyalty points redeemed. | [optional] | -|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] | -|**url** | **String** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | +|**redeemedQuantity** | **Integer** | How many times a voucher has already been redeemed. | +|**redeemedPoints** | **Integer** | Total loyalty points redeemed. | +|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | +|**url** | **String** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | diff --git a/docs/RedemptionsGetResponseBodyVoucherValidityTimeframe.md b/docs/RedemptionsGetResponseBodyVoucherValidityTimeframe.md index 6874d937..1f040c55 100644 --- a/docs/RedemptionsGetResponseBodyVoucherValidityTimeframe.md +++ b/docs/RedemptionsGetResponseBodyVoucherValidityTimeframe.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**duration** | **String** | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a `duration` of `PT1H` will be valid for a duration of one hour. | [optional] | -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an `interval` of `P2D` will be active every other day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**duration** | **String** | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a `duration` of `PT1H` will be valid for a duration of one hour. | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an `interval` of `P2D` will be active every other day. | diff --git a/docs/RedemptionsListResponseBody.md b/docs/RedemptionsListResponseBody.md index 469bb159..3c941a99 100644 --- a/docs/RedemptionsListResponseBody.md +++ b/docs/RedemptionsListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/redemptions`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about redemptions in a dictionary. | | -|**dataRef** | **String** | Identifies the name of the attribute that contains the array of redemption objects. | | -|**redemptions** | [**List<RedemptionsListResponseBodyRedemptionsItem>**](RedemptionsListResponseBodyRedemptionsItem.md) | | | -|**total** | **Integer** | Total number of redemptions. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about redemptions in a dictionary. | +|**dataRef** | **String** | Identifies the name of the attribute that contains the array of redemption objects. | +|**redemptions** | [**List<RedemptionsListResponseBodyRedemptionsItem>**](RedemptionsListResponseBodyRedemptionsItem.md) | | +|**total** | **Integer** | Total number of redemptions. | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItem.md b/docs/RedemptionsListResponseBodyRedemptionsItem.md index 24eca2ea..fe658efd 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItem.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItem.md @@ -5,32 +5,32 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | | | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | | -|**customerId** | **String** | Unique customer ID of the redeeming customer. | [optional] | -|**trackingId** | **String** | Hashed customer source ID. | [optional] | -|**metadata** | **Object** | | [optional] | -|**amount** | **Integer** | For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer. | [optional] | -|**redemption** | **String** | Unique redemption ID of the parent redemption. | [optional] | -|**result** | [**ResultEnum**](#ResultEnum) | Redemption result. | | -|**status** | [**StatusEnum**](#StatusEnum) | | | -|**relatedRedemptions** | [**RedemptionsListResponseBodyRedemptionsItemRelatedRedemptions**](RedemptionsListResponseBodyRedemptionsItemRelatedRedemptions.md) | | [optional] | -|**failureCode** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | [optional] | -|**failureMessage** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | [optional] | -|**order** | [**RedemptionsListResponseBodyRedemptionsItemOrder**](RedemptionsListResponseBodyRedemptionsItemOrder.md) | | [optional] | -|**channel** | [**RedemptionsListResponseBodyRedemptionsItemChannel**](RedemptionsListResponseBodyRedemptionsItemChannel.md) | | | -|**customer** | [**RedemptionsListResponseBodyRedemptionsItemCustomer**](RedemptionsListResponseBodyRedemptionsItemCustomer.md) | | [optional] | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object. | | -|**relatedObjectId** | **String** | | | -|**voucher** | [**RedemptionsListResponseBodyRedemptionsItemVoucher**](RedemptionsListResponseBodyRedemptionsItemVoucher.md) | | [optional] | -|**promotionTier** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTier**](RedemptionsListResponseBodyRedemptionsItemPromotionTier.md) | | [optional] | -|**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional] | -|**gift** | [**RedemptionsListResponseBodyRedemptionsItemGift**](RedemptionsListResponseBodyRedemptionsItemGift.md) | | [optional] | -|**loyaltyCard** | [**RedemptionsListResponseBodyRedemptionsItemLoyaltyCard**](RedemptionsListResponseBodyRedemptionsItemLoyaltyCard.md) | | [optional] | -|**reason** | **String** | System generated cause for the redemption being invalid in the context of the provided parameters. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | +|**customerId** | **String** | Unique customer ID of the redeeming customer. | +|**trackingId** | **String** | Hashed customer source ID. | +|**metadata** | **Object** | | +|**amount** | **Integer** | For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer. | +|**redemption** | **String** | Unique redemption ID of the parent redemption. | +|**result** | [**ResultEnum**](#ResultEnum) | Redemption result. | +|**status** | [**StatusEnum**](#StatusEnum) | | +|**relatedRedemptions** | [**RedemptionsListResponseBodyRedemptionsItemRelatedRedemptions**](RedemptionsListResponseBodyRedemptionsItemRelatedRedemptions.md) | | +|**failureCode** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | +|**failureMessage** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | +|**order** | [**RedemptionsListResponseBodyRedemptionsItemOrder**](RedemptionsListResponseBodyRedemptionsItemOrder.md) | | +|**channel** | [**RedemptionsListResponseBodyRedemptionsItemChannel**](RedemptionsListResponseBodyRedemptionsItemChannel.md) | | +|**customer** | [**RedemptionsListResponseBodyRedemptionsItemCustomer**](RedemptionsListResponseBodyRedemptionsItemCustomer.md) | | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object. | +|**relatedObjectId** | **String** | | +|**voucher** | [**RedemptionsListResponseBodyRedemptionsItemVoucher**](RedemptionsListResponseBodyRedemptionsItemVoucher.md) | | +|**promotionTier** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTier**](RedemptionsListResponseBodyRedemptionsItemPromotionTier.md) | | +|**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | +|**gift** | [**RedemptionsListResponseBodyRedemptionsItemGift**](RedemptionsListResponseBodyRedemptionsItemGift.md) | | +|**loyaltyCard** | [**RedemptionsListResponseBodyRedemptionsItemLoyaltyCard**](RedemptionsListResponseBodyRedemptionsItemLoyaltyCard.md) | | +|**reason** | **String** | System generated cause for the redemption being invalid in the context of the provided parameters. | @@ -40,7 +40,6 @@ |---- | -----| | REDEMPTION | "redemption" | | REDEMPTION_ROLLBACK | "redemption_rollback" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -50,7 +49,6 @@ |---- | -----| | SUCCESS | "SUCCESS" | | FAILURE | "FAILURE" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -61,7 +59,6 @@ | SUCCEEDED | "SUCCEEDED" | | FAILED | "FAILED" | | ROLLED_BACK | "ROLLED_BACK" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -72,7 +69,6 @@ | VOUCHER | "voucher" | | PROMOTION_TIER | "promotion_tier" | | REDEMPTION | "redemption" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemChannel.md b/docs/RedemptionsListResponseBodyRedemptionsItemChannel.md index bec0b6bc..20b691e6 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemChannel.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemChannel.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**channelId** | **String** | | [optional] | -|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**channelId** | **String** | | +|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | @@ -18,7 +18,6 @@ |---- | -----| | USER | "USER" | | API | "API" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemCustomer.md b/docs/RedemptionsListResponseBodyRedemptionsItemCustomer.md index ea38b1d4..61b5c871 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemCustomer.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemCustomer.md @@ -5,14 +5,14 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | [optional] | -|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] | -|**name** | **String** | Customer's first and last name. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**metadata** | **Object** | | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | +|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | +|**name** | **String** | Customer's first and last name. | +|**email** | **String** | Customer's email address. | +|**metadata** | **Object** | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | @@ -21,7 +21,6 @@ | Name | Value | |---- | -----| | CUSTOMER | "customer" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemGift.md b/docs/RedemptionsListResponseBodyRedemptionsItemGift.md index a6ec2f1e..05a70b11 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemGift.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemGift.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Integer** | Amount subtracted from the gift card as a result of the redemption. The amount is expressed as the smallest currency unit (e.g. 100 cents for $1.00). and Amount returned to the gift card as a result of the redemption rollback and expressed as a negative integer. The amount is expressed as the smallest currency unit (e.g. -100 cents for $1.00 returned). | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**amount** | **Integer** | Amount subtracted from the gift card as a result of the redemption. The amount is expressed as the smallest currency unit (e.g. 100 cents for $1.00). and Amount returned to the gift card as a result of the redemption rollback and expressed as a negative integer. The amount is expressed as the smallest currency unit (e.g. -100 cents for $1.00 returned). | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemLoyaltyCard.md b/docs/RedemptionsListResponseBodyRedemptionsItemLoyaltyCard.md index 16c5ec47..6feecaa9 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemLoyaltyCard.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemLoyaltyCard.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Number of points subtracted from the loyalty card as a result of the redemption. and Number of points being returned to the loyalty card for the reward redemption rollback. It is expressed as a negative integer. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Number of points subtracted from the loyalty card as a result of the redemption. and Number of points being returned to the loyalty card for the reward redemption rollback. It is expressed as a negative integer. | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md b/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md index 84c2d405..a4c255b9 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemOrder.md @@ -5,30 +5,30 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] | -|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The order status. | [optional] | -|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] | -|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] | -|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] | -|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] | -|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | [optional] | -|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] | -|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] | -|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] | -|**metadata** | **Object** | | [optional] | -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | [optional] | -|**referrerId** | **String** | Unique referrer ID. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | [optional] | -|**redemptions** | **Object** | | [optional] | -|**customer** | **CustomerId** | | [optional] | -|**referrer** | **ReferrerId** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | +|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | The order status. | +|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | +|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | +|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | +|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | +|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | +|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | +|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | +|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | +|**metadata** | **Object** | | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**referrerId** | **String** | Unique referrer ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**redemptions** | **Object** | | +|**customer** | **CustomerId** | | +|**referrer** | **ReferrerId** | | @@ -40,7 +40,6 @@ | PAID | "PAID" | | CANCELED | "CANCELED" | | FULFILLED | "FULFILLED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -49,7 +48,6 @@ | Name | Value | |---- | -----| | ORDER | "order" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTier.md b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTier.md index ec80f1e7..67b11b60 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTier.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTier.md @@ -5,30 +5,30 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique promotion tier ID. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. | [optional] | -|**name** | **String** | Name of the promotion tier. | [optional] | -|**banner** | **String** | Text to be displayed to your customers on your website. | [optional] | -|**action** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTierAction**](RedemptionsListResponseBodyRedemptionsItemPromotionTierAction.md) | | [optional] | -|**metadata** | **Object** | | [optional] | -|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional] | -|**promotionId** | **String** | Promotion unique ID. | [optional] | -|**campaign** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaign**](RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaign.md) | | [optional] | -|**campaignId** | **String** | Promotion tier's parent campaign's unique ID. | [optional] | -|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTierValidityTimeframe**](RedemptionsListResponseBodyRedemptionsItemPromotionTierValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | **List<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**summary** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTierSummary**](RedemptionsListResponseBodyRedemptionsItemPromotionTierSummary.md) | | [optional] | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the promotion tier. | [optional] | -|**validationRuleAssignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | [optional] | -|**categoryId** | **String** | Promotion tier category ID. | [optional] | -|**categories** | [**List<Category>**](Category.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique promotion tier ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. | +|**name** | **String** | Name of the promotion tier. | +|**banner** | **String** | Text to be displayed to your customers on your website. | +|**action** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTierAction**](RedemptionsListResponseBodyRedemptionsItemPromotionTierAction.md) | | +|**metadata** | **Object** | | +|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | +|**promotionId** | **String** | Promotion unique ID. | +|**campaign** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaign**](RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaign.md) | | +|**campaignId** | **String** | Promotion tier's parent campaign's unique ID. | +|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | +|**validityTimeframe** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTierValidityTimeframe**](RedemptionsListResponseBodyRedemptionsItemPromotionTierValidityTimeframe.md) | | +|**validityDayOfWeek** | **List<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**summary** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTierSummary**](RedemptionsListResponseBodyRedemptionsItemPromotionTierSummary.md) | | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the promotion tier. | +|**validationRuleAssignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | +|**categoryId** | **String** | Promotion tier category ID. | +|**categories** | [**List<Category>**](Category.md) | | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierAction.md b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierAction.md index 89ec0413..1a51e43b 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierAction.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierAction.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**discount** | [**Discount**](Discount.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**discount** | [**Discount**](Discount.md) | | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaign.md b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaign.md index f8477b53..48f1d2d2 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaign.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaign.md @@ -5,17 +5,17 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique campaign ID. | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaignValidityTimeframe**](RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaignValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the `start_date` and `expiration_date` using the <!-- [Disable Campaign](OpenAPI.json/paths/~1campaigns~1{campaignId}~1disable) -->[Disable Campaign](ref:disable-campaign) endpoint. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] | -|**categoryId** | **String** | Unique category ID that this campaign belongs to. | [optional] | -|**_object** | **String** | The type of the object represented by the campaign object. This object stores information about the campaign. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique campaign ID. | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | +|**validityTimeframe** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaignValidityTimeframe**](RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaignValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the `start_date` and `expiration_date` using the <!-- [Disable Campaign](OpenAPI.json/paths/~1campaigns~1{campaignId}~1disable) -->[Disable Campaign](ref:disable-campaign) endpoint. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | +|**categoryId** | **String** | Unique category ID that this campaign belongs to. | +|**_object** | **String** | The type of the object represented by the campaign object. This object stores information about the campaign. | @@ -30,7 +30,6 @@ | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaignValidityTimeframe.md b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaignValidityTimeframe.md index 94cb6e25..f57881c3 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaignValidityTimeframe.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaignValidityTimeframe.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | [optional] | -|**duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | +|**duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierSummary.md b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierSummary.md index ecef8158..b8046ff1 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierSummary.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierSummary.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redemptions** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryRedemptions**](RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryRedemptions.md) | | [optional] | -|**orders** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryOrders**](RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryOrders.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redemptions** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryRedemptions**](RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryRedemptions.md) | | +|**orders** | [**RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryOrders**](RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryOrders.md) | | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryOrders.md b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryOrders.md index 127d0517..d9e36dcf 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryOrders.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryOrders.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**totalAmount** | **Integer** | Sum of order totals. | [optional] | -|**totalDiscountAmount** | **Integer** | Sum of total discount applied using the promotion tier. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**totalAmount** | **Integer** | Sum of order totals. | +|**totalDiscountAmount** | **Integer** | Sum of total discount applied using the promotion tier. | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryRedemptions.md b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryRedemptions.md index d264adab..b7c9bd3a 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryRedemptions.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierSummaryRedemptions.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**totalRedeemed** | **Integer** | Number of times the promotion tier was redeemed. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**totalRedeemed** | **Integer** | Number of times the promotion tier was redeemed. | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierValidityTimeframe.md b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierValidityTimeframe.md index 556e599d..3afed7ec 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierValidityTimeframe.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemPromotionTierValidityTimeframe.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a promotion tier with an `interval` of `P2D` will be active every other day. | [optional] | -|**duration** | **String** | Defines the amount of time the promotion tier will be active in ISO 8601 format. For example, a promotion tier with a `duration` of `P1D` will be valid for a duration of one day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a promotion tier with an `interval` of `P2D` will be active every other day. | +|**duration** | **String** | Defines the amount of time the promotion tier will be active in ISO 8601 format. For example, a promotion tier with a `duration` of `P1D` will be valid for a duration of one day. | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemRelatedRedemptions.md b/docs/RedemptionsListResponseBodyRedemptionsItemRelatedRedemptions.md index 4e0aa644..917b00d9 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemRelatedRedemptions.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemRelatedRedemptions.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**rollbacks** | [**List<RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRollbacksItem>**](RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRollbacksItem.md) | | [optional] | -|**redemptions** | [**List<RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRedemptionsItem>**](RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRedemptionsItem.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**rollbacks** | [**List<RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRollbacksItem>**](RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRollbacksItem.md) | | +|**redemptions** | [**List<RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRedemptionsItem>**](RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRedemptionsItem.md) | | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRedemptionsItem.md b/docs/RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRedemptionsItem.md index 9010ada5..3e6bf05e 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRedemptionsItem.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRedemptionsItem.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique redemption ID. | [optional] | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique redemption ID. | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRollbacksItem.md b/docs/RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRollbacksItem.md index d3cef8e2..e405ce90 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRollbacksItem.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemRelatedRedemptionsRollbacksItem.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemVoucher.md b/docs/RedemptionsListResponseBodyRedemptionsItemVoucher.md index b97d2bbf..188b2782 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemVoucher.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemVoucher.md @@ -5,38 +5,38 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] | -|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] | -|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] | -|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] | -|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] | -|**categoryId** | **String** | Unique category ID assigned by Voucherify. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | [optional] | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**gift** | [**RedemptionsListResponseBodyRedemptionsItemVoucherGift**](RedemptionsListResponseBodyRedemptionsItemVoucherGift.md) | | [optional] | -|**loyaltyCard** | [**RedemptionsListResponseBodyRedemptionsItemVoucherLoyaltyCard**](RedemptionsListResponseBodyRedemptionsItemVoucherLoyaltyCard.md) | | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**RedemptionsListResponseBodyRedemptionsItemVoucherValidityTimeframe**](RedemptionsListResponseBodyRedemptionsItemVoucherValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**metadata** | **Object** | | [optional] | -|**assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] | -|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | [optional] | -|**referrerId** | **String** | Unique identifier of the referring person. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | -|**publish** | [**RedemptionsListResponseBodyRedemptionsItemVoucherPublish**](RedemptionsListResponseBodyRedemptionsItemVoucherPublish.md) | | [optional] | -|**redemption** | [**RedemptionsListResponseBodyRedemptionsItemVoucherRedemption**](RedemptionsListResponseBodyRedemptionsItemVoucherRedemption.md) | | [optional] | -|**holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | +|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | +|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | +|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | +|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | +|**categoryId** | **String** | Unique category ID assigned by Voucherify. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | +|**discount** | [**Discount**](Discount.md) | | +|**gift** | [**RedemptionsListResponseBodyRedemptionsItemVoucherGift**](RedemptionsListResponseBodyRedemptionsItemVoucherGift.md) | | +|**loyaltyCard** | [**RedemptionsListResponseBodyRedemptionsItemVoucherLoyaltyCard**](RedemptionsListResponseBodyRedemptionsItemVoucherLoyaltyCard.md) | | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | +|**validityTimeframe** | [**RedemptionsListResponseBodyRedemptionsItemVoucherValidityTimeframe**](RedemptionsListResponseBodyRedemptionsItemVoucherValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**metadata** | **Object** | | +|**assets** | [**VoucherAssets**](VoucherAssets.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | +|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | +|**referrerId** | **String** | Unique identifier of the referring person. | +|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | +|**publish** | [**RedemptionsListResponseBodyRedemptionsItemVoucherPublish**](RedemptionsListResponseBodyRedemptionsItemVoucherPublish.md) | | +|**redemption** | [**RedemptionsListResponseBodyRedemptionsItemVoucherRedemption**](RedemptionsListResponseBodyRedemptionsItemVoucherRedemption.md) | | +|**holder** | [**SimpleCustomer**](SimpleCustomer.md) | | @@ -47,7 +47,6 @@ | GIFT_VOUCHER | "GIFT_VOUCHER" | | DISCOUNT_VOUCHER | "DISCOUNT_VOUCHER" | | LOYALTY_CARD | "LOYALTY_CARD" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -62,7 +61,6 @@ | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemVoucherGift.md b/docs/RedemptionsListResponseBodyRedemptionsItemVoucherGift.md index b9584f38..ff66b388 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemVoucherGift.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemVoucherGift.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Integer** | Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] | -|**balance** | **Integer** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] | -|**effect** | [**EffectEnum**](#EffectEnum) | Defines how the credits are applied to the customer's order. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**amount** | **Integer** | Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | +|**balance** | **Integer** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | +|**effect** | [**EffectEnum**](#EffectEnum) | Defines how the credits are applied to the customer's order. | @@ -19,7 +19,6 @@ |---- | -----| | ORDER | "APPLY_TO_ORDER" | | ITEMS | "APPLY_TO_ITEMS" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemVoucherLoyaltyCard.md b/docs/RedemptionsListResponseBodyRedemptionsItemVoucherLoyaltyCard.md index 1dc03e33..cc871e0c 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemVoucherLoyaltyCard.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemVoucherLoyaltyCard.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Total points incurred over lifespan of loyalty card. | [optional] | -|**balance** | **Integer** | Points available for reward redemption. | [optional] | -|**nextExpirationDate** | **LocalDate** | The next closest date when the next set of points are due to expire. | [optional] | -|**nextExpirationPoints** | **Integer** | The amount of points that are set to expire next. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Total points incurred over lifespan of loyalty card. | +|**balance** | **Integer** | Points available for reward redemption. | +|**nextExpirationDate** | **LocalDate** | The next closest date when the next set of points are due to expire. | +|**nextExpirationPoints** | **Integer** | The amount of points that are set to expire next. | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemVoucherPublish.md b/docs/RedemptionsListResponseBodyRedemptionsItemVoucherPublish.md index 305f974b..25cd0548 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemVoucherPublish.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemVoucherPublish.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] | -|**count** | **Integer** | Publication events counter. | [optional] | -|**url** | **String** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | +|**count** | **Integer** | Publication events counter. | +|**url** | **String** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemVoucherRedemption.md b/docs/RedemptionsListResponseBodyRedemptionsItemVoucherRedemption.md index 6d82f0f7..ac044fcd 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemVoucherRedemption.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemVoucherRedemption.md @@ -5,13 +5,13 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | [optional] | -|**redeemedQuantity** | **Integer** | How many times a voucher has already been redeemed. | [optional] | -|**redeemedPoints** | **Integer** | Total loyalty points redeemed. | [optional] | -|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] | -|**url** | **String** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | +|**redeemedQuantity** | **Integer** | How many times a voucher has already been redeemed. | +|**redeemedPoints** | **Integer** | Total loyalty points redeemed. | +|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | +|**url** | **String** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | diff --git a/docs/RedemptionsListResponseBodyRedemptionsItemVoucherValidityTimeframe.md b/docs/RedemptionsListResponseBodyRedemptionsItemVoucherValidityTimeframe.md index e62b3b05..643850cd 100644 --- a/docs/RedemptionsListResponseBodyRedemptionsItemVoucherValidityTimeframe.md +++ b/docs/RedemptionsListResponseBodyRedemptionsItemVoucherValidityTimeframe.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**duration** | **String** | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a `duration` of `PT1H` will be valid for a duration of one hour. | [optional] | -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an `interval` of `P2D` will be active every other day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**duration** | **String** | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a `duration` of `PT1H` will be valid for a duration of one hour. | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an `interval` of `P2D` will be active every other day. | diff --git a/docs/RedemptionsRedeemRequestBody.md b/docs/RedemptionsRedeemRequestBody.md index 4663a2c4..c5754b4f 100644 --- a/docs/RedemptionsRedeemRequestBody.md +++ b/docs/RedemptionsRedeemRequestBody.md @@ -6,15 +6,15 @@ Response body schema for **POST** `/redemptions`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redeemables** | [**List<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | | | -|**order** | [**Order**](Order.md) | | [optional] | -|**customer** | [**Customer**](Customer.md) | | [optional] | -|**session** | [**Session**](Session.md) | | [optional] | -|**trackingId** | **String** | Is correspondent to Customer's source_id | [optional] | -|**metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | [optional] | -|**options** | [**ClientRedemptionsRedeemRequestBodyAllOfOptions**](ClientRedemptionsRedeemRequestBodyAllOfOptions.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redeemables** | [**List<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | | +|**order** | [**Order**](Order.md) | | +|**customer** | [**Customer**](Customer.md) | | +|**session** | [**Session**](Session.md) | | +|**trackingId** | **String** | Is correspondent to Customer's source_id | +|**metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | +|**options** | [**ClientRedemptionsRedeemRequestBodyAllOfOptions**](ClientRedemptionsRedeemRequestBodyAllOfOptions.md) | | diff --git a/docs/RedemptionsRedeemResponseBody.md b/docs/RedemptionsRedeemResponseBody.md index 5105f08f..06d35404 100644 --- a/docs/RedemptionsRedeemResponseBody.md +++ b/docs/RedemptionsRedeemResponseBody.md @@ -6,13 +6,13 @@ Response body schema for **POST** `/redemptions`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redemptions** | [**List<Redemption>**](Redemption.md) | | [optional] | -|**parentRedemption** | [**Redemption**](Redemption.md) | | [optional] | -|**order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] | -|**inapplicableRedeemables** | [**List<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | [optional] | -|**skippedRedeemables** | [**List<ValidationsRedeemableSkipped>**](ValidationsRedeemableSkipped.md) | Lists validation results of each redeemable. If a redeemable can be applied, the API returns `\"status\": \"APPLICABLE\"`. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redemptions** | [**List<Redemption>**](Redemption.md) | | +|**parentRedemption** | [**Redemption**](Redemption.md) | | +|**order** | [**OrderCalculated**](OrderCalculated.md) | | +|**inapplicableRedeemables** | [**List<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | +|**skippedRedeemables** | [**List<ValidationsRedeemableSkipped>**](ValidationsRedeemableSkipped.md) | Lists validation results of each redeemable. If a redeemable can be applied, the API returns `\"status\": \"APPLICABLE\"`. | diff --git a/docs/RedemptionsRollbackCreateRequestBody.md b/docs/RedemptionsRollbackCreateRequestBody.md index f175cd39..88286125 100644 --- a/docs/RedemptionsRollbackCreateRequestBody.md +++ b/docs/RedemptionsRollbackCreateRequestBody.md @@ -6,13 +6,13 @@ Request body schema for **POST** `/redemptions/{redemptionId}/rollback`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**reason** | **String** | Reason for the rollback. | [optional] | -|**trackingId** | **String** | Customer's `source_id`. | [optional] | -|**customer** | [**Customer**](Customer.md) | | [optional] | -|**order** | [**Order**](Order.md) | | [optional] | -|**metadata** | **Object** | A set of key/value pairs that you can send in the request body to update **redemption** metadata. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**reason** | **String** | Reason for the rollback. | +|**trackingId** | **String** | Customer's `source_id`. | +|**customer** | [**Customer**](Customer.md) | | +|**order** | [**Order**](Order.md) | | +|**metadata** | **Object** | A set of key/value pairs that you can send in the request body to update **redemption** metadata. | diff --git a/docs/RedemptionsRollbackCreateResponseBody.md b/docs/RedemptionsRollbackCreateResponseBody.md index 5d11f22d..57f55a58 100644 --- a/docs/RedemptionsRollbackCreateResponseBody.md +++ b/docs/RedemptionsRollbackCreateResponseBody.md @@ -6,32 +6,32 @@ Response body schema for **POST** `/redemptions/{redemptionId}/rollback`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique identifier of the redemption rollback. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON | | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | | -|**customerId** | **String** | Unique customer ID of the redeeming customer. | [optional] | -|**trackingId** | **String** | Hashed customer source ID. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the redemption. | [optional] | -|**amount** | **Integer** | For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer. | [optional] | -|**redemption** | **String** | Unique redemption ID of the parent redemption. | [optional] | -|**reason** | **String** | System generated cause for the redemption being invalid in the context of the provided parameters. | [optional] | -|**result** | [**ResultEnum**](#ResultEnum) | Redemption result. | | -|**status** | [**StatusEnum**](#StatusEnum) | Redemption status. | | -|**relatedRedemptions** | [**RedemptionRollbackRelatedRedemptions**](RedemptionRollbackRelatedRedemptions.md) | | [optional] | -|**failureCode** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | [optional] | -|**failureMessage** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | [optional] | -|**order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | [optional] | -|**channel** | [**RedemptionRollbackChannel**](RedemptionRollbackChannel.md) | | | -|**customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object. | | -|**relatedObjectId** | **String** | Unique identifier of the related object. It is assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher. | | -|**voucher** | [**Voucher**](Voucher.md) | | [optional] | -|**promotionTier** | [**PromotionTier**](PromotionTier.md) | | [optional] | -|**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional] | -|**gift** | [**RedemptionRollbackGift**](RedemptionRollbackGift.md) | | [optional] | -|**loyaltyCard** | [**RedemptionRollbackLoyaltyCard**](RedemptionRollbackLoyaltyCard.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique identifier of the redemption rollback. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | +|**customerId** | **String** | Unique customer ID of the redeeming customer. | +|**trackingId** | **String** | Hashed customer source ID. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the redemption. | +|**amount** | **Integer** | For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer. | +|**redemption** | **String** | Unique redemption ID of the parent redemption. | +|**reason** | **String** | System generated cause for the redemption being invalid in the context of the provided parameters. | +|**result** | [**ResultEnum**](#ResultEnum) | Redemption result. | +|**status** | [**StatusEnum**](#StatusEnum) | Redemption status. | +|**relatedRedemptions** | [**RedemptionRollbackRelatedRedemptions**](RedemptionRollbackRelatedRedemptions.md) | | +|**failureCode** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | +|**failureMessage** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | +|**order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | +|**channel** | [**RedemptionRollbackChannel**](RedemptionRollbackChannel.md) | | +|**customer** | [**SimpleCustomer**](SimpleCustomer.md) | | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object. | +|**relatedObjectId** | **String** | Unique identifier of the related object. It is assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher. | +|**voucher** | [**Voucher**](Voucher.md) | | +|**promotionTier** | [**PromotionTier**](PromotionTier.md) | | +|**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | +|**gift** | [**RedemptionRollbackGift**](RedemptionRollbackGift.md) | | +|**loyaltyCard** | [**RedemptionRollbackLoyaltyCard**](RedemptionRollbackLoyaltyCard.md) | | @@ -40,7 +40,6 @@ Response body schema for **POST** `/redemptions/{redemptionId}/rollback`. | Name | Value | |---- | -----| | REDEMPTION_ROLLBACK | "redemption_rollback" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -50,7 +49,6 @@ Response body schema for **POST** `/redemptions/{redemptionId}/rollback`. |---- | -----| | SUCCESS | "SUCCESS" | | FAILURE | "FAILURE" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -60,7 +58,6 @@ Response body schema for **POST** `/redemptions/{redemptionId}/rollback`. |---- | -----| | SUCCEEDED | "SUCCEEDED" | | FAILED | "FAILED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -71,7 +68,6 @@ Response body schema for **POST** `/redemptions/{redemptionId}/rollback`. | VOUCHER | "voucher" | | PROMOTION_TIER | "promotion_tier" | | REDEMPTION | "redemption" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RedemptionsRollbacksCreateRequestBody.md b/docs/RedemptionsRollbacksCreateRequestBody.md index 89659b2f..16f8ba17 100644 --- a/docs/RedemptionsRollbacksCreateRequestBody.md +++ b/docs/RedemptionsRollbacksCreateRequestBody.md @@ -6,13 +6,13 @@ Request body schema for **POST** `/redemptions/{parentRedemptionId}/rollbacks`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**reason** | **String** | Reason for the rollback. | [optional] | -|**trackingId** | **String** | Customer's `source_id`. | [optional] | -|**customer** | [**Customer**](Customer.md) | | [optional] | -|**order** | [**Order**](Order.md) | | [optional] | -|**metadata** | **Object** | A set of key/value pairs that you can send in the request body to update **redemption** metadata. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**reason** | **String** | Reason for the rollback. | +|**trackingId** | **String** | Customer's `source_id`. | +|**customer** | [**Customer**](Customer.md) | | +|**order** | [**Order**](Order.md) | | +|**metadata** | **Object** | A set of key/value pairs that you can send in the request body to update **redemption** metadata. | diff --git a/docs/RedemptionsRollbacksCreateResponseBody.md b/docs/RedemptionsRollbacksCreateResponseBody.md index e62984d2..8d0d6a02 100644 --- a/docs/RedemptionsRollbacksCreateResponseBody.md +++ b/docs/RedemptionsRollbacksCreateResponseBody.md @@ -6,11 +6,11 @@ Response body schema for POST `/redemptions/{parentRedemptionID}/rollbacks`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**rollbacks** | [**List<RedemptionRollback>**](RedemptionRollback.md) | Contains the rollback redemption objects of the particular incentives. | [optional] | -|**parentRollback** | [**RedemptionRollback**](RedemptionRollback.md) | | [optional] | -|**order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**rollbacks** | [**List<RedemptionRollback>**](RedemptionRollback.md) | Contains the rollback redemption objects of the particular incentives. | +|**parentRollback** | [**RedemptionRollback**](RedemptionRollback.md) | | +|**order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | diff --git a/docs/ReferralProgram.md b/docs/ReferralProgram.md index db5b56e0..b08defe1 100644 --- a/docs/ReferralProgram.md +++ b/docs/ReferralProgram.md @@ -6,11 +6,11 @@ Defines the referee reward and the way a referral is triggered. Context: `REFERR ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conversionEventType** | [**ConversionEventTypeEnum**](#ConversionEventTypeEnum) | Define how a referral is triggered. | [optional] | -|**customEvent** | [**ReferralProgramCustomEvent**](ReferralProgramCustomEvent.md) | | [optional] | -|**refereeReward** | [**ReferralProgramRefereeReward**](ReferralProgramRefereeReward.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conversionEventType** | [**ConversionEventTypeEnum**](#ConversionEventTypeEnum) | Define how a referral is triggered. | +|**customEvent** | [**ReferralProgramCustomEvent**](ReferralProgramCustomEvent.md) | | +|**refereeReward** | [**ReferralProgramRefereeReward**](ReferralProgramRefereeReward.md) | | @@ -20,7 +20,6 @@ Defines the referee reward and the way a referral is triggered. Context: `REFERR |---- | -----| | REDEMPTION | "redemption" | | CUSTOM_EVENT | "custom_event" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ReferralProgramCustomEvent.md b/docs/ReferralProgramCustomEvent.md index 49f5a4fd..e222862e 100644 --- a/docs/ReferralProgramCustomEvent.md +++ b/docs/ReferralProgramCustomEvent.md @@ -6,10 +6,10 @@ Contains details about the custom event. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique custom event ID. | [optional] | -|**name** | **String** | Custom event name. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique custom event ID. | +|**name** | **String** | Custom event name. | diff --git a/docs/ReferralProgramRefereeReward.md b/docs/ReferralProgramRefereeReward.md index a81e1eaf..86bac0a2 100644 --- a/docs/ReferralProgramRefereeReward.md +++ b/docs/ReferralProgramRefereeReward.md @@ -6,11 +6,11 @@ Defines the referee reward. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**relatedObjectParent** | [**ReferralProgramRefereeRewardRelatedObjectParent**](ReferralProgramRefereeRewardRelatedObjectParent.md) | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Type of reward. | [optional] | -|**amount** | **String** | Define the number of `points` to add to a loyalty card or `credits` to the balance on a gift card. In case of the gift card, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**relatedObjectParent** | [**ReferralProgramRefereeRewardRelatedObjectParent**](ReferralProgramRefereeRewardRelatedObjectParent.md) | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of reward. | +|**amount** | **String** | Define the number of `points` to add to a loyalty card or `credits` to the balance on a gift card. In case of the gift card, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | @@ -22,7 +22,6 @@ Defines the referee reward. | LOYALTY_CARD | "LOYALTY_CARD" | | GIFT_VOUCHER | "GIFT_VOUCHER" | | LUCKY_DRAW_CODE | "LUCKY_DRAW_CODE" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ReferralProgramRefereeRewardRelatedObjectParent.md b/docs/ReferralProgramRefereeRewardRelatedObjectParent.md index d42f6d3d..eb6b3f31 100644 --- a/docs/ReferralProgramRefereeRewardRelatedObjectParent.md +++ b/docs/ReferralProgramRefereeRewardRelatedObjectParent.md @@ -6,11 +6,11 @@ Details of the resource from which the reward originates. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique ID of the reward source. | [optional] | -|**name** | **String** | Name of the reward source. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | Type of resource represented by the source of the reward. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique ID of the reward source. | +|**name** | **String** | Name of the reward source. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | Type of resource represented by the source of the reward. | @@ -19,7 +19,6 @@ Details of the resource from which the reward originates. | Name | Value | |---- | -----| | CAMPAIGN | "CAMPAIGN" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/Referrer.md b/docs/Referrer.md index 6d2a78e2..68288da7 100644 --- a/docs/Referrer.md +++ b/docs/Referrer.md @@ -5,18 +5,18 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The ID of an existing customer. | [optional] | -|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] | -|**name** | **String** | Customer's first and last name. | [optional] | -|**description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] | -|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | [optional] | -|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | [optional] | -|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | The ID of an existing customer. | +|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | +|**name** | **String** | Customer's first and last name. | +|**description** | **String** | An arbitrary string that you can attach to a customer object. | +|**email** | **String** | Customer's email address. | +|**phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | +|**birthday** | **LocalDate** | `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~. | +|**birthdate** | **LocalDate** | Customer's birthdate; format YYYY-MM-DD. | +|**address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | diff --git a/docs/ReferrerId.md b/docs/ReferrerId.md index 47e43b9d..5b62a894 100644 --- a/docs/ReferrerId.md +++ b/docs/ReferrerId.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | A unique identifier of an existing customer. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | A unique identifier of an existing customer. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | @@ -17,7 +17,6 @@ | Name | Value | |---- | -----| | CUSTOMER | "customer" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ResourceTypes.md b/docs/ResourceTypes.md index c4f612b6..59c6c0ea 100644 --- a/docs/ResourceTypes.md +++ b/docs/ResourceTypes.md @@ -11,7 +11,5 @@ * `PROMOTION_TIER` (value: `"promotion_tier"`) -* `UNKNOWN_ENUM` (value: `"unknown_enum"`) - diff --git a/docs/Reward.md b/docs/Reward.md index d278fb16..61185a98 100644 --- a/docs/Reward.md +++ b/docs/Reward.md @@ -5,19 +5,19 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique reward ID, assigned by Voucherify. | | -|**name** | **String** | Reward name. | | -|**stock** | **Integer** | Configurable for **material rewards**. The number of units of the product that you want to share as reward. | [optional] | -|**redeemed** | **Integer** | Defines the number of already invoked (successful) reward redemptions. | [optional] | -|**attributes** | [**RewardAttributes**](RewardAttributes.md) | | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format. | | -|**type** | [**TypeEnum**](#TypeEnum) | Reward type. | | -|**parameters** | [**RewardType**](RewardType.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique reward ID, assigned by Voucherify. | +|**name** | **String** | Reward name. | +|**stock** | **Integer** | Configurable for **material rewards**. The number of units of the product that you want to share as reward. | +|**redeemed** | **Integer** | Defines the number of already invoked (successful) reward redemptions. | +|**attributes** | [**RewardAttributes**](RewardAttributes.md) | | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format. | +|**type** | [**TypeEnum**](#TypeEnum) | Reward type. | +|**parameters** | [**RewardType**](RewardType.md) | | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward. | @@ -28,7 +28,6 @@ | CAMPAIGN | "CAMPAIGN" | | COIN | "COIN" | | MATERIAL | "MATERIAL" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -37,7 +36,6 @@ | Name | Value | |---- | -----| | REWARD | "reward" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RewardAssignment.md b/docs/RewardAssignment.md index 6bf22c27..9f328d22 100644 --- a/docs/RewardAssignment.md +++ b/docs/RewardAssignment.md @@ -5,16 +5,16 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique reward assignment ID, assigned by Voucherify. | | -|**rewardId** | **String** | Associated reward ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward assignment. | | -|**relatedObjectId** | **String** | Related object ID to which the reward was assigned. | | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Related object type to which the reward was assigned. | | -|**parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique reward assignment ID, assigned by Voucherify. | +|**rewardId** | **String** | Associated reward ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward assignment. | +|**relatedObjectId** | **String** | Related object ID to which the reward was assigned. | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Related object type to which the reward was assigned. | +|**parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | @@ -23,7 +23,6 @@ | Name | Value | |---- | -----| | REWARD_ASSIGNMENT | "reward_assignment" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -32,7 +31,6 @@ | Name | Value | |---- | -----| | CAMPAIGN | "campaign" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RewardAssignmentBase.md b/docs/RewardAssignmentBase.md index 67ecb53f..eaab4382 100644 --- a/docs/RewardAssignmentBase.md +++ b/docs/RewardAssignmentBase.md @@ -5,15 +5,15 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique reward assignment ID, assigned by Voucherify. | | -|**rewardId** | **String** | Associated reward ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward assignment. | | -|**relatedObjectId** | **String** | Related object ID to which the reward was assigned. | | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Related object type to which the reward was assigned. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique reward assignment ID, assigned by Voucherify. | +|**rewardId** | **String** | Associated reward ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward assignment. | +|**relatedObjectId** | **String** | Related object ID to which the reward was assigned. | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Related object type to which the reward was assigned. | @@ -22,7 +22,6 @@ | Name | Value | |---- | -----| | REWARD_ASSIGNMENT | "reward_assignment" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -31,7 +30,6 @@ | Name | Value | |---- | -----| | CAMPAIGN | "campaign" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RewardAssignmentParameters.md b/docs/RewardAssignmentParameters.md index 77484968..bdfed7c5 100644 --- a/docs/RewardAssignmentParameters.md +++ b/docs/RewardAssignmentParameters.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | diff --git a/docs/RewardAssignmentParametersParameters.md b/docs/RewardAssignmentParametersParameters.md index 9f260e3c..e36daec0 100644 --- a/docs/RewardAssignmentParametersParameters.md +++ b/docs/RewardAssignmentParametersParameters.md @@ -6,9 +6,9 @@ Defines the cost of the reward. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loyalty** | [**RewardAssignmentParametersParametersLoyalty**](RewardAssignmentParametersParametersLoyalty.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**loyalty** | [**RewardAssignmentParametersParametersLoyalty**](RewardAssignmentParametersParametersLoyalty.md) | | diff --git a/docs/RewardAssignmentParametersParametersLoyalty.md b/docs/RewardAssignmentParametersParametersLoyalty.md index 5e366db2..fb82478a 100644 --- a/docs/RewardAssignmentParametersParametersLoyalty.md +++ b/docs/RewardAssignmentParametersParametersLoyalty.md @@ -6,9 +6,9 @@ Defines the equivalent points value of the reward. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | The number of points required to redeem the reward. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | The number of points required to redeem the reward. | diff --git a/docs/RewardAttributes.md b/docs/RewardAttributes.md index 240ed6af..c44cef08 100644 --- a/docs/RewardAttributes.md +++ b/docs/RewardAttributes.md @@ -6,10 +6,10 @@ These properties are configurable for **material rewards**. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file. | [optional] | -|**description** | **String** | An arbitrary string that you can attach to a material reward. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file. | +|**description** | **String** | An arbitrary string that you can attach to a material reward. | diff --git a/docs/RewardType.md b/docs/RewardType.md index e5eeaa69..2d6616e7 100644 --- a/docs/RewardType.md +++ b/docs/RewardType.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**campaign** | [**RewardTypeCampaign**](RewardTypeCampaign.md) | | [optional] | -|**coin** | [**RewardTypeCoin**](RewardTypeCoin.md) | | [optional] | -|**product** | [**RewardTypeProduct**](RewardTypeProduct.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**campaign** | [**RewardTypeCampaign**](RewardTypeCampaign.md) | | +|**coin** | [**RewardTypeCoin**](RewardTypeCoin.md) | | +|**product** | [**RewardTypeProduct**](RewardTypeProduct.md) | | diff --git a/docs/RewardTypeCampaign.md b/docs/RewardTypeCampaign.md index c35a2bb7..d105856f 100644 --- a/docs/RewardTypeCampaign.md +++ b/docs/RewardTypeCampaign.md @@ -6,11 +6,11 @@ Objects stores information about the campaign related to the reward. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique campaign ID, assigned by Voucherify. | | -|**balance** | **Integer** | The incremental amout to be added to the current balance on the gift card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Campaign type. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique campaign ID, assigned by Voucherify. | +|**balance** | **Integer** | The incremental amout to be added to the current balance on the gift card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | +|**type** | [**TypeEnum**](#TypeEnum) | Campaign type. | @@ -23,7 +23,6 @@ Objects stores information about the campaign related to the reward. | GIFT_VOUCHERS | "GIFT_VOUCHERS" | | REFERRAL_PROGRAM | "REFERRAL_PROGRAM" | | LOYALTY_PROGRAM | "LOYALTY_PROGRAM" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RewardTypeCoin.md b/docs/RewardTypeCoin.md index 44c20b51..1d75b509 100644 --- a/docs/RewardTypeCoin.md +++ b/docs/RewardTypeCoin.md @@ -6,10 +6,10 @@ Defines the ratio by mapping the number of loyalty points in points_ratio to a p ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**exchangeRatio** | **BigDecimal** | The cash equivalent of the points defined in the points_ratio property. | | -|**pointsRatio** | **Integer** | The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**exchangeRatio** | **BigDecimal** | The cash equivalent of the points defined in the points_ratio property. | +|**pointsRatio** | **Integer** | The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property. | diff --git a/docs/RewardTypeProduct.md b/docs/RewardTypeProduct.md index 98cebd66..02bb8d7b 100644 --- a/docs/RewardTypeProduct.md +++ b/docs/RewardTypeProduct.md @@ -6,10 +6,10 @@ Contains information about the product given as a reward. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique product ID, assigned by Voucherify. | | -|**skuId** | **String** | Unique SKU ID, assigned by Voucherify, of the SKU given as a reward. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique product ID, assigned by Voucherify. | +|**skuId** | **String** | Unique SKU ID, assigned by Voucherify, of the SKU given as a reward. | diff --git a/docs/RewardsApi.md b/docs/RewardsApi.md index d87e300a..c0f876d6 100644 --- a/docs/RewardsApi.md +++ b/docs/RewardsApi.md @@ -65,10 +65,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **rewardId** | **String**| A unique reward ID. | | -| **rewardsAssignmentsCreateRequestBody** | [**RewardsAssignmentsCreateRequestBody**](RewardsAssignmentsCreateRequestBody.md)| Provide the campaign ID of the campaign to which the reward is to be assigned and define the cost of the reward in terms of loyalty points. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **rewardId** | **String**| A unique reward ID. | +| **rewardsAssignmentsCreateRequestBody** | [**RewardsAssignmentsCreateRequestBody**](RewardsAssignmentsCreateRequestBody.md)| Provide the campaign ID of the campaign to which the reward is to be assigned and define the cost of the reward in terms of loyalty points. | ### Return type @@ -141,10 +141,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **rewardId** | **String**| A unique reward ID. | | -| **assignmentId** | **String**| A unique reward assignment ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **rewardId** | **String**| A unique reward ID. | +| **assignmentId** | **String**| A unique reward assignment ID. | ### Return type @@ -218,10 +218,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **rewardId** | **String**| A unique reward ID. | | -| **assignmentId** | **String**| A unique reward assignment ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **rewardId** | **String**| A unique reward ID. | +| **assignmentId** | **String**| A unique reward assignment ID. | ### Return type @@ -296,11 +296,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **rewardId** | **String**| A unique reward ID. | | -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **rewardId** | **String**| A unique reward ID. | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | ### Return type @@ -375,11 +375,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **rewardId** | **String**| A unique reward ID. | | -| **assignmentId** | **String**| A unique reward assignment ID. | | -| **rewardsAssignmentsUpdateRequestBody** | [**RewardsAssignmentsUpdateRequestBody**](RewardsAssignmentsUpdateRequestBody.md)| Define the number of points required to exchange for the reward. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **rewardId** | **String**| A unique reward ID. | +| **assignmentId** | **String**| A unique reward assignment ID. | +| **rewardsAssignmentsUpdateRequestBody** | [**RewardsAssignmentsUpdateRequestBody**](RewardsAssignmentsUpdateRequestBody.md)| Define the number of points required to exchange for the reward. | ### Return type diff --git a/docs/RewardsAssignmentsCreateRequestBody.md b/docs/RewardsAssignmentsCreateRequestBody.md index 2927bf01..0f47208a 100644 --- a/docs/RewardsAssignmentsCreateRequestBody.md +++ b/docs/RewardsAssignmentsCreateRequestBody.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**campaign** | **String** | The campaign ID of the campaign to which the reward is to be assigned. | | -|**parameters** | [**RewardsAssignmentsCreateRequestBodyParameters**](RewardsAssignmentsCreateRequestBodyParameters.md) | | [optional] | -|**validationRules** | **List<String>** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**campaign** | **String** | The campaign ID of the campaign to which the reward is to be assigned. | +|**parameters** | [**RewardsAssignmentsCreateRequestBodyParameters**](RewardsAssignmentsCreateRequestBodyParameters.md) | | +|**validationRules** | **List<String>** | | diff --git a/docs/RewardsAssignmentsCreateRequestBodyParameters.md b/docs/RewardsAssignmentsCreateRequestBodyParameters.md index b450e86d..cb4e8ec2 100644 --- a/docs/RewardsAssignmentsCreateRequestBodyParameters.md +++ b/docs/RewardsAssignmentsCreateRequestBodyParameters.md @@ -6,9 +6,9 @@ Defines the cost of the reward. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loyalty** | [**RewardsAssignmentsCreateRequestBodyParametersLoyalty**](RewardsAssignmentsCreateRequestBodyParametersLoyalty.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**loyalty** | [**RewardsAssignmentsCreateRequestBodyParametersLoyalty**](RewardsAssignmentsCreateRequestBodyParametersLoyalty.md) | | diff --git a/docs/RewardsAssignmentsCreateRequestBodyParametersLoyalty.md b/docs/RewardsAssignmentsCreateRequestBodyParametersLoyalty.md index ef0c18ba..187c61b8 100644 --- a/docs/RewardsAssignmentsCreateRequestBodyParametersLoyalty.md +++ b/docs/RewardsAssignmentsCreateRequestBodyParametersLoyalty.md @@ -6,9 +6,9 @@ Defines the equivalent points value of the reward. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Number of points that will be subtracted from the loyalty card points balance if the reward is redeemed. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Number of points that will be subtracted from the loyalty card points balance if the reward is redeemed. | diff --git a/docs/RewardsAssignmentsCreateResponseBody.md b/docs/RewardsAssignmentsCreateResponseBody.md index 0f0b7488..68e90b85 100644 --- a/docs/RewardsAssignmentsCreateResponseBody.md +++ b/docs/RewardsAssignmentsCreateResponseBody.md @@ -6,16 +6,16 @@ Response body schema for **GET** `/rewards/{rewardId}/assignments/{assignmentId} ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique reward assignment ID, assigned by Voucherify. | | -|**rewardId** | **String** | Associated reward ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward assignment. | | -|**relatedObjectId** | **String** | Related object ID to which the reward was assigned. | | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Related object type to which the reward was assigned. | | -|**parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique reward assignment ID, assigned by Voucherify. | +|**rewardId** | **String** | Associated reward ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward assignment. | +|**relatedObjectId** | **String** | Related object ID to which the reward was assigned. | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Related object type to which the reward was assigned. | +|**parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | @@ -24,7 +24,6 @@ Response body schema for **GET** `/rewards/{rewardId}/assignments/{assignmentId} | Name | Value | |---- | -----| | REWARD_ASSIGNMENT | "reward_assignment" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ Response body schema for **GET** `/rewards/{rewardId}/assignments/{assignmentId} | Name | Value | |---- | -----| | CAMPAIGN | "campaign" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RewardsAssignmentsGetResponseBody.md b/docs/RewardsAssignmentsGetResponseBody.md index ad316e33..32116916 100644 --- a/docs/RewardsAssignmentsGetResponseBody.md +++ b/docs/RewardsAssignmentsGetResponseBody.md @@ -6,16 +6,16 @@ Response body schema for **GET** `/rewards/{rewardId}/assignments/{assignmentId} ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique reward assignment ID, assigned by Voucherify. | | -|**rewardId** | **String** | Associated reward ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward assignment. | | -|**relatedObjectId** | **String** | Related object ID to which the reward was assigned. | | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Related object type to which the reward was assigned. | | -|**parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique reward assignment ID, assigned by Voucherify. | +|**rewardId** | **String** | Associated reward ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward assignment. | +|**relatedObjectId** | **String** | Related object ID to which the reward was assigned. | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Related object type to which the reward was assigned. | +|**parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | @@ -24,7 +24,6 @@ Response body schema for **GET** `/rewards/{rewardId}/assignments/{assignmentId} | Name | Value | |---- | -----| | REWARD_ASSIGNMENT | "reward_assignment" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ Response body schema for **GET** `/rewards/{rewardId}/assignments/{assignmentId} | Name | Value | |---- | -----| | CAMPAIGN | "campaign" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/RewardsAssignmentsListResponseBody.md b/docs/RewardsAssignmentsListResponseBody.md index cbf84710..85fd7174 100644 --- a/docs/RewardsAssignmentsListResponseBody.md +++ b/docs/RewardsAssignmentsListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/rewards/{rewardID}/assignments`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about reward assignments in a dictionary. | | -|**dataRef** | **String** | Identifies the name of the attribute that contains the array of reward assignments. | | -|**data** | [**List<RewardAssignment>**](RewardAssignment.md) | | | -|**total** | **Integer** | Total number of reward assignments. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about reward assignments in a dictionary. | +|**dataRef** | **String** | Identifies the name of the attribute that contains the array of reward assignments. | +|**data** | [**List<RewardAssignment>**](RewardAssignment.md) | | +|**total** | **Integer** | Total number of reward assignments. | diff --git a/docs/RewardsAssignmentsUpdateRequestBody.md b/docs/RewardsAssignmentsUpdateRequestBody.md index 8bf5c587..d97506c0 100644 --- a/docs/RewardsAssignmentsUpdateRequestBody.md +++ b/docs/RewardsAssignmentsUpdateRequestBody.md @@ -6,9 +6,9 @@ Request body schema for **PUT** `/loyalties/{campaignId}/rewards/{assignmentId}` ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**parameters** | [**RewardsAssignmentsUpdateRequestBodyParameters**](RewardsAssignmentsUpdateRequestBodyParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**parameters** | [**RewardsAssignmentsUpdateRequestBodyParameters**](RewardsAssignmentsUpdateRequestBodyParameters.md) | | diff --git a/docs/RewardsAssignmentsUpdateRequestBodyParameters.md b/docs/RewardsAssignmentsUpdateRequestBodyParameters.md index adb5a99c..427c754f 100644 --- a/docs/RewardsAssignmentsUpdateRequestBodyParameters.md +++ b/docs/RewardsAssignmentsUpdateRequestBodyParameters.md @@ -6,9 +6,9 @@ An object that defines the price of the reward in loyalty points. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**loyalty** | [**RewardsAssignmentsUpdateRequestBodyParametersLoyalty**](RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**loyalty** | [**RewardsAssignmentsUpdateRequestBodyParametersLoyalty**](RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md) | | diff --git a/docs/RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md b/docs/RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md index 97639031..964d8ae2 100644 --- a/docs/RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md +++ b/docs/RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md @@ -6,9 +6,9 @@ Stores the points parameter. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Defines how many points are required to obtain the reward. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Defines how many points are required to obtain the reward. | diff --git a/docs/RewardsAssignmentsUpdateResponseBody.md b/docs/RewardsAssignmentsUpdateResponseBody.md index 19a5d0b4..277c58fb 100644 --- a/docs/RewardsAssignmentsUpdateResponseBody.md +++ b/docs/RewardsAssignmentsUpdateResponseBody.md @@ -6,16 +6,16 @@ Response body schema for **GET** `/rewards/{rewardId}/assignments/{assignmentId} ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique reward assignment ID, assigned by Voucherify. | | -|**rewardId** | **String** | Associated reward ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward assignment. | | -|**relatedObjectId** | **String** | Related object ID to which the reward was assigned. | | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Related object type to which the reward was assigned. | | -|**parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique reward assignment ID, assigned by Voucherify. | +|**rewardId** | **String** | Associated reward ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. This object stores information about the reward assignment. | +|**relatedObjectId** | **String** | Related object ID to which the reward was assigned. | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Related object type to which the reward was assigned. | +|**parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | @@ -24,7 +24,6 @@ Response body schema for **GET** `/rewards/{rewardId}/assignments/{assignmentId} | Name | Value | |---- | -----| | REWARD_ASSIGNMENT | "reward_assignment" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ Response body schema for **GET** `/rewards/{rewardId}/assignments/{assignmentId} | Name | Value | |---- | -----| | CAMPAIGN | "campaign" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/Session.md b/docs/Session.md index 68717ef3..0fccd3cb 100644 --- a/docs/Session.md +++ b/docs/Session.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**key** | [**KeyEnum**](#KeyEnum) | The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | This parameter is required to establish a new session. The session locks the redemption quantity by 1. | [optional] | -|**ttl** | **BigDecimal** | Value for the period of time that the session is active. Units for this parameter are defined by the session.ttl_unit parameter. | [optional] | -|**ttlUnit** | [**TtlUnitEnum**](#TtlUnitEnum) | Defines the type of unit in which the session time is counted. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**key** | [**KeyEnum**](#KeyEnum) | The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated. | +|**type** | [**TypeEnum**](#TypeEnum) | This parameter is required to establish a new session. The session locks the redemption quantity by 1. | +|**ttl** | **BigDecimal** | Value for the period of time that the session is active. Units for this parameter are defined by the session.ttl_unit parameter. | +|**ttlUnit** | [**TtlUnitEnum**](#TtlUnitEnum) | Defines the type of unit in which the session time is counted. | @@ -19,7 +19,6 @@ | Name | Value | |---- | -----| | LOCK | "LOCK" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -28,7 +27,6 @@ | Name | Value | |---- | -----| | LOCK | "LOCK" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -43,7 +41,6 @@ | MINUTES | "MINUTES" | | NANOSECONDS | "NANOSECONDS" | | SECONDS | "SECONDS" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/SimpleCustomer.md b/docs/SimpleCustomer.md index 8962f954..95ff6ece 100644 --- a/docs/SimpleCustomer.md +++ b/docs/SimpleCustomer.md @@ -5,14 +5,14 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | [optional] | -|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] | -|**name** | **String** | Customer's first and last name. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | +|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | +|**name** | **String** | Customer's first and last name. | +|**email** | **String** | Customer's email address. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | @@ -21,7 +21,6 @@ | Name | Value | |---- | -----| | CUSTOMER | "customer" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/SimpleCustomerRequiredObjectType.md b/docs/SimpleCustomerRequiredObjectType.md index 6a001cea..29fe7713 100644 --- a/docs/SimpleCustomerRequiredObjectType.md +++ b/docs/SimpleCustomerRequiredObjectType.md @@ -6,14 +6,14 @@ This is an object representing a customer with limited properties used in Event ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The unique ID of a customer that is assigned by Voucherify. | [optional] | -|**sourceId** | **String** | The merchant’s customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service. | [optional] | -|**name** | **String** | Customer's first and last name. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] | -|**_object** | **String** | The type of the object represented by the JSON. This object stores information about the customer. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | The unique ID of a customer that is assigned by Voucherify. | +|**sourceId** | **String** | The merchant’s customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service. | +|**name** | **String** | Customer's first and last name. | +|**email** | **String** | Customer's email address. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | +|**_object** | **String** | The type of the object represented by the JSON. This object stores information about the customer. | diff --git a/docs/SimpleLoyaltyCard.md b/docs/SimpleLoyaltyCard.md index 07329342..f789c0c9 100644 --- a/docs/SimpleLoyaltyCard.md +++ b/docs/SimpleLoyaltyCard.md @@ -6,12 +6,12 @@ Simplified loyalty card data. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Total points incurred over lifespan of loyalty card. | | -|**balance** | **Integer** | Points available for reward redemption. | | -|**nextExpirationDate** | **String** | The next closest date when the next set of points are due to expire. | [optional] | -|**nextExpirationPoints** | **Integer** | The amount of points that are set to expire next. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Total points incurred over lifespan of loyalty card. | +|**balance** | **Integer** | Points available for reward redemption. | +|**nextExpirationDate** | **String** | The next closest date when the next set of points are due to expire. | +|**nextExpirationPoints** | **Integer** | The amount of points that are set to expire next. | diff --git a/docs/SimpleProductDiscountUnit.md b/docs/SimpleProductDiscountUnit.md index a3e82844..b556d2b1 100644 --- a/docs/SimpleProductDiscountUnit.md +++ b/docs/SimpleProductDiscountUnit.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique product ID, assigned by Voucherify. | | -|**sourceId** | **String** | Product's source ID. | [optional] | -|**name** | **String** | Product name. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique product ID, assigned by Voucherify. | +|**sourceId** | **String** | Product's source ID. | +|**name** | **String** | Product name. | diff --git a/docs/SimpleSegment.md b/docs/SimpleSegment.md index 3d52540c..5c3d6858 100644 --- a/docs/SimpleSegment.md +++ b/docs/SimpleSegment.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique segment ID. | | -|**name** | **String** | Segment name. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the ID. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique segment ID. | +|**name** | **String** | Segment name. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the ID. | @@ -18,7 +18,6 @@ | Name | Value | |---- | -----| | SEGMENT | "segment" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/SimpleSkuDiscountUnit.md b/docs/SimpleSkuDiscountUnit.md index f4f5bb23..2ef67559 100644 --- a/docs/SimpleSkuDiscountUnit.md +++ b/docs/SimpleSkuDiscountUnit.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique SKU ID, assigned by Voucherify. | | -|**sourceId** | **String** | Product variant's source ID. | [optional] | -|**name** | **String** | Sku name | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique SKU ID, assigned by Voucherify. | +|**sourceId** | **String** | Product variant's source ID. | +|**name** | **String** | Sku name | diff --git a/docs/SimpleVoucher.md b/docs/SimpleVoucher.md index 82660c71..f76bf9ab 100644 --- a/docs/SimpleVoucher.md +++ b/docs/SimpleVoucher.md @@ -6,29 +6,29 @@ Simplified voucher data. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | A unique identifier that represents the voucher assigned by Voucherify. | [optional] | -|**code** | **String** | Voucher code. | | -|**gift** | [**Gift**](Gift.md) | | [optional] | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**loyaltyCard** | [**SimpleLoyaltyCard**](SimpleLoyaltyCard.md) | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Type of the voucher. | | -|**campaign** | **String** | Campaign name. | [optional] | -|**campaignId** | **String** | Campaign unique ID. | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] | -|**holderId** | **String** | Unique customer ID of the campaign owner. | [optional] | -|**referrerId** | **String** | Unique identifier of the referrer assigned by Voucherify. | [optional] | -|**categoryId** | **String** | Unique identifier of the category that this voucher belongs to. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | [optional] | -|**active** | **Boolean** | Shows whether the voucher is on or off. `true` indicates an *active* voucher and `false` indicates an *inactive* voucher. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. Timestamp is presented in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was updated in the ISO 8601 format. | [optional] | -|**redemption** | [**SimpleVoucherRedemption**](SimpleVoucherRedemption.md) | | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | -|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a voucher. The metadata object stores all custom attributes assigned to the voucher. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | A unique identifier that represents the voucher assigned by Voucherify. | +|**code** | **String** | Voucher code. | +|**gift** | [**Gift**](Gift.md) | | +|**discount** | [**Discount**](Discount.md) | | +|**loyaltyCard** | [**SimpleLoyaltyCard**](SimpleLoyaltyCard.md) | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of the voucher. | +|**campaign** | **String** | Campaign name. | +|**campaignId** | **String** | Campaign unique ID. | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**holderId** | **String** | Unique customer ID of the campaign owner. | +|**referrerId** | **String** | Unique identifier of the referrer assigned by Voucherify. | +|**categoryId** | **String** | Unique identifier of the category that this voucher belongs to. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**active** | **Boolean** | Shows whether the voucher is on or off. `true` indicates an *active* voucher and `false` indicates an *inactive* voucher. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. Timestamp is presented in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was updated in the ISO 8601 format. | +|**redemption** | [**SimpleVoucherRedemption**](SimpleVoucherRedemption.md) | | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | +|**metadata** | **Object** | A set of custom key/value pairs that you can attach to a voucher. The metadata object stores all custom attributes assigned to the voucher. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | @@ -39,7 +39,6 @@ Simplified voucher data. | DISCOUNT_VOUCHER | "DISCOUNT_VOUCHER" | | LOYALTY_CARD | "LOYALTY_CARD" | | GIFT_VOUCHER | "GIFT_VOUCHER" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -48,7 +47,6 @@ Simplified voucher data. | Name | Value | |---- | -----| | VOUCHER | "voucher" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/SimpleVoucherRedemption.md b/docs/SimpleVoucherRedemption.md index c7504fa9..0ff86b92 100644 --- a/docs/SimpleVoucherRedemption.md +++ b/docs/SimpleVoucherRedemption.md @@ -6,10 +6,10 @@ Defines the redemption limits on vouchers. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | [optional] | -|**redeemedQuantity** | **Integer** | How many times a voucher has already been redeemed. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | +|**redeemedQuantity** | **Integer** | How many times a voucher has already been redeemed. | diff --git a/docs/Sku.md b/docs/Sku.md index e057f27d..b0364e7d 100644 --- a/docs/Sku.md +++ b/docs/Sku.md @@ -6,20 +6,20 @@ This is an object representing a product SKU. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | | -|**sourceId** | **String** | A unique SKU identifier from your inventory system. | [optional] | -|**productId** | **String** | The parent product's unique ID. | | -|**sku** | **String** | Unique user-defined SKU name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**currency** | **String** | SKU price currency. | [optional] | -|**attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the `SKU`. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | +|**sourceId** | **String** | A unique SKU identifier from your inventory system. | +|**productId** | **String** | The parent product's unique ID. | +|**sku** | **String** | Unique user-defined SKU name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**currency** | **String** | SKU price currency. | +|**attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the `SKU`. | @@ -28,7 +28,6 @@ This is an object representing a product SKU. | Name | Value | |---- | -----| | SKU | "sku" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/SkusGetResponseBody.md b/docs/SkusGetResponseBody.md index fa381057..e82e9e77 100644 --- a/docs/SkusGetResponseBody.md +++ b/docs/SkusGetResponseBody.md @@ -6,20 +6,20 @@ Response body schema for **GET** `/skus/{skuId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | | -|**sourceId** | **String** | A unique SKU identifier from your inventory system. | [optional] | -|**productId** | **String** | The parent product's unique ID. | | -|**sku** | **String** | Unique user-defined SKU name. | [optional] | -|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] | -|**currency** | **String** | SKU price currency. | [optional] | -|**attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | | -|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the `SKU`. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | +|**sourceId** | **String** | A unique SKU identifier from your inventory system. | +|**productId** | **String** | The parent product's unique ID. | +|**sku** | **String** | Unique user-defined SKU name. | +|**price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | +|**currency** | **String** | SKU price currency. | +|**attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | +|**imageUrl** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about the `SKU`. | @@ -28,7 +28,6 @@ Response body schema for **GET** `/skus/{skuId}`. | Name | Value | |---- | -----| | SKU | "sku" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/SkusImportCsvCreateResponseBody.md b/docs/SkusImportCsvCreateResponseBody.md index 68ee826d..b223a138 100644 --- a/docs/SkusImportCsvCreateResponseBody.md +++ b/docs/SkusImportCsvCreateResponseBody.md @@ -6,9 +6,9 @@ Response body schema for **POST** `/skus/importCSV`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | diff --git a/docs/SkusList.md b/docs/SkusList.md index 64523ae1..d1bc2120 100644 --- a/docs/SkusList.md +++ b/docs/SkusList.md @@ -6,12 +6,12 @@ Contains information about SKUs. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about SKUs. | | -|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of SKUs. | | -|**skus** | [**List<Sku>**](Sku.md) | A dictionary that contains an array of SKUs. | | -|**total** | **Integer** | Total number of SKUs in the product. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about SKUs. | +|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of SKUs. | +|**skus** | [**List<Sku>**](Sku.md) | A dictionary that contains an array of SKUs. | +|**total** | **Integer** | Total number of SKUs in the product. | diff --git a/docs/SkusListForProduct.md b/docs/SkusListForProduct.md index c0fbe484..64f7e6a2 100644 --- a/docs/SkusListForProduct.md +++ b/docs/SkusListForProduct.md @@ -6,12 +6,12 @@ Contains information about child SKUs. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about SKUs. | | -|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of SKUs. | | -|**data** | [**List<Sku>**](Sku.md) | A dictionary that contains an array of SKUs. | | -|**total** | **Integer** | Total number of SKUs in the product. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about SKUs. | +|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of SKUs. | +|**data** | [**List<Sku>**](Sku.md) | A dictionary that contains an array of SKUs. | +|**total** | **Integer** | Total number of SKUs in the product. | diff --git a/docs/StackableValidateRedeemBase.md b/docs/StackableValidateRedeemBase.md index 705e3c81..c14a1cd2 100644 --- a/docs/StackableValidateRedeemBase.md +++ b/docs/StackableValidateRedeemBase.md @@ -5,14 +5,14 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redeemables** | [**List<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | | | -|**order** | [**Order**](Order.md) | | [optional] | -|**customer** | [**Customer**](Customer.md) | | [optional] | -|**session** | [**Session**](Session.md) | | [optional] | -|**trackingId** | **String** | Is correspondent to Customer's source_id | [optional] | -|**metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redeemables** | [**List<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | | +|**order** | [**Order**](Order.md) | | +|**customer** | [**Customer**](Customer.md) | | +|**session** | [**Session**](Session.md) | | +|**trackingId** | **String** | Is correspondent to Customer's source_id | +|**metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | diff --git a/docs/StackableValidateRedeemBaseRedeemablesItem.md b/docs/StackableValidateRedeemBaseRedeemablesItem.md index 2799d626..3cdcd439 100644 --- a/docs/StackableValidateRedeemBaseRedeemablesItem.md +++ b/docs/StackableValidateRedeemBaseRedeemablesItem.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | | [optional] | -|**id** | **String** | | [optional] | -|**gift** | [**StackableValidateRedeemBaseRedeemablesItemGift**](StackableValidateRedeemBaseRedeemablesItemGift.md) | | [optional] | -|**reward** | [**StackableValidateRedeemBaseRedeemablesItemReward**](StackableValidateRedeemBaseRedeemablesItemReward.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | | +|**id** | **String** | | +|**gift** | [**StackableValidateRedeemBaseRedeemablesItemGift**](StackableValidateRedeemBaseRedeemablesItemGift.md) | | +|**reward** | [**StackableValidateRedeemBaseRedeemablesItemReward**](StackableValidateRedeemBaseRedeemablesItemReward.md) | | @@ -21,7 +21,6 @@ | VOUCHER | "voucher" | | PROMOTION_TIER | "promotion_tier" | | PROMOTION_STACK | "promotion_stack" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/StackableValidateRedeemBaseRedeemablesItemGift.md b/docs/StackableValidateRedeemBaseRedeemablesItemGift.md index 6b2afba8..e10219f4 100644 --- a/docs/StackableValidateRedeemBaseRedeemablesItemGift.md +++ b/docs/StackableValidateRedeemBaseRedeemablesItemGift.md @@ -6,9 +6,9 @@ Contains information on the number of gift card credits that the customer wants ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**credits** | **Integer** | The number of credits that the user wants to use from the gift card to fulfill the order. The value of credits cannot be higher than the current balance on the gift card. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**credits** | **Integer** | The number of credits that the user wants to use from the gift card to fulfill the order. The value of credits cannot be higher than the current balance on the gift card. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | diff --git a/docs/StackableValidateRedeemBaseRedeemablesItemReward.md b/docs/StackableValidateRedeemBaseRedeemablesItemReward.md index 3c771209..e760e1cb 100644 --- a/docs/StackableValidateRedeemBaseRedeemablesItemReward.md +++ b/docs/StackableValidateRedeemBaseRedeemablesItemReward.md @@ -6,10 +6,10 @@ Contains information about the reward that the customer wants to redeem and the ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique reward ID assigned by Voucherify. The reward must be assigned to the campaign in order for the user to be able to use the reward. | [optional] | -|**points** | **Integer** | The number of loyalty points that the user wants to spend in order to fulfill the order using a **pay with points** reward. The number of points cannot be higher than the current balance on the loyalty card. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique reward ID assigned by Voucherify. The reward must be assigned to the campaign in order for the user to be able to use the reward. | +|**points** | **Integer** | The number of loyalty points that the user wants to spend in order to fulfill the order using a **pay with points** reward. The number of points cannot be higher than the current balance on the loyalty card. | diff --git a/docs/StackingRules.md b/docs/StackingRules.md index 91451a2c..f2e16ac2 100644 --- a/docs/StackingRules.md +++ b/docs/StackingRules.md @@ -6,17 +6,17 @@ Defines stacking rules for redeemables. Read more in the [Help Center](https://s ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redeemablesLimit** | **Integer** | Defines how many redeemables can be sent in one stacking request (note: more redeemables means more processing time!). | | -|**applicableRedeemablesLimit** | **Integer** | Defines how many of the sent redeemables will be applied to the order. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be labelled as SKIPPED. | | -|**applicableRedeemablesPerCategoryLimit** | **Integer** | Defines how many redeemables per category can be applied in one request. | [optional] | -|**applicableExclusiveRedeemablesLimit** | **Integer** | Defines how many redeemables with an exclusive category can be applied in one request. | | -|**applicableExclusiveRedeemablesPerCategoryLimit** | **Integer** | Defines how many redeemables with an exclusive category per category in stacking rules can be applied in one request. | [optional] | -|**exclusiveCategories** | **List<String>** | Lists all exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint. | | -|**jointCategories** | **List<String>** | Lists all joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns. | | -|**redeemablesApplicationMode** | [**RedeemablesApplicationModeEnum**](#RedeemablesApplicationModeEnum) | Defines redeemables application mode. | | -|**redeemablesSortingRule** | [**RedeemablesSortingRuleEnum**](#RedeemablesSortingRuleEnum) | Defines redeemables sorting rule. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redeemablesLimit** | **Integer** | Defines how many redeemables can be sent in one stacking request (note: more redeemables means more processing time!). | +|**applicableRedeemablesLimit** | **Integer** | Defines how many of the sent redeemables will be applied to the order. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be labelled as SKIPPED. | +|**applicableRedeemablesPerCategoryLimit** | **Integer** | Defines how many redeemables per category can be applied in one request. | +|**applicableExclusiveRedeemablesLimit** | **Integer** | Defines how many redeemables with an exclusive category can be applied in one request. | +|**applicableExclusiveRedeemablesPerCategoryLimit** | **Integer** | Defines how many redeemables with an exclusive category per category in stacking rules can be applied in one request. | +|**exclusiveCategories** | **List<String>** | Lists all exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint. | +|**jointCategories** | **List<String>** | Lists all joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns. | +|**redeemablesApplicationMode** | [**RedeemablesApplicationModeEnum**](#RedeemablesApplicationModeEnum) | Defines redeemables application mode. | +|**redeemablesSortingRule** | [**RedeemablesSortingRuleEnum**](#RedeemablesSortingRuleEnum) | Defines redeemables sorting rule. | @@ -26,7 +26,6 @@ Defines stacking rules for redeemables. Read more in the [Help Center](https://s |---- | -----| | ALL | "ALL" | | PARTIAL | "PARTIAL" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -36,7 +35,6 @@ Defines stacking rules for redeemables. Read more in the [Help Center](https://s |---- | -----| | CATEGORY_HIERARCHY | "CATEGORY_HIERARCHY" | | REQUESTED_ORDER | "REQUESTED_ORDER" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationRule.md b/docs/ValidationRule.md index f642f404..2b2b0f43 100644 --- a/docs/ValidationRule.md +++ b/docs/ValidationRule.md @@ -5,19 +5,19 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Custom, unique name for set of validation rules. | | -|**rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | | -|**error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | [optional] | -|**applicableTo** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | | -|**type** | [**TypeEnum**](#TypeEnum) | Type of validation rule. | | -|**contextType** | [**ContextTypeEnum**](#ContextTypeEnum) | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | | -|**id** | **String** | Unique validation rule ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format. | [optional] | -|**assignmentsCount** | **Integer** | The number of instances the validation rule has been assigned to different types of redeemables. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the validation rule. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Custom, unique name for set of validation rules. | +|**rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | +|**error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | +|**applicableTo** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of validation rule. | +|**contextType** | [**ContextTypeEnum**](#ContextTypeEnum) | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | +|**id** | **String** | Unique validation rule ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format. | +|**assignmentsCount** | **Integer** | The number of instances the validation rule has been assigned to different types of redeemables. | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the validation rule. | @@ -29,7 +29,6 @@ | BASIC | "basic" | | ADVANCED | "advanced" | | COMPLEX | "complex" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -94,7 +93,6 @@ | DISTRIBUTION_ORDER_UPDATED | "distribution.order.updated" | | REWARD_ASSIGNMENT_PAY_WITH_POINTS | "reward_assignment.pay_with_points" | | GLOBAL | "global" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationRuleAssignment.md b/docs/ValidationRuleAssignment.md index 1dbbcaa7..b0ba4c20 100644 --- a/docs/ValidationRuleAssignment.md +++ b/docs/ValidationRuleAssignment.md @@ -6,14 +6,14 @@ This is an object representing a validation rule assignment. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Validation rule assignment ID. | | -|**ruleId** | **String** | Validation rule ID. | | -|**relatedObjectId** | **String** | The resource ID to which the validation rule was assigned. | | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | The type of resource to which the validation rule was assigned. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the ID. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Validation rule assignment ID. | +|**ruleId** | **String** | Validation rule ID. | +|**relatedObjectId** | **String** | The resource ID to which the validation rule was assigned. | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | The type of resource to which the validation rule was assigned. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the ID. | @@ -27,7 +27,6 @@ This is an object representing a validation rule assignment. | REWARD_ASSIGNMENT | "reward_assignment" | | PROMOTION_TIER | "promotion_tier" | | DISTRIBUTION | "distribution" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -36,7 +35,6 @@ This is an object representing a validation rule assignment. | Name | Value | |---- | -----| | VALIDATION_RULES_ASSIGNMENT | "validation_rules_assignment" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationRuleAssignmentsList.md b/docs/ValidationRuleAssignmentsList.md index 4e9346d4..4a5cb122 100644 --- a/docs/ValidationRuleAssignmentsList.md +++ b/docs/ValidationRuleAssignmentsList.md @@ -6,12 +6,12 @@ Validation Rule Assignments List ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about validation rule assignments. | | -|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of validation rule assignments. | | -|**data** | [**List<ValidationRuleAssignment>**](ValidationRuleAssignment.md) | A dictionary that contains an array of validation rule assignments. | | -|**total** | **Integer** | Total number of validation rule assignments. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about validation rule assignments. | +|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of validation rule assignments. | +|**data** | [**List<ValidationRuleAssignment>**](ValidationRuleAssignment.md) | A dictionary that contains an array of validation rule assignments. | +|**total** | **Integer** | Total number of validation rule assignments. | diff --git a/docs/ValidationRuleBase.md b/docs/ValidationRuleBase.md index 2c391c30..c99c8879 100644 --- a/docs/ValidationRuleBase.md +++ b/docs/ValidationRuleBase.md @@ -6,14 +6,14 @@ This is an object representing a request validation rule. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Custom, unique name for set of validation rules. | [optional] | -|**rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | [optional] | -|**error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | [optional] | -|**applicableTo** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Type of validation rule. | [optional] | -|**contextType** | [**ContextTypeEnum**](#ContextTypeEnum) | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Custom, unique name for set of validation rules. | +|**rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | +|**error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | +|**applicableTo** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of validation rule. | +|**contextType** | [**ContextTypeEnum**](#ContextTypeEnum) | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | @@ -25,7 +25,6 @@ This is an object representing a request validation rule. | BASIC | "basic" | | ADVANCED | "advanced" | | COMPLEX | "complex" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -90,7 +89,6 @@ This is an object representing a request validation rule. | DISTRIBUTION_ORDER_UPDATED | "distribution.order.updated" | | REWARD_ASSIGNMENT_PAY_WITH_POINTS | "reward_assignment.pay_with_points" | | GLOBAL | "global" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationRuleBaseApplicableTo.md b/docs/ValidationRuleBaseApplicableTo.md index c415870b..96daac87 100644 --- a/docs/ValidationRuleBaseApplicableTo.md +++ b/docs/ValidationRuleBaseApplicableTo.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**excluded** | [**List<ApplicableTo>**](ApplicableTo.md) | Defines which items are excluded from a discount. | [optional] | -|**included** | [**List<ApplicableTo>**](ApplicableTo.md) | Defines which items are included in a discount. | [optional] | -|**includedAll** | **Boolean** | Indicates whether all items are included in the discount. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**excluded** | [**List<ApplicableTo>**](ApplicableTo.md) | Defines which items are excluded from a discount. | +|**included** | [**List<ApplicableTo>**](ApplicableTo.md) | Defines which items are included in a discount. | +|**includedAll** | **Boolean** | Indicates whether all items are included in the discount. | diff --git a/docs/ValidationRuleBaseError.md b/docs/ValidationRuleBaseError.md index 16cc1811..e3114e4c 100644 --- a/docs/ValidationRuleBaseError.md +++ b/docs/ValidationRuleBaseError.md @@ -6,9 +6,9 @@ Contains the error message returned from API when validation / redemption fails ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**message** | **String** | The error message returned from API when validation / redemption fails to meet requirements of defined rules. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**message** | **String** | The error message returned from API when validation / redemption fails to meet requirements of defined rules. | diff --git a/docs/ValidationRulesApi.md b/docs/ValidationRulesApi.md index a7ed9cbe..df368338 100644 --- a/docs/ValidationRulesApi.md +++ b/docs/ValidationRulesApi.md @@ -70,11 +70,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **validationRuleId** | **String**| Unique validation rule ID. | | -| **force** | **Boolean**| If this flag is set to `true`, the previous assignment with the same data will be deleted and a new one will be added. | [optional] | -| **validationRulesAssignmentsCreateRequestBody** | [**ValidationRulesAssignmentsCreateRequestBody**](ValidationRulesAssignmentsCreateRequestBody.md)| Specify the resource that you would like to assign the validation rule to. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **validationRuleId** | **String**| Unique validation rule ID. | +| **force** | **Boolean**| If this flag is set to `true`, the previous assignment with the same data will be deleted and a new one will be added. | +| **validationRulesAssignmentsCreateRequestBody** | [**ValidationRulesAssignmentsCreateRequestBody**](ValidationRulesAssignmentsCreateRequestBody.md)| Specify the resource that you would like to assign the validation rule to. | ### Return type @@ -147,9 +147,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **validationRulesCreateRequestBody** | [**ValidationRulesCreateRequestBody**](ValidationRulesCreateRequestBody.md)| Specify the validation rules parameters. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **validationRulesCreateRequestBody** | [**ValidationRulesCreateRequestBody**](ValidationRulesCreateRequestBody.md)| Specify the validation rules parameters. | ### Return type @@ -222,10 +222,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **validationRuleId** | **String**| A unique validation rule ID. | | -| **assignmentId** | **String**| A unique validation rule assignment ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **validationRuleId** | **String**| A unique validation rule ID. | +| **assignmentId** | **String**| A unique validation rule assignment ID. | ### Return type @@ -297,9 +297,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **validationRuleId** | **String**| A unique validation rule ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **validationRuleId** | **String**| A unique validation rule ID. | ### Return type @@ -372,9 +372,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **validationRuleId** | **String**| A unique validation rule ID. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **validationRuleId** | **String**| A unique validation rule ID. | ### Return type @@ -450,12 +450,12 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **validationRuleId** | **String**| Unique validation rule ID. | | -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | -| **order** | [**ParameterOrderListValidationRuleAssignments**](.md)| This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] [enum: created_at, -created_at] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **validationRuleId** | **String**| Unique validation rule ID. | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | +| **order** | [**ParameterOrderListValidationRuleAssignments**](.md)| This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | ### Return type @@ -532,13 +532,13 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | -| **order** | [**ParameterOrderListValidationRules**](.md)| This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] [enum: created_at, -created_at, updated_at, -updated_at, name, -name] | -| **startDate** | **OffsetDateTime**| Timestamp representing the date and time which results must start on. Represented in ISO 8601 format. | [optional] | -| **endDate** | **OffsetDateTime**| Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | +| **order** | [**ParameterOrderListValidationRules**](.md)| This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | +| **startDate** | **OffsetDateTime**| Timestamp representing the date and time which results must start on. Represented in ISO 8601 format. | +| **endDate** | **OffsetDateTime**| Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | ### Return type @@ -615,13 +615,13 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **relatedObjectId** | **String**| The resource ID to which the validation rule was assigned; this could be, for example, a resource ID of a voucher, campaign, earning rule, reward assignment, promotion tier, or distribution. | [optional] | -| **rule** | **String**| Validation rule ID. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **order** | **String**| Sorts the results using one of the filtering options: `-created_at`, `created_at`, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **relatedObjectId** | **String**| The resource ID to which the validation rule was assigned; this could be, for example, a resource ID of a voucher, campaign, earning rule, reward assignment, promotion tier, or distribution. | +| **rule** | **String**| Validation rule ID. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **order** | **String**| Sorts the results using one of the filtering options: `-created_at`, `created_at`, where the dash `-` preceding a sorting option means sorting in a descending order. | ### Return type @@ -695,10 +695,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **validationRuleId** | **String**| A unique validation rule ID. | | -| **validationRulesUpdateRequestBody** | [**ValidationRulesUpdateRequestBody**](ValidationRulesUpdateRequestBody.md)| Specify the parameters to be updated. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **validationRuleId** | **String**| A unique validation rule ID. | +| **validationRulesUpdateRequestBody** | [**ValidationRulesUpdateRequestBody**](ValidationRulesUpdateRequestBody.md)| Specify the parameters to be updated. | ### Return type diff --git a/docs/ValidationRulesAssignmentsCreateRequestBody.md b/docs/ValidationRulesAssignmentsCreateRequestBody.md index a5c74c67..b57ce291 100644 --- a/docs/ValidationRulesAssignmentsCreateRequestBody.md +++ b/docs/ValidationRulesAssignmentsCreateRequestBody.md @@ -6,10 +6,10 @@ Request body schema for **POST** `/validation-rules/{validationRuleId}/assignmen ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object, e.g. `voucher`. | [optional] | -|**relatedObjectId** | **String** | Unique related object ID assigned by Voucherify, e.g. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object, e.g. `voucher`. | +|**relatedObjectId** | **String** | Unique related object ID assigned by Voucherify, e.g. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher. | @@ -23,7 +23,6 @@ Request body schema for **POST** `/validation-rules/{validationRuleId}/assignmen | EARNING_RULE | "earning_rule" | | DISTRIBUTION | "distribution" | | REWARD_ASSIGNMENT | "reward_assignment" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationRulesAssignmentsCreateResponseBody.md b/docs/ValidationRulesAssignmentsCreateResponseBody.md index e2d6351d..b6e4d4dc 100644 --- a/docs/ValidationRulesAssignmentsCreateResponseBody.md +++ b/docs/ValidationRulesAssignmentsCreateResponseBody.md @@ -6,14 +6,14 @@ Response body for **POST** `/validation-rules/{validationRuleId}/assignments`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Validation rule assignment ID. | | -|**ruleId** | **String** | Validation rule ID. | | -|**relatedObjectId** | **String** | The resource ID to which the validation rule was assigned. | | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | The type of resource to which the validation rule was assigned. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the ID. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Validation rule assignment ID. | +|**ruleId** | **String** | Validation rule ID. | +|**relatedObjectId** | **String** | The resource ID to which the validation rule was assigned. | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | The type of resource to which the validation rule was assigned. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the ID. | @@ -27,7 +27,6 @@ Response body for **POST** `/validation-rules/{validationRuleId}/assignments`. | REWARD_ASSIGNMENT | "reward_assignment" | | PROMOTION_TIER | "promotion_tier" | | DISTRIBUTION | "distribution" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -36,7 +35,6 @@ Response body for **POST** `/validation-rules/{validationRuleId}/assignments`. | Name | Value | |---- | -----| | VALIDATION_RULES_ASSIGNMENT | "validation_rules_assignment" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationRulesAssignmentsList.md b/docs/ValidationRulesAssignmentsList.md index f06a2ac3..84b3c12a 100644 --- a/docs/ValidationRulesAssignmentsList.md +++ b/docs/ValidationRulesAssignmentsList.md @@ -6,12 +6,12 @@ List of Validation Rules Assignments ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about validation rules assignments. | | -|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of validation rules assignments. | | -|**data** | [**List<BusValRuleAssignment>**](BusValRuleAssignment.md) | Contains array of validation rules assignments. | | -|**total** | **Integer** | Total number of validation rules assignments. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. This object stores information about validation rules assignments. | +|**dataRef** | [**DataRefEnum**](#DataRefEnum) | Identifies the name of the attribute that contains the array of validation rules assignments. | +|**data** | [**List<BusValRuleAssignment>**](BusValRuleAssignment.md) | Contains array of validation rules assignments. | +|**total** | **Integer** | Total number of validation rules assignments. | @@ -20,7 +20,6 @@ List of Validation Rules Assignments | Name | Value | |---- | -----| | LIST | "list" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -29,7 +28,6 @@ List of Validation Rules Assignments | Name | Value | |---- | -----| | DATA | "data" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationRulesAssignmentsListResponseBody.md b/docs/ValidationRulesAssignmentsListResponseBody.md index 55c85db6..b5153939 100644 --- a/docs/ValidationRulesAssignmentsListResponseBody.md +++ b/docs/ValidationRulesAssignmentsListResponseBody.md @@ -6,12 +6,12 @@ Response body for **GET** `/validation-rules-assignments` and **GET** `/validati ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about validation rule assignments. | | -|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of validation rule assignments. | | -|**data** | [**List<ValidationRuleAssignment>**](ValidationRuleAssignment.md) | A dictionary that contains an array of validation rule assignments. | | -|**total** | **Integer** | Total number of validation rule assignments. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about validation rule assignments. | +|**dataRef** | **String** | Identifies the name of the JSON property that contains the array of validation rule assignments. | +|**data** | [**List<ValidationRuleAssignment>**](ValidationRuleAssignment.md) | A dictionary that contains an array of validation rule assignments. | +|**total** | **Integer** | Total number of validation rule assignments. | diff --git a/docs/ValidationRulesCreateRequestBody.md b/docs/ValidationRulesCreateRequestBody.md index c5d4ccf6..e51daf7d 100644 --- a/docs/ValidationRulesCreateRequestBody.md +++ b/docs/ValidationRulesCreateRequestBody.md @@ -6,14 +6,14 @@ Request body schema for **POST** `/validation-rules`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Custom, unique name for set of validation rules. | | -|**rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | [optional] | -|**error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | [optional] | -|**applicableTo** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Type of validation rule. | [optional] | -|**contextType** | [**ContextTypeEnum**](#ContextTypeEnum) | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Custom, unique name for set of validation rules. | +|**rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | +|**error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | +|**applicableTo** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of validation rule. | +|**contextType** | [**ContextTypeEnum**](#ContextTypeEnum) | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | @@ -25,7 +25,6 @@ Request body schema for **POST** `/validation-rules`. | BASIC | "basic" | | ADVANCED | "advanced" | | COMPLEX | "complex" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -90,7 +89,6 @@ Request body schema for **POST** `/validation-rules`. | DISTRIBUTION_ORDER_UPDATED | "distribution.order.updated" | | REWARD_ASSIGNMENT_PAY_WITH_POINTS | "reward_assignment.pay_with_points" | | GLOBAL | "global" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationRulesCreateResponseBody.md b/docs/ValidationRulesCreateResponseBody.md index 13d8f9ef..6d8596cb 100644 --- a/docs/ValidationRulesCreateResponseBody.md +++ b/docs/ValidationRulesCreateResponseBody.md @@ -6,19 +6,19 @@ Response body schema for **POST** `/validation-rules`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Custom, unique name for set of validation rules. | | -|**rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | | -|**error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | [optional] | -|**applicableTo** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | | -|**type** | [**TypeEnum**](#TypeEnum) | Type of validation rule. | | -|**contextType** | [**ContextTypeEnum**](#ContextTypeEnum) | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | | -|**id** | **String** | Unique validation rule ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format. | [optional] | -|**assignmentsCount** | **Integer** | The number of instances the validation rule has been assigned to different types of redeemables. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the validation rule. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Custom, unique name for set of validation rules. | +|**rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | +|**error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | +|**applicableTo** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of validation rule. | +|**contextType** | [**ContextTypeEnum**](#ContextTypeEnum) | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | +|**id** | **String** | Unique validation rule ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format. | +|**assignmentsCount** | **Integer** | The number of instances the validation rule has been assigned to different types of redeemables. | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the validation rule. | @@ -30,7 +30,6 @@ Response body schema for **POST** `/validation-rules`. | BASIC | "basic" | | ADVANCED | "advanced" | | COMPLEX | "complex" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -95,7 +94,6 @@ Response body schema for **POST** `/validation-rules`. | DISTRIBUTION_ORDER_UPDATED | "distribution.order.updated" | | REWARD_ASSIGNMENT_PAY_WITH_POINTS | "reward_assignment.pay_with_points" | | GLOBAL | "global" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationRulesGetResponseBody.md b/docs/ValidationRulesGetResponseBody.md index c266a985..c75d6b77 100644 --- a/docs/ValidationRulesGetResponseBody.md +++ b/docs/ValidationRulesGetResponseBody.md @@ -6,19 +6,19 @@ Response body schema for **GET** `/validation-rules/{validationRuleId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Custom, unique name for set of validation rules. | | -|**rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | | -|**error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | [optional] | -|**applicableTo** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | | -|**type** | [**TypeEnum**](#TypeEnum) | Type of validation rule. | | -|**contextType** | [**ContextTypeEnum**](#ContextTypeEnum) | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | | -|**id** | **String** | Unique validation rule ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format. | [optional] | -|**assignmentsCount** | **Integer** | The number of instances the validation rule has been assigned to different types of redeemables. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the validation rule. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Custom, unique name for set of validation rules. | +|**rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | +|**error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | +|**applicableTo** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of validation rule. | +|**contextType** | [**ContextTypeEnum**](#ContextTypeEnum) | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | +|**id** | **String** | Unique validation rule ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format. | +|**assignmentsCount** | **Integer** | The number of instances the validation rule has been assigned to different types of redeemables. | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the validation rule. | @@ -30,7 +30,6 @@ Response body schema for **GET** `/validation-rules/{validationRuleId}`. | BASIC | "basic" | | ADVANCED | "advanced" | | COMPLEX | "complex" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -95,7 +94,6 @@ Response body schema for **GET** `/validation-rules/{validationRuleId}`. | DISTRIBUTION_ORDER_UPDATED | "distribution.order.updated" | | REWARD_ASSIGNMENT_PAY_WITH_POINTS | "reward_assignment.pay_with_points" | | GLOBAL | "global" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationRulesListResponseBody.md b/docs/ValidationRulesListResponseBody.md index 7db1ed56..5619f48e 100644 --- a/docs/ValidationRulesListResponseBody.md +++ b/docs/ValidationRulesListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/validation-rules`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. This object stores information about validation rules. | | -|**dataRef** | **String** | Identifies the name of the attribute that contains the array of validation rules. | | -|**data** | [**List<ValidationRule>**](ValidationRule.md) | An array of validation rules. | | -|**total** | **Integer** | Total number of validation rules in the project. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about validation rules. | +|**dataRef** | **String** | Identifies the name of the attribute that contains the array of validation rules. | +|**data** | [**List<ValidationRule>**](ValidationRule.md) | An array of validation rules. | +|**total** | **Integer** | Total number of validation rules in the project. | diff --git a/docs/ValidationRulesUpdateRequestBody.md b/docs/ValidationRulesUpdateRequestBody.md index 0247c19a..52f087c9 100644 --- a/docs/ValidationRulesUpdateRequestBody.md +++ b/docs/ValidationRulesUpdateRequestBody.md @@ -6,14 +6,14 @@ Response body schema for **PUT** `/validation-rules/{validationRuleId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Custom, unique name for set of validation rules. | [optional] | -|**rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | [optional] | -|**error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | [optional] | -|**applicableTo** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Type of validation rule. | [optional] | -|**contextType** | [**ContextTypeEnum**](#ContextTypeEnum) | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Custom, unique name for set of validation rules. | +|**rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | +|**error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | +|**applicableTo** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of validation rule. | +|**contextType** | [**ContextTypeEnum**](#ContextTypeEnum) | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | @@ -25,7 +25,6 @@ Response body schema for **PUT** `/validation-rules/{validationRuleId}`. | BASIC | "basic" | | ADVANCED | "advanced" | | COMPLEX | "complex" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -90,7 +89,6 @@ Response body schema for **PUT** `/validation-rules/{validationRuleId}`. | DISTRIBUTION_ORDER_UPDATED | "distribution.order.updated" | | REWARD_ASSIGNMENT_PAY_WITH_POINTS | "reward_assignment.pay_with_points" | | GLOBAL | "global" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationRulesUpdateResponseBody.md b/docs/ValidationRulesUpdateResponseBody.md index 960f5a56..476da6ad 100644 --- a/docs/ValidationRulesUpdateResponseBody.md +++ b/docs/ValidationRulesUpdateResponseBody.md @@ -6,19 +6,19 @@ Response body schema for **PUT** `/validation-rules/{validationRuleId}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Custom, unique name for set of validation rules. | | -|**rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | | -|**error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | [optional] | -|**applicableTo** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | | -|**type** | [**TypeEnum**](#TypeEnum) | Type of validation rule. | | -|**contextType** | [**ContextTypeEnum**](#ContextTypeEnum) | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | | -|**id** | **String** | Unique validation rule ID. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. | | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format. | [optional] | -|**assignmentsCount** | **Integer** | The number of instances the validation rule has been assigned to different types of redeemables. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the validation rule. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**name** | **String** | Custom, unique name for set of validation rules. | +|**rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | +|**error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | +|**applicableTo** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of validation rule. | +|**contextType** | [**ContextTypeEnum**](#ContextTypeEnum) | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | +|**id** | **String** | Unique validation rule ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format. | +|**assignmentsCount** | **Integer** | The number of instances the validation rule has been assigned to different types of redeemables. | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the validation rule. | @@ -30,7 +30,6 @@ Response body schema for **PUT** `/validation-rules/{validationRuleId}`. | BASIC | "basic" | | ADVANCED | "advanced" | | COMPLEX | "complex" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -95,7 +94,6 @@ Response body schema for **PUT** `/validation-rules/{validationRuleId}`. | DISTRIBUTION_ORDER_UPDATED | "distribution.order.updated" | | REWARD_ASSIGNMENT_PAY_WITH_POINTS | "reward_assignment.pay_with_points" | | GLOBAL | "global" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationsApi.md b/docs/ValidationsApi.md index 83580278..c3803885 100644 --- a/docs/ValidationsApi.md +++ b/docs/ValidationsApi.md @@ -60,9 +60,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **validationsValidateRequestBody** | [**ValidationsValidateRequestBody**](ValidationsValidateRequestBody.md)| | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **validationsValidateRequestBody** | [**ValidationsValidateRequestBody**](ValidationsValidateRequestBody.md)| | ### Return type diff --git a/docs/ValidationsRedeemableInapplicable.md b/docs/ValidationsRedeemableInapplicable.md index 4d4c7960..9ad318c8 100644 --- a/docs/ValidationsRedeemableInapplicable.md +++ b/docs/ValidationsRedeemableInapplicable.md @@ -5,14 +5,14 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | [**StatusEnum**](#StatusEnum) | Indicates whether the redeemable can be applied or not applied based on the validation rules. | | -|**id** | **String** | Redeemable ID, i.e. the voucher code. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | Redeemable's object type. | | -|**result** | [**ValidationsRedeemableInapplicableResult**](ValidationsRedeemableInapplicableResult.md) | | | -|**metadata** | **Object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | [optional] | -|**categories** | [**List<Category>**](Category.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**status** | [**StatusEnum**](#StatusEnum) | Indicates whether the redeemable can be applied or not applied based on the validation rules. | +|**id** | **String** | Redeemable ID, i.e. the voucher code. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | Redeemable's object type. | +|**result** | [**ValidationsRedeemableInapplicableResult**](ValidationsRedeemableInapplicableResult.md) | | +|**metadata** | **Object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | +|**categories** | [**List<Category>**](Category.md) | | @@ -21,7 +21,6 @@ | Name | Value | |---- | -----| | INAPPLICABLE | "INAPPLICABLE" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -31,7 +30,6 @@ |---- | -----| | VOUCHER | "voucher" | | PROMOTION_TIER | "promotion_tier" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationsRedeemableInapplicableResult.md b/docs/ValidationsRedeemableInapplicableResult.md index 0530a48d..bad0034e 100644 --- a/docs/ValidationsRedeemableInapplicableResult.md +++ b/docs/ValidationsRedeemableInapplicableResult.md @@ -6,10 +6,10 @@ Includes the error object with details about the reason why the redeemable is in ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**error** | [**Error**](Error.md) | | [optional] | -|**details** | [**ValidationsRedeemableInapplicableResultDetails**](ValidationsRedeemableInapplicableResultDetails.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**error** | [**Error**](Error.md) | | +|**details** | [**ValidationsRedeemableInapplicableResultDetails**](ValidationsRedeemableInapplicableResultDetails.md) | | diff --git a/docs/ValidationsRedeemableInapplicableResultDetails.md b/docs/ValidationsRedeemableInapplicableResultDetails.md index 58f19276..3c006afd 100644 --- a/docs/ValidationsRedeemableInapplicableResultDetails.md +++ b/docs/ValidationsRedeemableInapplicableResultDetails.md @@ -6,10 +6,10 @@ Provides details about the reason why the redeemable is inapplicable. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**message** | **String** | Generic message from the `message` string shown in the `error` object or the message configured in a validation rule. | [optional] | -|**key** | **String** | Generic message from the `key` string shown in the `error` object. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**message** | **String** | Generic message from the `message` string shown in the `error` object or the message configured in a validation rule. | +|**key** | **String** | Generic message from the `key` string shown in the `error` object. | diff --git a/docs/ValidationsRedeemableSkipped.md b/docs/ValidationsRedeemableSkipped.md index eaf9d4da..67217ddd 100644 --- a/docs/ValidationsRedeemableSkipped.md +++ b/docs/ValidationsRedeemableSkipped.md @@ -5,14 +5,14 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | [**StatusEnum**](#StatusEnum) | Indicates whether the redeemable can be applied or not applied based on the validation rules. | | -|**id** | **String** | Redeemable ID, i.e. the voucher code. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | Redeemable's object type. | | -|**result** | [**ValidationsRedeemableSkippedResult**](ValidationsRedeemableSkippedResult.md) | | | -|**metadata** | **Object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | [optional] | -|**categories** | [**List<Category>**](Category.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**status** | [**StatusEnum**](#StatusEnum) | Indicates whether the redeemable can be applied or not applied based on the validation rules. | +|**id** | **String** | Redeemable ID, i.e. the voucher code. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | Redeemable's object type. | +|**result** | [**ValidationsRedeemableSkippedResult**](ValidationsRedeemableSkippedResult.md) | | +|**metadata** | **Object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | +|**categories** | [**List<Category>**](Category.md) | | @@ -21,7 +21,6 @@ | Name | Value | |---- | -----| | SKIPPED | "SKIPPED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -31,7 +30,6 @@ |---- | -----| | VOUCHER | "voucher" | | PROMOTION_TIER | "promotion_tier" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationsRedeemableSkippedDetails.md b/docs/ValidationsRedeemableSkippedDetails.md index 92a10ac3..1532701f 100644 --- a/docs/ValidationsRedeemableSkippedDetails.md +++ b/docs/ValidationsRedeemableSkippedDetails.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**key** | [**KeyEnum**](#KeyEnum) | | [optional] | -|**message** | [**MessageEnum**](#MessageEnum) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**key** | [**KeyEnum**](#KeyEnum) | | +|**message** | **String** | | @@ -22,21 +22,6 @@ | APPLICABLE_EXCLUSIVE_REDEEMABLES_PER_CATEGORY_LIMIT_EXCEEDED | "applicable_exclusive_redeemables_per_category_limit_exceeded" | | EXCLUSION_RULES_NOT_MET | "exclusion_rules_not_met" | | PRECEDING_VALIDATION_FAILED | "preceding_validation_failed" | -| UNKNOWN_ENUM | "unknown_enum" | - - - -## Enum: MessageEnum - -| Name | Value | -|---- | -----| -| APPLICABLE_REDEEMABLES_LIMIT_EXCEEDED | "Applicable redeemables limit exceeded" | -| APPLICABLE_REDEEMABLES_LIMIT_PER_CATEGORY_EXCEEDED | "Applicable redeemables limit per category exceeded" | -| APPLICABLE_EXCLUSIVE_REDEEMABLES_LIMIT_EXCEEDED | "Applicable exclusive redeemables limit exceeded" | -| APPLICABLE_EXCLUSIVE_REDEEMABLES_LIMIT_PER_CATEGORY_EXCEEDED | "Applicable exclusive redeemables limit per category exceeded" | -| REDEEMABLE_CANNOT_BE_APPLIED_DUE_TO_EXCLUSION_RULES | "Redeemable cannot be applied due to exclusion rules" | -| REDEEMABLE_CANNOT_BE_APPLIED_DUE_TO_PRECEDING_VALIDATION_FAILURE | "Redeemable cannot be applied due to preceding validation failure" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationsRedeemableSkippedResult.md b/docs/ValidationsRedeemableSkippedResult.md index eab95246..a136cbef 100644 --- a/docs/ValidationsRedeemableSkippedResult.md +++ b/docs/ValidationsRedeemableSkippedResult.md @@ -6,9 +6,9 @@ Provides details about the reason why the redeemable is skipped. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**details** | [**ValidationsRedeemableSkippedDetails**](ValidationsRedeemableSkippedDetails.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**details** | [**ValidationsRedeemableSkippedDetails**](ValidationsRedeemableSkippedDetails.md) | | diff --git a/docs/ValidationsValidateRequestBody.md b/docs/ValidationsValidateRequestBody.md index f872cc4a..5a6a3fdd 100644 --- a/docs/ValidationsValidateRequestBody.md +++ b/docs/ValidationsValidateRequestBody.md @@ -6,15 +6,15 @@ Response body schema for **POST** `/validations`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redeemables** | [**List<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | | | -|**order** | [**Order**](Order.md) | | [optional] | -|**customer** | [**Customer**](Customer.md) | | [optional] | -|**session** | [**Session**](Session.md) | | [optional] | -|**trackingId** | **String** | Is correspondent to Customer's source_id | [optional] | -|**metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | [optional] | -|**options** | [**ClientValidationsValidateRequestBodyAllOfOptions**](ClientValidationsValidateRequestBodyAllOfOptions.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redeemables** | [**List<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | | +|**order** | [**Order**](Order.md) | | +|**customer** | [**Customer**](Customer.md) | | +|**session** | [**Session**](Session.md) | | +|**trackingId** | **String** | Is correspondent to Customer's source_id | +|**metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | +|**options** | [**ClientValidationsValidateRequestBodyAllOfOptions**](ClientValidationsValidateRequestBodyAllOfOptions.md) | | diff --git a/docs/ValidationsValidateResponseBody.md b/docs/ValidationsValidateResponseBody.md index 7eaa8c79..92b4084e 100644 --- a/docs/ValidationsValidateResponseBody.md +++ b/docs/ValidationsValidateResponseBody.md @@ -6,16 +6,16 @@ Response body schema for POST `/validations`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**valid** | **Boolean** | The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable. | | -|**redeemables** | [**List<ValidationsValidateResponseBodyRedeemablesItem>**](ValidationsValidateResponseBodyRedeemablesItem.md) | | | -|**skippedRedeemables** | [**List<ValidationsRedeemableSkipped>**](ValidationsRedeemableSkipped.md) | Lists validation results of each skipped redeemable. | [optional] | -|**inapplicableRedeemables** | [**List<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | [optional] | -|**order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] | -|**trackingId** | **String** | Hashed customer source ID. | [optional] | -|**session** | [**Session**](Session.md) | | [optional] | -|**stackingRules** | [**StackingRules**](StackingRules.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**valid** | **Boolean** | The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable. | +|**redeemables** | [**List<ValidationsValidateResponseBodyRedeemablesItem>**](ValidationsValidateResponseBodyRedeemablesItem.md) | | +|**skippedRedeemables** | [**List<ValidationsRedeemableSkipped>**](ValidationsRedeemableSkipped.md) | Lists validation results of each skipped redeemable. | +|**inapplicableRedeemables** | [**List<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | +|**order** | [**OrderCalculated**](OrderCalculated.md) | | +|**trackingId** | **String** | Hashed customer source ID. | +|**session** | [**Session**](Session.md) | | +|**stackingRules** | [**StackingRules**](StackingRules.md) | | diff --git a/docs/ValidationsValidateResponseBodyRedeemablesItem.md b/docs/ValidationsValidateResponseBodyRedeemablesItem.md index cd28fd64..cfe5fca8 100644 --- a/docs/ValidationsValidateResponseBodyRedeemablesItem.md +++ b/docs/ValidationsValidateResponseBodyRedeemablesItem.md @@ -5,17 +5,17 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | [**StatusEnum**](#StatusEnum) | | | -|**id** | **String** | Redeemable ID, i.e. the voucher code. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | Redeemable's object type. | | -|**order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] | -|**applicableTo** | [**ApplicableToResultList**](ApplicableToResultList.md) | | [optional] | -|**inapplicableTo** | [**InapplicableToResultList**](InapplicableToResultList.md) | | [optional] | -|**result** | [**ValidationsValidateResponseBodyRedeemablesItemResult**](ValidationsValidateResponseBodyRedeemablesItemResult.md) | | | -|**metadata** | **Object** | | [optional] | -|**categories** | [**List<Category>**](Category.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**status** | [**StatusEnum**](#StatusEnum) | | +|**id** | **String** | Redeemable ID, i.e. the voucher code. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | Redeemable's object type. | +|**order** | [**OrderCalculated**](OrderCalculated.md) | | +|**applicableTo** | [**ApplicableToResultList**](ApplicableToResultList.md) | | +|**inapplicableTo** | [**InapplicableToResultList**](InapplicableToResultList.md) | | +|**result** | [**ValidationsValidateResponseBodyRedeemablesItemResult**](ValidationsValidateResponseBodyRedeemablesItemResult.md) | | +|**metadata** | **Object** | | +|**categories** | [**List<Category>**](Category.md) | | @@ -26,7 +26,6 @@ | APPLICABLE | "APPLICABLE" | | INAPPLICABLE | "INAPPLICABLE" | | SKIPPED | "SKIPPED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -36,7 +35,6 @@ |---- | -----| | VOUCHER | "voucher" | | PROMOTION_TIER | "promotion_tier" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationsValidateResponseBodyRedeemablesItemResult.md b/docs/ValidationsValidateResponseBodyRedeemablesItemResult.md index 94c07eed..0e9cf112 100644 --- a/docs/ValidationsValidateResponseBodyRedeemablesItemResult.md +++ b/docs/ValidationsValidateResponseBodyRedeemablesItemResult.md @@ -5,13 +5,13 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**discount** | [**ValidationsValidateResponseBodyRedeemablesItemResultDiscount**](ValidationsValidateResponseBodyRedeemablesItemResultDiscount.md) | | [optional] | -|**gift** | [**ValidationsValidateResponseBodyRedeemablesItemResultGift**](ValidationsValidateResponseBodyRedeemablesItemResultGift.md) | | [optional] | -|**loyaltyCard** | [**ValidationsValidateResponseBodyRedeemablesItemResultLoyaltyCard**](ValidationsValidateResponseBodyRedeemablesItemResultLoyaltyCard.md) | | [optional] | -|**error** | [**Error**](Error.md) | | [optional] | -|**details** | [**ValidationsValidateResponseBodyRedeemablesItemResultDetails**](ValidationsValidateResponseBodyRedeemablesItemResultDetails.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**discount** | [**ValidationsValidateResponseBodyRedeemablesItemResultDiscount**](ValidationsValidateResponseBodyRedeemablesItemResultDiscount.md) | | +|**gift** | [**ValidationsValidateResponseBodyRedeemablesItemResultGift**](ValidationsValidateResponseBodyRedeemablesItemResultGift.md) | | +|**loyaltyCard** | [**ValidationsValidateResponseBodyRedeemablesItemResultLoyaltyCard**](ValidationsValidateResponseBodyRedeemablesItemResultLoyaltyCard.md) | | +|**error** | [**Error**](Error.md) | | +|**details** | [**ValidationsValidateResponseBodyRedeemablesItemResultDetails**](ValidationsValidateResponseBodyRedeemablesItemResultDetails.md) | | diff --git a/docs/ValidationsValidateResponseBodyRedeemablesItemResultDetails.md b/docs/ValidationsValidateResponseBodyRedeemablesItemResultDetails.md index b1acd9ff..c716ab14 100644 --- a/docs/ValidationsValidateResponseBodyRedeemablesItemResultDetails.md +++ b/docs/ValidationsValidateResponseBodyRedeemablesItemResultDetails.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**key** | [**KeyEnum**](#KeyEnum) | | [optional] | -|**message** | [**MessageEnum**](#MessageEnum) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**key** | [**KeyEnum**](#KeyEnum) | | +|**message** | **String** | | @@ -22,21 +22,6 @@ | APPLICABLE_EXCLUSIVE_REDEEMABLES_PER_CATEGORY_LIMIT_EXCEEDED | "applicable_exclusive_redeemables_per_category_limit_exceeded" | | EXCLUSION_RULES_NOT_MET | "exclusion_rules_not_met" | | PRECEDING_VALIDATION_FAILED | "preceding_validation_failed" | -| UNKNOWN_ENUM | "unknown_enum" | - - - -## Enum: MessageEnum - -| Name | Value | -|---- | -----| -| APPLICABLE_REDEEMABLES_LIMIT_EXCEEDED | "Applicable redeemables limit exceeded" | -| APPLICABLE_REDEEMABLES_LIMIT_PER_CATEGORY_EXCEEDED | "Applicable redeemables limit per category exceeded" | -| APPLICABLE_EXCLUSIVE_REDEEMABLES_LIMIT_EXCEEDED | "Applicable exclusive redeemables limit exceeded" | -| APPLICABLE_EXCLUSIVE_REDEEMABLES_LIMIT_PER_CATEGORY_EXCEEDED | "Applicable exclusive redeemables limit per category exceeded" | -| REDEEMABLE_CANNOT_BE_APPLIED_DUE_TO_EXCLUSION_RULES | "Redeemable cannot be applied due to exclusion rules" | -| REDEEMABLE_CANNOT_BE_APPLIED_DUE_TO_PRECEDING_VALIDATION_FAILURE | "Redeemable cannot be applied due to preceding validation failure" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationsValidateResponseBodyRedeemablesItemResultDiscount.md b/docs/ValidationsValidateResponseBodyRedeemablesItemResultDiscount.md index b198d9d4..eef1c239 100644 --- a/docs/ValidationsValidateResponseBodyRedeemablesItemResultDiscount.md +++ b/docs/ValidationsValidateResponseBodyRedeemablesItemResultDiscount.md @@ -5,25 +5,25 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | | | -|**amountOff** | **BigDecimal** | Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. | [optional] | -|**amountOffFormula** | **String** | | [optional] | -|**aggregatedAmountLimit** | **Integer** | Maximum discount amount per order. | [optional] | -|**effect** | [**EffectEnum**](#EffectEnum) | | [optional] | -|**isDynamic** | **Boolean** | Flag indicating whether the discount was calculated using a formula. | [optional] | -|**unitOff** | **Integer** | Number of units to be granted a full value discount. | [optional] | -|**unitOffFormula** | **String** | | [optional] | -|**unitType** | **String** | The product deemed as free, chosen from product inventory (e.g. time, items). | [optional] | -|**product** | [**ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct**](ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct.md) | | [optional] | -|**sku** | [**SimpleSkuDiscountUnit**](SimpleSkuDiscountUnit.md) | | [optional] | -|**units** | [**List<DiscountUnitMultipleOneUnit>**](DiscountUnitMultipleOneUnit.md) | | [optional] | -|**percentOff** | **BigDecimal** | The percent discount that the customer will receive. | [optional] | -|**percentOffFormula** | **String** | | [optional] | -|**amountLimit** | **BigDecimal** | Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600. | [optional] | -|**fixedAmount** | **BigDecimal** | Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the `fixed_amount_formula` parameter is present in the fixed amount definition, this value becomes the **fallback value**. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value. | [optional] | -|**fixedAmountFormula** | **String** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**type** | [**TypeEnum**](#TypeEnum) | | +|**amountOff** | **BigDecimal** | Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. | +|**amountOffFormula** | **String** | | +|**aggregatedAmountLimit** | **Integer** | Maximum discount amount per order. | +|**effect** | [**EffectEnum**](#EffectEnum) | | +|**isDynamic** | **Boolean** | Flag indicating whether the discount was calculated using a formula. | +|**unitOff** | **Integer** | Number of units to be granted a full value discount. | +|**unitOffFormula** | **String** | | +|**unitType** | **String** | The product deemed as free, chosen from product inventory (e.g. time, items). | +|**product** | [**ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct**](ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct.md) | | +|**sku** | [**SimpleSkuDiscountUnit**](SimpleSkuDiscountUnit.md) | | +|**units** | [**List<DiscountUnitMultipleOneUnit>**](DiscountUnitMultipleOneUnit.md) | | +|**percentOff** | **BigDecimal** | The percent discount that the customer will receive. | +|**percentOffFormula** | **String** | | +|**amountLimit** | **BigDecimal** | Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600. | +|**fixedAmount** | **BigDecimal** | Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the `fixed_amount_formula` parameter is present in the fixed amount definition, this value becomes the **fallback value**. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value. | +|**fixedAmountFormula** | **String** | | @@ -35,7 +35,6 @@ | UNIT | "UNIT" | | PERCENT | "PERCENT" | | FIXED | "FIXED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -51,7 +50,6 @@ | ADD_MISSING_ITEMS | "ADD_MISSING_ITEMS" | | ADD_NEW_ITEMS | "ADD_NEW_ITEMS" | | ADD_MANY_ITEMS | "ADD_MANY_ITEMS" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct.md b/docs/ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct.md index 3bc19091..d37e6452 100644 --- a/docs/ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct.md +++ b/docs/ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique product ID, assigned by Voucherify. | | -|**sourceId** | **String** | Product's source ID. | [optional] | -|**name** | **String** | Product name. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique product ID, assigned by Voucherify. | +|**sourceId** | **String** | Product's source ID. | +|**name** | **String** | Product name. | diff --git a/docs/ValidationsValidateResponseBodyRedeemablesItemResultGift.md b/docs/ValidationsValidateResponseBodyRedeemablesItemResultGift.md index 2d9c4e4a..633eb1e6 100644 --- a/docs/ValidationsValidateResponseBodyRedeemablesItemResultGift.md +++ b/docs/ValidationsValidateResponseBodyRedeemablesItemResultGift.md @@ -6,9 +6,9 @@ Stores the amount of gift card credits to be applied in the redemption. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**credits** | **Integer** | Total number of gift card credits to be applied in the redemption expressed as the smallest currency unit (e.g. 100 cents for $1.00). | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**credits** | **Integer** | Total number of gift card credits to be applied in the redemption expressed as the smallest currency unit (e.g. 100 cents for $1.00). | diff --git a/docs/ValidationsValidateResponseBodyRedeemablesItemResultLoyaltyCard.md b/docs/ValidationsValidateResponseBodyRedeemablesItemResultLoyaltyCard.md index ba6e8b9b..26643c79 100644 --- a/docs/ValidationsValidateResponseBodyRedeemablesItemResultLoyaltyCard.md +++ b/docs/ValidationsValidateResponseBodyRedeemablesItemResultLoyaltyCard.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Total number of loyalty points to be applied in the redemption. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Total number of loyalty points to be applied in the redemption. | diff --git a/docs/ValidityHours.md b/docs/ValidityHours.md index be6f8172..503028c2 100644 --- a/docs/ValidityHours.md +++ b/docs/ValidityHours.md @@ -6,9 +6,9 @@ Determines the hours of validity, e.g. to create a happy hours scenario. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**daily** | [**List<ValidityHoursDailyInner>**](ValidityHoursDailyInner.md) | Defines the reccuring period(s) when the resource is active. The periods should not overlap. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**daily** | [**List<ValidityHoursDailyInner>**](ValidityHoursDailyInner.md) | Defines the reccuring period(s) when the resource is active. The periods should not overlap. | diff --git a/docs/ValidityHoursDailyInner.md b/docs/ValidityHoursDailyInner.md index be539031..0f65dc1a 100644 --- a/docs/ValidityHoursDailyInner.md +++ b/docs/ValidityHoursDailyInner.md @@ -6,11 +6,11 @@ Defines the reccuring period(s) when the resource will be active. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**startTime** | **String** | Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time. | [optional] | -|**daysOfWeek** | [**List<DaysOfWeekEnum>**](#List<DaysOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**expirationTime** | **String** | Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**startTime** | **String** | Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time. | +|**daysOfWeek** | [**List<DaysOfWeekEnum>**](#List<DaysOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**expirationTime** | **String** | Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time. | @@ -25,7 +25,6 @@ Defines the reccuring period(s) when the resource will be active. | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/Voucher.md b/docs/Voucher.md index eebf5450..924b2a7a 100644 --- a/docs/Voucher.md +++ b/docs/Voucher.md @@ -6,37 +6,37 @@ This is an object representing a voucher. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] | -|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] | -|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] | -|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] | -|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] | -|**categoryId** | **String** | Unique category ID assigned by Voucherify. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | [optional] | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | [optional] | -|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] | -|**assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] | -|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | [optional] | -|**referrerId** | **String** | Unique identifier of the referring person. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | -|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | [optional] | -|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | +|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | +|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | +|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | +|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | +|**categoryId** | **String** | Unique category ID assigned by Voucherify. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | +|**discount** | [**Discount**](Discount.md) | | +|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | +|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | +|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | +|**assets** | [**VoucherAssets**](VoucherAssets.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | +|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | +|**referrerId** | **String** | Unique identifier of the referring person. | +|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | +|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | +|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | @@ -47,7 +47,6 @@ This is an object representing a voucher. | GIFT_VOUCHER | "GIFT_VOUCHER" | | DISCOUNT_VOUCHER | "DISCOUNT_VOUCHER" | | LOYALTY_CARD | "LOYALTY_CARD" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -62,7 +61,6 @@ This is an object representing a voucher. | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/VoucherAssets.md b/docs/VoucherAssets.md index dc006cb3..b6bc10f5 100644 --- a/docs/VoucherAssets.md +++ b/docs/VoucherAssets.md @@ -6,10 +6,10 @@ Stores links to images of QR and barcode that correspond to an encrypted voucher ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**qr** | [**LoyaltiesMembersTransfersCreateResponseBodyAssetsQr**](LoyaltiesMembersTransfersCreateResponseBodyAssetsQr.md) | | [optional] | -|**barcode** | [**LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode**](LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**qr** | [**LoyaltiesMembersTransfersCreateResponseBodyAssetsQr**](LoyaltiesMembersTransfersCreateResponseBodyAssetsQr.md) | | +|**barcode** | [**LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode**](LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode.md) | | diff --git a/docs/VoucherHolder.md b/docs/VoucherHolder.md index c17d7304..239cf6e7 100644 --- a/docs/VoucherHolder.md +++ b/docs/VoucherHolder.md @@ -6,9 +6,9 @@ This is an object representing a voucher holder. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**holder** | [**SimpleCustomer**](SimpleCustomer.md) | | diff --git a/docs/VoucherTransaction.md b/docs/VoucherTransaction.md index ad590c9b..03687daf 100644 --- a/docs/VoucherTransaction.md +++ b/docs/VoucherTransaction.md @@ -5,18 +5,18 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique transaction ID. | | -|**sourceId** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. In case of a redemption, this value is null. | [optional] | -|**voucherId** | **String** | Unique voucher ID. | | -|**campaignId** | **String** | Unqiue campaign ID of the voucher's parent campaign if it is part of campaign that generates bulk codes. | | -|**source** | **String** | The channel through which the transaction took place, whether through the API or the the Dashboard. In case of a redemption, this value is null. | [optional] | -|**reason** | **String** | Reason why the transaction occurred. In case of a redemption, this value is null. | [optional] | -|**type** | **LoyaltyCardTransactionsType** | | | -|**details** | [**VoucherTransactionDetails**](VoucherTransactionDetails.md) | | | -|**relatedTransactionId** | **String** | The related transaction ID on the receiving card. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique transaction ID. | +|**sourceId** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. In case of a redemption, this value is null. | +|**voucherId** | **String** | Unique voucher ID. | +|**campaignId** | **String** | Unqiue campaign ID of the voucher's parent campaign if it is part of campaign that generates bulk codes. | +|**source** | **String** | The channel through which the transaction took place, whether through the API or the the Dashboard. In case of a redemption, this value is null. | +|**reason** | **String** | Reason why the transaction occurred. In case of a redemption, this value is null. | +|**type** | **LoyaltyCardTransactionsType** | | +|**details** | [**VoucherTransactionDetails**](VoucherTransactionDetails.md) | | +|**relatedTransactionId** | **String** | The related transaction ID on the receiving card. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format. | diff --git a/docs/VoucherTransactionDetails.md b/docs/VoucherTransactionDetails.md index 06458801..670b910e 100644 --- a/docs/VoucherTransactionDetails.md +++ b/docs/VoucherTransactionDetails.md @@ -6,21 +6,21 @@ Contains the detailed information about the transaction. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**balance** | [**VoucherTransactionDetailsBalance**](VoucherTransactionDetailsBalance.md) | | [optional] | -|**order** | [**VoucherTransactionDetailsOrder**](VoucherTransactionDetailsOrder.md) | | [optional] | -|**event** | [**VoucherTransactionDetailsEvent**](VoucherTransactionDetailsEvent.md) | | [optional] | -|**earningRule** | [**VoucherTransactionDetailsEarningRule**](VoucherTransactionDetailsEarningRule.md) | | [optional] | -|**segment** | [**VoucherTransactionDetailsSegment**](VoucherTransactionDetailsSegment.md) | | [optional] | -|**loyaltyTier** | [**VoucherTransactionDetailsLoyaltyTier**](VoucherTransactionDetailsLoyaltyTier.md) | | [optional] | -|**redemption** | [**VoucherTransactionDetailsRedemption**](VoucherTransactionDetailsRedemption.md) | | [optional] | -|**rollback** | [**VoucherTransactionDetailsRollback**](VoucherTransactionDetailsRollback.md) | | [optional] | -|**customEvent** | [**VoucherTransactionDetailsCustomEvent**](VoucherTransactionDetailsCustomEvent.md) | | [optional] | -|**eventSchema** | [**VoucherTransactionDetailsEventSchema**](VoucherTransactionDetailsEventSchema.md) | | [optional] | -|**reward** | [**VoucherTransactionDetailsReward**](VoucherTransactionDetailsReward.md) | | [optional] | -|**sourceVoucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] | -|**destinationVoucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**balance** | [**VoucherTransactionDetailsBalance**](VoucherTransactionDetailsBalance.md) | | +|**order** | [**VoucherTransactionDetailsOrder**](VoucherTransactionDetailsOrder.md) | | +|**event** | [**VoucherTransactionDetailsEvent**](VoucherTransactionDetailsEvent.md) | | +|**earningRule** | [**VoucherTransactionDetailsEarningRule**](VoucherTransactionDetailsEarningRule.md) | | +|**segment** | [**VoucherTransactionDetailsSegment**](VoucherTransactionDetailsSegment.md) | | +|**loyaltyTier** | [**VoucherTransactionDetailsLoyaltyTier**](VoucherTransactionDetailsLoyaltyTier.md) | | +|**redemption** | [**VoucherTransactionDetailsRedemption**](VoucherTransactionDetailsRedemption.md) | | +|**rollback** | [**VoucherTransactionDetailsRollback**](VoucherTransactionDetailsRollback.md) | | +|**customEvent** | [**VoucherTransactionDetailsCustomEvent**](VoucherTransactionDetailsCustomEvent.md) | | +|**eventSchema** | [**VoucherTransactionDetailsEventSchema**](VoucherTransactionDetailsEventSchema.md) | | +|**reward** | [**VoucherTransactionDetailsReward**](VoucherTransactionDetailsReward.md) | | +|**sourceVoucher** | [**SimpleVoucher**](SimpleVoucher.md) | | +|**destinationVoucher** | [**SimpleVoucher**](SimpleVoucher.md) | | diff --git a/docs/VoucherTransactionDetailsBalance.md b/docs/VoucherTransactionDetailsBalance.md index 762c5e9e..2aad33f7 100644 --- a/docs/VoucherTransactionDetailsBalance.md +++ b/docs/VoucherTransactionDetailsBalance.md @@ -6,14 +6,14 @@ Contains information on how the balance was affected by the transaction. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | The type of voucher whose balance is being adjusted due to the transaction. | | -|**total** | **Integer** | The number of all points accumulated on the card as affected by add or subtract operations. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. | | -|**points** | **Integer** | Points added or subtracted in the transaction. | | -|**balance** | **Integer** | The available points on the card after the transaction as affected by redemption or rollback. | | -|**relatedObject** | [**VoucherTransactionDetailsBalanceRelatedObject**](VoucherTransactionDetailsBalanceRelatedObject.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**type** | [**TypeEnum**](#TypeEnum) | The type of voucher whose balance is being adjusted due to the transaction. | +|**total** | **Integer** | The number of all points accumulated on the card as affected by add or subtract operations. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by the JSON. | +|**points** | **Integer** | Points added or subtracted in the transaction. | +|**balance** | **Integer** | The available points on the card after the transaction as affected by redemption or rollback. | +|**relatedObject** | [**VoucherTransactionDetailsBalanceRelatedObject**](VoucherTransactionDetailsBalanceRelatedObject.md) | | @@ -22,7 +22,6 @@ Contains information on how the balance was affected by the transaction. | Name | Value | |---- | -----| | LOYALTY_CARD | "loyalty_card" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -31,7 +30,6 @@ Contains information on how the balance was affected by the transaction. | Name | Value | |---- | -----| | BALANCE | "balance" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/VoucherTransactionDetailsBalanceRelatedObject.md b/docs/VoucherTransactionDetailsBalanceRelatedObject.md index c97fd105..421ab8d7 100644 --- a/docs/VoucherTransactionDetailsBalanceRelatedObject.md +++ b/docs/VoucherTransactionDetailsBalanceRelatedObject.md @@ -6,10 +6,10 @@ Defines the resource that is being modified with the values that are returned in ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API. | | -|**type** | [**TypeEnum**](#TypeEnum) | The object being modified, i.e. voucher. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API. | +|**type** | [**TypeEnum**](#TypeEnum) | The object being modified, i.e. voucher. | @@ -18,7 +18,6 @@ Defines the resource that is being modified with the values that are returned in | Name | Value | |---- | -----| | VOUCHER | "voucher" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/VoucherTransactionDetailsCustomEvent.md b/docs/VoucherTransactionDetailsCustomEvent.md index 17c0d0d2..91d6c616 100644 --- a/docs/VoucherTransactionDetailsCustomEvent.md +++ b/docs/VoucherTransactionDetailsCustomEvent.md @@ -6,10 +6,10 @@ Contains information about the custom event that triggers the point accrual. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique event ID. | | -|**type** | **String** | Type of custom event. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique event ID. | +|**type** | **String** | Type of custom event. | diff --git a/docs/VoucherTransactionDetailsEarningRule.md b/docs/VoucherTransactionDetailsEarningRule.md index 7ffe4668..8197e67f 100644 --- a/docs/VoucherTransactionDetailsEarningRule.md +++ b/docs/VoucherTransactionDetailsEarningRule.md @@ -6,10 +6,10 @@ Contains information about the earning rule. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique earning rule ID. | | -|**source** | [**VoucherTransactionDetailsEarningRuleSource**](VoucherTransactionDetailsEarningRuleSource.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique earning rule ID. | +|**source** | [**VoucherTransactionDetailsEarningRuleSource**](VoucherTransactionDetailsEarningRuleSource.md) | | diff --git a/docs/VoucherTransactionDetailsEarningRuleSource.md b/docs/VoucherTransactionDetailsEarningRuleSource.md index 83216123..0f080b3a 100644 --- a/docs/VoucherTransactionDetailsEarningRuleSource.md +++ b/docs/VoucherTransactionDetailsEarningRuleSource.md @@ -6,9 +6,9 @@ Contains the custom earning rule name. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**banner** | **String** | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**banner** | **String** | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. | diff --git a/docs/VoucherTransactionDetailsEvent.md b/docs/VoucherTransactionDetailsEvent.md index 21d40f63..f8616317 100644 --- a/docs/VoucherTransactionDetailsEvent.md +++ b/docs/VoucherTransactionDetailsEvent.md @@ -6,10 +6,10 @@ Contains information about the event that triggers the point accrual. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique event ID. | | -|**type** | **String** | Type of event. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique event ID. | +|**type** | **String** | Type of event. | diff --git a/docs/VoucherTransactionDetailsEventSchema.md b/docs/VoucherTransactionDetailsEventSchema.md index 345575b1..b5c70cc1 100644 --- a/docs/VoucherTransactionDetailsEventSchema.md +++ b/docs/VoucherTransactionDetailsEventSchema.md @@ -6,10 +6,10 @@ Contains information about the custom event metadata schema. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique metadata schema ID. | | -|**name** | **String** | Type of custom event. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique metadata schema ID. | +|**name** | **String** | Type of custom event. | diff --git a/docs/VoucherTransactionDetailsLoyaltyTier.md b/docs/VoucherTransactionDetailsLoyaltyTier.md index f6a10b04..8d21938a 100644 --- a/docs/VoucherTransactionDetailsLoyaltyTier.md +++ b/docs/VoucherTransactionDetailsLoyaltyTier.md @@ -6,10 +6,10 @@ Contains information about the loyalty tier. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | | -|**name** | **String** | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | | +|**name** | **String** | | diff --git a/docs/VoucherTransactionDetailsOrder.md b/docs/VoucherTransactionDetailsOrder.md index 7987a481..50b08eb3 100644 --- a/docs/VoucherTransactionDetailsOrder.md +++ b/docs/VoucherTransactionDetailsOrder.md @@ -6,10 +6,10 @@ Contains information about the original order. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique order ID. | | -|**sourceId** | **String** | The merchant’s order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique order ID. | +|**sourceId** | **String** | The merchant’s order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service. | diff --git a/docs/VoucherTransactionDetailsRedemption.md b/docs/VoucherTransactionDetailsRedemption.md index 89c70d2b..9111459b 100644 --- a/docs/VoucherTransactionDetailsRedemption.md +++ b/docs/VoucherTransactionDetailsRedemption.md @@ -6,9 +6,9 @@ Contains information about the original redemption. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique redemption ID. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique redemption ID. | diff --git a/docs/VoucherTransactionDetailsReward.md b/docs/VoucherTransactionDetailsReward.md index b68b36af..7c6bede9 100644 --- a/docs/VoucherTransactionDetailsReward.md +++ b/docs/VoucherTransactionDetailsReward.md @@ -6,10 +6,10 @@ Contains information about the pay with points reward. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique reward ID. | | -|**name** | **String** | Reward name. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique reward ID. | +|**name** | **String** | Reward name. | diff --git a/docs/VoucherTransactionDetailsRollback.md b/docs/VoucherTransactionDetailsRollback.md index 93d8a0b9..80000e08 100644 --- a/docs/VoucherTransactionDetailsRollback.md +++ b/docs/VoucherTransactionDetailsRollback.md @@ -6,9 +6,9 @@ Contains information about the redemption rollback. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique redemption rollback ID. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique redemption rollback ID. | diff --git a/docs/VoucherTransactionDetailsSegment.md b/docs/VoucherTransactionDetailsSegment.md index 3dde4088..adea0401 100644 --- a/docs/VoucherTransactionDetailsSegment.md +++ b/docs/VoucherTransactionDetailsSegment.md @@ -6,10 +6,10 @@ Contains information about the segment. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | | -|**name** | **String** | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | | +|**name** | **String** | | diff --git a/docs/VoucherTransactionsExport.md b/docs/VoucherTransactionsExport.md index 7ca07eba..9e63b7ba 100644 --- a/docs/VoucherTransactionsExport.md +++ b/docs/VoucherTransactionsExport.md @@ -6,17 +6,17 @@ This is an object representing an export. Using this endpoint, you can export ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique export ID. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the `export`. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | | -|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | | -|**channel** | **String** | The channel through which the export was triggered. | | -|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | The type of exported object. | | -|**parameters** | [**VoucherTransactionsFilters**](VoucherTransactionsFilters.md) | | | -|**result** | [**VoucherTransactionsExportResult**](VoucherTransactionsExportResult.md) | | [optional] | -|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the `channel` value is `WEBSITE`. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique export ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the `export`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | +|**channel** | **String** | The channel through which the export was triggered. | +|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | The type of exported object. | +|**parameters** | [**VoucherTransactionsFilters**](VoucherTransactionsFilters.md) | | +|**result** | [**VoucherTransactionsExportResult**](VoucherTransactionsExportResult.md) | | +|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the `channel` value is `WEBSITE`. | @@ -25,7 +25,6 @@ This is an object representing an export. Using this endpoint, you can export | Name | Value | |---- | -----| | EXPORT | "export" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -34,7 +33,6 @@ This is an object representing an export. Using this endpoint, you can export | Name | Value | |---- | -----| | SCHEDULED | "SCHEDULED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -43,7 +41,6 @@ This is an object representing an export. Using this endpoint, you can export | Name | Value | |---- | -----| | VOUCHER_TRANSACTIONS | "voucher_transactions" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/VoucherTransactionsExportFilterConditions.md b/docs/VoucherTransactionsExportFilterConditions.md index a1932859..19abafa8 100644 --- a/docs/VoucherTransactionsExportFilterConditions.md +++ b/docs/VoucherTransactionsExportFilterConditions.md @@ -6,9 +6,9 @@ Filter condition. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**voucherId** | [**VoucherTransactionsExportFilterConditionsVoucherId**](VoucherTransactionsExportFilterConditionsVoucherId.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**voucherId** | [**VoucherTransactionsExportFilterConditionsVoucherId**](VoucherTransactionsExportFilterConditionsVoucherId.md) | | diff --git a/docs/VoucherTransactionsExportFilterConditionsVoucherId.md b/docs/VoucherTransactionsExportFilterConditionsVoucherId.md index 4925a193..ba51af12 100644 --- a/docs/VoucherTransactionsExportFilterConditionsVoucherId.md +++ b/docs/VoucherTransactionsExportFilterConditionsVoucherId.md @@ -6,9 +6,9 @@ Data filters used to narrow the data records to be returned in the result. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**conditions** | [**VoucherTransactionsExportFilterConditionsVoucherIdConditions**](VoucherTransactionsExportFilterConditionsVoucherIdConditions.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**conditions** | [**VoucherTransactionsExportFilterConditionsVoucherIdConditions**](VoucherTransactionsExportFilterConditionsVoucherIdConditions.md) | | diff --git a/docs/VoucherTransactionsExportFilterConditionsVoucherIdConditions.md b/docs/VoucherTransactionsExportFilterConditionsVoucherIdConditions.md index a0bd0d34..ccb6823f 100644 --- a/docs/VoucherTransactionsExportFilterConditionsVoucherIdConditions.md +++ b/docs/VoucherTransactionsExportFilterConditionsVoucherIdConditions.md @@ -6,9 +6,9 @@ Data filters used to narrow the data records to be returned in the result. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**$in** | **List<String>** | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**$in** | **List<String>** | | diff --git a/docs/VoucherTransactionsExportParameters.md b/docs/VoucherTransactionsExportParameters.md index 3e49d3b1..58653419 100644 --- a/docs/VoucherTransactionsExportParameters.md +++ b/docs/VoucherTransactionsExportParameters.md @@ -6,10 +6,10 @@ List of available fields and filters that can be exported with a gift card or lo ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**order** | [**OrderEnum**](#OrderEnum) | How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] | -|**fields** | [**List<FieldsEnum>**](#List<FieldsEnum>) | Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields: | **Field** | **Definition** | **Example Export** | |:---|:---|:---| | id | Unique transaction ID. | vtx_0cb7811f1c07765800 | | type | Transaction type. | - `CREDITS_REMOVAL` <br> - `CREDITS_ADDITION` <br> - `CREDITS_REFUND` <br> - `CREDITS_REDEMPTION` <br> - `POINTS_ACCRUAL` <br> - `POINTS_CANCELLATION` <br> - `POINTS_REDEMPTION`<br> - `POINTS_REFUND`<br> - `POINTS_ADDITION`<br> - `POINTS_REMOVAL`<br> - `POINTS_EXPIRATION`<br> - `POINTS_TRANSFER_IN`<br> - `POINTS_TRANSFER_OUT` | | source_id | Unique transaction source ID. | 8638 | | reason | Contains the reason for the transaction if one was included originally. | | | balance | The gift card or loyalty card balance after the transaction. | | | amount | The amount of gift card or loyalty card credits being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction. | | | created_at | Timestamp in ISO 8601 format representing the date and time when the transaction was created. | 2022-03-09T09:16:32.521Z | | voucher_id | Unique Voucher ID. | v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp | | campaign_id | Parent campaign ID. | camp_FNYR4jhqZBM9xTptxDGgeNBV | | source| Channel through which the transaction was initiated. | API | | details | More detailed information stored in the form of a JSON. | Provides more details related to the transaction in the form of an object. | | related_transaction_id | Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card. | vtx_0c9afe802593b34b80 | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**order** | [**OrderEnum**](#OrderEnum) | How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order. | +|**fields** | [**List<FieldsEnum>**](#List<FieldsEnum>) | Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields: | **Field** | **Definition** | **Example Export** | |:---|:---|:---| | id | Unique transaction ID. | vtx_0cb7811f1c07765800 | | type | Transaction type. | - `CREDITS_REMOVAL` <br> - `CREDITS_ADDITION` <br> - `CREDITS_REFUND` <br> - `CREDITS_REDEMPTION` <br> - `POINTS_ACCRUAL` <br> - `POINTS_CANCELLATION` <br> - `POINTS_REDEMPTION`<br> - `POINTS_REFUND`<br> - `POINTS_ADDITION`<br> - `POINTS_REMOVAL`<br> - `POINTS_EXPIRATION`<br> - `POINTS_TRANSFER_IN`<br> - `POINTS_TRANSFER_OUT` | | source_id | Unique transaction source ID. | 8638 | | reason | Contains the reason for the transaction if one was included originally. | | | balance | The gift card or loyalty card balance after the transaction. | | | amount | The amount of gift card or loyalty card credits being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction. | | | created_at | Timestamp in ISO 8601 format representing the date and time when the transaction was created. | 2022-03-09T09:16:32.521Z | | voucher_id | Unique Voucher ID. | v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp | | campaign_id | Parent campaign ID. | camp_FNYR4jhqZBM9xTptxDGgeNBV | | source| Channel through which the transaction was initiated. | API | | details | More detailed information stored in the form of a JSON. | Provides more details related to the transaction in the form of an object. | | related_transaction_id | Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card. | vtx_0c9afe802593b34b80 | | @@ -19,7 +19,6 @@ List of available fields and filters that can be exported with a gift card or lo |---- | -----| | _CREATED_AT | "-created_at" | | CREATED_AT | "created_at" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -39,7 +38,6 @@ List of available fields and filters that can be exported with a gift card or lo | SOURCE | "source" | | DETAILS | "details" | | RELATED_TRANSACTION_ID | "related_transaction_id" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/VoucherTransactionsExportResult.md b/docs/VoucherTransactionsExportResult.md index 25422760..6f8d4d90 100644 --- a/docs/VoucherTransactionsExportResult.md +++ b/docs/VoucherTransactionsExportResult.md @@ -6,9 +6,9 @@ Contains the URL of the CSV file. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**url** | **String** | URL of the CSV file location. It contains the `token` used for authorization in the <!-- [Download export](OpenAPI.json/paths/~1exports~1{export_Id}/get) -->[Download export](ref:download-export) method. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**url** | **String** | URL of the CSV file location. It contains the `token` used for authorization in the <!-- [Download export](OpenAPI.json/paths/~1exports~1{export_Id}/get) -->[Download export](ref:download-export) method. | diff --git a/docs/VoucherTransactionsFilters.md b/docs/VoucherTransactionsFilters.md index 418fd58c..71df01ec 100644 --- a/docs/VoucherTransactionsFilters.md +++ b/docs/VoucherTransactionsFilters.md @@ -6,11 +6,11 @@ List of available fields and filters that can be exported with gift card or loya ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**order** | [**OrderEnum**](#OrderEnum) | How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] | -|**fields** | [**List<FieldsEnum>**](#List<FieldsEnum>) | Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields: | **Field** | **Definition** | **Example Export** | |:---|:---|:---| | id | Unique transaction ID. | vtx_0cb7811f1c07765800 | | type | Transaction type. | - `CREDITS_REMOVAL` <br> - `CREDITS_ADDITION` <br> - `CREDITS_REFUND` <br> - `CREDITS_REDEMPTION` <br> - `POINTS_ACCRUAL` <br> - `POINTS_CANCELLATION` <br> - `POINTS_REDEMPTION`<br> - `POINTS_REFUND`<br> - `POINTS_ADDITION`<br> - `POINTS_REMOVAL`<br> - `POINTS_EXPIRATION`<br> - `POINTS_TRANSFER_IN`<br> - `POINTS_TRANSFER_OUT` | | source_id | Unique transaction source ID. | 8638 | | reason | Contains the reason for the transaction if one was included originally. | | | balance | The gift card or loyalty card balance after the transaction. | | | amount | The amount of gift card or loyalty card credits being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction. | | | created_at | Timestamp in ISO 8601 format representing the date and time when the transaction was created. | 2022-03-09T09:16:32.521Z | | voucher_id | Unique Voucher ID. | v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp | | campaign_id | Parent campaign ID. | camp_FNYR4jhqZBM9xTptxDGgeNBV | | source| Channel through which the transaction was initiated. | API | | details | More detailed information stored in the form of a JSON. | Provides more details related to the transaction in the form of an object. | | related_transaction_id | Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card. | vtx_0c9afe802593b34b80 | | [optional] | -|**filters** | [**VoucherTransactionsExportFilterConditions**](VoucherTransactionsExportFilterConditions.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**order** | [**OrderEnum**](#OrderEnum) | How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order. | +|**fields** | [**List<FieldsEnum>**](#List<FieldsEnum>) | Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields: | **Field** | **Definition** | **Example Export** | |:---|:---|:---| | id | Unique transaction ID. | vtx_0cb7811f1c07765800 | | type | Transaction type. | - `CREDITS_REMOVAL` <br> - `CREDITS_ADDITION` <br> - `CREDITS_REFUND` <br> - `CREDITS_REDEMPTION` <br> - `POINTS_ACCRUAL` <br> - `POINTS_CANCELLATION` <br> - `POINTS_REDEMPTION`<br> - `POINTS_REFUND`<br> - `POINTS_ADDITION`<br> - `POINTS_REMOVAL`<br> - `POINTS_EXPIRATION`<br> - `POINTS_TRANSFER_IN`<br> - `POINTS_TRANSFER_OUT` | | source_id | Unique transaction source ID. | 8638 | | reason | Contains the reason for the transaction if one was included originally. | | | balance | The gift card or loyalty card balance after the transaction. | | | amount | The amount of gift card or loyalty card credits being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction. | | | created_at | Timestamp in ISO 8601 format representing the date and time when the transaction was created. | 2022-03-09T09:16:32.521Z | | voucher_id | Unique Voucher ID. | v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp | | campaign_id | Parent campaign ID. | camp_FNYR4jhqZBM9xTptxDGgeNBV | | source| Channel through which the transaction was initiated. | API | | details | More detailed information stored in the form of a JSON. | Provides more details related to the transaction in the form of an object. | | related_transaction_id | Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card. | vtx_0c9afe802593b34b80 | | +|**filters** | [**VoucherTransactionsExportFilterConditions**](VoucherTransactionsExportFilterConditions.md) | | @@ -20,7 +20,6 @@ List of available fields and filters that can be exported with gift card or loya |---- | -----| | _CREATED_AT | "-created_at" | | CREATED_AT | "created_at" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -40,7 +39,6 @@ List of available fields and filters that can be exported with gift card or loya | SOURCE | "source" | | DETAILS | "details" | | RELATED_TRANSACTION_ID | "related_transaction_id" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/VouchersApi.md b/docs/VouchersApi.md index 6b6049c0..adb03f84 100644 --- a/docs/VouchersApi.md +++ b/docs/VouchersApi.md @@ -66,9 +66,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **code** | **String**| A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **code** | **String**| A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`. | ### Return type @@ -141,9 +141,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **code** | **String**| A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **code** | **String**| A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`. | ### Return type @@ -217,10 +217,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **code** | **String**| A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`. | | -| **vouchersTransactionsExportCreateRequestBody** | [**VouchersTransactionsExportCreateRequestBody**](VouchersTransactionsExportCreateRequestBody.md)| Specify the parameters for the transaction export. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **code** | **String**| A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`. | +| **vouchersTransactionsExportCreateRequestBody** | [**VouchersTransactionsExportCreateRequestBody**](VouchersTransactionsExportCreateRequestBody.md)| Specify the parameters for the transaction export. | ### Return type @@ -293,9 +293,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **code** | **String**| A unique **code** that identifies the voucher. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **code** | **String**| A unique **code** that identifies the voucher. | ### Return type @@ -368,9 +368,9 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **_file** | **File**| File path. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **_file** | **File**| File path. | ### Return type @@ -445,11 +445,11 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **code** | **String**| A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`. | | -| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] | -| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | [optional] | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **code** | **String**| A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`. | +| **limit** | **Integer**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | +| **page** | **Integer**| Which page of results to return. The lowest value is `1`. | ### Return type @@ -523,10 +523,10 @@ public class Example { ### Parameters -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **code** | **String**| A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`. | | -| **vouchersBalanceUpdateRequestBody** | [**VouchersBalanceUpdateRequestBody**](VouchersBalanceUpdateRequestBody.md)| Provide the amount to be added to/subtracted from the voucher. | | +| Name | Type | Description | +|------------- | ------------- | ------------- | +| **code** | **String**| A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`. | +| **vouchersBalanceUpdateRequestBody** | [**VouchersBalanceUpdateRequestBody**](VouchersBalanceUpdateRequestBody.md)| Provide the amount to be added to/subtracted from the voucher. | ### Return type diff --git a/docs/VouchersBalanceUpdateRequestBody.md b/docs/VouchersBalanceUpdateRequestBody.md index 72876daf..f9ae734e 100644 --- a/docs/VouchersBalanceUpdateRequestBody.md +++ b/docs/VouchersBalanceUpdateRequestBody.md @@ -6,11 +6,11 @@ Request body schema for `vouchers/{code}/balance`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Integer** | The incremental amount to be added to or removed from the current balance on the gift card or loyalty card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. To remove balance, simply add a minus sign before the value, i.e. to remove $20, use -2000. | | -|**sourceId** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. | [optional] | -|**reason** | **String** | Reason why the transaction occurred. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**amount** | **Integer** | The incremental amount to be added to or removed from the current balance on the gift card or loyalty card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. To remove balance, simply add a minus sign before the value, i.e. to remove $20, use -2000. | +|**sourceId** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. | +|**reason** | **String** | Reason why the transaction occurred. | diff --git a/docs/VouchersBalanceUpdateResponseBody.md b/docs/VouchersBalanceUpdateResponseBody.md index d29c1da8..a3bd52d2 100644 --- a/docs/VouchersBalanceUpdateResponseBody.md +++ b/docs/VouchersBalanceUpdateResponseBody.md @@ -6,15 +6,15 @@ Response body schema for `vouchers/{code}/balance.` ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Integer** | The incremental amount added (positive integer) or subtracted (negative integer) to the current balance on the gift card or loyalty card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | | -|**total** | **Integer** | Total income incurred over the lifespan of the gift card or loyalty card. | | -|**balance** | **Integer** | The balance after adding or subtracting a specified amount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | | -|**type** | [**TypeEnum**](#TypeEnum) | The type of voucher being modified. | | -|**operationType** | [**OperationTypeEnum**](#OperationTypeEnum) | | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is `balance`. | | -|**relatedObject** | [**VouchersBalanceUpdateResponseBodyRelatedObject**](VouchersBalanceUpdateResponseBodyRelatedObject.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**amount** | **Integer** | The incremental amount added (positive integer) or subtracted (negative integer) to the current balance on the gift card or loyalty card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | +|**total** | **Integer** | Total income incurred over the lifespan of the gift card or loyalty card. | +|**balance** | **Integer** | The balance after adding or subtracting a specified amount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | +|**type** | [**TypeEnum**](#TypeEnum) | The type of voucher being modified. | +|**operationType** | [**OperationTypeEnum**](#OperationTypeEnum) | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. Default is `balance`. | +|**relatedObject** | [**VouchersBalanceUpdateResponseBodyRelatedObject**](VouchersBalanceUpdateResponseBodyRelatedObject.md) | | @@ -24,7 +24,6 @@ Response body schema for `vouchers/{code}/balance.` |---- | -----| | GIFT_VOUCHER | "gift_voucher" | | LOYALTY_CARD | "loyalty_card" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -33,7 +32,6 @@ Response body schema for `vouchers/{code}/balance.` | Name | Value | |---- | -----| | MANUAL | "MANUAL" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -42,7 +40,6 @@ Response body schema for `vouchers/{code}/balance.` | Name | Value | |---- | -----| | BALANCE | "balance" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/VouchersBalanceUpdateResponseBodyRelatedObject.md b/docs/VouchersBalanceUpdateResponseBodyRelatedObject.md index 8e04013b..705ba16d 100644 --- a/docs/VouchersBalanceUpdateResponseBodyRelatedObject.md +++ b/docs/VouchersBalanceUpdateResponseBodyRelatedObject.md @@ -6,10 +6,10 @@ Defines the resource that is being modified with the values that are returned in ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | The object being modified, i.e. `voucher`. | | -|**id** | **String** | Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**type** | [**TypeEnum**](#TypeEnum) | The object being modified, i.e. `voucher`. | +|**id** | **String** | Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API. | @@ -18,7 +18,6 @@ Defines the resource that is being modified with the values that are returned in | Name | Value | |---- | -----| | VOUCHER | "voucher" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/VouchersDisableResponseBody.md b/docs/VouchersDisableResponseBody.md index 3b5f9e7e..e3754c79 100644 --- a/docs/VouchersDisableResponseBody.md +++ b/docs/VouchersDisableResponseBody.md @@ -6,37 +6,37 @@ Response body schema for **POST** `/vouchers/{code}/disable`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] | -|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] | -|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] | -|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] | -|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] | -|**categoryId** | **String** | Unique category ID assigned by Voucherify. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | [optional] | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | [optional] | -|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] | -|**assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] | -|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | [optional] | -|**referrerId** | **String** | Unique identifier of the referring person. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | -|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | [optional] | -|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | +|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | +|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | +|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | +|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | +|**categoryId** | **String** | Unique category ID assigned by Voucherify. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | +|**discount** | [**Discount**](Discount.md) | | +|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | +|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | +|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | +|**assets** | [**VoucherAssets**](VoucherAssets.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | +|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | +|**referrerId** | **String** | Unique identifier of the referring person. | +|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | +|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | +|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | @@ -47,7 +47,6 @@ Response body schema for **POST** `/vouchers/{code}/disable`. | GIFT_VOUCHER | "GIFT_VOUCHER" | | DISCOUNT_VOUCHER | "DISCOUNT_VOUCHER" | | LOYALTY_CARD | "LOYALTY_CARD" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -62,7 +61,6 @@ Response body schema for **POST** `/vouchers/{code}/disable`. | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/VouchersEnableResponseBody.md b/docs/VouchersEnableResponseBody.md index 74fac495..82936e35 100644 --- a/docs/VouchersEnableResponseBody.md +++ b/docs/VouchersEnableResponseBody.md @@ -6,37 +6,37 @@ Response body schema for **POST** `/vouchers/{code}/enable`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] | -|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] | -|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] | -|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] | -|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] | -|**categoryId** | **String** | Unique category ID assigned by Voucherify. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | [optional] | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | [optional] | -|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] | -|**assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] | -|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | [optional] | -|**referrerId** | **String** | Unique identifier of the referring person. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | -|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | [optional] | -|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | +|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | +|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | +|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | +|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | +|**categoryId** | **String** | Unique category ID assigned by Voucherify. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | +|**discount** | [**Discount**](Discount.md) | | +|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | +|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | +|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | +|**assets** | [**VoucherAssets**](VoucherAssets.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | +|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | +|**referrerId** | **String** | Unique identifier of the referring person. | +|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | +|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | +|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | @@ -47,7 +47,6 @@ Response body schema for **POST** `/vouchers/{code}/enable`. | GIFT_VOUCHER | "GIFT_VOUCHER" | | DISCOUNT_VOUCHER | "DISCOUNT_VOUCHER" | | LOYALTY_CARD | "LOYALTY_CARD" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -62,7 +61,6 @@ Response body schema for **POST** `/vouchers/{code}/enable`. | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/VouchersGetResponseBody.md b/docs/VouchersGetResponseBody.md index cb99a25c..85418b3f 100644 --- a/docs/VouchersGetResponseBody.md +++ b/docs/VouchersGetResponseBody.md @@ -6,37 +6,37 @@ Response body schema for **GET** `/vouchers/{code}`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] | -|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] | -|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] | -|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] | -|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] | -|**categoryId** | **String** | Unique category ID assigned by Voucherify. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | [optional] | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | [optional] | -|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] | -|**assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] | -|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | [optional] | -|**referrerId** | **String** | Unique identifier of the referring person. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | -|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | [optional] | -|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | +|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | +|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | +|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | +|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | +|**categoryId** | **String** | Unique category ID assigned by Voucherify. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | +|**discount** | [**Discount**](Discount.md) | | +|**gift** | [**CampaignsVouchersCreateCombinedResponseBodyGift**](CampaignsVouchersCreateCombinedResponseBodyGift.md) | | +|**loyaltyCard** | [**CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard**](CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard.md) | | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | +|**validityTimeframe** | [**CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe**](CampaignsVouchersCreateCombinedResponseBodyValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | +|**assets** | [**VoucherAssets**](VoucherAssets.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | +|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | +|**referrerId** | **String** | Unique identifier of the referring person. | +|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | +|**publish** | [**CampaignsVouchersCreateCombinedResponseBodyPublish**](CampaignsVouchersCreateCombinedResponseBodyPublish.md) | | +|**redemption** | [**CampaignsVouchersCreateCombinedResponseBodyRedemption**](CampaignsVouchersCreateCombinedResponseBodyRedemption.md) | | @@ -47,7 +47,6 @@ Response body schema for **GET** `/vouchers/{code}`. | GIFT_VOUCHER | "GIFT_VOUCHER" | | DISCOUNT_VOUCHER | "DISCOUNT_VOUCHER" | | LOYALTY_CARD | "LOYALTY_CARD" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -62,7 +61,6 @@ Response body schema for **GET** `/vouchers/{code}`. | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/VouchersImportCsvCreateResponseBody.md b/docs/VouchersImportCsvCreateResponseBody.md index e9b58ad3..b760ecb0 100644 --- a/docs/VouchersImportCsvCreateResponseBody.md +++ b/docs/VouchersImportCsvCreateResponseBody.md @@ -6,9 +6,9 @@ Response body schema for **POST** `/vouchers/importCSV`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**asyncActionId** | **String** | The ID of the scheduled asynchronous action. | diff --git a/docs/VouchersRedemptionGetResponseBody.md b/docs/VouchersRedemptionGetResponseBody.md index 44e92eaf..93d3a8cd 100644 --- a/docs/VouchersRedemptionGetResponseBody.md +++ b/docs/VouchersRedemptionGetResponseBody.md @@ -6,15 +6,15 @@ Response body schema for **GET** `/vouchers/{code}/redemption`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**quantity** | **Integer** | The maximum number of times a voucher can be redeemed. | [optional] | -|**redeemedQuantity** | **Integer** | The number of times the voucher was redeemed successfully. | | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about redemptions in a dictionary. | | -|**url** | **String** | URL | | -|**dataRef** | **String** | Identifies the name of the attribute that contains the array of `redemption_entries`. | | -|**total** | **Integer** | Total number of redemption objects. | | -|**redemptionEntries** | [**List<VouchersRedemptionGetResponseBodyRedemptionEntriesItem>**](VouchersRedemptionGetResponseBodyRedemptionEntriesItem.md) | | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**quantity** | **Integer** | The maximum number of times a voucher can be redeemed. | +|**redeemedQuantity** | **Integer** | The number of times the voucher was redeemed successfully. | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about redemptions in a dictionary. | +|**url** | **String** | URL | +|**dataRef** | **String** | Identifies the name of the attribute that contains the array of `redemption_entries`. | +|**total** | **Integer** | Total number of redemption objects. | +|**redemptionEntries** | [**List<VouchersRedemptionGetResponseBodyRedemptionEntriesItem>**](VouchersRedemptionGetResponseBodyRedemptionEntriesItem.md) | | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItem.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItem.md index 5e33243d..e44c1112 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItem.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItem.md @@ -5,32 +5,32 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | | | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | | -|**customerId** | **String** | Unique customer ID of the redeeming customer. | [optional] | -|**trackingId** | **String** | Hashed customer source ID. | [optional] | -|**metadata** | **Object** | | [optional] | -|**amount** | **Integer** | For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer. | [optional] | -|**redemption** | **String** | Unique redemption ID of the parent redemption. | [optional] | -|**result** | [**ResultEnum**](#ResultEnum) | Redemption result. | | -|**status** | [**StatusEnum**](#StatusEnum) | | | -|**relatedRedemptions** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptions**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptions.md) | | [optional] | -|**failureCode** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | [optional] | -|**failureMessage** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | [optional] | -|**order** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemOrder**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemOrder.md) | | [optional] | -|**channel** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel.md) | | | -|**customer** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemCustomer**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemCustomer.md) | | [optional] | -|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object. | | -|**relatedObjectId** | **String** | | | -|**voucher** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucher**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucher.md) | | [optional] | -|**promotionTier** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTier**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTier.md) | | [optional] | -|**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional] | -|**gift** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemGift**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemGift.md) | | [optional] | -|**loyaltyCard** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemLoyaltyCard**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemLoyaltyCard.md) | | [optional] | -|**reason** | **String** | System generated cause for the redemption being invalid in the context of the provided parameters. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | +|**customerId** | **String** | Unique customer ID of the redeeming customer. | +|**trackingId** | **String** | Hashed customer source ID. | +|**metadata** | **Object** | | +|**amount** | **Integer** | For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction. and For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card. For loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer. | +|**redemption** | **String** | Unique redemption ID of the parent redemption. | +|**result** | [**ResultEnum**](#ResultEnum) | Redemption result. | +|**status** | [**StatusEnum**](#StatusEnum) | | +|**relatedRedemptions** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptions**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptions.md) | | +|**failureCode** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | +|**failureMessage** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | +|**order** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemOrder**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemOrder.md) | | +|**channel** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel.md) | | +|**customer** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemCustomer**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemCustomer.md) | | +|**relatedObjectType** | [**RelatedObjectTypeEnum**](#RelatedObjectTypeEnum) | Defines the related object. | +|**relatedObjectId** | **String** | | +|**voucher** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucher**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucher.md) | | +|**promotionTier** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTier**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTier.md) | | +|**reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | +|**gift** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemGift**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemGift.md) | | +|**loyaltyCard** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemLoyaltyCard**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemLoyaltyCard.md) | | +|**reason** | **String** | System generated cause for the redemption being invalid in the context of the provided parameters. | @@ -40,7 +40,6 @@ |---- | -----| | REDEMPTION | "redemption" | | REDEMPTION_ROLLBACK | "redemption_rollback" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -50,7 +49,6 @@ |---- | -----| | SUCCESS | "SUCCESS" | | FAILURE | "FAILURE" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -61,7 +59,6 @@ | SUCCEEDED | "SUCCEEDED" | | FAILED | "FAILED" | | ROLLED_BACK | "ROLLED_BACK" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -72,7 +69,6 @@ | VOUCHER | "voucher" | | PROMOTION_TIER | "promotion_tier" | | REDEMPTION | "redemption" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel.md index c1de5fc6..ed064706 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**channelId** | **String** | | [optional] | -|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**channelId** | **String** | | +|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | @@ -18,7 +18,6 @@ |---- | -----| | USER | "USER" | | API | "API" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemCustomer.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemCustomer.md index 22c88d18..e36a1117 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemCustomer.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemCustomer.md @@ -5,14 +5,14 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | [optional] | -|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] | -|**name** | **String** | Customer's first and last name. | [optional] | -|**email** | **String** | Customer's email address. | [optional] | -|**metadata** | **Object** | | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | +|**sourceId** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | +|**name** | **String** | Customer's first and last name. | +|**email** | **String** | Customer's email address. | +|**metadata** | **Object** | | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | @@ -21,7 +21,6 @@ | Name | Value | |---- | -----| | CUSTOMER | "customer" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemGift.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemGift.md index 2b17207c..e8ca61f6 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemGift.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemGift.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Integer** | Amount subtracted from the gift card as a result of the redemption. The amount is expressed as the smallest currency unit (e.g. 100 cents for $1.00). and Amount returned to the gift card as a result of the redemption rollback and expressed as a negative integer. The amount is expressed as the smallest currency unit (e.g. -100 cents for $1.00 returned). | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**amount** | **Integer** | Amount subtracted from the gift card as a result of the redemption. The amount is expressed as the smallest currency unit (e.g. 100 cents for $1.00). and Amount returned to the gift card as a result of the redemption rollback and expressed as a negative integer. The amount is expressed as the smallest currency unit (e.g. -100 cents for $1.00 returned). | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemLoyaltyCard.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemLoyaltyCard.md index 34c04900..2f341419 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemLoyaltyCard.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemLoyaltyCard.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Number of points subtracted from the loyalty card as a result of the redemption. and Number of points being returned to the loyalty card for the reward redemption rollback. It is expressed as a negative integer. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Number of points subtracted from the loyalty card as a result of the redemption. and Number of points being returned to the loyalty card for the reward redemption rollback. It is expressed as a negative integer. | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemOrder.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemOrder.md index d2509a16..3ef2776d 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemOrder.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemOrder.md @@ -5,30 +5,30 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] | -|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The order status. | [optional] | -|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] | -|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] | -|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] | -|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] | -|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] | -|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | [optional] | -|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] | -|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] | -|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] | -|**metadata** | **Object** | | [optional] | -|**customerId** | **String** | Unique customer ID of the customer making the purchase. | [optional] | -|**referrerId** | **String** | Unique referrer ID. | [optional] | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | [optional] | -|**redemptions** | **Object** | | [optional] | -|**customer** | **CustomerId** | | [optional] | -|**referrer** | **ReferrerId** | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | +|**sourceId** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | The order status. | +|**amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**initialAmount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | +|**discountAmount** | **Integer** | Sum of all order-level discounts applied to the order. | +|**itemsDiscountAmount** | **Integer** | Sum of all product-specific discounts applied to the order. | +|**totalDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | +|**totalAmount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | +|**appliedDiscountAmount** | **Integer** | This field shows the order-level discount applied. | +|**itemsAppliedDiscountAmount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | +|**totalAppliedDiscountAmount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | +|**items** | [**List<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | +|**metadata** | **Object** | | +|**customerId** | **String** | Unique customer ID of the customer making the purchase. | +|**referrerId** | **String** | Unique referrer ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of the object represented by JSON. | +|**redemptions** | **Object** | | +|**customer** | **CustomerId** | | +|**referrer** | **ReferrerId** | | @@ -40,7 +40,6 @@ | PAID | "PAID" | | CANCELED | "CANCELED" | | FULFILLED | "FULFILLED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -49,7 +48,6 @@ | Name | Value | |---- | -----| | ORDER | "order" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTier.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTier.md index d0c2713f..08736093 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTier.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTier.md @@ -5,30 +5,30 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique promotion tier ID. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. | [optional] | -|**name** | **String** | Name of the promotion tier. | [optional] | -|**banner** | **String** | Text to be displayed to your customers on your website. | [optional] | -|**action** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierAction**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierAction.md) | | [optional] | -|**metadata** | **Object** | | [optional] | -|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional] | -|**promotionId** | **String** | Promotion unique ID. | [optional] | -|**campaign** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaign**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaign.md) | | [optional] | -|**campaignId** | **String** | Promotion tier's parent campaign's unique ID. | [optional] | -|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierValidityTimeframe**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | **List<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**summary** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummary**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummary.md) | | [optional] | -|**_object** | **String** | The type of the object represented by JSON. This object stores information about the promotion tier. | [optional] | -|**validationRuleAssignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | [optional] | -|**categoryId** | **String** | Promotion tier category ID. | [optional] | -|**categories** | [**List<Category>**](Category.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique promotion tier ID. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format. | +|**name** | **String** | Name of the promotion tier. | +|**banner** | **String** | Text to be displayed to your customers on your website. | +|**action** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierAction**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierAction.md) | | +|**metadata** | **Object** | | +|**hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | +|**promotionId** | **String** | Promotion unique ID. | +|**campaign** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaign**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaign.md) | | +|**campaignId** | **String** | Promotion tier's parent campaign's unique ID. | +|**active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | +|**validityTimeframe** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierValidityTimeframe**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierValidityTimeframe.md) | | +|**validityDayOfWeek** | **List<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**summary** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummary**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummary.md) | | +|**_object** | **String** | The type of the object represented by JSON. This object stores information about the promotion tier. | +|**validationRuleAssignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | +|**categoryId** | **String** | Promotion tier category ID. | +|**categories** | [**List<Category>**](Category.md) | | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierAction.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierAction.md index baf69109..95db323e 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierAction.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierAction.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**discount** | [**Discount**](Discount.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**discount** | [**Discount**](Discount.md) | | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaign.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaign.md index 44072a43..83539f5f 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaign.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaign.md @@ -5,17 +5,17 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique campaign ID. | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaignValidityTimeframe**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaignValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the `start_date` and `expiration_date` using the <!-- [Disable Campaign](OpenAPI.json/paths/~1campaigns~1{campaignId}~1disable) -->[Disable Campaign](ref:disable-campaign) endpoint. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] | -|**categoryId** | **String** | Unique category ID that this campaign belongs to. | [optional] | -|**_object** | **String** | The type of the object represented by the campaign object. This object stores information about the campaign. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique campaign ID. | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | +|**validityTimeframe** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaignValidityTimeframe**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaignValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the `start_date` and `expiration_date` using the <!-- [Disable Campaign](OpenAPI.json/paths/~1campaigns~1{campaignId}~1disable) -->[Disable Campaign](ref:disable-campaign) endpoint. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | +|**categoryId** | **String** | Unique category ID that this campaign belongs to. | +|**_object** | **String** | The type of the object represented by the campaign object. This object stores information about the campaign. | @@ -30,7 +30,6 @@ | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaignValidityTimeframe.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaignValidityTimeframe.md index e5f3e6a2..a3f05477 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaignValidityTimeframe.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaignValidityTimeframe.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | [optional] | -|**duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | +|**duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummary.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummary.md index 65d92bee..5f615fca 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummary.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummary.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**redemptions** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryRedemptions**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryRedemptions.md) | | [optional] | -|**orders** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryOrders**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryOrders.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**redemptions** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryRedemptions**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryRedemptions.md) | | +|**orders** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryOrders**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryOrders.md) | | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryOrders.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryOrders.md index 4fb91863..8e82c346 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryOrders.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryOrders.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**totalAmount** | **Integer** | Sum of order totals. | [optional] | -|**totalDiscountAmount** | **Integer** | Sum of total discount applied using the promotion tier. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**totalAmount** | **Integer** | Sum of order totals. | +|**totalDiscountAmount** | **Integer** | Sum of total discount applied using the promotion tier. | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryRedemptions.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryRedemptions.md index 7565c2bb..51a840a9 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryRedemptions.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierSummaryRedemptions.md @@ -5,9 +5,9 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**totalRedeemed** | **Integer** | Number of times the promotion tier was redeemed. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**totalRedeemed** | **Integer** | Number of times the promotion tier was redeemed. | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierValidityTimeframe.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierValidityTimeframe.md index 664e828f..fe47f5d9 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierValidityTimeframe.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierValidityTimeframe.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a promotion tier with an `interval` of `P2D` will be active every other day. | [optional] | -|**duration** | **String** | Defines the amount of time the promotion tier will be active in ISO 8601 format. For example, a promotion tier with a `duration` of `P1D` will be valid for a duration of one day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a promotion tier with an `interval` of `P2D` will be active every other day. | +|**duration** | **String** | Defines the amount of time the promotion tier will be active in ISO 8601 format. For example, a promotion tier with a `duration` of `P1D` will be valid for a duration of one day. | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptions.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptions.md index ad1f0a29..f28addf7 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptions.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptions.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**rollbacks** | [**List<VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRollbacksItem>**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRollbacksItem.md) | | [optional] | -|**redemptions** | [**List<VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRedemptionsItem>**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRedemptionsItem.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**rollbacks** | [**List<VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRollbacksItem>**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRollbacksItem.md) | | +|**redemptions** | [**List<VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRedemptionsItem>**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRedemptionsItem.md) | | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRedemptionsItem.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRedemptionsItem.md index ca7f8bd6..47db6a49 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRedemptionsItem.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRedemptionsItem.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique redemption ID. | [optional] | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique redemption ID. | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRollbacksItem.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRollbacksItem.md index 96594e77..5a7cf69a 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRollbacksItem.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemRelatedRedemptionsRollbacksItem.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | | +|**date** | **OffsetDateTime** | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucher.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucher.md index 6bf59864..a432fd7c 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucher.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucher.md @@ -5,38 +5,38 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] | -|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] | -|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] | -|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] | -|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] | -|**categoryId** | **String** | Unique category ID assigned by Voucherify. | [optional] | -|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | [optional] | -|**discount** | [**Discount**](Discount.md) | | [optional] | -|**gift** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherGift**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherGift.md) | | [optional] | -|**loyaltyCard** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherLoyaltyCard**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherLoyaltyCard.md) | | [optional] | -|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] | -|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] | -|**validityTimeframe** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherValidityTimeframe**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherValidityTimeframe.md) | | [optional] | -|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] | -|**validityHours** | [**ValidityHours**](ValidityHours.md) | | [optional] | -|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] | -|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] | -|**metadata** | **Object** | | [optional] | -|**assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] | -|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | [optional] | -|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] | -|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | [optional] | -|**referrerId** | **String** | Unique identifier of the referring person. | [optional] | -|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | [optional] | -|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] | -|**publish** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherPublish**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherPublish.md) | | [optional] | -|**redemption** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherRedemption**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherRedemption.md) | | [optional] | -|**holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Assigned by the Voucherify API, identifies the voucher. | +|**code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | +|**campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | +|**campaignId** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | +|**category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | +|**categoryId** | **String** | Unique category ID assigned by Voucherify. | +|**categories** | [**List<Category>**](Category.md) | Contains details about the category. | +|**type** | [**TypeEnum**](#TypeEnum) | Defines the type of the voucher. | +|**discount** | [**Discount**](Discount.md) | | +|**gift** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherGift**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherGift.md) | | +|**loyaltyCard** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherLoyaltyCard**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherLoyaltyCard.md) | | +|**startDate** | **OffsetDateTime** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | +|**expirationDate** | **OffsetDateTime** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | +|**validityTimeframe** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherValidityTimeframe**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherValidityTimeframe.md) | | +|**validityDayOfWeek** | [**List<ValidityDayOfWeekEnum>**](#List<ValidityDayOfWeekEnum>) | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | +|**validityHours** | [**ValidityHours**](ValidityHours.md) | | +|**active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | +|**additionalInfo** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | +|**metadata** | **Object** | | +|**assets** | [**VoucherAssets**](VoucherAssets.md) | | +|**isReferralCode** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format. | +|**updatedAt** | **OffsetDateTime** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | +|**holderId** | **String** | Unique identifier of the customer who owns the voucher. | +|**referrerId** | **String** | Unique identifier of the referring person. | +|**_object** | **String** | The type of the object represented by JSON. Default is `voucher`. | +|**validationRulesAssignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | +|**publish** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherPublish**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherPublish.md) | | +|**redemption** | [**VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherRedemption**](VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherRedemption.md) | | +|**holder** | [**SimpleCustomer**](SimpleCustomer.md) | | @@ -47,7 +47,6 @@ | GIFT_VOUCHER | "GIFT_VOUCHER" | | DISCOUNT_VOUCHER | "DISCOUNT_VOUCHER" | | LOYALTY_CARD | "LOYALTY_CARD" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -62,7 +61,6 @@ | NUMBER_4 | 4 | | NUMBER_5 | 5 | | NUMBER_6 | 6 | -| NUMBER_unknown_enum | 11184809 | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherGift.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherGift.md index 66262afa..57bdbeb5 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherGift.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherGift.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Integer** | Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] | -|**balance** | **Integer** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] | -|**effect** | [**EffectEnum**](#EffectEnum) | Defines how the credits are applied to the customer's order. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**amount** | **Integer** | Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | +|**balance** | **Integer** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | +|**effect** | [**EffectEnum**](#EffectEnum) | Defines how the credits are applied to the customer's order. | @@ -19,7 +19,6 @@ |---- | -----| | ORDER | "APPLY_TO_ORDER" | | ITEMS | "APPLY_TO_ITEMS" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherLoyaltyCard.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherLoyaltyCard.md index 6f7f6ea6..f91ee657 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherLoyaltyCard.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherLoyaltyCard.md @@ -5,12 +5,12 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**points** | **Integer** | Total points incurred over lifespan of loyalty card. | [optional] | -|**balance** | **Integer** | Points available for reward redemption. | [optional] | -|**nextExpirationDate** | **LocalDate** | The next closest date when the next set of points are due to expire. | [optional] | -|**nextExpirationPoints** | **Integer** | The amount of points that are set to expire next. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**points** | **Integer** | Total points incurred over lifespan of loyalty card. | +|**balance** | **Integer** | Points available for reward redemption. | +|**nextExpirationDate** | **LocalDate** | The next closest date when the next set of points are due to expire. | +|**nextExpirationPoints** | **Integer** | The amount of points that are set to expire next. | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherPublish.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherPublish.md index b0a57e06..67efc19a 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherPublish.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherPublish.md @@ -5,11 +5,11 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional] | -|**count** | **Integer** | Publication events counter. | [optional] | -|**url** | **String** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | +|**count** | **Integer** | Publication events counter. | +|**url** | **String** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherRedemption.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherRedemption.md index bafb0f16..aa71e885 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherRedemption.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherRedemption.md @@ -5,13 +5,13 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | [optional] | -|**redeemedQuantity** | **Integer** | How many times a voucher has already been redeemed. | [optional] | -|**redeemedPoints** | **Integer** | Total loyalty points redeemed. | [optional] | -|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional] | -|**url** | **String** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | +|**redeemedQuantity** | **Integer** | How many times a voucher has already been redeemed. | +|**redeemedPoints** | **Integer** | Total loyalty points redeemed. | +|**_object** | **String** | The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | +|**url** | **String** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherValidityTimeframe.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherValidityTimeframe.md index 9ffa9a8f..eac5e59c 100644 --- a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherValidityTimeframe.md +++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherValidityTimeframe.md @@ -5,10 +5,10 @@ ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**duration** | **String** | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a `duration` of `PT1H` will be valid for a duration of one hour. | [optional] | -|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an `interval` of `P2D` will be active every other day. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**duration** | **String** | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a `duration` of `PT1H` will be valid for a duration of one hour. | +|**interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an `interval` of `P2D` will be active every other day. | diff --git a/docs/VouchersTransactionsExportCreateRequestBody.md b/docs/VouchersTransactionsExportCreateRequestBody.md index 968e420a..fe5fd9c1 100644 --- a/docs/VouchersTransactionsExportCreateRequestBody.md +++ b/docs/VouchersTransactionsExportCreateRequestBody.md @@ -6,9 +6,9 @@ Request body schema for **POST** `/vouchers/transactions/export`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**parameters** | [**VoucherTransactionsExportParameters**](VoucherTransactionsExportParameters.md) | | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**parameters** | [**VoucherTransactionsExportParameters**](VoucherTransactionsExportParameters.md) | | diff --git a/docs/VouchersTransactionsExportCreateResponseBody.md b/docs/VouchersTransactionsExportCreateResponseBody.md index c4a2c86e..bbd2ef29 100644 --- a/docs/VouchersTransactionsExportCreateResponseBody.md +++ b/docs/VouchersTransactionsExportCreateResponseBody.md @@ -6,17 +6,17 @@ Response body schema for **POST** `/vouchers/{code}/transactions/export`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique export ID. | | -|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the `export`. | | -|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | | -|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | | -|**channel** | **String** | The channel through which the export was triggered. | | -|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | The type of exported object. | | -|**parameters** | [**VoucherTransactionsFilters**](VoucherTransactionsFilters.md) | | | -|**result** | [**VoucherTransactionsExportResult**](VoucherTransactionsExportResult.md) | | [optional] | -|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the `channel` value is `WEBSITE`. | [optional] | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**id** | **String** | Unique export ID. | +|**_object** | [**ObjectEnum**](#ObjectEnum) | The type of object being represented. This object stores information about the `export`. | +|**createdAt** | **OffsetDateTime** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | +|**status** | [**StatusEnum**](#StatusEnum) | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | +|**channel** | **String** | The channel through which the export was triggered. | +|**exportedObject** | [**ExportedObjectEnum**](#ExportedObjectEnum) | The type of exported object. | +|**parameters** | [**VoucherTransactionsFilters**](VoucherTransactionsFilters.md) | | +|**result** | [**VoucherTransactionsExportResult**](VoucherTransactionsExportResult.md) | | +|**userId** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the `channel` value is `WEBSITE`. | @@ -25,7 +25,6 @@ Response body schema for **POST** `/vouchers/{code}/transactions/export`. | Name | Value | |---- | -----| | EXPORT | "export" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -34,7 +33,6 @@ Response body schema for **POST** `/vouchers/{code}/transactions/export`. | Name | Value | |---- | -----| | SCHEDULED | "SCHEDULED" | -| UNKNOWN_ENUM | "unknown_enum" | @@ -43,7 +41,6 @@ Response body schema for **POST** `/vouchers/{code}/transactions/export`. | Name | Value | |---- | -----| | VOUCHER_TRANSACTIONS | "voucher_transactions" | -| UNKNOWN_ENUM | "unknown_enum" | diff --git a/docs/VouchersTransactionsListResponseBody.md b/docs/VouchersTransactionsListResponseBody.md index 8e4a255d..5790bd60 100644 --- a/docs/VouchersTransactionsListResponseBody.md +++ b/docs/VouchersTransactionsListResponseBody.md @@ -6,12 +6,12 @@ Response body schema for **GET** `/vouchers/{code}/transactions`. ## Properties -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_object** | **String** | The type of the object represented by JSON. | | -|**dataRef** | **String** | Identifies the name of the attribute that contains the array of transaction objects. | | -|**data** | [**List<VoucherTransaction>**](VoucherTransaction.md) | A dictionary that contains an array of transactions. Each entry in the array is a separate transaction object. | | -|**hasMore** | **Boolean** | 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 (with a different page or a different start date filter) to get more records returned in the results. | | +| Name | Type | Description | +|------------ | ------------- | ------------- | +|**_object** | **String** | The type of the object represented by JSON. | +|**dataRef** | **String** | Identifies the name of the attribute that contains the array of transaction objects. | +|**data** | [**List<VoucherTransaction>**](VoucherTransaction.md) | A dictionary that contains an array of transactions. Each entry in the array is a separate transaction object. | +|**hasMore** | **Boolean** | 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 (with a different page or a different start date filter) to get more records returned in the results. | diff --git a/src/main/java/voucherify/client/model/ApplicableTo.java b/src/main/java/voucherify/client/model/ApplicableTo.java index c0228567..abb155d7 100644 --- a/src/main/java/voucherify/client/model/ApplicableTo.java +++ b/src/main/java/voucherify/client/model/ApplicableTo.java @@ -65,9 +65,7 @@ public enum ObjectEnum { SKU("sku"), - PRODUCTS_COLLECTION("products_collection"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCTS_COLLECTION("products_collection"); private String value; @@ -90,7 +88,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -176,7 +174,7 @@ public ApplicableTo _object(ObjectEnum _object) { * This object stores information about the product collection. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -197,7 +195,7 @@ public ApplicableTo id(String id) { * Unique product collection ID assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -281,7 +279,7 @@ public ApplicableTo strict(Boolean strict) { * Get strict * @return strict **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getStrict() { return strict; } @@ -344,7 +342,7 @@ public ApplicableTo effect(ApplicableToEffect effect) { * Get effect * @return effect **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ApplicableToEffect getEffect() { return effect; } @@ -602,10 +600,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("strict"); - openapiRequiredFields.add("effect"); } /** @@ -620,15 +614,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicableTo is not found in the empty JSON string", ApplicableTo.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ApplicableTo.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -644,7 +631,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/ApplicableToEffect.java b/src/main/java/voucherify/client/model/ApplicableToEffect.java index 3e93321f..5b64ecdb 100644 --- a/src/main/java/voucherify/client/model/ApplicableToEffect.java +++ b/src/main/java/voucherify/client/model/ApplicableToEffect.java @@ -32,9 +32,7 @@ public enum ApplicableToEffect { CHEAPEST("APPLY_TO_CHEAPEST"), - MOST_EXPENSIVE("APPLY_TO_MOST_EXPENSIVE"), - - UNKNOWN_ENUM("unknown_enum"); + MOST_EXPENSIVE("APPLY_TO_MOST_EXPENSIVE"); private String value; @@ -57,7 +55,7 @@ public static ApplicableToEffect fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ApplicableToResultList.java b/src/main/java/voucherify/client/model/ApplicableToResultList.java index 621a267a..9bbca91f 100644 --- a/src/main/java/voucherify/client/model/ApplicableToResultList.java +++ b/src/main/java/voucherify/client/model/ApplicableToResultList.java @@ -57,7 +57,7 @@ public class ApplicableToResultList { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -68,9 +68,7 @@ public class ApplicableToResultList { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -93,7 +91,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -119,9 +117,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - DATA("data"), - - UNKNOWN_ENUM("unknown_enum"); + DATA("data"); private String value; @@ -144,7 +140,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -186,7 +182,7 @@ public ApplicableToResultList addDataItem(ApplicableTo dataItem) { * Contains array of items to which the discount can apply. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -208,7 +204,7 @@ public ApplicableToResultList total(Integer total) { * minimum: 0 * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -229,7 +225,7 @@ public ApplicableToResultList _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -250,7 +246,7 @@ public ApplicableToResultList dataRef(DataRefEnum dataRef) { * The type of the object represented by JSON. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -365,10 +361,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); } /** @@ -383,25 +375,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicableToResultList is not found in the empty JSON string", ApplicableToResultList.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ApplicableToResultList.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ApplicableTo.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ApplicableTo.validateJsonElement(jsonArraydata.get(i)); - }; - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -417,7 +406,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { diff --git a/src/main/java/voucherify/client/model/AsyncActions.java b/src/main/java/voucherify/client/model/AsyncActions.java index 49ce0dcf..fc3ebefb 100644 --- a/src/main/java/voucherify/client/model/AsyncActions.java +++ b/src/main/java/voucherify/client/model/AsyncActions.java @@ -69,7 +69,7 @@ public AsyncActions asyncActionId(String asyncActionId) { * The ID of the scheduled asynchronous action. * @return asyncActionId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAsyncActionId() { return asyncActionId; } @@ -129,7 +129,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("async_action_id"); } /** @@ -152,15 +151,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AsyncActions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AsyncActions.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("async_action_id").isJsonPrimitive()) { + if ((jsonObj.get("async_action_id") != null && !jsonObj.get("async_action_id").isJsonNull()) && !jsonObj.get("async_action_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `async_action_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_action_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/BusValRuleAssignment.java b/src/main/java/voucherify/client/model/BusValRuleAssignment.java index b6137e6c..40ddf1fe 100644 --- a/src/main/java/voucherify/client/model/BusValRuleAssignment.java +++ b/src/main/java/voucherify/client/model/BusValRuleAssignment.java @@ -84,9 +84,7 @@ public class BusValRuleAssignment { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - VALIDATION_RULES_ASSIGNMENT("validation_rules_assignment"), - - UNKNOWN_ENUM("unknown_enum"); + VALIDATION_RULES_ASSIGNMENT("validation_rules_assignment"); private String value; @@ -109,7 +107,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -139,9 +137,7 @@ public enum ValidationStatusEnum { PARTIALLY_VALID("PARTIALLY_VALID"), - INVALID("INVALID"), - - UNKNOWN_ENUM("unknown_enum"); + INVALID("INVALID"); private String value; @@ -164,7 +160,7 @@ public static ValidationStatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -202,7 +198,7 @@ public BusValRuleAssignment id(String id) { * The unique identifier for a assignment * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -223,7 +219,7 @@ public BusValRuleAssignment ruleId(String ruleId) { * The unique identifier for a rule * @return ruleId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRuleId() { return ruleId; } @@ -244,7 +240,7 @@ public BusValRuleAssignment relatedObjectId(String relatedObjectId) { * The unique identifier for a related object * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -265,7 +261,7 @@ public BusValRuleAssignment relatedObjectType(String relatedObjectType) { * The type of related object * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectType() { return relatedObjectType; } @@ -328,7 +324,7 @@ public BusValRuleAssignment _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -508,11 +504,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("rule_id"); - openapiRequiredFields.add("related_object_id"); - openapiRequiredFields.add("related_object_type"); - openapiRequiredFields.add("object"); } /** @@ -527,27 +518,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in BusValRuleAssignment is not found in the empty JSON string", BusValRuleAssignment.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BusValRuleAssignment.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("rule_id").isJsonPrimitive()) { + if ((jsonObj.get("rule_id") != null && !jsonObj.get("rule_id").isJsonNull()) && !jsonObj.get("rule_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `rule_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rule_id").toString())); } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/Campaign.java b/src/main/java/voucherify/client/model/Campaign.java index d861ed13..685c8048 100644 --- a/src/main/java/voucherify/client/model/Campaign.java +++ b/src/main/java/voucherify/client/model/Campaign.java @@ -91,9 +91,7 @@ public enum CampaignTypeEnum { REFERRAL_PROGRAM("REFERRAL_PROGRAM"), - LUCKY_DRAW("LUCKY_DRAW"), - - UNKNOWN_ENUM("unknown_enum"); + LUCKY_DRAW("LUCKY_DRAW"); private String value; @@ -116,7 +114,7 @@ public static CampaignTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -144,9 +142,7 @@ public CampaignTypeEnum read(final JsonReader jsonReader) throws IOException { public enum TypeEnum { AUTO_UPDATE("AUTO_UPDATE"), - STATIC("STATIC"), - - UNKNOWN_ENUM("unknown_enum"); + STATIC("STATIC"); private String value; @@ -169,7 +165,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -227,9 +223,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -252,7 +246,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -326,9 +320,7 @@ public enum CreationStatusEnum { DRAFT("DRAFT"), - MODIFYING("MODIFYING"), - - UNKNOWN_ENUM("unknown_enum"); + MODIFYING("MODIFYING"); private String value; @@ -351,7 +343,7 @@ public static CreationStatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -385,9 +377,7 @@ public enum VouchersGenerationStatusEnum { DRAFT("DRAFT"), - MODIFYING("MODIFYING"), - - UNKNOWN_ENUM("unknown_enum"); + MODIFYING("MODIFYING"); private String value; @@ -410,7 +400,7 @@ public static VouchersGenerationStatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -441,7 +431,7 @@ public VouchersGenerationStatusEnum read(final JsonReader jsonReader) throws IOE public static final String SERIALIZED_NAME_CATEGORIES = "categories"; @SerializedName(SERIALIZED_NAME_CATEGORIES) - private List categories = new ArrayList<>(); + private List categories; public static final String SERIALIZED_NAME_OBJECT = "object"; @SerializedName(SERIALIZED_NAME_OBJECT) @@ -476,7 +466,7 @@ public Campaign id(String id) { * Unique campaign ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -497,7 +487,7 @@ public Campaign name(String name) { * Campaign name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -539,7 +529,7 @@ public Campaign campaignType(CampaignTypeEnum campaignType) { * Type of campaign. * @return campaignType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CampaignTypeEnum getCampaignType() { return campaignType; } @@ -560,7 +550,7 @@ public Campaign type(TypeEnum type) { * Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -602,7 +592,7 @@ public Campaign autoJoin(Boolean autoJoin) { * Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. * @return autoJoin **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getAutoJoin() { return autoJoin; } @@ -623,7 +613,7 @@ public Campaign joinOnce(Boolean joinOnce) { * If this value is set to `true`, customers will be able to join the campaign only once. * @return joinOnce **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getJoinOnce() { return joinOnce; } @@ -644,7 +634,7 @@ public Campaign useVoucherMetadataSchema(Boolean useVoucherMetadataSchema) { * Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. * @return useVoucherMetadataSchema **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getUseVoucherMetadataSchema() { return useVoucherMetadataSchema; } @@ -862,7 +852,7 @@ public Campaign createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -925,7 +915,7 @@ public Campaign creationStatus(CreationStatusEnum creationStatus) { * Indicates the status of the campaign creation. * @return creationStatus **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CreationStatusEnum getCreationStatus() { return creationStatus; } @@ -946,7 +936,7 @@ public Campaign vouchersGenerationStatus(VouchersGenerationStatusEnum vouchersGe * Indicates the status of the campaign's voucher generation. * @return vouchersGenerationStatus **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VouchersGenerationStatusEnum getVouchersGenerationStatus() { return vouchersGenerationStatus; } @@ -967,7 +957,7 @@ public Campaign _protected(Boolean _protected) { * Indicates whether the resource can be deleted. * @return _protected **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getProtected() { return _protected; } @@ -1017,7 +1007,7 @@ public Campaign addCategoriesItem(Category categoriesItem) { * Contains details about the category. * @return categories **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getCategories() { return categories; } @@ -1038,7 +1028,7 @@ public Campaign _object(String _object) { * The type of the object represented by JSON. This object stores information about the campaign. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -1329,19 +1319,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("campaign_type"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("auto_join"); - openapiRequiredFields.add("join_once"); - openapiRequiredFields.add("use_voucher_metadata_schema"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("creation_status"); - openapiRequiredFields.add("vouchers_generation_status"); - openapiRequiredFields.add("protected"); - openapiRequiredFields.add("categories"); - openapiRequiredFields.add("object"); } /** @@ -1356,24 +1333,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in Campaign is not found in the empty JSON string", Campaign.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Campaign.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - if (!jsonObj.get("campaign_type").isJsonPrimitive()) { + if ((jsonObj.get("campaign_type") != null && !jsonObj.get("campaign_type").isJsonNull()) && !jsonObj.get("campaign_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign_type").toString())); } try { @@ -1389,7 +1359,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `campaign_type` to be a valid element of CampaignTypeEnum enum got `%s` instead", jsonObj.get("campaign_type").toString())); } } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -1427,7 +1397,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) && !jsonObj.get("category").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); } - if (!jsonObj.get("creation_status").isJsonPrimitive()) { + if ((jsonObj.get("creation_status") != null && !jsonObj.get("creation_status").isJsonNull()) && !jsonObj.get("creation_status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `creation_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creation_status").toString())); } try { @@ -1443,7 +1413,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `creation_status` to be a valid element of CreationStatusEnum enum got `%s` instead", jsonObj.get("creation_status").toString())); } } - if (!jsonObj.get("vouchers_generation_status").isJsonPrimitive()) { + if ((jsonObj.get("vouchers_generation_status") != null && !jsonObj.get("vouchers_generation_status").isJsonNull()) && !jsonObj.get("vouchers_generation_status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `vouchers_generation_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vouchers_generation_status").toString())); } try { @@ -1462,17 +1432,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("category_id") != null && !jsonObj.get("category_id").isJsonNull()) && !jsonObj.get("category_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category_id").toString())); } - // ensure the json data is an array - if (!jsonObj.get("categories").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull()) { + JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); + if (jsonArraycategories != null) { + // ensure the json data is an array + if (!jsonObj.get("categories").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + } + + // validate the optional field `categories` (array) + for (int i = 0; i < jsonArraycategories.size(); i++) { + Category.validateJsonElement(jsonArraycategories.get(i)); + }; + } } - - JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); - // validate the required field `categories` (array) - for (int i = 0; i < jsonArraycategories.size(); i++) { - Category.validateJsonElement(jsonArraycategories.get(i)); - }; - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } // validate the optional field `referral_program` diff --git a/src/main/java/voucherify/client/model/CampaignBase.java b/src/main/java/voucherify/client/model/CampaignBase.java index a676c24c..f4ef9669 100644 --- a/src/main/java/voucherify/client/model/CampaignBase.java +++ b/src/main/java/voucherify/client/model/CampaignBase.java @@ -89,9 +89,7 @@ public enum CampaignTypeEnum { REFERRAL_PROGRAM("REFERRAL_PROGRAM"), - LUCKY_DRAW("LUCKY_DRAW"), - - UNKNOWN_ENUM("unknown_enum"); + LUCKY_DRAW("LUCKY_DRAW"); private String value; @@ -114,7 +112,7 @@ public static CampaignTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -142,9 +140,7 @@ public CampaignTypeEnum read(final JsonReader jsonReader) throws IOException { public enum TypeEnum { AUTO_UPDATE("AUTO_UPDATE"), - STATIC("STATIC"), - - UNKNOWN_ENUM("unknown_enum"); + STATIC("STATIC"); private String value; @@ -167,7 +163,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -225,9 +221,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -250,7 +244,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -324,9 +318,7 @@ public enum CreationStatusEnum { DRAFT("DRAFT"), - MODIFYING("MODIFYING"), - - UNKNOWN_ENUM("unknown_enum"); + MODIFYING("MODIFYING"); private String value; @@ -349,7 +341,7 @@ public static CreationStatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -383,9 +375,7 @@ public enum VouchersGenerationStatusEnum { DRAFT("DRAFT"), - MODIFYING("MODIFYING"), - - UNKNOWN_ENUM("unknown_enum"); + MODIFYING("MODIFYING"); private String value; @@ -408,7 +398,7 @@ public static VouchersGenerationStatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -439,7 +429,7 @@ public VouchersGenerationStatusEnum read(final JsonReader jsonReader) throws IOE public static final String SERIALIZED_NAME_CATEGORIES = "categories"; @SerializedName(SERIALIZED_NAME_CATEGORIES) - private List categories = new ArrayList<>(); + private List categories; public static final String SERIALIZED_NAME_OBJECT = "object"; @SerializedName(SERIALIZED_NAME_OBJECT) @@ -466,7 +456,7 @@ public CampaignBase id(String id) { * Unique campaign ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -487,7 +477,7 @@ public CampaignBase name(String name) { * Campaign name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -529,7 +519,7 @@ public CampaignBase campaignType(CampaignTypeEnum campaignType) { * Type of campaign. * @return campaignType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CampaignTypeEnum getCampaignType() { return campaignType; } @@ -550,7 +540,7 @@ public CampaignBase type(TypeEnum type) { * Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -592,7 +582,7 @@ public CampaignBase autoJoin(Boolean autoJoin) { * Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. * @return autoJoin **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getAutoJoin() { return autoJoin; } @@ -613,7 +603,7 @@ public CampaignBase joinOnce(Boolean joinOnce) { * If this value is set to `true`, customers will be able to join the campaign only once. * @return joinOnce **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getJoinOnce() { return joinOnce; } @@ -634,7 +624,7 @@ public CampaignBase useVoucherMetadataSchema(Boolean useVoucherMetadataSchema) { * Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. * @return useVoucherMetadataSchema **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getUseVoucherMetadataSchema() { return useVoucherMetadataSchema; } @@ -852,7 +842,7 @@ public CampaignBase createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -915,7 +905,7 @@ public CampaignBase creationStatus(CreationStatusEnum creationStatus) { * Indicates the status of the campaign creation. * @return creationStatus **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CreationStatusEnum getCreationStatus() { return creationStatus; } @@ -936,7 +926,7 @@ public CampaignBase vouchersGenerationStatus(VouchersGenerationStatusEnum vouche * Indicates the status of the campaign's voucher generation. * @return vouchersGenerationStatus **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VouchersGenerationStatusEnum getVouchersGenerationStatus() { return vouchersGenerationStatus; } @@ -957,7 +947,7 @@ public CampaignBase _protected(Boolean _protected) { * Indicates whether the resource can be deleted. * @return _protected **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getProtected() { return _protected; } @@ -1007,7 +997,7 @@ public CampaignBase addCategoriesItem(Category categoriesItem) { * Contains details about the category. * @return categories **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getCategories() { return categories; } @@ -1028,7 +1018,7 @@ public CampaignBase _object(String _object) { * The type of the object represented by JSON. This object stores information about the campaign. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -1271,19 +1261,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("campaign_type"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("auto_join"); - openapiRequiredFields.add("join_once"); - openapiRequiredFields.add("use_voucher_metadata_schema"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("creation_status"); - openapiRequiredFields.add("vouchers_generation_status"); - openapiRequiredFields.add("protected"); - openapiRequiredFields.add("categories"); - openapiRequiredFields.add("object"); } /** @@ -1298,24 +1275,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignBase is not found in the empty JSON string", CampaignBase.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CampaignBase.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - if (!jsonObj.get("campaign_type").isJsonPrimitive()) { + if ((jsonObj.get("campaign_type") != null && !jsonObj.get("campaign_type").isJsonNull()) && !jsonObj.get("campaign_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign_type").toString())); } try { @@ -1331,7 +1301,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `campaign_type` to be a valid element of CampaignTypeEnum enum got `%s` instead", jsonObj.get("campaign_type").toString())); } } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -1369,7 +1339,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) && !jsonObj.get("category").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); } - if (!jsonObj.get("creation_status").isJsonPrimitive()) { + if ((jsonObj.get("creation_status") != null && !jsonObj.get("creation_status").isJsonNull()) && !jsonObj.get("creation_status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `creation_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creation_status").toString())); } try { @@ -1385,7 +1355,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `creation_status` to be a valid element of CreationStatusEnum enum got `%s` instead", jsonObj.get("creation_status").toString())); } } - if (!jsonObj.get("vouchers_generation_status").isJsonPrimitive()) { + if ((jsonObj.get("vouchers_generation_status") != null && !jsonObj.get("vouchers_generation_status").isJsonNull()) && !jsonObj.get("vouchers_generation_status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `vouchers_generation_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vouchers_generation_status").toString())); } try { @@ -1404,17 +1374,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("category_id") != null && !jsonObj.get("category_id").isJsonNull()) && !jsonObj.get("category_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category_id").toString())); } - // ensure the json data is an array - if (!jsonObj.get("categories").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull()) { + JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); + if (jsonArraycategories != null) { + // ensure the json data is an array + if (!jsonObj.get("categories").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + } + + // validate the optional field `categories` (array) + for (int i = 0; i < jsonArraycategories.size(); i++) { + Category.validateJsonElement(jsonArraycategories.get(i)); + }; + } } - - JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); - // validate the required field `categories` (array) - for (int i = 0; i < jsonArraycategories.size(); i++) { - Category.validateJsonElement(jsonArraycategories.get(i)); - }; - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } // validate the optional field `referral_program` diff --git a/src/main/java/voucherify/client/model/CampaignLoyaltyCard.java b/src/main/java/voucherify/client/model/CampaignLoyaltyCard.java index ad3eb3ca..b17a4755 100644 --- a/src/main/java/voucherify/client/model/CampaignLoyaltyCard.java +++ b/src/main/java/voucherify/client/model/CampaignLoyaltyCard.java @@ -74,7 +74,7 @@ public CampaignLoyaltyCard points(Integer points) { * The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card. * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPoints() { return points; } @@ -204,7 +204,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("points"); } /** @@ -219,13 +218,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignLoyaltyCard is not found in the empty JSON string", CampaignLoyaltyCard.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CampaignLoyaltyCard.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `expiration_rules` if (jsonObj.get("expiration_rules") != null && !jsonObj.get("expiration_rules").isJsonNull()) { diff --git a/src/main/java/voucherify/client/model/CampaignLoyaltyCardExpirationRules.java b/src/main/java/voucherify/client/model/CampaignLoyaltyCardExpirationRules.java index 2fdd2950..73dcbdde 100644 --- a/src/main/java/voucherify/client/model/CampaignLoyaltyCardExpirationRules.java +++ b/src/main/java/voucherify/client/model/CampaignLoyaltyCardExpirationRules.java @@ -81,7 +81,7 @@ public CampaignLoyaltyCardExpirationRules periodType(String periodType) { * Type of period * @return periodType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getPeriodType() { return periodType; } @@ -102,7 +102,7 @@ public CampaignLoyaltyCardExpirationRules periodValue(Integer periodValue) { * Value of the period * @return periodValue **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPeriodValue() { return periodValue; } @@ -123,7 +123,7 @@ public CampaignLoyaltyCardExpirationRules roundingType(String roundingType) { * Type of rounding * @return roundingType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRoundingType() { return roundingType; } @@ -144,7 +144,7 @@ public CampaignLoyaltyCardExpirationRules roundingValue(Integer roundingValue) { * Value of rounding * @return roundingValue **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getRoundingValue() { return roundingValue; } @@ -259,10 +259,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("period_type"); - openapiRequiredFields.add("period_value"); - openapiRequiredFields.add("rounding_type"); - openapiRequiredFields.add("rounding_value"); } /** @@ -277,18 +273,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignLoyaltyCardExpirationRules is not found in the empty JSON string", CampaignLoyaltyCardExpirationRules.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CampaignLoyaltyCardExpirationRules.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("period_type").isJsonPrimitive()) { + if ((jsonObj.get("period_type") != null && !jsonObj.get("period_type").isJsonNull()) && !jsonObj.get("period_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `period_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("period_type").toString())); } - if (!jsonObj.get("rounding_type").isJsonPrimitive()) { + if ((jsonObj.get("rounding_type") != null && !jsonObj.get("rounding_type").isJsonNull()) && !jsonObj.get("rounding_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `rounding_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rounding_type").toString())); } } diff --git a/src/main/java/voucherify/client/model/CampaignVoucher.java b/src/main/java/voucherify/client/model/CampaignVoucher.java index 5de5addb..4f21b5b0 100644 --- a/src/main/java/voucherify/client/model/CampaignVoucher.java +++ b/src/main/java/voucherify/client/model/CampaignVoucher.java @@ -119,9 +119,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -144,7 +142,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -182,7 +180,7 @@ public CampaignVoucher type(String type) { * Type of voucher. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getType() { return type; } @@ -266,7 +264,7 @@ public CampaignVoucher redemption(CampaignVoucherRedemption redemption) { * Get redemption * @return redemption **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CampaignVoucherRedemption getRedemption() { return redemption; } @@ -287,7 +285,7 @@ public CampaignVoucher codeConfig(CodeConfigRequiredLengthCharsetPattern codeCon * Get codeConfig * @return codeConfig **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CodeConfigRequiredLengthCharsetPattern getCodeConfig() { return codeConfig; } @@ -308,7 +306,7 @@ public CampaignVoucher isReferralCode(Boolean isReferralCode) { * Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. * @return isReferralCode **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getIsReferralCode() { return isReferralCode; } @@ -560,10 +558,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("redemption"); - openapiRequiredFields.add("code_config"); - openapiRequiredFields.add("is_referral_code"); } /** @@ -578,15 +572,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignVoucher is not found in the empty JSON string", CampaignVoucher.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CampaignVoucher.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } // validate the optional field `discount` @@ -601,10 +588,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("loyalty_card") != null && !jsonObj.get("loyalty_card").isJsonNull()) { CampaignLoyaltyCard.validateJsonElement(jsonObj.get("loyalty_card")); } - // validate the required field `redemption` - CampaignVoucherRedemption.validateJsonElement(jsonObj.get("redemption")); - // validate the required field `code_config` - CodeConfigRequiredLengthCharsetPattern.validateJsonElement(jsonObj.get("code_config")); + // validate the optional field `redemption` + if (jsonObj.get("redemption") != null && !jsonObj.get("redemption").isJsonNull()) { + CampaignVoucherRedemption.validateJsonElement(jsonObj.get("redemption")); + } + // validate the optional field `code_config` + if (jsonObj.get("code_config") != null && !jsonObj.get("code_config").isJsonNull()) { + CodeConfigRequiredLengthCharsetPattern.validateJsonElement(jsonObj.get("code_config")); + } // validate the optional field `validity_timeframe` if (jsonObj.get("validity_timeframe") != null && !jsonObj.get("validity_timeframe").isJsonNull()) { CampaignBaseValidityTimeframe.validateJsonElement(jsonObj.get("validity_timeframe")); diff --git a/src/main/java/voucherify/client/model/CampaignsCreateRequestBody.java b/src/main/java/voucherify/client/model/CampaignsCreateRequestBody.java index 3a6a9a1d..48a77a58 100644 --- a/src/main/java/voucherify/client/model/CampaignsCreateRequestBody.java +++ b/src/main/java/voucherify/client/model/CampaignsCreateRequestBody.java @@ -76,9 +76,7 @@ public class CampaignsCreateRequestBody { public enum TypeEnum { AUTO_UPDATE("AUTO_UPDATE"), - STATIC("STATIC"), - - UNKNOWN_ENUM("unknown_enum"); + STATIC("STATIC"); private String value; @@ -101,7 +99,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -167,9 +165,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -192,7 +188,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -252,9 +248,7 @@ public enum CampaignTypeEnum { PROMOTION("PROMOTION"), - LUCKY_DRAW("LUCKY_DRAW"), - - UNKNOWN_ENUM("unknown_enum"); + LUCKY_DRAW("LUCKY_DRAW"); private String value; @@ -277,7 +271,7 @@ public static CampaignTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/CampaignsCreateRequestBodyVoucher.java b/src/main/java/voucherify/client/model/CampaignsCreateRequestBodyVoucher.java index f1d45579..68844823 100644 --- a/src/main/java/voucherify/client/model/CampaignsCreateRequestBodyVoucher.java +++ b/src/main/java/voucherify/client/model/CampaignsCreateRequestBodyVoucher.java @@ -66,9 +66,7 @@ public enum TypeEnum { GIFT_VOUCHER("GIFT_VOUCHER"), - LOYALTY_CARD("LOYALTY_CARD"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("LOYALTY_CARD"); private String value; @@ -91,7 +89,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -149,7 +147,7 @@ public CampaignsCreateRequestBodyVoucher type(TypeEnum type) { * Get type * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -399,7 +397,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); } /** @@ -414,15 +411,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignsCreateRequestBodyVoucher is not found in the empty JSON string", CampaignsCreateRequestBodyVoucher.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CampaignsCreateRequestBodyVoucher.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { diff --git a/src/main/java/voucherify/client/model/CampaignsCreateResponseBody.java b/src/main/java/voucherify/client/model/CampaignsCreateResponseBody.java index c5fccf37..2365c05c 100644 --- a/src/main/java/voucherify/client/model/CampaignsCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/CampaignsCreateResponseBody.java @@ -91,9 +91,7 @@ public enum CampaignTypeEnum { REFERRAL_PROGRAM("REFERRAL_PROGRAM"), - LUCKY_DRAW("LUCKY_DRAW"), - - UNKNOWN_ENUM("unknown_enum"); + LUCKY_DRAW("LUCKY_DRAW"); private String value; @@ -116,7 +114,7 @@ public static CampaignTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -144,9 +142,7 @@ public CampaignTypeEnum read(final JsonReader jsonReader) throws IOException { public enum TypeEnum { AUTO_UPDATE("AUTO_UPDATE"), - STATIC("STATIC"), - - UNKNOWN_ENUM("unknown_enum"); + STATIC("STATIC"); private String value; @@ -169,7 +165,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -227,9 +223,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -252,7 +246,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -326,9 +320,7 @@ public enum CreationStatusEnum { DRAFT("DRAFT"), - MODIFYING("MODIFYING"), - - UNKNOWN_ENUM("unknown_enum"); + MODIFYING("MODIFYING"); private String value; @@ -351,7 +343,7 @@ public static CreationStatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -385,9 +377,7 @@ public enum VouchersGenerationStatusEnum { DRAFT("DRAFT"), - MODIFYING("MODIFYING"), - - UNKNOWN_ENUM("unknown_enum"); + MODIFYING("MODIFYING"); private String value; @@ -410,7 +400,7 @@ public static VouchersGenerationStatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -441,7 +431,7 @@ public VouchersGenerationStatusEnum read(final JsonReader jsonReader) throws IOE public static final String SERIALIZED_NAME_CATEGORIES = "categories"; @SerializedName(SERIALIZED_NAME_CATEGORIES) - private List categories = new ArrayList<>(); + private List categories; public static final String SERIALIZED_NAME_OBJECT = "object"; @SerializedName(SERIALIZED_NAME_OBJECT) @@ -476,7 +466,7 @@ public CampaignsCreateResponseBody id(String id) { * Unique campaign ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -497,7 +487,7 @@ public CampaignsCreateResponseBody name(String name) { * Campaign name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -539,7 +529,7 @@ public CampaignsCreateResponseBody campaignType(CampaignTypeEnum campaignType) { * Type of campaign. * @return campaignType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CampaignTypeEnum getCampaignType() { return campaignType; } @@ -560,7 +550,7 @@ public CampaignsCreateResponseBody type(TypeEnum type) { * Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -602,7 +592,7 @@ public CampaignsCreateResponseBody autoJoin(Boolean autoJoin) { * Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. * @return autoJoin **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getAutoJoin() { return autoJoin; } @@ -623,7 +613,7 @@ public CampaignsCreateResponseBody joinOnce(Boolean joinOnce) { * If this value is set to `true`, customers will be able to join the campaign only once. * @return joinOnce **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getJoinOnce() { return joinOnce; } @@ -644,7 +634,7 @@ public CampaignsCreateResponseBody useVoucherMetadataSchema(Boolean useVoucherMe * Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. * @return useVoucherMetadataSchema **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getUseVoucherMetadataSchema() { return useVoucherMetadataSchema; } @@ -862,7 +852,7 @@ public CampaignsCreateResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -925,7 +915,7 @@ public CampaignsCreateResponseBody creationStatus(CreationStatusEnum creationSta * Indicates the status of the campaign creation. * @return creationStatus **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CreationStatusEnum getCreationStatus() { return creationStatus; } @@ -946,7 +936,7 @@ public CampaignsCreateResponseBody vouchersGenerationStatus(VouchersGenerationSt * Indicates the status of the campaign's voucher generation. * @return vouchersGenerationStatus **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VouchersGenerationStatusEnum getVouchersGenerationStatus() { return vouchersGenerationStatus; } @@ -967,7 +957,7 @@ public CampaignsCreateResponseBody _protected(Boolean _protected) { * Indicates whether the resource can be deleted. * @return _protected **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getProtected() { return _protected; } @@ -1017,7 +1007,7 @@ public CampaignsCreateResponseBody addCategoriesItem(Category categoriesItem) { * Contains details about the category. * @return categories **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getCategories() { return categories; } @@ -1038,7 +1028,7 @@ public CampaignsCreateResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about the campaign. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -1329,19 +1319,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("campaign_type"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("auto_join"); - openapiRequiredFields.add("join_once"); - openapiRequiredFields.add("use_voucher_metadata_schema"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("creation_status"); - openapiRequiredFields.add("vouchers_generation_status"); - openapiRequiredFields.add("protected"); - openapiRequiredFields.add("categories"); - openapiRequiredFields.add("object"); } /** @@ -1356,24 +1333,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignsCreateResponseBody is not found in the empty JSON string", CampaignsCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CampaignsCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - if (!jsonObj.get("campaign_type").isJsonPrimitive()) { + if ((jsonObj.get("campaign_type") != null && !jsonObj.get("campaign_type").isJsonNull()) && !jsonObj.get("campaign_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign_type").toString())); } try { @@ -1389,7 +1359,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `campaign_type` to be a valid element of CampaignTypeEnum enum got `%s` instead", jsonObj.get("campaign_type").toString())); } } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -1427,7 +1397,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) && !jsonObj.get("category").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); } - if (!jsonObj.get("creation_status").isJsonPrimitive()) { + if ((jsonObj.get("creation_status") != null && !jsonObj.get("creation_status").isJsonNull()) && !jsonObj.get("creation_status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `creation_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creation_status").toString())); } try { @@ -1443,7 +1413,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `creation_status` to be a valid element of CreationStatusEnum enum got `%s` instead", jsonObj.get("creation_status").toString())); } } - if (!jsonObj.get("vouchers_generation_status").isJsonPrimitive()) { + if ((jsonObj.get("vouchers_generation_status") != null && !jsonObj.get("vouchers_generation_status").isJsonNull()) && !jsonObj.get("vouchers_generation_status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `vouchers_generation_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vouchers_generation_status").toString())); } try { @@ -1462,17 +1432,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("category_id") != null && !jsonObj.get("category_id").isJsonNull()) && !jsonObj.get("category_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category_id").toString())); } - // ensure the json data is an array - if (!jsonObj.get("categories").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull()) { + JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); + if (jsonArraycategories != null) { + // ensure the json data is an array + if (!jsonObj.get("categories").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + } + + // validate the optional field `categories` (array) + for (int i = 0; i < jsonArraycategories.size(); i++) { + Category.validateJsonElement(jsonArraycategories.get(i)); + }; + } } - - JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); - // validate the required field `categories` (array) - for (int i = 0; i < jsonArraycategories.size(); i++) { - Category.validateJsonElement(jsonArraycategories.get(i)); - }; - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } // validate the optional field `referral_program` diff --git a/src/main/java/voucherify/client/model/CampaignsGetResponseBody.java b/src/main/java/voucherify/client/model/CampaignsGetResponseBody.java index acd0a4ff..4cedd164 100644 --- a/src/main/java/voucherify/client/model/CampaignsGetResponseBody.java +++ b/src/main/java/voucherify/client/model/CampaignsGetResponseBody.java @@ -91,9 +91,7 @@ public enum CampaignTypeEnum { REFERRAL_PROGRAM("REFERRAL_PROGRAM"), - LUCKY_DRAW("LUCKY_DRAW"), - - UNKNOWN_ENUM("unknown_enum"); + LUCKY_DRAW("LUCKY_DRAW"); private String value; @@ -116,7 +114,7 @@ public static CampaignTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -144,9 +142,7 @@ public CampaignTypeEnum read(final JsonReader jsonReader) throws IOException { public enum TypeEnum { AUTO_UPDATE("AUTO_UPDATE"), - STATIC("STATIC"), - - UNKNOWN_ENUM("unknown_enum"); + STATIC("STATIC"); private String value; @@ -169,7 +165,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -227,9 +223,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -252,7 +246,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -326,9 +320,7 @@ public enum CreationStatusEnum { DRAFT("DRAFT"), - MODIFYING("MODIFYING"), - - UNKNOWN_ENUM("unknown_enum"); + MODIFYING("MODIFYING"); private String value; @@ -351,7 +343,7 @@ public static CreationStatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -385,9 +377,7 @@ public enum VouchersGenerationStatusEnum { DRAFT("DRAFT"), - MODIFYING("MODIFYING"), - - UNKNOWN_ENUM("unknown_enum"); + MODIFYING("MODIFYING"); private String value; @@ -410,7 +400,7 @@ public static VouchersGenerationStatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -441,7 +431,7 @@ public VouchersGenerationStatusEnum read(final JsonReader jsonReader) throws IOE public static final String SERIALIZED_NAME_CATEGORIES = "categories"; @SerializedName(SERIALIZED_NAME_CATEGORIES) - private List categories = new ArrayList<>(); + private List categories; public static final String SERIALIZED_NAME_OBJECT = "object"; @SerializedName(SERIALIZED_NAME_OBJECT) @@ -476,7 +466,7 @@ public CampaignsGetResponseBody id(String id) { * Unique campaign ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -497,7 +487,7 @@ public CampaignsGetResponseBody name(String name) { * Campaign name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -539,7 +529,7 @@ public CampaignsGetResponseBody campaignType(CampaignTypeEnum campaignType) { * Type of campaign. * @return campaignType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CampaignTypeEnum getCampaignType() { return campaignType; } @@ -560,7 +550,7 @@ public CampaignsGetResponseBody type(TypeEnum type) { * Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -602,7 +592,7 @@ public CampaignsGetResponseBody autoJoin(Boolean autoJoin) { * Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. * @return autoJoin **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getAutoJoin() { return autoJoin; } @@ -623,7 +613,7 @@ public CampaignsGetResponseBody joinOnce(Boolean joinOnce) { * If this value is set to `true`, customers will be able to join the campaign only once. * @return joinOnce **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getJoinOnce() { return joinOnce; } @@ -644,7 +634,7 @@ public CampaignsGetResponseBody useVoucherMetadataSchema(Boolean useVoucherMetad * Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. * @return useVoucherMetadataSchema **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getUseVoucherMetadataSchema() { return useVoucherMetadataSchema; } @@ -862,7 +852,7 @@ public CampaignsGetResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -925,7 +915,7 @@ public CampaignsGetResponseBody creationStatus(CreationStatusEnum creationStatus * Indicates the status of the campaign creation. * @return creationStatus **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CreationStatusEnum getCreationStatus() { return creationStatus; } @@ -946,7 +936,7 @@ public CampaignsGetResponseBody vouchersGenerationStatus(VouchersGenerationStatu * Indicates the status of the campaign's voucher generation. * @return vouchersGenerationStatus **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VouchersGenerationStatusEnum getVouchersGenerationStatus() { return vouchersGenerationStatus; } @@ -967,7 +957,7 @@ public CampaignsGetResponseBody _protected(Boolean _protected) { * Indicates whether the resource can be deleted. * @return _protected **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getProtected() { return _protected; } @@ -1017,7 +1007,7 @@ public CampaignsGetResponseBody addCategoriesItem(Category categoriesItem) { * Contains details about the category. * @return categories **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getCategories() { return categories; } @@ -1038,7 +1028,7 @@ public CampaignsGetResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about the campaign. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -1329,19 +1319,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("campaign_type"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("auto_join"); - openapiRequiredFields.add("join_once"); - openapiRequiredFields.add("use_voucher_metadata_schema"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("creation_status"); - openapiRequiredFields.add("vouchers_generation_status"); - openapiRequiredFields.add("protected"); - openapiRequiredFields.add("categories"); - openapiRequiredFields.add("object"); } /** @@ -1356,24 +1333,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignsGetResponseBody is not found in the empty JSON string", CampaignsGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CampaignsGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - if (!jsonObj.get("campaign_type").isJsonPrimitive()) { + if ((jsonObj.get("campaign_type") != null && !jsonObj.get("campaign_type").isJsonNull()) && !jsonObj.get("campaign_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign_type").toString())); } try { @@ -1389,7 +1359,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `campaign_type` to be a valid element of CampaignTypeEnum enum got `%s` instead", jsonObj.get("campaign_type").toString())); } } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -1427,7 +1397,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) && !jsonObj.get("category").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); } - if (!jsonObj.get("creation_status").isJsonPrimitive()) { + if ((jsonObj.get("creation_status") != null && !jsonObj.get("creation_status").isJsonNull()) && !jsonObj.get("creation_status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `creation_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creation_status").toString())); } try { @@ -1443,7 +1413,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `creation_status` to be a valid element of CreationStatusEnum enum got `%s` instead", jsonObj.get("creation_status").toString())); } } - if (!jsonObj.get("vouchers_generation_status").isJsonPrimitive()) { + if ((jsonObj.get("vouchers_generation_status") != null && !jsonObj.get("vouchers_generation_status").isJsonNull()) && !jsonObj.get("vouchers_generation_status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `vouchers_generation_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vouchers_generation_status").toString())); } try { @@ -1462,17 +1432,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("category_id") != null && !jsonObj.get("category_id").isJsonNull()) && !jsonObj.get("category_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category_id").toString())); } - // ensure the json data is an array - if (!jsonObj.get("categories").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull()) { + JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); + if (jsonArraycategories != null) { + // ensure the json data is an array + if (!jsonObj.get("categories").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + } + + // validate the optional field `categories` (array) + for (int i = 0; i < jsonArraycategories.size(); i++) { + Category.validateJsonElement(jsonArraycategories.get(i)); + }; + } } - - JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); - // validate the required field `categories` (array) - for (int i = 0; i < jsonArraycategories.size(); i++) { - Category.validateJsonElement(jsonArraycategories.get(i)); - }; - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } // validate the optional field `referral_program` diff --git a/src/main/java/voucherify/client/model/CampaignsImportCreateResponseBody.java b/src/main/java/voucherify/client/model/CampaignsImportCreateResponseBody.java index 23f5bc01..ef9554a7 100644 --- a/src/main/java/voucherify/client/model/CampaignsImportCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/CampaignsImportCreateResponseBody.java @@ -69,7 +69,7 @@ public CampaignsImportCreateResponseBody asyncActionId(String asyncActionId) { * The ID of the scheduled asynchronous action. * @return asyncActionId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAsyncActionId() { return asyncActionId; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("async_action_id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignsImportCreateResponseBody is not found in the empty JSON string", CampaignsImportCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CampaignsImportCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("async_action_id").isJsonPrimitive()) { + if ((jsonObj.get("async_action_id") != null && !jsonObj.get("async_action_id").isJsonNull()) && !jsonObj.get("async_action_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `async_action_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_action_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/CampaignsImportCsvCreateResponseBody.java b/src/main/java/voucherify/client/model/CampaignsImportCsvCreateResponseBody.java index ebedfc9e..2cc255b7 100644 --- a/src/main/java/voucherify/client/model/CampaignsImportCsvCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/CampaignsImportCsvCreateResponseBody.java @@ -69,7 +69,7 @@ public CampaignsImportCsvCreateResponseBody asyncActionId(String asyncActionId) * The ID of the scheduled asynchronous action. * @return asyncActionId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAsyncActionId() { return asyncActionId; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("async_action_id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignsImportCsvCreateResponseBody is not found in the empty JSON string", CampaignsImportCsvCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CampaignsImportCsvCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("async_action_id").isJsonPrimitive()) { + if ((jsonObj.get("async_action_id") != null && !jsonObj.get("async_action_id").isJsonNull()) && !jsonObj.get("async_action_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `async_action_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_action_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/CampaignsImportVoucherItem.java b/src/main/java/voucherify/client/model/CampaignsImportVoucherItem.java index 41038f3d..050da9b7 100644 --- a/src/main/java/voucherify/client/model/CampaignsImportVoucherItem.java +++ b/src/main/java/voucherify/client/model/CampaignsImportVoucherItem.java @@ -70,9 +70,7 @@ public enum TypeEnum { LOYALTY_CARD("LOYALTY_CARD"), - LUCKY_DRAW_CODE("LUCKY_DRAW_CODE"), - - UNKNOWN_ENUM("unknown_enum"); + LUCKY_DRAW_CODE("LUCKY_DRAW_CODE"); private String value; @@ -95,7 +93,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -157,7 +155,7 @@ public CampaignsImportVoucherItem code(String code) { * Unique custom voucher code. * @return code **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCode() { return code; } @@ -455,7 +453,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("code"); } /** @@ -470,15 +467,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignsImportVoucherItem is not found in the empty JSON string", CampaignsImportVoucherItem.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CampaignsImportVoucherItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("code").isJsonPrimitive()) { + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/CampaignsImportVoucherLoyaltyCard.java b/src/main/java/voucherify/client/model/CampaignsImportVoucherLoyaltyCard.java index e5703b71..3aab89a7 100644 --- a/src/main/java/voucherify/client/model/CampaignsImportVoucherLoyaltyCard.java +++ b/src/main/java/voucherify/client/model/CampaignsImportVoucherLoyaltyCard.java @@ -69,7 +69,7 @@ public CampaignsImportVoucherLoyaltyCard points(Integer points) { * The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card. * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPoints() { return points; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("points"); } /** @@ -190,13 +189,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignsImportVoucherLoyaltyCard is not found in the empty JSON string", CampaignsImportVoucherLoyaltyCard.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CampaignsImportVoucherLoyaltyCard.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); } diff --git a/src/main/java/voucherify/client/model/CampaignsUpdateRequestBody.java b/src/main/java/voucherify/client/model/CampaignsUpdateRequestBody.java index a6bc3865..4a0e0b81 100644 --- a/src/main/java/voucherify/client/model/CampaignsUpdateRequestBody.java +++ b/src/main/java/voucherify/client/model/CampaignsUpdateRequestBody.java @@ -91,9 +91,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -116,7 +114,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -180,9 +178,7 @@ public ValidityDayOfWeekEnum read(final JsonReader jsonReader) throws IOExceptio public enum TypeEnum { AUTO_UPDATE("AUTO_UPDATE"), - STATIC("STATIC"), - - UNKNOWN_ENUM("unknown_enum"); + STATIC("STATIC"); private String value; @@ -205,7 +201,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/CampaignsUpdateResponseBody.java b/src/main/java/voucherify/client/model/CampaignsUpdateResponseBody.java index 76be3203..09f760ac 100644 --- a/src/main/java/voucherify/client/model/CampaignsUpdateResponseBody.java +++ b/src/main/java/voucherify/client/model/CampaignsUpdateResponseBody.java @@ -91,9 +91,7 @@ public enum CampaignTypeEnum { REFERRAL_PROGRAM("REFERRAL_PROGRAM"), - LUCKY_DRAW("LUCKY_DRAW"), - - UNKNOWN_ENUM("unknown_enum"); + LUCKY_DRAW("LUCKY_DRAW"); private String value; @@ -116,7 +114,7 @@ public static CampaignTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -144,9 +142,7 @@ public CampaignTypeEnum read(final JsonReader jsonReader) throws IOException { public enum TypeEnum { AUTO_UPDATE("AUTO_UPDATE"), - STATIC("STATIC"), - - UNKNOWN_ENUM("unknown_enum"); + STATIC("STATIC"); private String value; @@ -169,7 +165,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -227,9 +223,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -252,7 +246,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -326,9 +320,7 @@ public enum CreationStatusEnum { DRAFT("DRAFT"), - MODIFYING("MODIFYING"), - - UNKNOWN_ENUM("unknown_enum"); + MODIFYING("MODIFYING"); private String value; @@ -351,7 +343,7 @@ public static CreationStatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -385,9 +377,7 @@ public enum VouchersGenerationStatusEnum { DRAFT("DRAFT"), - MODIFYING("MODIFYING"), - - UNKNOWN_ENUM("unknown_enum"); + MODIFYING("MODIFYING"); private String value; @@ -410,7 +400,7 @@ public static VouchersGenerationStatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -441,7 +431,7 @@ public VouchersGenerationStatusEnum read(final JsonReader jsonReader) throws IOE public static final String SERIALIZED_NAME_CATEGORIES = "categories"; @SerializedName(SERIALIZED_NAME_CATEGORIES) - private List categories = new ArrayList<>(); + private List categories; public static final String SERIALIZED_NAME_OBJECT = "object"; @SerializedName(SERIALIZED_NAME_OBJECT) @@ -476,7 +466,7 @@ public CampaignsUpdateResponseBody id(String id) { * Unique campaign ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -497,7 +487,7 @@ public CampaignsUpdateResponseBody name(String name) { * Campaign name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -539,7 +529,7 @@ public CampaignsUpdateResponseBody campaignType(CampaignTypeEnum campaignType) { * Type of campaign. * @return campaignType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CampaignTypeEnum getCampaignType() { return campaignType; } @@ -560,7 +550,7 @@ public CampaignsUpdateResponseBody type(TypeEnum type) { * Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -602,7 +592,7 @@ public CampaignsUpdateResponseBody autoJoin(Boolean autoJoin) { * Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. * @return autoJoin **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getAutoJoin() { return autoJoin; } @@ -623,7 +613,7 @@ public CampaignsUpdateResponseBody joinOnce(Boolean joinOnce) { * If this value is set to `true`, customers will be able to join the campaign only once. * @return joinOnce **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getJoinOnce() { return joinOnce; } @@ -644,7 +634,7 @@ public CampaignsUpdateResponseBody useVoucherMetadataSchema(Boolean useVoucherMe * Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. * @return useVoucherMetadataSchema **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getUseVoucherMetadataSchema() { return useVoucherMetadataSchema; } @@ -862,7 +852,7 @@ public CampaignsUpdateResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -925,7 +915,7 @@ public CampaignsUpdateResponseBody creationStatus(CreationStatusEnum creationSta * Indicates the status of the campaign creation. * @return creationStatus **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CreationStatusEnum getCreationStatus() { return creationStatus; } @@ -946,7 +936,7 @@ public CampaignsUpdateResponseBody vouchersGenerationStatus(VouchersGenerationSt * Indicates the status of the campaign's voucher generation. * @return vouchersGenerationStatus **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VouchersGenerationStatusEnum getVouchersGenerationStatus() { return vouchersGenerationStatus; } @@ -967,7 +957,7 @@ public CampaignsUpdateResponseBody _protected(Boolean _protected) { * Indicates whether the resource can be deleted. * @return _protected **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getProtected() { return _protected; } @@ -1017,7 +1007,7 @@ public CampaignsUpdateResponseBody addCategoriesItem(Category categoriesItem) { * Contains details about the category. * @return categories **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getCategories() { return categories; } @@ -1038,7 +1028,7 @@ public CampaignsUpdateResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about the campaign. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -1329,19 +1319,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("campaign_type"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("auto_join"); - openapiRequiredFields.add("join_once"); - openapiRequiredFields.add("use_voucher_metadata_schema"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("creation_status"); - openapiRequiredFields.add("vouchers_generation_status"); - openapiRequiredFields.add("protected"); - openapiRequiredFields.add("categories"); - openapiRequiredFields.add("object"); } /** @@ -1356,24 +1333,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignsUpdateResponseBody is not found in the empty JSON string", CampaignsUpdateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CampaignsUpdateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - if (!jsonObj.get("campaign_type").isJsonPrimitive()) { + if ((jsonObj.get("campaign_type") != null && !jsonObj.get("campaign_type").isJsonNull()) && !jsonObj.get("campaign_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign_type").toString())); } try { @@ -1389,7 +1359,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `campaign_type` to be a valid element of CampaignTypeEnum enum got `%s` instead", jsonObj.get("campaign_type").toString())); } } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -1427,7 +1397,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) && !jsonObj.get("category").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); } - if (!jsonObj.get("creation_status").isJsonPrimitive()) { + if ((jsonObj.get("creation_status") != null && !jsonObj.get("creation_status").isJsonNull()) && !jsonObj.get("creation_status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `creation_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creation_status").toString())); } try { @@ -1443,7 +1413,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `creation_status` to be a valid element of CreationStatusEnum enum got `%s` instead", jsonObj.get("creation_status").toString())); } } - if (!jsonObj.get("vouchers_generation_status").isJsonPrimitive()) { + if ((jsonObj.get("vouchers_generation_status") != null && !jsonObj.get("vouchers_generation_status").isJsonNull()) && !jsonObj.get("vouchers_generation_status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `vouchers_generation_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vouchers_generation_status").toString())); } try { @@ -1462,17 +1432,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("category_id") != null && !jsonObj.get("category_id").isJsonNull()) && !jsonObj.get("category_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category_id").toString())); } - // ensure the json data is an array - if (!jsonObj.get("categories").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull()) { + JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); + if (jsonArraycategories != null) { + // ensure the json data is an array + if (!jsonObj.get("categories").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + } + + // validate the optional field `categories` (array) + for (int i = 0; i < jsonArraycategories.size(); i++) { + Category.validateJsonElement(jsonArraycategories.get(i)); + }; + } } - - JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); - // validate the required field `categories` (array) - for (int i = 0; i < jsonArraycategories.size(); i++) { - Category.validateJsonElement(jsonArraycategories.get(i)); - }; - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } // validate the optional field `referral_program` diff --git a/src/main/java/voucherify/client/model/CampaignsVouchersCreateCombinedResponseBody.java b/src/main/java/voucherify/client/model/CampaignsVouchersCreateCombinedResponseBody.java index 396808a2..3f6769c3 100644 --- a/src/main/java/voucherify/client/model/CampaignsVouchersCreateCombinedResponseBody.java +++ b/src/main/java/voucherify/client/model/CampaignsVouchersCreateCombinedResponseBody.java @@ -103,9 +103,7 @@ public enum TypeEnum { DISCOUNT_VOUCHER("DISCOUNT_VOUCHER"), - LOYALTY_CARD("LOYALTY_CARD"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("LOYALTY_CARD"); private String value; @@ -128,7 +126,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -190,9 +188,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -215,7 +211,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/CampaignsVouchersCreateCombinedResponseBodyGift.java b/src/main/java/voucherify/client/model/CampaignsVouchersCreateCombinedResponseBodyGift.java index 4544b9fa..2c2e4a8c 100644 --- a/src/main/java/voucherify/client/model/CampaignsVouchersCreateCombinedResponseBodyGift.java +++ b/src/main/java/voucherify/client/model/CampaignsVouchersCreateCombinedResponseBodyGift.java @@ -67,9 +67,7 @@ public class CampaignsVouchersCreateCombinedResponseBodyGift { public enum EffectEnum { ORDER("APPLY_TO_ORDER"), - ITEMS("APPLY_TO_ITEMS"), - - UNKNOWN_ENUM("unknown_enum"); + ITEMS("APPLY_TO_ITEMS"); private String value; @@ -92,7 +90,7 @@ public static EffectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/CampaignsVouchersCreateResponseBody.java b/src/main/java/voucherify/client/model/CampaignsVouchersCreateResponseBody.java index c0a334d9..78b22f76 100644 --- a/src/main/java/voucherify/client/model/CampaignsVouchersCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/CampaignsVouchersCreateResponseBody.java @@ -103,9 +103,7 @@ public enum TypeEnum { DISCOUNT_VOUCHER("DISCOUNT_VOUCHER"), - LOYALTY_CARD("LOYALTY_CARD"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("LOYALTY_CARD"); private String value; @@ -128,7 +126,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -190,9 +188,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -215,7 +211,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/CategoriesCreateRequestBody.java b/src/main/java/voucherify/client/model/CategoriesCreateRequestBody.java index 88aecebf..e451510b 100644 --- a/src/main/java/voucherify/client/model/CategoriesCreateRequestBody.java +++ b/src/main/java/voucherify/client/model/CategoriesCreateRequestBody.java @@ -73,7 +73,7 @@ public CategoriesCreateRequestBody name(String name) { * Category name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -94,7 +94,7 @@ public CategoriesCreateRequestBody hierarchy(Integer hierarchy) { * Category hierarchy. * @return hierarchy **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getHierarchy() { return hierarchy; } @@ -203,8 +203,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("hierarchy"); } /** @@ -219,15 +217,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CategoriesCreateRequestBody is not found in the empty JSON string", CategoriesCreateRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CategoriesCreateRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } diff --git a/src/main/java/voucherify/client/model/CategoriesCreateResponseBody.java b/src/main/java/voucherify/client/model/CategoriesCreateResponseBody.java index 8c3fb4b0..12d4589f 100644 --- a/src/main/java/voucherify/client/model/CategoriesCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/CategoriesCreateResponseBody.java @@ -70,9 +70,7 @@ public class CategoriesCreateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CATEGORY("category"), - - UNKNOWN_ENUM("unknown_enum"); + CATEGORY("category"); private String value; @@ -95,7 +93,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -133,7 +131,7 @@ public CategoriesCreateResponseBody id(String id) { * Unique category ID assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -154,7 +152,7 @@ public CategoriesCreateResponseBody name(String name) { * Category name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -175,7 +173,7 @@ public CategoriesCreateResponseBody hierarchy(Integer hierarchy) { * Category hierarchy. * @return hierarchy **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getHierarchy() { return hierarchy; } @@ -196,7 +194,7 @@ public CategoriesCreateResponseBody _object(ObjectEnum _object) { * Get _object * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -217,7 +215,7 @@ public CategoriesCreateResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -335,11 +333,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("hierarchy"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("created_at"); } /** @@ -354,21 +347,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CategoriesCreateResponseBody is not found in the empty JSON string", CategoriesCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CategoriesCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/CategoriesGetResponseBody.java b/src/main/java/voucherify/client/model/CategoriesGetResponseBody.java index d3359661..af43d8f1 100644 --- a/src/main/java/voucherify/client/model/CategoriesGetResponseBody.java +++ b/src/main/java/voucherify/client/model/CategoriesGetResponseBody.java @@ -70,9 +70,7 @@ public class CategoriesGetResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CATEGORY("category"), - - UNKNOWN_ENUM("unknown_enum"); + CATEGORY("category"); private String value; @@ -95,7 +93,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -131,9 +129,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public enum StackingRulesTypeEnum { JOINT("JOINT"), - EXCLUSIVE("EXCLUSIVE"), - - UNKNOWN_ENUM("unknown_enum"); + EXCLUSIVE("EXCLUSIVE"); private String value; @@ -156,7 +152,7 @@ public static StackingRulesTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -190,7 +186,7 @@ public CategoriesGetResponseBody id(String id) { * Unique category ID assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -211,7 +207,7 @@ public CategoriesGetResponseBody name(String name) { * Category name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -232,7 +228,7 @@ public CategoriesGetResponseBody hierarchy(Integer hierarchy) { * Category hierarchy. * @return hierarchy **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getHierarchy() { return hierarchy; } @@ -253,7 +249,7 @@ public CategoriesGetResponseBody _object(ObjectEnum _object) { * The type of the object represented by the JSON. This object stores information about the category. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -274,7 +270,7 @@ public CategoriesGetResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -440,11 +436,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("hierarchy"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("created_at"); } /** @@ -459,21 +450,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CategoriesGetResponseBody is not found in the empty JSON string", CategoriesGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CategoriesGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/CategoriesListResponseBody.java b/src/main/java/voucherify/client/model/CategoriesListResponseBody.java index e4c1ee27..7c53016a 100644 --- a/src/main/java/voucherify/client/model/CategoriesListResponseBody.java +++ b/src/main/java/voucherify/client/model/CategoriesListResponseBody.java @@ -60,9 +60,7 @@ public class CategoriesListResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -85,7 +83,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -111,9 +109,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - DATA("data"), - - UNKNOWN_ENUM("unknown_enum"); + DATA("data"); private String value; @@ -136,7 +132,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -159,7 +155,7 @@ public DataRefEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -178,7 +174,7 @@ public CategoriesListResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about categories in a dictionary. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -199,7 +195,7 @@ public CategoriesListResponseBody dataRef(DataRefEnum dataRef) { * Identifies the name of the attribute that contains the array of category objects. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -228,7 +224,7 @@ public CategoriesListResponseBody addDataItem(Category dataItem) { * Get data * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -249,7 +245,7 @@ public CategoriesListResponseBody total(Integer total) { * Total number of categories. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -364,10 +360,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -382,15 +374,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CategoriesListResponseBody is not found in the empty JSON string", CategoriesListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CategoriesListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -406,7 +391,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { @@ -422,16 +407,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a valid element of DataRefEnum enum got `%s` instead", jsonObj.get("data_ref").toString())); } } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + Category.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Category.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/CategoriesUpdateRequestBody.java b/src/main/java/voucherify/client/model/CategoriesUpdateRequestBody.java index cc08c12a..603c728f 100644 --- a/src/main/java/voucherify/client/model/CategoriesUpdateRequestBody.java +++ b/src/main/java/voucherify/client/model/CategoriesUpdateRequestBody.java @@ -73,7 +73,7 @@ public CategoriesUpdateRequestBody name(String name) { * Category name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -94,7 +94,7 @@ public CategoriesUpdateRequestBody hierarchy(Integer hierarchy) { * Category hierarchy. * @return hierarchy **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getHierarchy() { return hierarchy; } @@ -203,8 +203,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("hierarchy"); } /** @@ -219,15 +217,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CategoriesUpdateRequestBody is not found in the empty JSON string", CategoriesUpdateRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CategoriesUpdateRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } diff --git a/src/main/java/voucherify/client/model/CategoriesUpdateResponseBody.java b/src/main/java/voucherify/client/model/CategoriesUpdateResponseBody.java index c5722e94..72c39bce 100644 --- a/src/main/java/voucherify/client/model/CategoriesUpdateResponseBody.java +++ b/src/main/java/voucherify/client/model/CategoriesUpdateResponseBody.java @@ -70,9 +70,7 @@ public class CategoriesUpdateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CATEGORY("category"), - - UNKNOWN_ENUM("unknown_enum"); + CATEGORY("category"); private String value; @@ -95,7 +93,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -137,7 +135,7 @@ public CategoriesUpdateResponseBody id(String id) { * Unique category ID assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -158,7 +156,7 @@ public CategoriesUpdateResponseBody name(String name) { * Category name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -179,7 +177,7 @@ public CategoriesUpdateResponseBody hierarchy(Integer hierarchy) { * Category hierarchy. * @return hierarchy **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getHierarchy() { return hierarchy; } @@ -200,7 +198,7 @@ public CategoriesUpdateResponseBody _object(ObjectEnum _object) { * Get _object * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -221,7 +219,7 @@ public CategoriesUpdateResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -242,7 +240,7 @@ public CategoriesUpdateResponseBody updatedAt(OffsetDateTime updatedAt) { * Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format. * @return updatedAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { return updatedAt; } @@ -363,12 +361,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("hierarchy"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("updated_at"); } /** @@ -383,21 +375,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CategoriesUpdateResponseBody is not found in the empty JSON string", CategoriesUpdateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CategoriesUpdateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/Category.java b/src/main/java/voucherify/client/model/Category.java index fc806667..58915523 100644 --- a/src/main/java/voucherify/client/model/Category.java +++ b/src/main/java/voucherify/client/model/Category.java @@ -70,9 +70,7 @@ public class Category { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CATEGORY("category"), - - UNKNOWN_ENUM("unknown_enum"); + CATEGORY("category"); private String value; @@ -95,7 +93,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -131,9 +129,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public enum StackingRulesTypeEnum { JOINT("JOINT"), - EXCLUSIVE("EXCLUSIVE"), - - UNKNOWN_ENUM("unknown_enum"); + EXCLUSIVE("EXCLUSIVE"); private String value; @@ -156,7 +152,7 @@ public static StackingRulesTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -190,7 +186,7 @@ public Category id(String id) { * Unique category ID assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -211,7 +207,7 @@ public Category name(String name) { * Category name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -232,7 +228,7 @@ public Category hierarchy(Integer hierarchy) { * Category hierarchy. * @return hierarchy **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getHierarchy() { return hierarchy; } @@ -253,7 +249,7 @@ public Category _object(ObjectEnum _object) { * The type of the object represented by the JSON. This object stores information about the category. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -274,7 +270,7 @@ public Category createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -440,11 +436,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("hierarchy"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("created_at"); } /** @@ -459,21 +450,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in Category is not found in the empty JSON string", Category.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Category.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ClientEventsCreateRequestBody.java b/src/main/java/voucherify/client/model/ClientEventsCreateRequestBody.java index cd56889f..37ec1c92 100644 --- a/src/main/java/voucherify/client/model/ClientEventsCreateRequestBody.java +++ b/src/main/java/voucherify/client/model/ClientEventsCreateRequestBody.java @@ -88,7 +88,7 @@ public ClientEventsCreateRequestBody event(String event) { * Event name. This is the same name that you used to define a custom event in the **Dashboard** > **Project Settings** > **Event Schema**. * @return event **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getEvent() { return event; } @@ -109,7 +109,7 @@ public ClientEventsCreateRequestBody customer(Customer customer) { * Get customer * @return customer **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Customer getCustomer() { return customer; } @@ -290,8 +290,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("event"); - openapiRequiredFields.add("customer"); } /** @@ -306,19 +304,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ClientEventsCreateRequestBody is not found in the empty JSON string", ClientEventsCreateRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ClientEventsCreateRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("event").isJsonPrimitive()) { + if ((jsonObj.get("event") != null && !jsonObj.get("event").isJsonNull()) && !jsonObj.get("event").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `event` to be a primitive type in the JSON string but got `%s`", jsonObj.get("event").toString())); } - // validate the required field `customer` - Customer.validateJsonElement(jsonObj.get("customer")); + // validate the optional field `customer` + if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { + Customer.validateJsonElement(jsonObj.get("customer")); + } // validate the optional field `referral` if (jsonObj.get("referral") != null && !jsonObj.get("referral").isJsonNull()) { ClientEventsCreateRequestBodyReferral.validateJsonElement(jsonObj.get("referral")); diff --git a/src/main/java/voucherify/client/model/ClientEventsCreateRequestBodyLoyalty.java b/src/main/java/voucherify/client/model/ClientEventsCreateRequestBodyLoyalty.java index 0bf81580..77657289 100644 --- a/src/main/java/voucherify/client/model/ClientEventsCreateRequestBodyLoyalty.java +++ b/src/main/java/voucherify/client/model/ClientEventsCreateRequestBodyLoyalty.java @@ -69,7 +69,7 @@ public ClientEventsCreateRequestBodyLoyalty code(String code) { * Code of the loyalty card to receive points based on the calculation method defined in the related earning rule. An earning rule is triggered for the loyalty card when the event passed in the `event` parameter of the request payload gets sent along with this loyalty card code. * @return code **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCode() { return code; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("code"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ClientEventsCreateRequestBodyLoyalty is not found in the empty JSON string", ClientEventsCreateRequestBodyLoyalty.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ClientEventsCreateRequestBodyLoyalty.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("code").isJsonPrimitive()) { + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } } diff --git a/src/main/java/voucherify/client/model/ClientEventsCreateRequestBodyReferral.java b/src/main/java/voucherify/client/model/ClientEventsCreateRequestBodyReferral.java index 025a6351..ae31c590 100644 --- a/src/main/java/voucherify/client/model/ClientEventsCreateRequestBodyReferral.java +++ b/src/main/java/voucherify/client/model/ClientEventsCreateRequestBodyReferral.java @@ -73,7 +73,7 @@ public ClientEventsCreateRequestBodyReferral code(String code) { * A code through which a new visitor has been referred to a service. * @return code **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCode() { return code; } @@ -203,7 +203,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("code"); } /** @@ -218,15 +217,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ClientEventsCreateRequestBodyReferral is not found in the empty JSON string", ClientEventsCreateRequestBodyReferral.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ClientEventsCreateRequestBodyReferral.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("code").isJsonPrimitive()) { + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } if ((jsonObj.get("referrer_id") != null && !jsonObj.get("referrer_id").isJsonNull()) && !jsonObj.get("referrer_id").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/ClientEventsCreateResponseBody.java b/src/main/java/voucherify/client/model/ClientEventsCreateResponseBody.java index d8e0d9e1..ac3e6e55 100644 --- a/src/main/java/voucherify/client/model/ClientEventsCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/ClientEventsCreateResponseBody.java @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import voucherify.client.model.SimpleCustomerRequiredObjectType; import com.google.gson.Gson; @@ -58,9 +59,7 @@ public class ClientEventsCreateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EVENT("event"), - - UNKNOWN_ENUM("unknown_enum"); + EVENT("event"); private String value; @@ -83,7 +82,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -133,7 +132,7 @@ public ClientEventsCreateResponseBody _object(ObjectEnum _object) { * The object represented is an `event`. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -154,7 +153,7 @@ public ClientEventsCreateResponseBody type(String type) { * The event name. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getType() { return type; } @@ -175,7 +174,7 @@ public ClientEventsCreateResponseBody customer(SimpleCustomerRequiredObjectType * Get customer * @return customer **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public SimpleCustomerRequiredObjectType getCustomer() { return customer; } @@ -290,11 +289,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, clientEventsCreateResponseBody.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(_object, type, customer, referral, loyalty, additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -335,11 +345,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("customer"); - openapiRequiredFields.add("referral"); - openapiRequiredFields.add("loyalty"); } /** @@ -354,15 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ClientEventsCreateResponseBody is not found in the empty JSON string", ClientEventsCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ClientEventsCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -378,11 +376,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } - // validate the required field `customer` - SimpleCustomerRequiredObjectType.validateJsonElement(jsonObj.get("customer")); + // validate the optional field `customer` + if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { + SimpleCustomerRequiredObjectType.validateJsonElement(jsonObj.get("customer")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/ClientQualificationsCheckEligibilityRequestBody.java b/src/main/java/voucherify/client/model/ClientQualificationsCheckEligibilityRequestBody.java index 8f4330f4..2f2c4731 100644 --- a/src/main/java/voucherify/client/model/ClientQualificationsCheckEligibilityRequestBody.java +++ b/src/main/java/voucherify/client/model/ClientQualificationsCheckEligibilityRequestBody.java @@ -86,9 +86,7 @@ public enum ScenarioEnum { PRODUCTS_BY_CUSTOMER("PRODUCTS_BY_CUSTOMER"), - PRODUCTS_DISCOUNT_BY_CUSTOMER("PRODUCTS_DISCOUNT_BY_CUSTOMER"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCTS_DISCOUNT_BY_CUSTOMER("PRODUCTS_DISCOUNT_BY_CUSTOMER"); private String value; @@ -111,7 +109,7 @@ public static ScenarioEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ClientRedemptionsRedeemRequestBody.java b/src/main/java/voucherify/client/model/ClientRedemptionsRedeemRequestBody.java index 4774b6f7..98400822 100644 --- a/src/main/java/voucherify/client/model/ClientRedemptionsRedeemRequestBody.java +++ b/src/main/java/voucherify/client/model/ClientRedemptionsRedeemRequestBody.java @@ -61,7 +61,7 @@ public class ClientRedemptionsRedeemRequestBody { public static final String SERIALIZED_NAME_REDEEMABLES = "redeemables"; @SerializedName(SERIALIZED_NAME_REDEEMABLES) - private List redeemables = new ArrayList<>(); + private List redeemables; public static final String SERIALIZED_NAME_ORDER = "order"; @SerializedName(SERIALIZED_NAME_ORDER) @@ -108,7 +108,7 @@ public ClientRedemptionsRedeemRequestBody addRedeemablesItem(StackableValidateRe * Get redeemables * @return redeemables **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getRedeemables() { return redeemables; } @@ -358,7 +358,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("redeemables"); } /** @@ -373,24 +372,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ClientRedemptionsRedeemRequestBody is not found in the empty JSON string", ClientRedemptionsRedeemRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ClientRedemptionsRedeemRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("redeemables").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `redeemables` to be an array in the JSON string but got `%s`", jsonObj.get("redeemables").toString())); + if (jsonObj.get("redeemables") != null && !jsonObj.get("redeemables").isJsonNull()) { + JsonArray jsonArrayredeemables = jsonObj.getAsJsonArray("redeemables"); + if (jsonArrayredeemables != null) { + // ensure the json data is an array + if (!jsonObj.get("redeemables").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `redeemables` to be an array in the JSON string but got `%s`", jsonObj.get("redeemables").toString())); + } + + // validate the optional field `redeemables` (array) + for (int i = 0; i < jsonArrayredeemables.size(); i++) { + StackableValidateRedeemBaseRedeemablesItem.validateJsonElement(jsonArrayredeemables.get(i)); + }; + } } - - JsonArray jsonArrayredeemables = jsonObj.getAsJsonArray("redeemables"); - // validate the required field `redeemables` (array) - for (int i = 0; i < jsonArrayredeemables.size(); i++) { - StackableValidateRedeemBaseRedeemablesItem.validateJsonElement(jsonArrayredeemables.get(i)); - }; // validate the optional field `order` if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { Order.validateJsonElement(jsonObj.get("order")); diff --git a/src/main/java/voucherify/client/model/ClientRedemptionsRedeemRequestBodyAllOfOptions.java b/src/main/java/voucherify/client/model/ClientRedemptionsRedeemRequestBodyAllOfOptions.java index 4eb97af4..f5dc648a 100644 --- a/src/main/java/voucherify/client/model/ClientRedemptionsRedeemRequestBodyAllOfOptions.java +++ b/src/main/java/voucherify/client/model/ClientRedemptionsRedeemRequestBodyAllOfOptions.java @@ -65,9 +65,7 @@ public enum ExpandEnum { REDEEMABLE("redeemable"), - CATEGORY("category"), - - UNKNOWN_ENUM("unknown_enum"); + CATEGORY("category"); private String value; @@ -90,7 +88,7 @@ public static ExpandEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ClientValidationsValidateRequestBody.java b/src/main/java/voucherify/client/model/ClientValidationsValidateRequestBody.java index 63ef9f8f..1a89605f 100644 --- a/src/main/java/voucherify/client/model/ClientValidationsValidateRequestBody.java +++ b/src/main/java/voucherify/client/model/ClientValidationsValidateRequestBody.java @@ -61,7 +61,7 @@ public class ClientValidationsValidateRequestBody { public static final String SERIALIZED_NAME_REDEEMABLES = "redeemables"; @SerializedName(SERIALIZED_NAME_REDEEMABLES) - private List redeemables = new ArrayList<>(); + private List redeemables; public static final String SERIALIZED_NAME_ORDER = "order"; @SerializedName(SERIALIZED_NAME_ORDER) @@ -108,7 +108,7 @@ public ClientValidationsValidateRequestBody addRedeemablesItem(StackableValidate * Get redeemables * @return redeemables **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getRedeemables() { return redeemables; } @@ -358,7 +358,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("redeemables"); } /** @@ -373,24 +372,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ClientValidationsValidateRequestBody is not found in the empty JSON string", ClientValidationsValidateRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ClientValidationsValidateRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("redeemables").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `redeemables` to be an array in the JSON string but got `%s`", jsonObj.get("redeemables").toString())); + if (jsonObj.get("redeemables") != null && !jsonObj.get("redeemables").isJsonNull()) { + JsonArray jsonArrayredeemables = jsonObj.getAsJsonArray("redeemables"); + if (jsonArrayredeemables != null) { + // ensure the json data is an array + if (!jsonObj.get("redeemables").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `redeemables` to be an array in the JSON string but got `%s`", jsonObj.get("redeemables").toString())); + } + + // validate the optional field `redeemables` (array) + for (int i = 0; i < jsonArrayredeemables.size(); i++) { + StackableValidateRedeemBaseRedeemablesItem.validateJsonElement(jsonArrayredeemables.get(i)); + }; + } } - - JsonArray jsonArrayredeemables = jsonObj.getAsJsonArray("redeemables"); - // validate the required field `redeemables` (array) - for (int i = 0; i < jsonArrayredeemables.size(); i++) { - StackableValidateRedeemBaseRedeemablesItem.validateJsonElement(jsonArrayredeemables.get(i)); - }; // validate the optional field `order` if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { Order.validateJsonElement(jsonObj.get("order")); diff --git a/src/main/java/voucherify/client/model/ClientValidationsValidateRequestBodyAllOfOptions.java b/src/main/java/voucherify/client/model/ClientValidationsValidateRequestBodyAllOfOptions.java index c63c8ef0..87ef44d9 100644 --- a/src/main/java/voucherify/client/model/ClientValidationsValidateRequestBodyAllOfOptions.java +++ b/src/main/java/voucherify/client/model/ClientValidationsValidateRequestBodyAllOfOptions.java @@ -65,9 +65,7 @@ public enum ExpandEnum { REDEEMABLE("redeemable"), - CATEGORY("category"), - - UNKNOWN_ENUM("unknown_enum"); + CATEGORY("category"); private String value; @@ -90,7 +88,7 @@ public static ExpandEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ClientValidationsValidateResponseBody.java b/src/main/java/voucherify/client/model/ClientValidationsValidateResponseBody.java index 28adaef3..d1cf3ba6 100644 --- a/src/main/java/voucherify/client/model/ClientValidationsValidateResponseBody.java +++ b/src/main/java/voucherify/client/model/ClientValidationsValidateResponseBody.java @@ -66,7 +66,7 @@ public class ClientValidationsValidateResponseBody { public static final String SERIALIZED_NAME_REDEEMABLES = "redeemables"; @SerializedName(SERIALIZED_NAME_REDEEMABLES) - private List redeemables = new ArrayList<>(); + private List redeemables; public static final String SERIALIZED_NAME_SKIPPED_REDEEMABLES = "skipped_redeemables"; @SerializedName(SERIALIZED_NAME_SKIPPED_REDEEMABLES) @@ -105,7 +105,7 @@ public ClientValidationsValidateResponseBody valid(Boolean valid) { * The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable. * @return valid **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getValid() { return valid; } @@ -134,7 +134,7 @@ public ClientValidationsValidateResponseBody addRedeemablesItem(ValidationsValid * Get redeemables * @return redeemables **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getRedeemables() { return redeemables; } @@ -276,7 +276,7 @@ public ClientValidationsValidateResponseBody stackingRules(StackingRules stackin * Get stackingRules * @return stackingRules **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StackingRules getStackingRules() { return stackingRules; } @@ -403,9 +403,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("valid"); - openapiRequiredFields.add("redeemables"); - openapiRequiredFields.add("stacking_rules"); } /** @@ -420,24 +417,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ClientValidationsValidateResponseBody is not found in the empty JSON string", ClientValidationsValidateResponseBody.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("redeemables") != null && !jsonObj.get("redeemables").isJsonNull()) { + JsonArray jsonArrayredeemables = jsonObj.getAsJsonArray("redeemables"); + if (jsonArrayredeemables != null) { + // ensure the json data is an array + if (!jsonObj.get("redeemables").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `redeemables` to be an array in the JSON string but got `%s`", jsonObj.get("redeemables").toString())); + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ClientValidationsValidateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + // validate the optional field `redeemables` (array) + for (int i = 0; i < jsonArrayredeemables.size(); i++) { + ValidationsValidateResponseBodyRedeemablesItem.validateJsonElement(jsonArrayredeemables.get(i)); + }; } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("redeemables").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `redeemables` to be an array in the JSON string but got `%s`", jsonObj.get("redeemables").toString())); - } - - JsonArray jsonArrayredeemables = jsonObj.getAsJsonArray("redeemables"); - // validate the required field `redeemables` (array) - for (int i = 0; i < jsonArrayredeemables.size(); i++) { - ValidationsValidateResponseBodyRedeemablesItem.validateJsonElement(jsonArrayredeemables.get(i)); - }; if (jsonObj.get("skipped_redeemables") != null && !jsonObj.get("skipped_redeemables").isJsonNull()) { JsonArray jsonArrayskippedRedeemables = jsonObj.getAsJsonArray("skipped_redeemables"); if (jsonArrayskippedRedeemables != null) { @@ -477,8 +471,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("session") != null && !jsonObj.get("session").isJsonNull()) { Session.validateJsonElement(jsonObj.get("session")); } - // validate the required field `stacking_rules` - StackingRules.validateJsonElement(jsonObj.get("stacking_rules")); + // validate the optional field `stacking_rules` + if (jsonObj.get("stacking_rules") != null && !jsonObj.get("stacking_rules").isJsonNull()) { + StackingRules.validateJsonElement(jsonObj.get("stacking_rules")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/CreatePublicationCampaign.java b/src/main/java/voucherify/client/model/CreatePublicationCampaign.java index 28894b98..e39185ae 100644 --- a/src/main/java/voucherify/client/model/CreatePublicationCampaign.java +++ b/src/main/java/voucherify/client/model/CreatePublicationCampaign.java @@ -73,7 +73,7 @@ public CreatePublicationCampaign name(String name) { * Name of voucher's parent campaign or unique campaign ID that was assigned by Voucherify. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -205,7 +205,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); } /** @@ -220,15 +219,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CreatePublicationCampaign is not found in the empty JSON string", CreatePublicationCampaign.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreatePublicationCampaign.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } diff --git a/src/main/java/voucherify/client/model/CustomerId.java b/src/main/java/voucherify/client/model/CustomerId.java index 3e26ebdc..a6fbb8a4 100644 --- a/src/main/java/voucherify/client/model/CustomerId.java +++ b/src/main/java/voucherify/client/model/CustomerId.java @@ -61,9 +61,7 @@ public class CustomerId { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CUSTOMER("customer"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOMER("customer"); private String value; @@ -86,7 +84,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -120,7 +118,7 @@ public CustomerId id(String id) { * A unique identifier of an existing customer. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -141,7 +139,7 @@ public CustomerId _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -250,8 +248,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); } /** @@ -266,18 +262,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerId is not found in the empty JSON string", CustomerId.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerId.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/CustomerLoyalty.java b/src/main/java/voucherify/client/model/CustomerLoyalty.java index ac89f46b..28f09d4e 100644 --- a/src/main/java/voucherify/client/model/CustomerLoyalty.java +++ b/src/main/java/voucherify/client/model/CustomerLoyalty.java @@ -80,7 +80,7 @@ public CustomerLoyalty points(Integer points) { * Customer's loyalty points. * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPoints() { return points; } @@ -101,7 +101,7 @@ public CustomerLoyalty referredCustomers(Integer referredCustomers) { * Total number of customers referred by the customer. * @return referredCustomers **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getReferredCustomers() { return referredCustomers; } @@ -130,7 +130,7 @@ public CustomerLoyalty putCampaignsItem(String key, CustomerLoyaltyCampaignsValu * Contains campaigns with details about point balances and how many customers were referred by the customer. * @return campaigns **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Map getCampaigns() { return campaigns; } @@ -242,9 +242,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("points"); - openapiRequiredFields.add("referred_customers"); - openapiRequiredFields.add("campaigns"); } /** @@ -259,13 +256,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerLoyalty is not found in the empty JSON string", CustomerLoyalty.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerLoyalty.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); } diff --git a/src/main/java/voucherify/client/model/CustomerReferrals.java b/src/main/java/voucherify/client/model/CustomerReferrals.java index b23d43fb..920c4bfc 100644 --- a/src/main/java/voucherify/client/model/CustomerReferrals.java +++ b/src/main/java/voucherify/client/model/CustomerReferrals.java @@ -61,7 +61,7 @@ public class CustomerReferrals { public static final String SERIALIZED_NAME_CAMPAIGNS = "campaigns"; @SerializedName(SERIALIZED_NAME_CAMPAIGNS) - private List campaigns = new ArrayList<>(); + private List campaigns; public CustomerReferrals() { } @@ -76,7 +76,7 @@ public CustomerReferrals total(Integer total) { * Total number of times this customer received a referral, i.e. was referred by another customer. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -105,7 +105,7 @@ public CustomerReferrals addCampaignsItem(CustomerReferralsCampaignsItem campaig * Contains an array of campaigns that served as the source of a referral for the customer. * @return campaigns **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getCampaigns() { return campaigns; } @@ -214,8 +214,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("total"); - openapiRequiredFields.add("campaigns"); } /** @@ -230,24 +228,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerReferrals is not found in the empty JSON string", CustomerReferrals.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerReferrals.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("campaigns").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `campaigns` to be an array in the JSON string but got `%s`", jsonObj.get("campaigns").toString())); + if (jsonObj.get("campaigns") != null && !jsonObj.get("campaigns").isJsonNull()) { + JsonArray jsonArraycampaigns = jsonObj.getAsJsonArray("campaigns"); + if (jsonArraycampaigns != null) { + // ensure the json data is an array + if (!jsonObj.get("campaigns").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `campaigns` to be an array in the JSON string but got `%s`", jsonObj.get("campaigns").toString())); + } + + // validate the optional field `campaigns` (array) + for (int i = 0; i < jsonArraycampaigns.size(); i++) { + CustomerReferralsCampaignsItem.validateJsonElement(jsonArraycampaigns.get(i)); + }; + } } - - JsonArray jsonArraycampaigns = jsonObj.getAsJsonArray("campaigns"); - // validate the required field `campaigns` (array) - for (int i = 0; i < jsonArraycampaigns.size(); i++) { - CustomerReferralsCampaignsItem.validateJsonElement(jsonArraycampaigns.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/CustomerSegmentsList.java b/src/main/java/voucherify/client/model/CustomerSegmentsList.java index 032125ae..31986f20 100644 --- a/src/main/java/voucherify/client/model/CustomerSegmentsList.java +++ b/src/main/java/voucherify/client/model/CustomerSegmentsList.java @@ -65,7 +65,7 @@ public class CustomerSegmentsList { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public CustomerSegmentsList _object(String _object) { * The type of the object represented by JSON. This object stores information about customer segments. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public CustomerSegmentsList dataRef(String dataRef) { * Identifies the name of the JSON property that contains the array of segment IDs. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public CustomerSegmentsList addDataItem(SimpleSegment dataItem) { * A dictionary that contains an array of segment IDs and names. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -155,7 +155,7 @@ public CustomerSegmentsList total(Integer total) { * Total number of segments the customer belongs to. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerSegmentsList is not found in the empty JSON string", CustomerSegmentsList.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerSegmentsList.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + SimpleSegment.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - SimpleSegment.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/CustomerSummary.java b/src/main/java/voucherify/client/model/CustomerSummary.java index 0a1c1979..2e32036f 100644 --- a/src/main/java/voucherify/client/model/CustomerSummary.java +++ b/src/main/java/voucherify/client/model/CustomerSummary.java @@ -75,7 +75,7 @@ public CustomerSummary redemptions(CustomerSummaryRedemptions redemptions) { * Get redemptions * @return redemptions **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CustomerSummaryRedemptions getRedemptions() { return redemptions; } @@ -96,7 +96,7 @@ public CustomerSummary orders(CustomerSummaryOrders orders) { * Get orders * @return orders **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CustomerSummaryOrders getOrders() { return orders; } @@ -205,8 +205,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("redemptions"); - openapiRequiredFields.add("orders"); } /** @@ -221,18 +219,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerSummary is not found in the empty JSON string", CustomerSummary.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerSummary.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `redemptions` - CustomerSummaryRedemptions.validateJsonElement(jsonObj.get("redemptions")); - // validate the required field `orders` - CustomerSummaryOrders.validateJsonElement(jsonObj.get("orders")); + // validate the optional field `redemptions` + if (jsonObj.get("redemptions") != null && !jsonObj.get("redemptions").isJsonNull()) { + CustomerSummaryRedemptions.validateJsonElement(jsonObj.get("redemptions")); + } + // validate the optional field `orders` + if (jsonObj.get("orders") != null && !jsonObj.get("orders").isJsonNull()) { + CustomerSummaryOrders.validateJsonElement(jsonObj.get("orders")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/CustomerSummaryOrders.java b/src/main/java/voucherify/client/model/CustomerSummaryOrders.java index c8fa1a7e..5d1bcc31 100644 --- a/src/main/java/voucherify/client/model/CustomerSummaryOrders.java +++ b/src/main/java/voucherify/client/model/CustomerSummaryOrders.java @@ -86,7 +86,7 @@ public CustomerSummaryOrders totalAmount(Integer totalAmount) { * The total amount spent by the customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. * @return totalAmount **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotalAmount() { return totalAmount; } @@ -107,7 +107,7 @@ public CustomerSummaryOrders totalCount(Integer totalCount) { * Total number of orders made by the customer. * @return totalCount **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotalCount() { return totalCount; } @@ -128,7 +128,7 @@ public CustomerSummaryOrders averageAmount(Integer averageAmount) { * Average amount spent on orders. `total_amount` &divide; `total_count`. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. * @return averageAmount **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getAverageAmount() { return averageAmount; } @@ -149,7 +149,7 @@ public CustomerSummaryOrders lastOrderAmount(Integer lastOrderAmount) { * Amount spent on last order. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. * @return lastOrderAmount **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getLastOrderAmount() { return lastOrderAmount; } @@ -288,10 +288,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("total_amount"); - openapiRequiredFields.add("total_count"); - openapiRequiredFields.add("average_amount"); - openapiRequiredFields.add("last_order_amount"); } /** @@ -306,13 +302,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerSummaryOrders is not found in the empty JSON string", CustomerSummaryOrders.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerSummaryOrders.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); } diff --git a/src/main/java/voucherify/client/model/CustomerSummaryRedemptions.java b/src/main/java/voucherify/client/model/CustomerSummaryRedemptions.java index 4a6e9d47..9db2432b 100644 --- a/src/main/java/voucherify/client/model/CustomerSummaryRedemptions.java +++ b/src/main/java/voucherify/client/model/CustomerSummaryRedemptions.java @@ -99,7 +99,7 @@ public CustomerSummaryRedemptions totalRedeemed(Integer totalRedeemed) { * Total number of redemptions made by the customer. * @return totalRedeemed **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotalRedeemed() { return totalRedeemed; } @@ -120,7 +120,7 @@ public CustomerSummaryRedemptions totalFailed(Integer totalFailed) { * Total number of redemptions that failed. * @return totalFailed **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotalFailed() { return totalFailed; } @@ -141,7 +141,7 @@ public CustomerSummaryRedemptions totalSucceeded(Integer totalSucceeded) { * Total number of redemptions that succeeded. * @return totalSucceeded **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotalSucceeded() { return totalSucceeded; } @@ -162,7 +162,7 @@ public CustomerSummaryRedemptions totalRolledBack(Integer totalRolledBack) { * Total number of redemptions that were rolled back for the customer. * @return totalRolledBack **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotalRolledBack() { return totalRolledBack; } @@ -183,7 +183,7 @@ public CustomerSummaryRedemptions totalRollbackFailed(Integer totalRollbackFaile * Total number of redemption rollbacks that failed. * @return totalRollbackFailed **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotalRollbackFailed() { return totalRollbackFailed; } @@ -204,7 +204,7 @@ public CustomerSummaryRedemptions totalRollbackSucceeded(Integer totalRollbackSu * Total number of redemption rollbacks that succeeded. * @return totalRollbackSucceeded **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotalRollbackSucceeded() { return totalRollbackSucceeded; } @@ -225,7 +225,7 @@ public CustomerSummaryRedemptions gift(CustomerSummaryRedemptionsGift gift) { * Get gift * @return gift **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CustomerSummaryRedemptionsGift getGift() { return gift; } @@ -246,7 +246,7 @@ public CustomerSummaryRedemptions loyaltyCard(CustomerSummaryRedemptionsLoyaltyC * Get loyaltyCard * @return loyaltyCard **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CustomerSummaryRedemptionsLoyaltyCard getLoyaltyCard() { return loyaltyCard; } @@ -373,14 +373,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("total_redeemed"); - openapiRequiredFields.add("total_failed"); - openapiRequiredFields.add("total_succeeded"); - openapiRequiredFields.add("total_rolled_back"); - openapiRequiredFields.add("total_rollback_failed"); - openapiRequiredFields.add("total_rollback_succeeded"); - openapiRequiredFields.add("gift"); - openapiRequiredFields.add("loyalty_card"); } /** @@ -395,18 +387,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerSummaryRedemptions is not found in the empty JSON string", CustomerSummaryRedemptions.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerSummaryRedemptions.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `gift` - CustomerSummaryRedemptionsGift.validateJsonElement(jsonObj.get("gift")); - // validate the required field `loyalty_card` - CustomerSummaryRedemptionsLoyaltyCard.validateJsonElement(jsonObj.get("loyalty_card")); + // validate the optional field `gift` + if (jsonObj.get("gift") != null && !jsonObj.get("gift").isJsonNull()) { + CustomerSummaryRedemptionsGift.validateJsonElement(jsonObj.get("gift")); + } + // validate the optional field `loyalty_card` + if (jsonObj.get("loyalty_card") != null && !jsonObj.get("loyalty_card").isJsonNull()) { + CustomerSummaryRedemptionsLoyaltyCard.validateJsonElement(jsonObj.get("loyalty_card")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/CustomerSummaryRedemptionsGift.java b/src/main/java/voucherify/client/model/CustomerSummaryRedemptionsGift.java index 40fd3f5e..885888e0 100644 --- a/src/main/java/voucherify/client/model/CustomerSummaryRedemptionsGift.java +++ b/src/main/java/voucherify/client/model/CustomerSummaryRedemptionsGift.java @@ -73,7 +73,7 @@ public CustomerSummaryRedemptionsGift redeemedAmount(Integer redeemedAmount) { * Total amount of gift card credits redeemed by customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. * @return redeemedAmount **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getRedeemedAmount() { return redeemedAmount; } @@ -94,7 +94,7 @@ public CustomerSummaryRedemptionsGift amountToGo(Integer amountToGo) { * Remaining gift card balance across all gift cards. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. * @return amountToGo **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getAmountToGo() { return amountToGo; } @@ -203,8 +203,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("redeemed_amount"); - openapiRequiredFields.add("amount_to_go"); } /** @@ -219,13 +217,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerSummaryRedemptionsGift is not found in the empty JSON string", CustomerSummaryRedemptionsGift.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerSummaryRedemptionsGift.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); } diff --git a/src/main/java/voucherify/client/model/CustomerSummaryRedemptionsLoyaltyCard.java b/src/main/java/voucherify/client/model/CustomerSummaryRedemptionsLoyaltyCard.java index f6974998..03391448 100644 --- a/src/main/java/voucherify/client/model/CustomerSummaryRedemptionsLoyaltyCard.java +++ b/src/main/java/voucherify/client/model/CustomerSummaryRedemptionsLoyaltyCard.java @@ -73,7 +73,7 @@ public CustomerSummaryRedemptionsLoyaltyCard redeemedPoints(Integer redeemedPoin * Total number of loyalty points redeemed by the customer. * @return redeemedPoints **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getRedeemedPoints() { return redeemedPoints; } @@ -94,7 +94,7 @@ public CustomerSummaryRedemptionsLoyaltyCard pointsToGo(Integer pointsToGo) { * Sum of remaining available point balance across all loyalty cards. * @return pointsToGo **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPointsToGo() { return pointsToGo; } @@ -203,8 +203,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("redeemed_points"); - openapiRequiredFields.add("points_to_go"); } /** @@ -219,13 +217,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerSummaryRedemptionsLoyaltyCard is not found in the empty JSON string", CustomerSummaryRedemptionsLoyaltyCard.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerSummaryRedemptionsLoyaltyCard.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); } diff --git a/src/main/java/voucherify/client/model/CustomerWithSummaryLoyaltyReferrals.java b/src/main/java/voucherify/client/model/CustomerWithSummaryLoyaltyReferrals.java index 4f7cc32d..41780ea8 100644 --- a/src/main/java/voucherify/client/model/CustomerWithSummaryLoyaltyReferrals.java +++ b/src/main/java/voucherify/client/model/CustomerWithSummaryLoyaltyReferrals.java @@ -133,9 +133,7 @@ public class CustomerWithSummaryLoyaltyReferrals { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CUSTOMER("customer"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOMER("customer"); private String value; @@ -158,7 +156,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -549,7 +547,7 @@ public CustomerWithSummaryLoyaltyReferrals _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -717,7 +715,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); } /** @@ -732,13 +729,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomerWithSummaryLoyaltyReferrals is not found in the empty JSON string", CustomerWithSummaryLoyaltyReferrals.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomerWithSummaryLoyaltyReferrals.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); @@ -778,7 +768,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("assets") != null && !jsonObj.get("assets").isJsonNull()) { CustomerResponseDataAssets.validateJsonElement(jsonObj.get("assets")); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/CustomersCreateResponseBody.java b/src/main/java/voucherify/client/model/CustomersCreateResponseBody.java index f9262343..84ba664b 100644 --- a/src/main/java/voucherify/client/model/CustomersCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/CustomersCreateResponseBody.java @@ -101,9 +101,7 @@ public class CustomersCreateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CUSTOMER("customer"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOMER("customer"); private String value; @@ -126,7 +124,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -381,7 +379,7 @@ public CustomersCreateResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -717,7 +715,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); } /** @@ -732,13 +729,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomersCreateResponseBody is not found in the empty JSON string", CustomersCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomersCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); @@ -762,7 +752,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("assets") != null && !jsonObj.get("assets").isJsonNull()) { CustomerResponseDataAssets.validateJsonElement(jsonObj.get("assets")); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/CustomersGetResponseBody.java b/src/main/java/voucherify/client/model/CustomersGetResponseBody.java index fb59bba7..5f0d4f38 100644 --- a/src/main/java/voucherify/client/model/CustomersGetResponseBody.java +++ b/src/main/java/voucherify/client/model/CustomersGetResponseBody.java @@ -101,9 +101,7 @@ public class CustomersGetResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CUSTOMER("customer"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOMER("customer"); private String value; @@ -126,7 +124,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -381,7 +379,7 @@ public CustomersGetResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -717,7 +715,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); } /** @@ -732,13 +729,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomersGetResponseBody is not found in the empty JSON string", CustomersGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomersGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); @@ -762,7 +752,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("assets") != null && !jsonObj.get("assets").isJsonNull()) { CustomerResponseDataAssets.validateJsonElement(jsonObj.get("assets")); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/CustomersImportCsvCreateResponseBody.java b/src/main/java/voucherify/client/model/CustomersImportCsvCreateResponseBody.java index f2e3b8a7..4afb622d 100644 --- a/src/main/java/voucherify/client/model/CustomersImportCsvCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/CustomersImportCsvCreateResponseBody.java @@ -69,7 +69,7 @@ public CustomersImportCsvCreateResponseBody asyncActionId(String asyncActionId) * The ID of the scheduled asynchronous action. * @return asyncActionId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAsyncActionId() { return asyncActionId; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("async_action_id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomersImportCsvCreateResponseBody is not found in the empty JSON string", CustomersImportCsvCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomersImportCsvCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("async_action_id").isJsonPrimitive()) { + if ((jsonObj.get("async_action_id") != null && !jsonObj.get("async_action_id").isJsonNull()) && !jsonObj.get("async_action_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `async_action_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_action_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/CustomersListResponseBody.java b/src/main/java/voucherify/client/model/CustomersListResponseBody.java index 510aec36..77168186 100644 --- a/src/main/java/voucherify/client/model/CustomersListResponseBody.java +++ b/src/main/java/voucherify/client/model/CustomersListResponseBody.java @@ -65,7 +65,7 @@ public class CustomersListResponseBody { public static final String SERIALIZED_NAME_CUSTOMERS = "customers"; @SerializedName(SERIALIZED_NAME_CUSTOMERS) - private List customers = new ArrayList<>(); + private List customers; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -88,7 +88,7 @@ public CustomersListResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about customers in a dictionary. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -109,7 +109,7 @@ public CustomersListResponseBody dataRef(String dataRef) { * Identifies the name of the attribute that contains the array of customer objects. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -138,7 +138,7 @@ public CustomersListResponseBody addCustomersItem(CustomerWithSummaryLoyaltyRefe * Contains array of customer objects. * @return customers **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getCustomers() { return customers; } @@ -159,7 +159,7 @@ public CustomersListResponseBody total(Integer total) { * Total number of customers. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -298,10 +298,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("customers"); - openapiRequiredFields.add("total"); } /** @@ -316,30 +312,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomersListResponseBody is not found in the empty JSON string", CustomersListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomersListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("customers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `customers` to be an array in the JSON string but got `%s`", jsonObj.get("customers").toString())); + if (jsonObj.get("customers") != null && !jsonObj.get("customers").isJsonNull()) { + JsonArray jsonArraycustomers = jsonObj.getAsJsonArray("customers"); + if (jsonArraycustomers != null) { + // ensure the json data is an array + if (!jsonObj.get("customers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `customers` to be an array in the JSON string but got `%s`", jsonObj.get("customers").toString())); + } + + // validate the optional field `customers` (array) + for (int i = 0; i < jsonArraycustomers.size(); i++) { + CustomerWithSummaryLoyaltyReferrals.validateJsonElement(jsonArraycustomers.get(i)); + }; + } } - - JsonArray jsonArraycustomers = jsonObj.getAsJsonArray("customers"); - // validate the required field `customers` (array) - for (int i = 0; i < jsonArraycustomers.size(); i++) { - CustomerWithSummaryLoyaltyReferrals.validateJsonElement(jsonArraycustomers.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/CustomersMetadataUpdateInBulkRequestBody.java b/src/main/java/voucherify/client/model/CustomersMetadataUpdateInBulkRequestBody.java index d62891dd..c7161ad5 100644 --- a/src/main/java/voucherify/client/model/CustomersMetadataUpdateInBulkRequestBody.java +++ b/src/main/java/voucherify/client/model/CustomersMetadataUpdateInBulkRequestBody.java @@ -56,7 +56,7 @@ public class CustomersMetadataUpdateInBulkRequestBody { public static final String SERIALIZED_NAME_SOURCE_IDS = "source_ids"; @SerializedName(SERIALIZED_NAME_SOURCE_IDS) - private List sourceIds = new ArrayList<>(); + private List sourceIds; public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) @@ -83,7 +83,7 @@ public CustomersMetadataUpdateInBulkRequestBody addSourceIdsItem(String sourceId * An array of customer `source_id`'s. * @return sourceIds **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getSourceIds() { return sourceIds; } @@ -104,7 +104,7 @@ public CustomersMetadataUpdateInBulkRequestBody metadata(Object metadata) { * Metadata key value pairs to be updated. A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -213,8 +213,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("source_ids"); - openapiRequiredFields.add("metadata"); } /** @@ -229,18 +227,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomersMetadataUpdateInBulkRequestBody is not found in the empty JSON string", CustomersMetadataUpdateInBulkRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomersMetadataUpdateInBulkRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the required json array is present - if (jsonObj.get("source_ids") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("source_ids").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("source_ids") != null && !jsonObj.get("source_ids").isJsonNull() && !jsonObj.get("source_ids").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `source_ids` to be an array in the JSON string but got `%s`", jsonObj.get("source_ids").toString())); } } diff --git a/src/main/java/voucherify/client/model/CustomersMetadataUpdateInBulkResponseBody.java b/src/main/java/voucherify/client/model/CustomersMetadataUpdateInBulkResponseBody.java index d66661e5..ed7c7f65 100644 --- a/src/main/java/voucherify/client/model/CustomersMetadataUpdateInBulkResponseBody.java +++ b/src/main/java/voucherify/client/model/CustomersMetadataUpdateInBulkResponseBody.java @@ -69,7 +69,7 @@ public CustomersMetadataUpdateInBulkResponseBody asyncActionId(String asyncActio * The ID of the scheduled asynchronous action. * @return asyncActionId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAsyncActionId() { return asyncActionId; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("async_action_id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomersMetadataUpdateInBulkResponseBody is not found in the empty JSON string", CustomersMetadataUpdateInBulkResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomersMetadataUpdateInBulkResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("async_action_id").isJsonPrimitive()) { + if ((jsonObj.get("async_action_id") != null && !jsonObj.get("async_action_id").isJsonNull()) && !jsonObj.get("async_action_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `async_action_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_action_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/CustomersPermanentDeletionCreateResponseBody.java b/src/main/java/voucherify/client/model/CustomersPermanentDeletionCreateResponseBody.java index 0d58e5e6..c34d5b46 100644 --- a/src/main/java/voucherify/client/model/CustomersPermanentDeletionCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/CustomersPermanentDeletionCreateResponseBody.java @@ -95,7 +95,7 @@ public CustomersPermanentDeletionCreateResponseBody id(String id) { * Unique permanent deletion object ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -116,7 +116,7 @@ public CustomersPermanentDeletionCreateResponseBody createdAt(OffsetDateTime cre * Timestamp representing the date and time when the customer was requested to be deleted in ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -137,7 +137,7 @@ public CustomersPermanentDeletionCreateResponseBody relatedObjectId(String relat * Unique customer ID that is being deleted. * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -158,7 +158,7 @@ public CustomersPermanentDeletionCreateResponseBody relatedObject(String related * Object being deleted. * @return relatedObject **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObject() { return relatedObject; } @@ -179,7 +179,7 @@ public CustomersPermanentDeletionCreateResponseBody status(String status) { * Deletion status. * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getStatus() { return status; } @@ -200,7 +200,7 @@ public CustomersPermanentDeletionCreateResponseBody dataJson(CustomersPermanentD * Get dataJson * @return dataJson **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public CustomersPermanentDeletionCreateResponseBodyDataJson getDataJson() { return dataJson; } @@ -221,7 +221,7 @@ public CustomersPermanentDeletionCreateResponseBody _object(String _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -345,13 +345,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("related_object_id"); - openapiRequiredFields.add("related_object"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("data_json"); - openapiRequiredFields.add("object"); } /** @@ -366,29 +359,24 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomersPermanentDeletionCreateResponseBody is not found in the empty JSON string", CustomersPermanentDeletionCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomersPermanentDeletionCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } - if (!jsonObj.get("related_object").isJsonPrimitive()) { + if ((jsonObj.get("related_object") != null && !jsonObj.get("related_object").isJsonNull()) && !jsonObj.get("related_object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object").toString())); } - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } - // validate the required field `data_json` - CustomersPermanentDeletionCreateResponseBodyDataJson.validateJsonElement(jsonObj.get("data_json")); - if (!jsonObj.get("object").isJsonPrimitive()) { + // validate the optional field `data_json` + if (jsonObj.get("data_json") != null && !jsonObj.get("data_json").isJsonNull()) { + CustomersPermanentDeletionCreateResponseBodyDataJson.validateJsonElement(jsonObj.get("data_json")); + } + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } } diff --git a/src/main/java/voucherify/client/model/CustomersPermanentDeletionCreateResponseBodyDataJson.java b/src/main/java/voucherify/client/model/CustomersPermanentDeletionCreateResponseBodyDataJson.java index d469bd9e..fd14b1ec 100644 --- a/src/main/java/voucherify/client/model/CustomersPermanentDeletionCreateResponseBodyDataJson.java +++ b/src/main/java/voucherify/client/model/CustomersPermanentDeletionCreateResponseBodyDataJson.java @@ -93,7 +93,7 @@ public CustomersPermanentDeletionCreateResponseBodyDataJson events(Integer event * Number of events deleted. * @return events **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getEvents() { return events; } @@ -114,7 +114,7 @@ public CustomersPermanentDeletionCreateResponseBodyDataJson customerEvents(Integ * Number of customer events deleted. * @return customerEvents **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getCustomerEvents() { return customerEvents; } @@ -135,7 +135,7 @@ public CustomersPermanentDeletionCreateResponseBodyDataJson dailyEvents(Integer * Number of daily events deleted. * @return dailyEvents **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getDailyEvents() { return dailyEvents; } @@ -156,7 +156,7 @@ public CustomersPermanentDeletionCreateResponseBodyDataJson segments(Integer seg * Number of segments deleted. * @return segments **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getSegments() { return segments; } @@ -177,7 +177,7 @@ public CustomersPermanentDeletionCreateResponseBodyDataJson orders(Integer order * Number of orders deleted. * @return orders **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getOrders() { return orders; } @@ -198,7 +198,7 @@ public CustomersPermanentDeletionCreateResponseBodyDataJson orderEvents(Integer * Number of order events deleted. * @return orderEvents **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getOrderEvents() { return orderEvents; } @@ -219,7 +219,7 @@ public CustomersPermanentDeletionCreateResponseBodyDataJson customer(Integer cus * Number of customers deleted. * @return customer **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getCustomer() { return customer; } @@ -343,13 +343,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("events"); - openapiRequiredFields.add("customer_events"); - openapiRequiredFields.add("daily_events"); - openapiRequiredFields.add("segments"); - openapiRequiredFields.add("orders"); - openapiRequiredFields.add("order_events"); - openapiRequiredFields.add("customer"); } /** @@ -364,13 +357,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomersPermanentDeletionCreateResponseBodyDataJson is not found in the empty JSON string", CustomersPermanentDeletionCreateResponseBodyDataJson.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomersPermanentDeletionCreateResponseBodyDataJson.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); } diff --git a/src/main/java/voucherify/client/model/CustomersSegmentsListResponseBody.java b/src/main/java/voucherify/client/model/CustomersSegmentsListResponseBody.java index b1587fcb..9d0b33cd 100644 --- a/src/main/java/voucherify/client/model/CustomersSegmentsListResponseBody.java +++ b/src/main/java/voucherify/client/model/CustomersSegmentsListResponseBody.java @@ -65,7 +65,7 @@ public class CustomersSegmentsListResponseBody { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public CustomersSegmentsListResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about customer segments. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public CustomersSegmentsListResponseBody dataRef(String dataRef) { * Identifies the name of the JSON property that contains the array of segment IDs. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public CustomersSegmentsListResponseBody addDataItem(SimpleSegment dataItem) { * A dictionary that contains an array of segment IDs and names. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -155,7 +155,7 @@ public CustomersSegmentsListResponseBody total(Integer total) { * Total number of segments the customer belongs to. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomersSegmentsListResponseBody is not found in the empty JSON string", CustomersSegmentsListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomersSegmentsListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + SimpleSegment.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - SimpleSegment.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/CustomersUpdateInBulkRequestBody.java b/src/main/java/voucherify/client/model/CustomersUpdateInBulkRequestBody.java index 34988ec2..4258d86a 100644 --- a/src/main/java/voucherify/client/model/CustomersUpdateInBulkRequestBody.java +++ b/src/main/java/voucherify/client/model/CustomersUpdateInBulkRequestBody.java @@ -272,7 +272,7 @@ public CustomersUpdateInBulkRequestBody sourceId(String sourceId) { * Unique customer source ID. * @return sourceId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getSourceId() { return sourceId; } @@ -413,7 +413,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("source_id"); } /** @@ -428,13 +427,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomersUpdateInBulkRequestBody is not found in the empty JSON string", CustomersUpdateInBulkRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomersUpdateInBulkRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); @@ -452,7 +444,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { CustomerBaseAddress.validateJsonElement(jsonObj.get("address")); } - if (!jsonObj.get("source_id").isJsonPrimitive()) { + if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/CustomersUpdateInBulkResponseBody.java b/src/main/java/voucherify/client/model/CustomersUpdateInBulkResponseBody.java index d9b1a938..43c14775 100644 --- a/src/main/java/voucherify/client/model/CustomersUpdateInBulkResponseBody.java +++ b/src/main/java/voucherify/client/model/CustomersUpdateInBulkResponseBody.java @@ -69,7 +69,7 @@ public CustomersUpdateInBulkResponseBody asyncActionId(String asyncActionId) { * The ID of the scheduled asynchronous action. * @return asyncActionId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAsyncActionId() { return asyncActionId; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("async_action_id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomersUpdateInBulkResponseBody is not found in the empty JSON string", CustomersUpdateInBulkResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomersUpdateInBulkResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("async_action_id").isJsonPrimitive()) { + if ((jsonObj.get("async_action_id") != null && !jsonObj.get("async_action_id").isJsonNull()) && !jsonObj.get("async_action_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `async_action_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_action_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/CustomersUpdateResponseBody.java b/src/main/java/voucherify/client/model/CustomersUpdateResponseBody.java index 7066f3a5..99ffdadf 100644 --- a/src/main/java/voucherify/client/model/CustomersUpdateResponseBody.java +++ b/src/main/java/voucherify/client/model/CustomersUpdateResponseBody.java @@ -101,9 +101,7 @@ public class CustomersUpdateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CUSTOMER("customer"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOMER("customer"); private String value; @@ -126,7 +124,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -381,7 +379,7 @@ public CustomersUpdateResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -717,7 +715,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); } /** @@ -732,13 +729,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in CustomersUpdateResponseBody is not found in the empty JSON string", CustomersUpdateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CustomersUpdateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); @@ -762,7 +752,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("assets") != null && !jsonObj.get("assets").isJsonNull()) { CustomerResponseDataAssets.validateJsonElement(jsonObj.get("assets")); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/Discount.java b/src/main/java/voucherify/client/model/Discount.java index c5f041e1..001558db 100644 --- a/src/main/java/voucherify/client/model/Discount.java +++ b/src/main/java/voucherify/client/model/Discount.java @@ -69,9 +69,7 @@ public enum TypeEnum { PERCENT("PERCENT"), - FIXED("FIXED"), - - UNKNOWN_ENUM("unknown_enum"); + FIXED("FIXED"); private String value; @@ -94,7 +92,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -146,9 +144,7 @@ public enum EffectEnum { ADD_NEW_ITEMS("ADD_NEW_ITEMS"), - ADD_MANY_ITEMS("ADD_MANY_ITEMS"), - - UNKNOWN_ENUM("unknown_enum"); + ADD_MANY_ITEMS("ADD_MANY_ITEMS"); private String value; @@ -171,7 +167,7 @@ public static EffectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -253,7 +249,7 @@ public Discount type(TypeEnum type) { * Get type * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -751,7 +747,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); } /** @@ -766,15 +761,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in Discount is not found in the empty JSON string", Discount.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Discount.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { diff --git a/src/main/java/voucherify/client/model/DiscountUnitMultipleOneUnit.java b/src/main/java/voucherify/client/model/DiscountUnitMultipleOneUnit.java index 94874550..c93dd7b1 100644 --- a/src/main/java/voucherify/client/model/DiscountUnitMultipleOneUnit.java +++ b/src/main/java/voucherify/client/model/DiscountUnitMultipleOneUnit.java @@ -70,9 +70,7 @@ public class DiscountUnitMultipleOneUnit { public enum EffectEnum { NEW_ITEMS("ADD_NEW_ITEMS"), - MISSING_ITEMS("ADD_MISSING_ITEMS"), - - UNKNOWN_ENUM("unknown_enum"); + MISSING_ITEMS("ADD_MISSING_ITEMS"); private String value; @@ -95,7 +93,7 @@ public static EffectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -183,7 +181,7 @@ public DiscountUnitMultipleOneUnit effect(EffectEnum effect) { * Defines how the unit is added to the customer's order. * @return effect **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public EffectEnum getEffect() { return effect; } @@ -204,7 +202,7 @@ public DiscountUnitMultipleOneUnit unitType(String unitType) { * The product deemed as free, chosen from product inventory (e.g. time, items). * @return unitType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getUnitType() { return unitType; } @@ -367,8 +365,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("effect"); - openapiRequiredFields.add("unit_type"); } /** @@ -383,18 +379,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in DiscountUnitMultipleOneUnit is not found in the empty JSON string", DiscountUnitMultipleOneUnit.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DiscountUnitMultipleOneUnit.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("unit_off_formula") != null && !jsonObj.get("unit_off_formula").isJsonNull()) && !jsonObj.get("unit_off_formula").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `unit_off_formula` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unit_off_formula").toString())); } - if (!jsonObj.get("effect").isJsonPrimitive()) { + if ((jsonObj.get("effect") != null && !jsonObj.get("effect").isJsonNull()) && !jsonObj.get("effect").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `effect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("effect").toString())); } try { @@ -410,7 +399,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `effect` to be a valid element of EffectEnum enum got `%s` instead", jsonObj.get("effect").toString())); } } - if (!jsonObj.get("unit_type").isJsonPrimitive()) { + if ((jsonObj.get("unit_type") != null && !jsonObj.get("unit_type").isJsonNull()) && !jsonObj.get("unit_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `unit_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unit_type").toString())); } // validate the optional field `product` diff --git a/src/main/java/voucherify/client/model/EarningRule.java b/src/main/java/voucherify/client/model/EarningRule.java index d8f03004..da46b04f 100644 --- a/src/main/java/voucherify/client/model/EarningRule.java +++ b/src/main/java/voucherify/client/model/EarningRule.java @@ -96,9 +96,7 @@ public class EarningRule { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EARNING_RULE("earning_rule"), - - UNKNOWN_ENUM("unknown_enum"); + EARNING_RULE("earning_rule"); private String value; @@ -121,7 +119,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -175,9 +173,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -200,7 +196,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -254,7 +250,7 @@ public EarningRule id(String id) { * Assigned by the Voucherify API, identifies the earning rule object. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -275,7 +271,7 @@ public EarningRule createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -296,7 +292,7 @@ public EarningRule loyalty(EarningRuleBaseLoyalty loyalty) { * Get loyalty * @return loyalty **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public EarningRuleBaseLoyalty getLoyalty() { return loyalty; } @@ -380,7 +376,7 @@ public EarningRule source(EarningRuleBaseSource source) { * Get source * @return source **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public EarningRuleBaseSource getSource() { return source; } @@ -401,7 +397,7 @@ public EarningRule _object(ObjectEnum _object) { * The type of the object represented by JSON. Default is earning_rule. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -422,7 +418,7 @@ public EarningRule automationId(String automationId) { * For internal use by Voucherify. * @return automationId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAutomationId() { return automationId; } @@ -556,7 +552,7 @@ public EarningRule metadata(Object metadata) { * 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. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -619,7 +615,7 @@ public EarningRule active(Boolean active) { * A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. - `true` indicates an active earning rule - `false` indicates an inactive earning rule * @return active **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getActive() { return active; } @@ -787,14 +783,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("loyalty"); - openapiRequiredFields.add("source"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("automation_id"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("active"); } /** @@ -809,19 +797,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EarningRule is not found in the empty JSON string", EarningRule.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EarningRule.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - // validate the required field `loyalty` - EarningRuleBaseLoyalty.validateJsonElement(jsonObj.get("loyalty")); + // validate the optional field `loyalty` + if (jsonObj.get("loyalty") != null && !jsonObj.get("loyalty").isJsonNull()) { + EarningRuleBaseLoyalty.validateJsonElement(jsonObj.get("loyalty")); + } // validate the optional field `custom_event` if (jsonObj.get("custom_event") != null && !jsonObj.get("custom_event").isJsonNull()) { EarningRuleBaseCustomEvent.validateJsonElement(jsonObj.get("custom_event")); @@ -830,9 +813,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("segment") != null && !jsonObj.get("segment").isJsonNull()) { EarningRuleBaseSegment.validateJsonElement(jsonObj.get("segment")); } - // validate the required field `source` - EarningRuleBaseSource.validateJsonElement(jsonObj.get("source")); - if (!jsonObj.get("object").isJsonPrimitive()) { + // validate the optional field `source` + if (jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) { + EarningRuleBaseSource.validateJsonElement(jsonObj.get("source")); + } + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -848,7 +833,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("automation_id").isJsonPrimitive()) { + if ((jsonObj.get("automation_id") != null && !jsonObj.get("automation_id").isJsonNull()) && !jsonObj.get("automation_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `automation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("automation_id").toString())); } if ((jsonObj.get("start_date") != null && !jsonObj.get("start_date").isJsonNull()) && !jsonObj.get("start_date").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/EarningRuleBase.java b/src/main/java/voucherify/client/model/EarningRuleBase.java index 9491123f..55d87efb 100644 --- a/src/main/java/voucherify/client/model/EarningRuleBase.java +++ b/src/main/java/voucherify/client/model/EarningRuleBase.java @@ -95,9 +95,7 @@ public class EarningRuleBase { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EARNING_RULE("earning_rule"), - - UNKNOWN_ENUM("unknown_enum"); + EARNING_RULE("earning_rule"); private String value; @@ -120,7 +118,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -174,9 +172,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -199,7 +195,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -241,7 +237,7 @@ public EarningRuleBase id(String id) { * Assigned by the Voucherify API, identifies the earning rule object. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -262,7 +258,7 @@ public EarningRuleBase createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -283,7 +279,7 @@ public EarningRuleBase loyalty(EarningRuleBaseLoyalty loyalty) { * Get loyalty * @return loyalty **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public EarningRuleBaseLoyalty getLoyalty() { return loyalty; } @@ -367,7 +363,7 @@ public EarningRuleBase source(EarningRuleBaseSource source) { * Get source * @return source **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public EarningRuleBaseSource getSource() { return source; } @@ -388,7 +384,7 @@ public EarningRuleBase _object(ObjectEnum _object) { * The type of the object represented by JSON. Default is earning_rule. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -409,7 +405,7 @@ public EarningRuleBase automationId(String automationId) { * For internal use by Voucherify. * @return automationId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAutomationId() { return automationId; } @@ -543,7 +539,7 @@ public EarningRuleBase metadata(Object metadata) { * 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. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -691,13 +687,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("loyalty"); - openapiRequiredFields.add("source"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("automation_id"); - openapiRequiredFields.add("metadata"); } /** @@ -712,19 +701,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EarningRuleBase is not found in the empty JSON string", EarningRuleBase.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EarningRuleBase.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - // validate the required field `loyalty` - EarningRuleBaseLoyalty.validateJsonElement(jsonObj.get("loyalty")); + // validate the optional field `loyalty` + if (jsonObj.get("loyalty") != null && !jsonObj.get("loyalty").isJsonNull()) { + EarningRuleBaseLoyalty.validateJsonElement(jsonObj.get("loyalty")); + } // validate the optional field `custom_event` if (jsonObj.get("custom_event") != null && !jsonObj.get("custom_event").isJsonNull()) { EarningRuleBaseCustomEvent.validateJsonElement(jsonObj.get("custom_event")); @@ -733,9 +717,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("segment") != null && !jsonObj.get("segment").isJsonNull()) { EarningRuleBaseSegment.validateJsonElement(jsonObj.get("segment")); } - // validate the required field `source` - EarningRuleBaseSource.validateJsonElement(jsonObj.get("source")); - if (!jsonObj.get("object").isJsonPrimitive()) { + // validate the optional field `source` + if (jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) { + EarningRuleBaseSource.validateJsonElement(jsonObj.get("source")); + } + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -751,7 +737,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("automation_id").isJsonPrimitive()) { + if ((jsonObj.get("automation_id") != null && !jsonObj.get("automation_id").isJsonNull()) && !jsonObj.get("automation_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `automation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("automation_id").toString())); } if ((jsonObj.get("start_date") != null && !jsonObj.get("start_date").isJsonNull()) && !jsonObj.get("start_date").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/EarningRuleBaseCustomEvent.java b/src/main/java/voucherify/client/model/EarningRuleBaseCustomEvent.java index d600970c..c8a953b5 100644 --- a/src/main/java/voucherify/client/model/EarningRuleBaseCustomEvent.java +++ b/src/main/java/voucherify/client/model/EarningRuleBaseCustomEvent.java @@ -69,7 +69,7 @@ public EarningRuleBaseCustomEvent schemaId(String schemaId) { * Get schemaId * @return schemaId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getSchemaId() { return schemaId; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("schema_id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EarningRuleBaseCustomEvent is not found in the empty JSON string", EarningRuleBaseCustomEvent.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EarningRuleBaseCustomEvent.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("schema_id").isJsonPrimitive()) { + if ((jsonObj.get("schema_id") != null && !jsonObj.get("schema_id").isJsonNull()) && !jsonObj.get("schema_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `schema_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("schema_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/EarningRuleBaseLoyalty.java b/src/main/java/voucherify/client/model/EarningRuleBaseLoyalty.java index 767bd94f..8410abc9 100644 --- a/src/main/java/voucherify/client/model/EarningRuleBaseLoyalty.java +++ b/src/main/java/voucherify/client/model/EarningRuleBaseLoyalty.java @@ -63,9 +63,7 @@ public class EarningRuleBaseLoyalty { public enum TypeEnum { PROPORTIONAL("PROPORTIONAL"), - FIXED("FIXED"), - - UNKNOWN_ENUM("unknown_enum"); + FIXED("FIXED"); private String value; @@ -88,7 +86,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -128,9 +126,7 @@ public enum CalculationTypeEnum { CUSTOMER_METADATA("CUSTOMER_METADATA"), - CUSTOM_EVENT_METADATA("CUSTOM_EVENT_METADATA"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOM_EVENT_METADATA("CUSTOM_EVENT_METADATA"); private String value; @@ -153,7 +149,7 @@ public static CalculationTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomEvent.java b/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomEvent.java index f85fcd50..6c45a965 100644 --- a/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomEvent.java +++ b/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomEvent.java @@ -70,7 +70,7 @@ public EarningRuleBaseLoyaltyCustomEvent metadata(EarningRuleBaseLoyaltyCustomEv * Get metadata * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public EarningRuleBaseLoyaltyCustomEventMetadata getMetadata() { return metadata; } @@ -176,7 +176,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata"); } /** @@ -191,16 +190,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EarningRuleBaseLoyaltyCustomEvent is not found in the empty JSON string", EarningRuleBaseLoyaltyCustomEvent.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EarningRuleBaseLoyaltyCustomEvent.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `metadata` - EarningRuleBaseLoyaltyCustomEventMetadata.validateJsonElement(jsonObj.get("metadata")); + // validate the optional field `metadata` + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + EarningRuleBaseLoyaltyCustomEventMetadata.validateJsonElement(jsonObj.get("metadata")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomEventMetadata.java b/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomEventMetadata.java index 3e5276d4..85865862 100644 --- a/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomEventMetadata.java +++ b/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomEventMetadata.java @@ -77,7 +77,7 @@ public EarningRuleBaseLoyaltyCustomEventMetadata every(Integer every) { * For how many increments of the customer metadata property to grant points for. * @return every **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getEvery() { return every; } @@ -98,7 +98,7 @@ public EarningRuleBaseLoyaltyCustomEventMetadata points(Integer points) { * Number of points to be awarded, i.e. how many points to be added to the loyalty card. * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPoints() { return points; } @@ -119,7 +119,7 @@ public EarningRuleBaseLoyaltyCustomEventMetadata property(String property) { * Custom event metadata property. * @return property **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getProperty() { return property; } @@ -231,9 +231,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("every"); - openapiRequiredFields.add("points"); - openapiRequiredFields.add("property"); } /** @@ -248,15 +245,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EarningRuleBaseLoyaltyCustomEventMetadata is not found in the empty JSON string", EarningRuleBaseLoyaltyCustomEventMetadata.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EarningRuleBaseLoyaltyCustomEventMetadata.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("property").isJsonPrimitive()) { + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); } } diff --git a/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomer.java b/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomer.java index 75dbd066..3a7a7f9b 100644 --- a/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomer.java +++ b/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomer.java @@ -70,7 +70,7 @@ public EarningRuleBaseLoyaltyCustomer metadata(EarningRuleBaseLoyaltyCustomerMet * Get metadata * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public EarningRuleBaseLoyaltyCustomerMetadata getMetadata() { return metadata; } @@ -176,7 +176,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metadata"); } /** @@ -191,16 +190,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EarningRuleBaseLoyaltyCustomer is not found in the empty JSON string", EarningRuleBaseLoyaltyCustomer.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EarningRuleBaseLoyaltyCustomer.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `metadata` - EarningRuleBaseLoyaltyCustomerMetadata.validateJsonElement(jsonObj.get("metadata")); + // validate the optional field `metadata` + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + EarningRuleBaseLoyaltyCustomerMetadata.validateJsonElement(jsonObj.get("metadata")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomerMetadata.java b/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomerMetadata.java index aef66992..be51608c 100644 --- a/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomerMetadata.java +++ b/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyCustomerMetadata.java @@ -77,7 +77,7 @@ public EarningRuleBaseLoyaltyCustomerMetadata every(Integer every) { * For how many increments of the customer metadata property to grant points for. * @return every **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getEvery() { return every; } @@ -98,7 +98,7 @@ public EarningRuleBaseLoyaltyCustomerMetadata points(Integer points) { * Number of points to be awarded, i.e. how many points to be added to the loyalty card. * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPoints() { return points; } @@ -119,7 +119,7 @@ public EarningRuleBaseLoyaltyCustomerMetadata property(String property) { * Customer metadata property. * @return property **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getProperty() { return property; } @@ -231,9 +231,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("every"); - openapiRequiredFields.add("points"); - openapiRequiredFields.add("property"); } /** @@ -248,15 +245,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EarningRuleBaseLoyaltyCustomerMetadata is not found in the empty JSON string", EarningRuleBaseLoyaltyCustomerMetadata.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EarningRuleBaseLoyaltyCustomerMetadata.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("property").isJsonPrimitive()) { + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); } } diff --git a/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyOrderAmount.java b/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyOrderAmount.java index e170b4fe..1d106c4f 100644 --- a/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyOrderAmount.java +++ b/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyOrderAmount.java @@ -73,7 +73,7 @@ public EarningRuleBaseLoyaltyOrderAmount every(Integer every) { * Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000. * @return every **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getEvery() { return every; } @@ -94,7 +94,7 @@ public EarningRuleBaseLoyaltyOrderAmount points(Integer points) { * Number of points to be awarded, i.e. how many points to be added to the loyalty card. * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPoints() { return points; } @@ -203,8 +203,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("every"); - openapiRequiredFields.add("points"); } /** @@ -219,13 +217,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EarningRuleBaseLoyaltyOrderAmount is not found in the empty JSON string", EarningRuleBaseLoyaltyOrderAmount.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EarningRuleBaseLoyaltyOrderAmount.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); } diff --git a/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyOrderItemsQuantity.java b/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyOrderItemsQuantity.java index 8a3649df..19933175 100644 --- a/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyOrderItemsQuantity.java +++ b/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyOrderItemsQuantity.java @@ -69,9 +69,7 @@ public enum ObjectEnum { PRODUCT("product"), - SKU("sku"), - - UNKNOWN_ENUM("unknown_enum"); + SKU("sku"); private String value; @@ -94,7 +92,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -132,7 +130,7 @@ public EarningRuleBaseLoyaltyOrderItemsQuantity every(Integer every) { * Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000. * @return every **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getEvery() { return every; } @@ -153,7 +151,7 @@ public EarningRuleBaseLoyaltyOrderItemsQuantity points(Integer points) { * Number of points to be awarded, i.e. how many points to be added to the loyalty card. * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPoints() { return points; } @@ -174,7 +172,7 @@ public EarningRuleBaseLoyaltyOrderItemsQuantity _object(ObjectEnum _object) { * Type of object taken under consideration. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -195,7 +193,7 @@ public EarningRuleBaseLoyaltyOrderItemsQuantity id(String id) { * Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -310,10 +308,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("every"); - openapiRequiredFields.add("points"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("id"); } /** @@ -328,15 +322,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EarningRuleBaseLoyaltyOrderItemsQuantity is not found in the empty JSON string", EarningRuleBaseLoyaltyOrderItemsQuantity.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EarningRuleBaseLoyaltyOrderItemsQuantity.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -352,7 +339,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } } diff --git a/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyOrderMetadata.java b/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyOrderMetadata.java index 39a30e70..57af3b2e 100644 --- a/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyOrderMetadata.java +++ b/src/main/java/voucherify/client/model/EarningRuleBaseLoyaltyOrderMetadata.java @@ -77,7 +77,7 @@ public EarningRuleBaseLoyaltyOrderMetadata every(Integer every) { * For how many increments of the order metadata property to grant points for. * @return every **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getEvery() { return every; } @@ -98,7 +98,7 @@ public EarningRuleBaseLoyaltyOrderMetadata points(Integer points) { * Number of points to be awarded, i.e. how many points to be added to the loyalty card. * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPoints() { return points; } @@ -119,7 +119,7 @@ public EarningRuleBaseLoyaltyOrderMetadata property(String property) { * Order metadata property. * @return property **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getProperty() { return property; } @@ -231,9 +231,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("every"); - openapiRequiredFields.add("points"); - openapiRequiredFields.add("property"); } /** @@ -248,15 +245,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EarningRuleBaseLoyaltyOrderMetadata is not found in the empty JSON string", EarningRuleBaseLoyaltyOrderMetadata.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EarningRuleBaseLoyaltyOrderMetadata.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("property").isJsonPrimitive()) { + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `property` to be a primitive type in the JSON string but got `%s`", jsonObj.get("property").toString())); } } diff --git a/src/main/java/voucherify/client/model/EarningRuleBaseSegment.java b/src/main/java/voucherify/client/model/EarningRuleBaseSegment.java index 13046052..7de49517 100644 --- a/src/main/java/voucherify/client/model/EarningRuleBaseSegment.java +++ b/src/main/java/voucherify/client/model/EarningRuleBaseSegment.java @@ -69,7 +69,7 @@ public EarningRuleBaseSegment id(String id) { * Contains a unique identifier of a customer segment. Assigned by the Voucherify API. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EarningRuleBaseSegment is not found in the empty JSON string", EarningRuleBaseSegment.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EarningRuleBaseSegment.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } } diff --git a/src/main/java/voucherify/client/model/EarningRuleBaseSource.java b/src/main/java/voucherify/client/model/EarningRuleBaseSource.java index 2ea110f8..2b4753a0 100644 --- a/src/main/java/voucherify/client/model/EarningRuleBaseSource.java +++ b/src/main/java/voucherify/client/model/EarningRuleBaseSource.java @@ -65,9 +65,7 @@ public class EarningRuleBaseSource { */ @JsonAdapter(ObjectTypeEnum.Adapter.class) public enum ObjectTypeEnum { - CAMPAIGN("campaign"), - - UNKNOWN_ENUM("unknown_enum"); + CAMPAIGN("campaign"); private String value; @@ -90,7 +88,7 @@ public static ObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -145,7 +143,7 @@ public EarningRuleBaseSource objectId(String objectId) { * A unique campaign identifier assigned by the Voucherify API. * @return objectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObjectId() { return objectId; } @@ -166,7 +164,7 @@ public EarningRuleBaseSource objectType(ObjectTypeEnum objectType) { * Defines the object associated with the earning rule. Defaults to `campaign`. * @return objectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectTypeEnum getObjectType() { return objectType; } @@ -278,8 +276,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object_id"); - openapiRequiredFields.add("object_type"); } /** @@ -294,21 +290,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EarningRuleBaseSource is not found in the empty JSON string", EarningRuleBaseSource.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EarningRuleBaseSource.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("banner") != null && !jsonObj.get("banner").isJsonNull()) && !jsonObj.get("banner").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `banner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("banner").toString())); } - if (!jsonObj.get("object_id").isJsonPrimitive()) { + if ((jsonObj.get("object_id") != null && !jsonObj.get("object_id").isJsonNull()) && !jsonObj.get("object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_id").toString())); } - if (!jsonObj.get("object_type").isJsonPrimitive()) { + if ((jsonObj.get("object_type") != null && !jsonObj.get("object_type").isJsonNull()) && !jsonObj.get("object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object_type").toString())); } try { diff --git a/src/main/java/voucherify/client/model/EarningRuleBaseValidityTimeframe.java b/src/main/java/voucherify/client/model/EarningRuleBaseValidityTimeframe.java index 688b2a9b..dbab6cca 100644 --- a/src/main/java/voucherify/client/model/EarningRuleBaseValidityTimeframe.java +++ b/src/main/java/voucherify/client/model/EarningRuleBaseValidityTimeframe.java @@ -73,7 +73,7 @@ public EarningRuleBaseValidityTimeframe duration(String duration) { * Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration of PT1H will be valid for a duration of one hour. * @return duration **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDuration() { return duration; } @@ -94,7 +94,7 @@ public EarningRuleBaseValidityTimeframe interval(String interval) { * Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval of P2D will be valid every other day. * @return interval **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getInterval() { return interval; } @@ -203,8 +203,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("duration"); - openapiRequiredFields.add("interval"); } /** @@ -219,18 +217,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EarningRuleBaseValidityTimeframe is not found in the empty JSON string", EarningRuleBaseValidityTimeframe.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EarningRuleBaseValidityTimeframe.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("duration").isJsonPrimitive()) { + if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } - if (!jsonObj.get("interval").isJsonPrimitive()) { + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) && !jsonObj.get("interval").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `interval` to be a primitive type in the JSON string but got `%s`", jsonObj.get("interval").toString())); } } diff --git a/src/main/java/voucherify/client/model/EarningRuleEvent.java b/src/main/java/voucherify/client/model/EarningRuleEvent.java index e1da9484..f448c536 100644 --- a/src/main/java/voucherify/client/model/EarningRuleEvent.java +++ b/src/main/java/voucherify/client/model/EarningRuleEvent.java @@ -42,9 +42,7 @@ public enum EarningRuleEvent { CUSTOMER_LOYALTY_TIER_JOINED("customer.loyalty.tier.joined"), - CUSTOMER_LOYALTY_TIER_LEFT("customer.loyalty.tier.left"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOMER_LOYALTY_TIER_LEFT("customer.loyalty.tier.left"); private String value; @@ -67,7 +65,7 @@ public static EarningRuleEvent fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/Error.java b/src/main/java/voucherify/client/model/Error.java index c367af12..97dd5a6f 100644 --- a/src/main/java/voucherify/client/model/Error.java +++ b/src/main/java/voucherify/client/model/Error.java @@ -93,7 +93,7 @@ public Error code(Integer code) { * Error's HTTP status code. * @return code **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getCode() { return code; } @@ -135,7 +135,7 @@ public Error message(String message) { * A human-readable message providing a short description about the error. * @return message **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getMessage() { return message; } @@ -156,7 +156,7 @@ public Error details(String details) { * A human-readable message providing more details about the error. * @return details **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDetails() { return details; } @@ -343,9 +343,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("code"); - openapiRequiredFields.add("message"); - openapiRequiredFields.add("details"); } /** @@ -360,21 +357,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Error.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); } - if (!jsonObj.get("message").isJsonPrimitive()) { + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } - if (!jsonObj.get("details").isJsonPrimitive()) { + if ((jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) && !jsonObj.get("details").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `details` to be a primitive type in the JSON string but got `%s`", jsonObj.get("details").toString())); } if ((jsonObj.get("request_id") != null && !jsonObj.get("request_id").isJsonNull()) && !jsonObj.get("request_id").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/EventsCreateRequestBody.java b/src/main/java/voucherify/client/model/EventsCreateRequestBody.java index d31565a9..9a061ebf 100644 --- a/src/main/java/voucherify/client/model/EventsCreateRequestBody.java +++ b/src/main/java/voucherify/client/model/EventsCreateRequestBody.java @@ -88,7 +88,7 @@ public EventsCreateRequestBody event(String event) { * Event name. This is the same name that you used to define a custom event in the **Dashboard** > **Project Settings** > **Event Schema**. * @return event **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getEvent() { return event; } @@ -109,7 +109,7 @@ public EventsCreateRequestBody customer(Customer customer) { * Get customer * @return customer **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Customer getCustomer() { return customer; } @@ -290,8 +290,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("event"); - openapiRequiredFields.add("customer"); } /** @@ -306,19 +304,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EventsCreateRequestBody is not found in the empty JSON string", EventsCreateRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EventsCreateRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("event").isJsonPrimitive()) { + if ((jsonObj.get("event") != null && !jsonObj.get("event").isJsonNull()) && !jsonObj.get("event").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `event` to be a primitive type in the JSON string but got `%s`", jsonObj.get("event").toString())); } - // validate the required field `customer` - Customer.validateJsonElement(jsonObj.get("customer")); + // validate the optional field `customer` + if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { + Customer.validateJsonElement(jsonObj.get("customer")); + } // validate the optional field `referral` if (jsonObj.get("referral") != null && !jsonObj.get("referral").isJsonNull()) { ClientEventsCreateRequestBodyReferral.validateJsonElement(jsonObj.get("referral")); diff --git a/src/main/java/voucherify/client/model/EventsCreateResponseBody.java b/src/main/java/voucherify/client/model/EventsCreateResponseBody.java index 05aa757f..6837f0f1 100644 --- a/src/main/java/voucherify/client/model/EventsCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/EventsCreateResponseBody.java @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import voucherify.client.model.SimpleCustomerRequiredObjectType; import com.google.gson.Gson; @@ -58,9 +59,7 @@ public class EventsCreateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EVENT("event"), - - UNKNOWN_ENUM("unknown_enum"); + EVENT("event"); private String value; @@ -83,7 +82,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -133,7 +132,7 @@ public EventsCreateResponseBody _object(ObjectEnum _object) { * The object represented is an `event`. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -154,7 +153,7 @@ public EventsCreateResponseBody type(String type) { * The event name. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getType() { return type; } @@ -175,7 +174,7 @@ public EventsCreateResponseBody customer(SimpleCustomerRequiredObjectType custom * Get customer * @return customer **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public SimpleCustomerRequiredObjectType getCustomer() { return customer; } @@ -290,11 +289,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, eventsCreateResponseBody.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(_object, type, customer, referral, loyalty, additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -335,11 +345,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("customer"); - openapiRequiredFields.add("referral"); - openapiRequiredFields.add("loyalty"); } /** @@ -354,15 +359,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in EventsCreateResponseBody is not found in the empty JSON string", EventsCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EventsCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -378,11 +376,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } - // validate the required field `customer` - SimpleCustomerRequiredObjectType.validateJsonElement(jsonObj.get("customer")); + // validate the optional field `customer` + if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { + SimpleCustomerRequiredObjectType.validateJsonElement(jsonObj.get("customer")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/Export.java b/src/main/java/voucherify/client/model/Export.java index b9b46608..d40a790d 100644 --- a/src/main/java/voucherify/client/model/Export.java +++ b/src/main/java/voucherify/client/model/Export.java @@ -65,9 +65,7 @@ public class Export { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EXPORT("export"), - - UNKNOWN_ENUM("unknown_enum"); + EXPORT("export"); private String value; @@ -90,7 +88,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -126,9 +124,7 @@ public enum StatusEnum { DONE("DONE"), - ERROR("ERROR"), - - UNKNOWN_ENUM("unknown_enum"); + ERROR("ERROR"); private String value; @@ -151,7 +147,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -201,9 +197,7 @@ public enum ExportedObjectEnum { POINTS_EXPIRATION("points_expiration"), - VOUCHER_TRANSACTIONS("voucher_transactions"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER_TRANSACTIONS("voucher_transactions"); private String value; @@ -226,7 +220,7 @@ public static ExportedObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ExportOrderBase.java b/src/main/java/voucherify/client/model/ExportOrderBase.java index f0838d65..c0ab99c8 100644 --- a/src/main/java/voucherify/client/model/ExportOrderBase.java +++ b/src/main/java/voucherify/client/model/ExportOrderBase.java @@ -58,9 +58,7 @@ public class ExportOrderBase { */ @JsonAdapter(ExportedObjectEnum.Adapter.class) public enum ExportedObjectEnum { - ORDER("order"), - - UNKNOWN_ENUM("unknown_enum"); + ORDER("order"); private String value; @@ -83,7 +81,7 @@ public static ExportedObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -121,7 +119,7 @@ public ExportOrderBase exportedObject(ExportedObjectEnum exportedObject) { * The type of object to be exported. * @return exportedObject **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ExportedObjectEnum getExportedObject() { return exportedObject; } @@ -251,7 +249,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("exported_object"); } /** @@ -266,15 +263,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ExportOrderBase is not found in the empty JSON string", ExportOrderBase.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ExportOrderBase.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("exported_object").isJsonPrimitive()) { + if ((jsonObj.get("exported_object") != null && !jsonObj.get("exported_object").isJsonNull()) && !jsonObj.get("exported_object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `exported_object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exported_object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ExportOrderFields.java b/src/main/java/voucherify/client/model/ExportOrderFields.java index eb0bdb19..59f9bfc8 100644 --- a/src/main/java/voucherify/client/model/ExportOrderFields.java +++ b/src/main/java/voucherify/client/model/ExportOrderFields.java @@ -52,9 +52,7 @@ public enum ExportOrderFields { REFERRER_ID("referrer_id"), - METADATA("metadata"), - - UNKNOWN_ENUM("unknown_enum"); + METADATA("metadata"); private String value; @@ -77,7 +75,7 @@ public static ExportOrderFields fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ExportOrderOrder.java b/src/main/java/voucherify/client/model/ExportOrderOrder.java index 05f50c11..10a1618e 100644 --- a/src/main/java/voucherify/client/model/ExportOrderOrder.java +++ b/src/main/java/voucherify/client/model/ExportOrderOrder.java @@ -38,9 +38,7 @@ public enum ExportOrderOrder { _STATUS("-status"), - STATUS("status"), - - UNKNOWN_ENUM("unknown_enum"); + STATUS("status"); private String value; @@ -63,7 +61,7 @@ public static ExportOrderOrder fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ExportParameters.java b/src/main/java/voucherify/client/model/ExportParameters.java index fe43185c..b292baab 100644 --- a/src/main/java/voucherify/client/model/ExportParameters.java +++ b/src/main/java/voucherify/client/model/ExportParameters.java @@ -86,9 +86,7 @@ public enum OrderEnum { _CUSTOMER_ID("-customer_id"), - CUSTOMER_ID("customer_id"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOMER_ID("customer_id"); private String value; @@ -111,7 +109,7 @@ public static OrderEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -313,9 +311,7 @@ public enum FieldsEnum { RELATED_TRANSACTION_ID("related_transaction_id"), - DETAILS("details"), - - UNKNOWN_ENUM("unknown_enum"); + DETAILS("details"); private String value; @@ -338,7 +334,7 @@ public static FieldsEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ExportResult.java b/src/main/java/voucherify/client/model/ExportResult.java index b9425063..712463be 100644 --- a/src/main/java/voucherify/client/model/ExportResult.java +++ b/src/main/java/voucherify/client/model/ExportResult.java @@ -69,7 +69,7 @@ public ExportResult url(String url) { * URL of the CSV file location. It contains the token used for authorization in the Download export method. * @return url **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getUrl() { return url; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("url"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ExportResult is not found in the empty JSON string", ExportResult.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ExportResult.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("url").isJsonPrimitive()) { + if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } diff --git a/src/main/java/voucherify/client/model/ExportScheduledBase.java b/src/main/java/voucherify/client/model/ExportScheduledBase.java index dc19c7ab..af6d64e2 100644 --- a/src/main/java/voucherify/client/model/ExportScheduledBase.java +++ b/src/main/java/voucherify/client/model/ExportScheduledBase.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -62,9 +63,7 @@ public class ExportScheduledBase { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EXPORT("export"), - - UNKNOWN_ENUM("unknown_enum"); + EXPORT("export"); private String value; @@ -87,7 +86,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -117,9 +116,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - SCHEDULED("SCHEDULED"), - - UNKNOWN_ENUM("unknown_enum"); + SCHEDULED("SCHEDULED"); private String value; @@ -142,7 +139,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -188,7 +185,7 @@ public ExportScheduledBase id(String id) { * Unique export ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -209,7 +206,7 @@ public ExportScheduledBase _object(ObjectEnum _object) { * The type of object being represented. This object stores information about the export. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -230,7 +227,7 @@ public ExportScheduledBase createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the export was scheduled in ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -251,7 +248,7 @@ public ExportScheduledBase status(StatusEnum status) { * Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -314,7 +311,7 @@ public ExportScheduledBase userId(String userId) { * Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. * @return userId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getUserId() { return userId; } @@ -389,11 +386,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, exportScheduledBase.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(id, _object, createdAt, status, channel, result, userId, additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -438,12 +446,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("result"); - openapiRequiredFields.add("user_id"); } /** @@ -458,18 +460,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ExportScheduledBase is not found in the empty JSON string", ExportScheduledBase.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ExportScheduledBase.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -485,7 +480,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -504,7 +499,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("channel") != null && !jsonObj.get("channel").isJsonNull()) && !jsonObj.get("channel").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `channel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("channel").toString())); } - if (!jsonObj.get("user_id").isJsonPrimitive()) { + if ((jsonObj.get("user_id") != null && !jsonObj.get("user_id").isJsonNull()) && !jsonObj.get("user_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/ExportVoucherTransactionsBase.java b/src/main/java/voucherify/client/model/ExportVoucherTransactionsBase.java index 1b104b95..af28c10f 100644 --- a/src/main/java/voucherify/client/model/ExportVoucherTransactionsBase.java +++ b/src/main/java/voucherify/client/model/ExportVoucherTransactionsBase.java @@ -58,9 +58,7 @@ public class ExportVoucherTransactionsBase { */ @JsonAdapter(ExportedObjectEnum.Adapter.class) public enum ExportedObjectEnum { - VOUCHER_TRANSACTIONS("voucher_transactions"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER_TRANSACTIONS("voucher_transactions"); private String value; @@ -83,7 +81,7 @@ public static ExportedObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -121,7 +119,7 @@ public ExportVoucherTransactionsBase exportedObject(ExportedObjectEnum exportedO * The type of object to be exported. * @return exportedObject **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ExportedObjectEnum getExportedObject() { return exportedObject; } @@ -251,7 +249,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("exported_object"); } /** @@ -266,15 +263,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ExportVoucherTransactionsBase is not found in the empty JSON string", ExportVoucherTransactionsBase.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ExportVoucherTransactionsBase.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("exported_object").isJsonPrimitive()) { + if ((jsonObj.get("exported_object") != null && !jsonObj.get("exported_object").isJsonNull()) && !jsonObj.get("exported_object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `exported_object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exported_object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ExportVoucherTransactionsFields.java b/src/main/java/voucherify/client/model/ExportVoucherTransactionsFields.java index bb0798fe..acd0d6f5 100644 --- a/src/main/java/voucherify/client/model/ExportVoucherTransactionsFields.java +++ b/src/main/java/voucherify/client/model/ExportVoucherTransactionsFields.java @@ -50,9 +50,7 @@ public enum ExportVoucherTransactionsFields { CREATED_AT("created_at"), - DETAILS("details"), - - UNKNOWN_ENUM("unknown_enum"); + DETAILS("details"); private String value; @@ -75,7 +73,7 @@ public static ExportVoucherTransactionsFields fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ExportVoucherTransactionsOrder.java b/src/main/java/voucherify/client/model/ExportVoucherTransactionsOrder.java index 7d670005..85ceec47 100644 --- a/src/main/java/voucherify/client/model/ExportVoucherTransactionsOrder.java +++ b/src/main/java/voucherify/client/model/ExportVoucherTransactionsOrder.java @@ -30,9 +30,7 @@ public enum ExportVoucherTransactionsOrder { _CREATED_AT("-created_at"), - CREATED_AT("created_at"), - - UNKNOWN_ENUM("unknown_enum"); + CREATED_AT("created_at"); private String value; @@ -55,7 +53,7 @@ public static ExportVoucherTransactionsOrder fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ExportVoucherTransactionsScheduled.java b/src/main/java/voucherify/client/model/ExportVoucherTransactionsScheduled.java index bbd6f2f2..c9d89bc3 100644 --- a/src/main/java/voucherify/client/model/ExportVoucherTransactionsScheduled.java +++ b/src/main/java/voucherify/client/model/ExportVoucherTransactionsScheduled.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import voucherify.client.model.LoyaltiesMembersTransactionsExportCreateRequestBodyParameters; import com.google.gson.Gson; @@ -63,9 +64,7 @@ public class ExportVoucherTransactionsScheduled { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EXPORT("export"), - - UNKNOWN_ENUM("unknown_enum"); + EXPORT("export"); private String value; @@ -88,7 +87,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -118,9 +117,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - SCHEDULED("SCHEDULED"), - - UNKNOWN_ENUM("unknown_enum"); + SCHEDULED("SCHEDULED"); private String value; @@ -143,7 +140,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -181,9 +178,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ExportedObjectEnum.Adapter.class) public enum ExportedObjectEnum { - VOUCHER_TRANSACTIONS("voucher_transactions"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER_TRANSACTIONS("voucher_transactions"); private String value; @@ -206,7 +201,7 @@ public static ExportedObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -244,7 +239,7 @@ public ExportVoucherTransactionsScheduled id(String id) { * Unique export ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -265,7 +260,7 @@ public ExportVoucherTransactionsScheduled _object(ObjectEnum _object) { * The type of object being represented. This object stores information about the export. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -286,7 +281,7 @@ public ExportVoucherTransactionsScheduled createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the export was scheduled in ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -307,7 +302,7 @@ public ExportVoucherTransactionsScheduled status(StatusEnum status) { * Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -370,7 +365,7 @@ public ExportVoucherTransactionsScheduled userId(String userId) { * Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. * @return userId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getUserId() { return userId; } @@ -391,7 +386,7 @@ public ExportVoucherTransactionsScheduled exportedObject(ExportedObjectEnum expo * The type of object to be exported. * @return exportedObject **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ExportedObjectEnum getExportedObject() { return exportedObject; } @@ -489,11 +484,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, exportVoucherTransactionsScheduled.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(id, _object, createdAt, status, channel, result, userId, exportedObject, parameters, additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -542,13 +548,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("result"); - openapiRequiredFields.add("user_id"); - openapiRequiredFields.add("exported_object"); } /** @@ -563,18 +562,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ExportVoucherTransactionsScheduled is not found in the empty JSON string", ExportVoucherTransactionsScheduled.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ExportVoucherTransactionsScheduled.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -590,7 +582,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -609,10 +601,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("channel") != null && !jsonObj.get("channel").isJsonNull()) && !jsonObj.get("channel").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `channel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("channel").toString())); } - if (!jsonObj.get("user_id").isJsonPrimitive()) { + if ((jsonObj.get("user_id") != null && !jsonObj.get("user_id").isJsonNull()) && !jsonObj.get("user_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); } - if (!jsonObj.get("exported_object").isJsonPrimitive()) { + if ((jsonObj.get("exported_object") != null && !jsonObj.get("exported_object").isJsonNull()) && !jsonObj.get("exported_object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `exported_object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exported_object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ExportsCreateRequestBody.java b/src/main/java/voucherify/client/model/ExportsCreateRequestBody.java index 65f1a159..80084f89 100644 --- a/src/main/java/voucherify/client/model/ExportsCreateRequestBody.java +++ b/src/main/java/voucherify/client/model/ExportsCreateRequestBody.java @@ -70,9 +70,7 @@ public enum ExportedObjectEnum { POINTS_EXPIRATION("points_expiration"), - VOUCHER_TRANSACTIONS("voucher_transactions"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER_TRANSACTIONS("voucher_transactions"); private String value; @@ -95,7 +93,7 @@ public static ExportedObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -133,7 +131,7 @@ public ExportsCreateRequestBody exportedObject(ExportedObjectEnum exportedObject * Get exportedObject * @return exportedObject **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ExportedObjectEnum getExportedObject() { return exportedObject; } @@ -263,7 +261,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("exported_object"); } /** @@ -278,15 +275,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ExportsCreateRequestBody is not found in the empty JSON string", ExportsCreateRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ExportsCreateRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("exported_object").isJsonPrimitive()) { + if ((jsonObj.get("exported_object") != null && !jsonObj.get("exported_object").isJsonNull()) && !jsonObj.get("exported_object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `exported_object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exported_object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ExportsCreateRequestBodyParameters.java b/src/main/java/voucherify/client/model/ExportsCreateRequestBodyParameters.java index e1846ccc..68984ed5 100644 --- a/src/main/java/voucherify/client/model/ExportsCreateRequestBodyParameters.java +++ b/src/main/java/voucherify/client/model/ExportsCreateRequestBodyParameters.java @@ -86,9 +86,7 @@ public enum OrderEnum { _CUSTOMER_ID("-customer_id"), - CUSTOMER_ID("customer_id"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOMER_ID("customer_id"); private String value; @@ -111,7 +109,7 @@ public static OrderEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -313,9 +311,7 @@ public enum FieldsEnum { RELATED_TRANSACTION_ID("related_transaction_id"), - DETAILS("details"), - - UNKNOWN_ENUM("unknown_enum"); + DETAILS("details"); private String value; @@ -338,7 +334,7 @@ public static FieldsEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ExportsCreateResponseBody.java b/src/main/java/voucherify/client/model/ExportsCreateResponseBody.java index a54a17ec..75b4a2b6 100644 --- a/src/main/java/voucherify/client/model/ExportsCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/ExportsCreateResponseBody.java @@ -64,9 +64,7 @@ public class ExportsCreateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EXPORT("export"), - - UNKNOWN_ENUM("unknown_enum"); + EXPORT("export"); private String value; @@ -89,7 +87,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -119,9 +117,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - SCHEDULED("SCHEDULED"), - - UNKNOWN_ENUM("unknown_enum"); + SCHEDULED("SCHEDULED"); private String value; @@ -144,7 +140,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -194,9 +190,7 @@ public enum ExportedObjectEnum { POINTS_EXPIRATION("points_expiration"), - VOUCHER_TRANSACTIONS("voucher_transactions"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER_TRANSACTIONS("voucher_transactions"); private String value; @@ -219,7 +213,7 @@ public static ExportedObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ExportsCreateResponseBodyParameters.java b/src/main/java/voucherify/client/model/ExportsCreateResponseBodyParameters.java index 922f66fb..4c9d4a12 100644 --- a/src/main/java/voucherify/client/model/ExportsCreateResponseBodyParameters.java +++ b/src/main/java/voucherify/client/model/ExportsCreateResponseBodyParameters.java @@ -86,9 +86,7 @@ public enum OrderEnum { _CUSTOMER_ID("-customer_id"), - CUSTOMER_ID("customer_id"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOMER_ID("customer_id"); private String value; @@ -111,7 +109,7 @@ public static OrderEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -313,9 +311,7 @@ public enum FieldsEnum { RELATED_TRANSACTION_ID("related_transaction_id"), - DETAILS("details"), - - UNKNOWN_ENUM("unknown_enum"); + DETAILS("details"); private String value; @@ -338,7 +334,7 @@ public static FieldsEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ExportsGetResponseBody.java b/src/main/java/voucherify/client/model/ExportsGetResponseBody.java index dd231aee..8fc3dfea 100644 --- a/src/main/java/voucherify/client/model/ExportsGetResponseBody.java +++ b/src/main/java/voucherify/client/model/ExportsGetResponseBody.java @@ -65,9 +65,7 @@ public class ExportsGetResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EXPORT("export"), - - UNKNOWN_ENUM("unknown_enum"); + EXPORT("export"); private String value; @@ -90,7 +88,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -126,9 +124,7 @@ public enum StatusEnum { DONE("DONE"), - ERROR("ERROR"), - - UNKNOWN_ENUM("unknown_enum"); + ERROR("ERROR"); private String value; @@ -151,7 +147,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -201,9 +197,7 @@ public enum ExportedObjectEnum { POINTS_EXPIRATION("points_expiration"), - VOUCHER_TRANSACTIONS("voucher_transactions"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER_TRANSACTIONS("voucher_transactions"); private String value; @@ -226,7 +220,7 @@ public static ExportedObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ExportsListResponseBody.java b/src/main/java/voucherify/client/model/ExportsListResponseBody.java index b7ae1ac9..3cd6f6af 100644 --- a/src/main/java/voucherify/client/model/ExportsListResponseBody.java +++ b/src/main/java/voucherify/client/model/ExportsListResponseBody.java @@ -60,9 +60,7 @@ public class ExportsListResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -85,7 +83,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -111,9 +109,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - EXPORTS("exports"), - - UNKNOWN_ENUM("unknown_enum"); + EXPORTS("exports"); private String value; @@ -136,7 +132,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -159,7 +155,7 @@ public DataRefEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_EXPORTS = "exports"; @SerializedName(SERIALIZED_NAME_EXPORTS) - private List exports = new ArrayList<>(); + private List exports; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -178,7 +174,7 @@ public ExportsListResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about exports. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -199,7 +195,7 @@ public ExportsListResponseBody dataRef(DataRefEnum dataRef) { * Identifies the name of the attribute that contains the array of exports. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -228,7 +224,7 @@ public ExportsListResponseBody addExportsItem(Export exportsItem) { * An array of export objects. * @return exports **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getExports() { return exports; } @@ -249,7 +245,7 @@ public ExportsListResponseBody total(Integer total) { * Total number of exports. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -364,10 +360,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("exports"); - openapiRequiredFields.add("total"); } /** @@ -382,15 +374,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ExportsListResponseBody is not found in the empty JSON string", ExportsListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ExportsListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -406,7 +391,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { @@ -422,16 +407,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a valid element of DataRefEnum enum got `%s` instead", jsonObj.get("data_ref").toString())); } } - // ensure the json data is an array - if (!jsonObj.get("exports").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `exports` to be an array in the JSON string but got `%s`", jsonObj.get("exports").toString())); + if (jsonObj.get("exports") != null && !jsonObj.get("exports").isJsonNull()) { + JsonArray jsonArrayexports = jsonObj.getAsJsonArray("exports"); + if (jsonArrayexports != null) { + // ensure the json data is an array + if (!jsonObj.get("exports").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `exports` to be an array in the JSON string but got `%s`", jsonObj.get("exports").toString())); + } + + // validate the optional field `exports` (array) + for (int i = 0; i < jsonArrayexports.size(); i++) { + Export.validateJsonElement(jsonArrayexports.get(i)); + }; + } } - - JsonArray jsonArrayexports = jsonObj.getAsJsonArray("exports"); - // validate the required field `exports` (array) - for (int i = 0; i < jsonArrayexports.size(); i++) { - Export.validateJsonElement(jsonArrayexports.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/Gift.java b/src/main/java/voucherify/client/model/Gift.java index 150efbc2..7e9ea046 100644 --- a/src/main/java/voucherify/client/model/Gift.java +++ b/src/main/java/voucherify/client/model/Gift.java @@ -68,9 +68,7 @@ public class Gift { public enum EffectEnum { ORDER("APPLY_TO_ORDER"), - ITEMS("APPLY_TO_ITEMS"), - - UNKNOWN_ENUM("unknown_enum"); + ITEMS("APPLY_TO_ITEMS"); private String value; @@ -93,7 +91,7 @@ public static EffectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -127,7 +125,7 @@ public Gift amount(BigDecimal amount) { * Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. * @return amount **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public BigDecimal getAmount() { return amount; } @@ -148,7 +146,7 @@ public Gift balance(BigDecimal balance) { * Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. * @return balance **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public BigDecimal getBalance() { return balance; } @@ -235,8 +233,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("balance"); } /** @@ -259,13 +255,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Gift` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Gift.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("effect") != null && !jsonObj.get("effect").isJsonNull()) && !jsonObj.get("effect").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `effect` to be a primitive type in the JSON string but got `%s`", jsonObj.get("effect").toString())); diff --git a/src/main/java/voucherify/client/model/InapplicableTo.java b/src/main/java/voucherify/client/model/InapplicableTo.java index 8039acb3..fa1f6904 100644 --- a/src/main/java/voucherify/client/model/InapplicableTo.java +++ b/src/main/java/voucherify/client/model/InapplicableTo.java @@ -65,9 +65,7 @@ public enum ObjectEnum { SKU("sku"), - PRODUCTS_COLLECTION("products_collection"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCTS_COLLECTION("products_collection"); private String value; @@ -90,7 +88,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -176,7 +174,7 @@ public InapplicableTo _object(ObjectEnum _object) { * This object stores information about the product collection. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -197,7 +195,7 @@ public InapplicableTo id(String id) { * Unique product collection ID assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -281,7 +279,7 @@ public InapplicableTo strict(Boolean strict) { * Get strict * @return strict **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getStrict() { return strict; } @@ -344,7 +342,7 @@ public InapplicableTo effect(ApplicableToEffect effect) { * Get effect * @return effect **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ApplicableToEffect getEffect() { return effect; } @@ -602,10 +600,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("strict"); - openapiRequiredFields.add("effect"); } /** @@ -620,15 +614,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in InapplicableTo is not found in the empty JSON string", InapplicableTo.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : InapplicableTo.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -644,7 +631,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/InapplicableToResultList.java b/src/main/java/voucherify/client/model/InapplicableToResultList.java index 831ecaa7..8f833064 100644 --- a/src/main/java/voucherify/client/model/InapplicableToResultList.java +++ b/src/main/java/voucherify/client/model/InapplicableToResultList.java @@ -57,7 +57,7 @@ public class InapplicableToResultList { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -68,9 +68,7 @@ public class InapplicableToResultList { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -93,7 +91,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -119,9 +117,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - DATA("data"), - - UNKNOWN_ENUM("unknown_enum"); + DATA("data"); private String value; @@ -144,7 +140,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -186,7 +182,7 @@ public InapplicableToResultList addDataItem(InapplicableTo dataItem) { * Contains array of items to which the discount cannot apply. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -208,7 +204,7 @@ public InapplicableToResultList total(Integer total) { * minimum: 0 * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -229,7 +225,7 @@ public InapplicableToResultList _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -250,7 +246,7 @@ public InapplicableToResultList dataRef(DataRefEnum dataRef) { * The type of the object represented by JSON. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -365,10 +361,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); } /** @@ -383,25 +375,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in InapplicableToResultList is not found in the empty JSON string", InapplicableToResultList.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : InapplicableToResultList.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + InapplicableTo.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - InapplicableTo.validateJsonElement(jsonArraydata.get(i)); - }; - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -417,7 +406,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { diff --git a/src/main/java/voucherify/client/model/Junction.java b/src/main/java/voucherify/client/model/Junction.java index a98a497e..3aa69073 100644 --- a/src/main/java/voucherify/client/model/Junction.java +++ b/src/main/java/voucherify/client/model/Junction.java @@ -30,9 +30,7 @@ public enum Junction { AND("and"), - OR("or"), - - UNKNOWN_ENUM("unknown_enum"); + OR("or"); private String value; @@ -55,7 +53,7 @@ public static Junction fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ListPublicationsItemVoucher.java b/src/main/java/voucherify/client/model/ListPublicationsItemVoucher.java index 422cb195..866577e9 100644 --- a/src/main/java/voucherify/client/model/ListPublicationsItemVoucher.java +++ b/src/main/java/voucherify/client/model/ListPublicationsItemVoucher.java @@ -63,9 +63,7 @@ public class ListPublicationsItemVoucher { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - VOUCHER("voucher"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER("voucher"); private String value; @@ -88,7 +86,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -142,7 +140,7 @@ public ListPublicationsItemVoucher code(String code) { * Voucher code. * @return code **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCode() { return code; } @@ -163,7 +161,7 @@ public ListPublicationsItemVoucher _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -184,7 +182,7 @@ public ListPublicationsItemVoucher campaign(String campaign) { * Campaign name * @return campaign **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCampaign() { return campaign; } @@ -392,9 +390,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("code"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("campaign"); } /** @@ -409,18 +404,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ListPublicationsItemVoucher is not found in the empty JSON string", ListPublicationsItemVoucher.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ListPublicationsItemVoucher.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("code").isJsonPrimitive()) { + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -436,7 +424,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("campaign").isJsonPrimitive()) { + if ((jsonObj.get("campaign") != null && !jsonObj.get("campaign").isJsonNull()) && !jsonObj.get("campaign").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign").toString())); } // validate the optional field `gift` diff --git a/src/main/java/voucherify/client/model/LoyaltiesDeleteResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesDeleteResponseBody.java index 95185300..93b5e4e8 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesDeleteResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesDeleteResponseBody.java @@ -69,7 +69,7 @@ public LoyaltiesDeleteResponseBody asyncActionId(String asyncActionId) { * The ID of the scheduled asynchronous action. * @return asyncActionId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAsyncActionId() { return asyncActionId; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("async_action_id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesDeleteResponseBody is not found in the empty JSON string", LoyaltiesDeleteResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesDeleteResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("async_action_id").isJsonPrimitive()) { + if ((jsonObj.get("async_action_id") != null && !jsonObj.get("async_action_id").isJsonNull()) && !jsonObj.get("async_action_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `async_action_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_action_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/LoyaltiesEarningRulesDisableResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesEarningRulesDisableResponseBody.java index a0a793ad..49d82e89 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesEarningRulesDisableResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesEarningRulesDisableResponseBody.java @@ -96,9 +96,7 @@ public class LoyaltiesEarningRulesDisableResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EARNING_RULE("earning_rule"), - - UNKNOWN_ENUM("unknown_enum"); + EARNING_RULE("earning_rule"); private String value; @@ -121,7 +119,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -175,9 +173,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -200,7 +196,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -250,7 +246,7 @@ public LoyaltiesEarningRulesDisableResponseBody id(String id) { * Assigned by the Voucherify API, identifies the earning rule object. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -271,7 +267,7 @@ public LoyaltiesEarningRulesDisableResponseBody createdAt(OffsetDateTime created * Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -292,7 +288,7 @@ public LoyaltiesEarningRulesDisableResponseBody loyalty(EarningRuleBaseLoyalty l * Get loyalty * @return loyalty **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public EarningRuleBaseLoyalty getLoyalty() { return loyalty; } @@ -376,7 +372,7 @@ public LoyaltiesEarningRulesDisableResponseBody source(EarningRuleBaseSource sou * Get source * @return source **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public EarningRuleBaseSource getSource() { return source; } @@ -397,7 +393,7 @@ public LoyaltiesEarningRulesDisableResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. Default is earning_rule. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -418,7 +414,7 @@ public LoyaltiesEarningRulesDisableResponseBody automationId(String automationId * For internal use by Voucherify. * @return automationId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAutomationId() { return automationId; } @@ -552,7 +548,7 @@ public LoyaltiesEarningRulesDisableResponseBody metadata(Object metadata) { * 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. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -594,7 +590,7 @@ public LoyaltiesEarningRulesDisableResponseBody active(Boolean active) { * A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. * @return active **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getActive() { return active; } @@ -759,14 +755,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("loyalty"); - openapiRequiredFields.add("source"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("automation_id"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("active"); } /** @@ -781,19 +769,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesEarningRulesDisableResponseBody is not found in the empty JSON string", LoyaltiesEarningRulesDisableResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesEarningRulesDisableResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - // validate the required field `loyalty` - EarningRuleBaseLoyalty.validateJsonElement(jsonObj.get("loyalty")); + // validate the optional field `loyalty` + if (jsonObj.get("loyalty") != null && !jsonObj.get("loyalty").isJsonNull()) { + EarningRuleBaseLoyalty.validateJsonElement(jsonObj.get("loyalty")); + } // validate the optional field `custom_event` if (jsonObj.get("custom_event") != null && !jsonObj.get("custom_event").isJsonNull()) { EarningRuleBaseCustomEvent.validateJsonElement(jsonObj.get("custom_event")); @@ -802,9 +785,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("segment") != null && !jsonObj.get("segment").isJsonNull()) { EarningRuleBaseSegment.validateJsonElement(jsonObj.get("segment")); } - // validate the required field `source` - EarningRuleBaseSource.validateJsonElement(jsonObj.get("source")); - if (!jsonObj.get("object").isJsonPrimitive()) { + // validate the optional field `source` + if (jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) { + EarningRuleBaseSource.validateJsonElement(jsonObj.get("source")); + } + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -820,7 +805,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("automation_id").isJsonPrimitive()) { + if ((jsonObj.get("automation_id") != null && !jsonObj.get("automation_id").isJsonNull()) && !jsonObj.get("automation_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `automation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("automation_id").toString())); } if ((jsonObj.get("start_date") != null && !jsonObj.get("start_date").isJsonNull()) && !jsonObj.get("start_date").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/LoyaltiesEarningRulesEnableResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesEarningRulesEnableResponseBody.java index faa2e72e..b2b5a547 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesEarningRulesEnableResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesEarningRulesEnableResponseBody.java @@ -96,9 +96,7 @@ public class LoyaltiesEarningRulesEnableResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EARNING_RULE("earning_rule"), - - UNKNOWN_ENUM("unknown_enum"); + EARNING_RULE("earning_rule"); private String value; @@ -121,7 +119,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -175,9 +173,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -200,7 +196,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -250,7 +246,7 @@ public LoyaltiesEarningRulesEnableResponseBody id(String id) { * Assigned by the Voucherify API, identifies the earning rule object. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -271,7 +267,7 @@ public LoyaltiesEarningRulesEnableResponseBody createdAt(OffsetDateTime createdA * Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -292,7 +288,7 @@ public LoyaltiesEarningRulesEnableResponseBody loyalty(EarningRuleBaseLoyalty lo * Get loyalty * @return loyalty **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public EarningRuleBaseLoyalty getLoyalty() { return loyalty; } @@ -376,7 +372,7 @@ public LoyaltiesEarningRulesEnableResponseBody source(EarningRuleBaseSource sour * Get source * @return source **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public EarningRuleBaseSource getSource() { return source; } @@ -397,7 +393,7 @@ public LoyaltiesEarningRulesEnableResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. Default is earning_rule. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -418,7 +414,7 @@ public LoyaltiesEarningRulesEnableResponseBody automationId(String automationId) * For internal use by Voucherify. * @return automationId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAutomationId() { return automationId; } @@ -552,7 +548,7 @@ public LoyaltiesEarningRulesEnableResponseBody metadata(Object metadata) { * 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. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -594,7 +590,7 @@ public LoyaltiesEarningRulesEnableResponseBody active(Boolean active) { * A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. * @return active **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getActive() { return active; } @@ -759,14 +755,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("loyalty"); - openapiRequiredFields.add("source"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("automation_id"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("active"); } /** @@ -781,19 +769,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesEarningRulesEnableResponseBody is not found in the empty JSON string", LoyaltiesEarningRulesEnableResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesEarningRulesEnableResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - // validate the required field `loyalty` - EarningRuleBaseLoyalty.validateJsonElement(jsonObj.get("loyalty")); + // validate the optional field `loyalty` + if (jsonObj.get("loyalty") != null && !jsonObj.get("loyalty").isJsonNull()) { + EarningRuleBaseLoyalty.validateJsonElement(jsonObj.get("loyalty")); + } // validate the optional field `custom_event` if (jsonObj.get("custom_event") != null && !jsonObj.get("custom_event").isJsonNull()) { EarningRuleBaseCustomEvent.validateJsonElement(jsonObj.get("custom_event")); @@ -802,9 +785,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("segment") != null && !jsonObj.get("segment").isJsonNull()) { EarningRuleBaseSegment.validateJsonElement(jsonObj.get("segment")); } - // validate the required field `source` - EarningRuleBaseSource.validateJsonElement(jsonObj.get("source")); - if (!jsonObj.get("object").isJsonPrimitive()) { + // validate the optional field `source` + if (jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) { + EarningRuleBaseSource.validateJsonElement(jsonObj.get("source")); + } + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -820,7 +805,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("automation_id").isJsonPrimitive()) { + if ((jsonObj.get("automation_id") != null && !jsonObj.get("automation_id").isJsonNull()) && !jsonObj.get("automation_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `automation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("automation_id").toString())); } if ((jsonObj.get("start_date") != null && !jsonObj.get("start_date").isJsonNull()) && !jsonObj.get("start_date").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/LoyaltiesEarningRulesGetResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesEarningRulesGetResponseBody.java index 87ccb9fd..938cac76 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesEarningRulesGetResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesEarningRulesGetResponseBody.java @@ -96,9 +96,7 @@ public class LoyaltiesEarningRulesGetResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EARNING_RULE("earning_rule"), - - UNKNOWN_ENUM("unknown_enum"); + EARNING_RULE("earning_rule"); private String value; @@ -121,7 +119,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -175,9 +173,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -200,7 +196,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -254,7 +250,7 @@ public LoyaltiesEarningRulesGetResponseBody id(String id) { * Assigned by the Voucherify API, identifies the earning rule object. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -275,7 +271,7 @@ public LoyaltiesEarningRulesGetResponseBody createdAt(OffsetDateTime createdAt) * Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -296,7 +292,7 @@ public LoyaltiesEarningRulesGetResponseBody loyalty(EarningRuleBaseLoyalty loyal * Get loyalty * @return loyalty **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public EarningRuleBaseLoyalty getLoyalty() { return loyalty; } @@ -380,7 +376,7 @@ public LoyaltiesEarningRulesGetResponseBody source(EarningRuleBaseSource source) * Get source * @return source **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public EarningRuleBaseSource getSource() { return source; } @@ -401,7 +397,7 @@ public LoyaltiesEarningRulesGetResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. Default is earning_rule. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -422,7 +418,7 @@ public LoyaltiesEarningRulesGetResponseBody automationId(String automationId) { * For internal use by Voucherify. * @return automationId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAutomationId() { return automationId; } @@ -556,7 +552,7 @@ public LoyaltiesEarningRulesGetResponseBody metadata(Object metadata) { * 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. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -619,7 +615,7 @@ public LoyaltiesEarningRulesGetResponseBody active(Boolean active) { * A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. - `true` indicates an active earning rule - `false` indicates an inactive earning rule * @return active **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getActive() { return active; } @@ -787,14 +783,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("loyalty"); - openapiRequiredFields.add("source"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("automation_id"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("active"); } /** @@ -809,19 +797,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesEarningRulesGetResponseBody is not found in the empty JSON string", LoyaltiesEarningRulesGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesEarningRulesGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - // validate the required field `loyalty` - EarningRuleBaseLoyalty.validateJsonElement(jsonObj.get("loyalty")); + // validate the optional field `loyalty` + if (jsonObj.get("loyalty") != null && !jsonObj.get("loyalty").isJsonNull()) { + EarningRuleBaseLoyalty.validateJsonElement(jsonObj.get("loyalty")); + } // validate the optional field `custom_event` if (jsonObj.get("custom_event") != null && !jsonObj.get("custom_event").isJsonNull()) { EarningRuleBaseCustomEvent.validateJsonElement(jsonObj.get("custom_event")); @@ -830,9 +813,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("segment") != null && !jsonObj.get("segment").isJsonNull()) { EarningRuleBaseSegment.validateJsonElement(jsonObj.get("segment")); } - // validate the required field `source` - EarningRuleBaseSource.validateJsonElement(jsonObj.get("source")); - if (!jsonObj.get("object").isJsonPrimitive()) { + // validate the optional field `source` + if (jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) { + EarningRuleBaseSource.validateJsonElement(jsonObj.get("source")); + } + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -848,7 +833,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("automation_id").isJsonPrimitive()) { + if ((jsonObj.get("automation_id") != null && !jsonObj.get("automation_id").isJsonNull()) && !jsonObj.get("automation_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `automation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("automation_id").toString())); } if ((jsonObj.get("start_date") != null && !jsonObj.get("start_date").isJsonNull()) && !jsonObj.get("start_date").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/LoyaltiesLoyaltyTierReward.java b/src/main/java/voucherify/client/model/LoyaltiesLoyaltyTierReward.java index 5dbdd114..c5bc43c6 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesLoyaltyTierReward.java +++ b/src/main/java/voucherify/client/model/LoyaltiesLoyaltyTierReward.java @@ -67,9 +67,7 @@ public class LoyaltiesLoyaltyTierReward { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LOYALTY_TIER_REWARD("loyalty_tier_reward"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_TIER_REWARD("loyalty_tier_reward"); private String value; @@ -92,7 +90,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -126,7 +124,7 @@ public LoyaltiesLoyaltyTierReward reward(Reward reward) { * Get reward * @return reward **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Reward getReward() { return reward; } @@ -147,7 +145,7 @@ public LoyaltiesLoyaltyTierReward assignment(RewardAssignment assignment) { * Get assignment * @return assignment **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RewardAssignment getAssignment() { return assignment; } @@ -168,7 +166,7 @@ public LoyaltiesLoyaltyTierReward _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the loyalty tier reward. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -280,9 +278,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("reward"); - openapiRequiredFields.add("assignment"); - openapiRequiredFields.add("object"); } /** @@ -297,19 +292,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesLoyaltyTierReward is not found in the empty JSON string", LoyaltiesLoyaltyTierReward.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesLoyaltyTierReward.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `reward` - Reward.validateJsonElement(jsonObj.get("reward")); - // validate the required field `assignment` - RewardAssignment.validateJsonElement(jsonObj.get("assignment")); - if (!jsonObj.get("object").isJsonPrimitive()) { + // validate the optional field `reward` + if (jsonObj.get("reward") != null && !jsonObj.get("reward").isJsonNull()) { + Reward.validateJsonElement(jsonObj.get("reward")); + } + // validate the optional field `assignment` + if (jsonObj.get("assignment") != null && !jsonObj.get("assignment").isJsonNull()) { + RewardAssignment.validateJsonElement(jsonObj.get("assignment")); + } + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersBalanceUpdateRequestBody.java b/src/main/java/voucherify/client/model/LoyaltiesMembersBalanceUpdateRequestBody.java index 44e1c9f2..62153167 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersBalanceUpdateRequestBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersBalanceUpdateRequestBody.java @@ -87,7 +87,7 @@ public LoyaltiesMembersBalanceUpdateRequestBody points(Integer points) { * Incremental balance to be added to/subtracted from the loyalty card. - To add points: 100 - To subtract points, add a minus: -100 * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPoints() { return points; } @@ -289,7 +289,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("points"); } /** @@ -304,13 +303,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesMembersBalanceUpdateRequestBody is not found in the empty JSON string", LoyaltiesMembersBalanceUpdateRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesMembersBalanceUpdateRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersBalanceUpdateResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesMembersBalanceUpdateResponseBody.java index 0787c412..9da7831b 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersBalanceUpdateResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersBalanceUpdateResponseBody.java @@ -72,9 +72,7 @@ public class LoyaltiesMembersBalanceUpdateResponseBody { public enum TypeEnum { LOYALTY_CARD("loyalty_card"), - GIFT_VOUCHER("gift_voucher"), - - UNKNOWN_ENUM("unknown_enum"); + GIFT_VOUCHER("gift_voucher"); private String value; @@ -97,7 +95,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -123,9 +121,7 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - BALANCE("balance"), - - UNKNOWN_ENUM("unknown_enum"); + BALANCE("balance"); private String value; @@ -148,7 +144,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -180,9 +176,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public enum OperationTypeEnum { MANUAL("MANUAL"), - AUTOMATIC("AUTOMATIC"), - - UNKNOWN_ENUM("unknown_enum"); + AUTOMATIC("AUTOMATIC"); private String value; @@ -205,7 +199,7 @@ public static OperationTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -239,7 +233,7 @@ public LoyaltiesMembersBalanceUpdateResponseBody points(Integer points) { * The incremental points removed or added to the current balance on the loyalty card. * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPoints() { return points; } @@ -260,7 +254,7 @@ public LoyaltiesMembersBalanceUpdateResponseBody total(Integer total) { * The total of points accrued over the lifetime of the loyalty card. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -282,7 +276,7 @@ public LoyaltiesMembersBalanceUpdateResponseBody balance(Integer balance) { * minimum: 0 * @return balance **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getBalance() { return balance; } @@ -303,7 +297,7 @@ public LoyaltiesMembersBalanceUpdateResponseBody type(TypeEnum type) { * The type of voucher being modified. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -324,7 +318,7 @@ public LoyaltiesMembersBalanceUpdateResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. Default is balance. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -345,7 +339,7 @@ public LoyaltiesMembersBalanceUpdateResponseBody relatedObject(LoyaltiesMembersB * Get relatedObject * @return relatedObject **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject getRelatedObject() { return relatedObject; } @@ -490,12 +484,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("points"); - openapiRequiredFields.add("total"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("related_object"); } /** @@ -510,15 +498,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesMembersBalanceUpdateResponseBody is not found in the empty JSON string", LoyaltiesMembersBalanceUpdateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesMembersBalanceUpdateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -534,7 +515,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `type` to be a valid element of TypeEnum enum got `%s` instead", jsonObj.get("type").toString())); } } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -550,8 +531,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - // validate the required field `related_object` - LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.validateJsonElement(jsonObj.get("related_object")); + // validate the optional field `related_object` + if (jsonObj.get("related_object") != null && !jsonObj.get("related_object").isJsonNull()) { + LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.validateJsonElement(jsonObj.get("related_object")); + } if ((jsonObj.get("operation_type") != null && !jsonObj.get("operation_type").isJsonNull()) && !jsonObj.get("operation_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `operation_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operation_type").toString())); } diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.java b/src/main/java/voucherify/client/model/LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.java index aeeb6442..8217ddfd 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.java @@ -57,9 +57,7 @@ public class LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - VOUCHER("voucher"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER("voucher"); private String value; @@ -82,7 +80,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -120,7 +118,7 @@ public LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject type(TypeEnum type * The object being modified. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -141,7 +139,7 @@ public LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject id(String id) { * Identifies the loyalty card that is being modified, this is the ID that was assigned by the Voucherify API. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -250,8 +248,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); } /** @@ -266,15 +262,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject is not found in the empty JSON string", LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -290,7 +279,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `type` to be a valid element of TypeEnum enum got `%s` instead", jsonObj.get("type").toString())); } } - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } } diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersPointsExpirationListResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesMembersPointsExpirationListResponseBody.java index 19c4c532..defff81b 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersPointsExpirationListResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersPointsExpirationListResponseBody.java @@ -60,9 +60,7 @@ public class LoyaltiesMembersPointsExpirationListResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -85,7 +83,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -111,9 +109,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - DATA("data"), - - UNKNOWN_ENUM("unknown_enum"); + DATA("data"); private String value; @@ -136,7 +132,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -159,7 +155,7 @@ public DataRefEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -178,7 +174,7 @@ public LoyaltiesMembersPointsExpirationListResponseBody _object(ObjectEnum _obje * The type of the object represented by JSON. This object stores information about loyalty points expiration buckets in a dictionary. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -199,7 +195,7 @@ public LoyaltiesMembersPointsExpirationListResponseBody dataRef(DataRefEnum data * Identifies the name of the attribute that contains the array of loyalty points expiration bucket objects. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -228,7 +224,7 @@ public LoyaltiesMembersPointsExpirationListResponseBody addDataItem(LoyaltiesMem * Contains array of loyalty points expiration buckets. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -249,7 +245,7 @@ public LoyaltiesMembersPointsExpirationListResponseBody total(Integer total) { * Total number of point expiration buckets. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -364,10 +360,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -382,15 +374,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesMembersPointsExpirationListResponseBody is not found in the empty JSON string", LoyaltiesMembersPointsExpirationListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesMembersPointsExpirationListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -406,7 +391,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { @@ -422,16 +407,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a valid element of DataRefEnum enum got `%s` instead", jsonObj.get("data_ref").toString())); } } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + LoyaltiesMembersPointsExpirationListResponseBodyDataItem.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - LoyaltiesMembersPointsExpirationListResponseBodyDataItem.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.java b/src/main/java/voucherify/client/model/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.java index 4470227d..09bc8bd8 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.java @@ -91,9 +91,7 @@ public class LoyaltiesMembersPointsExpirationListResponseBodyDataItem { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LOYALTY_POINTS_BUCKET("loyalty_points_bucket"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_POINTS_BUCKET("loyalty_points_bucket"); private String value; @@ -116,7 +114,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersRedemptionRedeemResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesMembersRedemptionRedeemResponseBody.java index 7aaefac4..b097f2e0 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersRedemptionRedeemResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersRedemptionRedeemResponseBody.java @@ -72,9 +72,7 @@ public class LoyaltiesMembersRedemptionRedeemResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - REDEMPTION("redemption"), - - UNKNOWN_ENUM("unknown_enum"); + REDEMPTION("redemption"); private String value; @@ -97,7 +95,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -149,9 +147,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public enum ResultEnum { SUCCESS("SUCCESS"), - FAILURE("FAILURE"), - - UNKNOWN_ENUM("unknown_enum"); + FAILURE("FAILURE"); private String value; @@ -174,7 +170,7 @@ public static ResultEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -204,9 +200,7 @@ public enum StatusEnum { FAILED("FAILED"), - ROLLED_BACK("ROLLED_BACK"), - - UNKNOWN_ENUM("unknown_enum"); + ROLLED_BACK("ROLLED_BACK"); private String value; @@ -229,7 +223,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -283,9 +277,7 @@ public enum RelatedObjectTypeEnum { PROMOTION_TIER("promotion_tier"), - REDEMPTION("redemption"), - - UNKNOWN_ENUM("unknown_enum"); + REDEMPTION("redemption"); private String value; @@ -308,7 +300,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -366,7 +358,7 @@ public LoyaltiesMembersRedemptionRedeemResponseBody id(String id) { * Unique redemption ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -387,7 +379,7 @@ public LoyaltiesMembersRedemptionRedeemResponseBody _object(ObjectEnum _object) * The type of the object represented by the JSON * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -408,7 +400,7 @@ public LoyaltiesMembersRedemptionRedeemResponseBody date(OffsetDateTime date) { * Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. * @return date **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getDate() { return date; } @@ -534,7 +526,7 @@ public LoyaltiesMembersRedemptionRedeemResponseBody result(ResultEnum result) { * Redemption result. * @return result **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ResultEnum getResult() { return result; } @@ -555,7 +547,7 @@ public LoyaltiesMembersRedemptionRedeemResponseBody status(StatusEnum status) { * Redemption status. * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -660,7 +652,7 @@ public LoyaltiesMembersRedemptionRedeemResponseBody channel(RedemptionChannel ch * Get channel * @return channel **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RedemptionChannel getChannel() { return channel; } @@ -702,7 +694,7 @@ public LoyaltiesMembersRedemptionRedeemResponseBody relatedObjectType(RelatedObj * Defines the related object. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -723,7 +715,7 @@ public LoyaltiesMembersRedemptionRedeemResponseBody relatedObjectId(String relat * Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -1011,14 +1003,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("date"); - openapiRequiredFields.add("result"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("channel"); - openapiRequiredFields.add("related_object_type"); - openapiRequiredFields.add("related_object_id"); openapiRequiredFields.add("reward"); } @@ -1042,10 +1026,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -1070,7 +1054,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("redemption") != null && !jsonObj.get("redemption").isJsonNull()) && !jsonObj.get("redemption").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redemption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redemption").toString())); } - if (!jsonObj.get("result").isJsonPrimitive()) { + if ((jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) && !jsonObj.get("result").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `result` to be a primitive type in the JSON string but got `%s`", jsonObj.get("result").toString())); } try { @@ -1086,7 +1070,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `result` to be a valid element of ResultEnum enum got `%s` instead", jsonObj.get("result").toString())); } } - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -1116,13 +1100,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { OrderCalculatedNoCustomerData.validateJsonElement(jsonObj.get("order")); } - // validate the required field `channel` - RedemptionChannel.validateJsonElement(jsonObj.get("channel")); + // validate the optional field `channel` + if (jsonObj.get("channel") != null && !jsonObj.get("channel").isJsonNull()) { + RedemptionChannel.validateJsonElement(jsonObj.get("channel")); + } // validate the optional field `customer` if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { SimpleCustomer.validateJsonElement(jsonObj.get("customer")); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { @@ -1138,7 +1124,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a valid element of RelatedObjectTypeEnum enum got `%s` instead", jsonObj.get("related_object_type").toString())); } } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } // validate the optional field `voucher` diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersRewardsListResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesMembersRewardsListResponseBody.java index 52f09ca6..e8e08300 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersRewardsListResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersRewardsListResponseBody.java @@ -60,9 +60,7 @@ public class LoyaltiesMembersRewardsListResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -85,7 +83,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -111,9 +109,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - DATA("data"), - - UNKNOWN_ENUM("unknown_enum"); + DATA("data"); private String value; @@ -136,7 +132,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -159,7 +155,7 @@ public DataRefEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -178,7 +174,7 @@ public LoyaltiesMembersRewardsListResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -199,7 +195,7 @@ public LoyaltiesMembersRewardsListResponseBody dataRef(DataRefEnum dataRef) { * Identifies the name of the attribute that contains the array of loyalty reward objects. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -228,7 +224,7 @@ public LoyaltiesMembersRewardsListResponseBody addDataItem(LoyaltiesMembersRewar * Contains array of loyalty reward objects. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -250,7 +246,7 @@ public LoyaltiesMembersRewardsListResponseBody total(Integer total) { * minimum: 0 * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -365,10 +361,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -383,15 +375,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesMembersRewardsListResponseBody is not found in the empty JSON string", LoyaltiesMembersRewardsListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesMembersRewardsListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -407,7 +392,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { @@ -423,16 +408,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a valid element of DataRefEnum enum got `%s` instead", jsonObj.get("data_ref").toString())); } } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + LoyaltiesMembersRewardsListResponseBodyDataItem.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - LoyaltiesMembersRewardsListResponseBodyDataItem.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersRewardsListResponseBodyDataItem.java b/src/main/java/voucherify/client/model/LoyaltiesMembersRewardsListResponseBodyDataItem.java index 4bca1154..7e38bf05 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersRewardsListResponseBodyDataItem.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersRewardsListResponseBodyDataItem.java @@ -67,9 +67,7 @@ public class LoyaltiesMembersRewardsListResponseBodyDataItem { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LOYALTY_REWARD("loyalty_reward"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_REWARD("loyalty_reward"); private String value; @@ -92,7 +90,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersTiersListResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesMembersTiersListResponseBody.java index ba3415c8..9189f598 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersTiersListResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersTiersListResponseBody.java @@ -60,9 +60,7 @@ public class LoyaltiesMembersTiersListResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -85,7 +83,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -111,9 +109,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - DATA("data"), - - UNKNOWN_ENUM("unknown_enum"); + DATA("data"); private String value; @@ -136,7 +132,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -159,7 +155,7 @@ public DataRefEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -178,7 +174,7 @@ public LoyaltiesMembersTiersListResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about loyalty tiers in a dictionary. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -199,7 +195,7 @@ public LoyaltiesMembersTiersListResponseBody dataRef(DataRefEnum dataRef) { * Identifies the name of the attribute that contains the array of loyalty tier objects. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -228,7 +224,7 @@ public LoyaltiesMembersTiersListResponseBody addDataItem(LoyaltyTier dataItem) { * Get data * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -249,7 +245,7 @@ public LoyaltiesMembersTiersListResponseBody total(Integer total) { * Total number of loyalty tier objects. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -364,10 +360,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -382,15 +374,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesMembersTiersListResponseBody is not found in the empty JSON string", LoyaltiesMembersTiersListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesMembersTiersListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -406,7 +391,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { @@ -422,16 +407,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a valid element of DataRefEnum enum got `%s` instead", jsonObj.get("data_ref").toString())); } } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + LoyaltyTier.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - LoyaltyTier.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersTransactionsExportCreateResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesMembersTransactionsExportCreateResponseBody.java index 7b1667a9..185ea833 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersTransactionsExportCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersTransactionsExportCreateResponseBody.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import voucherify.client.model.LoyaltiesMembersTransactionsExportCreateRequestBodyParameters; import com.google.gson.Gson; @@ -63,9 +64,7 @@ public class LoyaltiesMembersTransactionsExportCreateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EXPORT("export"), - - UNKNOWN_ENUM("unknown_enum"); + EXPORT("export"); private String value; @@ -88,7 +87,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -118,9 +117,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - SCHEDULED("SCHEDULED"), - - UNKNOWN_ENUM("unknown_enum"); + SCHEDULED("SCHEDULED"); private String value; @@ -143,7 +140,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -181,9 +178,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ExportedObjectEnum.Adapter.class) public enum ExportedObjectEnum { - VOUCHER_TRANSACTIONS("voucher_transactions"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER_TRANSACTIONS("voucher_transactions"); private String value; @@ -206,7 +201,7 @@ public static ExportedObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -244,7 +239,7 @@ public LoyaltiesMembersTransactionsExportCreateResponseBody id(String id) { * Unique export ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -265,7 +260,7 @@ public LoyaltiesMembersTransactionsExportCreateResponseBody _object(ObjectEnum _ * The type of object being represented. This object stores information about the export. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -286,7 +281,7 @@ public LoyaltiesMembersTransactionsExportCreateResponseBody createdAt(OffsetDate * Timestamp representing the date and time when the export was scheduled in ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -307,7 +302,7 @@ public LoyaltiesMembersTransactionsExportCreateResponseBody status(StatusEnum st * Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -370,7 +365,7 @@ public LoyaltiesMembersTransactionsExportCreateResponseBody userId(String userId * Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. * @return userId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getUserId() { return userId; } @@ -391,7 +386,7 @@ public LoyaltiesMembersTransactionsExportCreateResponseBody exportedObject(Expor * The type of object to be exported. * @return exportedObject **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ExportedObjectEnum getExportedObject() { return exportedObject; } @@ -489,11 +484,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, loyaltiesMembersTransactionsExportCreateResponseBody.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(id, _object, createdAt, status, channel, result, userId, exportedObject, parameters, additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -542,13 +548,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("result"); - openapiRequiredFields.add("user_id"); - openapiRequiredFields.add("exported_object"); } /** @@ -563,18 +562,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesMembersTransactionsExportCreateResponseBody is not found in the empty JSON string", LoyaltiesMembersTransactionsExportCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesMembersTransactionsExportCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -590,7 +582,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -609,10 +601,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("channel") != null && !jsonObj.get("channel").isJsonNull()) && !jsonObj.get("channel").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `channel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("channel").toString())); } - if (!jsonObj.get("user_id").isJsonPrimitive()) { + if ((jsonObj.get("user_id") != null && !jsonObj.get("user_id").isJsonNull()) && !jsonObj.get("user_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); } - if (!jsonObj.get("exported_object").isJsonPrimitive()) { + if ((jsonObj.get("exported_object") != null && !jsonObj.get("exported_object").isJsonNull()) && !jsonObj.get("exported_object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `exported_object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exported_object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersTransactionsListResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesMembersTransactionsListResponseBody.java index 669cb403..d0064ea5 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersTransactionsListResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersTransactionsListResponseBody.java @@ -60,9 +60,7 @@ public class LoyaltiesMembersTransactionsListResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -85,7 +83,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -111,9 +109,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - DATA("data"), - - UNKNOWN_ENUM("unknown_enum"); + DATA("data"); private String value; @@ -136,7 +132,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -159,7 +155,7 @@ public DataRefEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_HAS_MORE = "has_more"; @SerializedName(SERIALIZED_NAME_HAS_MORE) @@ -178,7 +174,7 @@ public LoyaltiesMembersTransactionsListResponseBody _object(ObjectEnum _object) * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -199,7 +195,7 @@ public LoyaltiesMembersTransactionsListResponseBody dataRef(DataRefEnum dataRef) * Identifies the name of the attribute that contains the array of transaction objects. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -228,7 +224,7 @@ public LoyaltiesMembersTransactionsListResponseBody addDataItem(LoyaltyCardTrans * A dictionary that contains an array of transactions. Each entry in the array is a separate transaction object. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -249,7 +245,7 @@ public LoyaltiesMembersTransactionsListResponseBody hasMore(Boolean hasMore) { * 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 (with a different page or a different start date filter) to get more records returned in the results. * @return hasMore **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getHasMore() { return hasMore; } @@ -364,10 +360,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("has_more"); } /** @@ -382,15 +374,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesMembersTransactionsListResponseBody is not found in the empty JSON string", LoyaltiesMembersTransactionsListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesMembersTransactionsListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -406,7 +391,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { @@ -422,16 +407,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a valid element of DataRefEnum enum got `%s` instead", jsonObj.get("data_ref").toString())); } } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + LoyaltyCardTransaction.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - LoyaltyCardTransaction.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBody.java index 35498d53..06dc07a2 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBody.java @@ -96,9 +96,7 @@ public class LoyaltiesMembersTransfersCreateResponseBody { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - LOYALTY_CARD("LOYALTY_CARD"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("LOYALTY_CARD"); private String value; @@ -121,7 +119,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -175,9 +173,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -200,7 +196,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -278,7 +274,7 @@ public LoyaltiesMembersTransfersCreateResponseBody id(String id) { * Assigned by the Voucherify API, identifies the voucher. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -299,7 +295,7 @@ public LoyaltiesMembersTransfersCreateResponseBody code(String code) { * A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. * @return code **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCode() { return code; } @@ -433,7 +429,7 @@ public LoyaltiesMembersTransfersCreateResponseBody type(TypeEnum type) { * Defines the type of the voucher. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -454,7 +450,7 @@ public LoyaltiesMembersTransfersCreateResponseBody loyaltyCard(LoyaltiesMembersT * Get loyaltyCard * @return loyaltyCard **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard getLoyaltyCard() { return loyaltyCard; } @@ -630,7 +626,7 @@ public LoyaltiesMembersTransfersCreateResponseBody active(String active) { * A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the start_date and expiration_date. - `true` indicates an active voucher - `false` indicates an inactive voucher * @return active **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getActive() { return active; } @@ -672,7 +668,7 @@ public LoyaltiesMembersTransfersCreateResponseBody metadata(Object metadata) { * The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -714,7 +710,7 @@ public LoyaltiesMembersTransfersCreateResponseBody isReferralCode(Boolean isRefe * Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. * @return isReferralCode **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getIsReferralCode() { return isReferralCode; } @@ -777,7 +773,7 @@ public LoyaltiesMembersTransfersCreateResponseBody createdAt(OffsetDateTime crea * Get createdAt * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -963,14 +959,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("code"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("loyalty_card"); - openapiRequiredFields.add("active"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("is_referral_code"); - openapiRequiredFields.add("created_at"); } /** @@ -985,18 +973,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesMembersTransfersCreateResponseBody is not found in the empty JSON string", LoyaltiesMembersTransfersCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesMembersTransfersCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("code").isJsonPrimitive()) { + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } if ((jsonObj.get("campaign") != null && !jsonObj.get("campaign").isJsonNull()) && !jsonObj.get("campaign").isJsonPrimitive()) { @@ -1025,7 +1006,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -1041,8 +1022,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `type` to be a valid element of TypeEnum enum got `%s` instead", jsonObj.get("type").toString())); } } - // validate the required field `loyalty_card` - LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.validateJsonElement(jsonObj.get("loyalty_card")); + // validate the optional field `loyalty_card` + if (jsonObj.get("loyalty_card") != null && !jsonObj.get("loyalty_card").isJsonNull()) { + LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.validateJsonElement(jsonObj.get("loyalty_card")); + } // validate the optional field `validity_timeframe` if (jsonObj.get("validity_timeframe") != null && !jsonObj.get("validity_timeframe").isJsonNull()) { LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe.validateJsonElement(jsonObj.get("validity_timeframe")); @@ -1063,7 +1046,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("redemption") != null && !jsonObj.get("redemption").isJsonNull()) { LoyaltiesMembersTransfersCreateResponseBodyRedemption.validateJsonElement(jsonObj.get("redemption")); } - if (!jsonObj.get("active").isJsonPrimitive()) { + if ((jsonObj.get("active") != null && !jsonObj.get("active").isJsonNull()) && !jsonObj.get("active").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `active` to be a primitive type in the JSON string but got `%s`", jsonObj.get("active").toString())); } if ((jsonObj.get("additional_info") != null && !jsonObj.get("additional_info").isJsonNull()) && !jsonObj.get("additional_info").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.java b/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.java index 90dc587b..4a5dc31f 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.java @@ -81,7 +81,7 @@ public LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard points(Integer poi * Total points incurred over lifespan of loyalty card. * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPoints() { return points; } @@ -102,7 +102,7 @@ public LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard balance(Integer ba * Points available for reward redemption. * @return balance **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getBalance() { return balance; } @@ -259,8 +259,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("points"); - openapiRequiredFields.add("balance"); } /** @@ -275,13 +273,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard is not found in the empty JSON string", LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("next_expiration_date") != null && !jsonObj.get("next_expiration_date").isJsonNull()) && !jsonObj.get("next_expiration_date").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `next_expiration_date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("next_expiration_date").toString())); diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBodyPublish.java b/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBodyPublish.java index c8505fc2..e317f271 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBodyPublish.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBodyPublish.java @@ -59,9 +59,7 @@ public class LoyaltiesMembersTransfersCreateResponseBodyPublish { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -84,7 +82,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -130,7 +128,7 @@ public LoyaltiesMembersTransfersCreateResponseBodyPublish _object(ObjectEnum _ob * The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -316,7 +314,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); } /** @@ -331,15 +328,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesMembersTransfersCreateResponseBodyPublish is not found in the empty JSON string", LoyaltiesMembersTransfersCreateResponseBodyPublish.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesMembersTransfersCreateResponseBodyPublish.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBodyRedemption.java b/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBodyRedemption.java index 3804926c..b787dfd5 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBodyRedemption.java +++ b/src/main/java/voucherify/client/model/LoyaltiesMembersTransfersCreateResponseBodyRedemption.java @@ -76,9 +76,7 @@ public class LoyaltiesMembersTransfersCreateResponseBodyRedemption { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -101,7 +99,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/LoyaltiesRewardAssignmentsGetResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesRewardAssignmentsGetResponseBody.java index d09598e3..88f22f91 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesRewardAssignmentsGetResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesRewardAssignmentsGetResponseBody.java @@ -76,9 +76,7 @@ public class LoyaltiesRewardAssignmentsGetResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - REWARD_ASSIGNMENT("reward_assignment"), - - UNKNOWN_ENUM("unknown_enum"); + REWARD_ASSIGNMENT("reward_assignment"); private String value; @@ -101,7 +99,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -131,9 +129,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(RelatedObjectTypeEnum.Adapter.class) public enum RelatedObjectTypeEnum { - CAMPAIGN("campaign"), - - UNKNOWN_ENUM("unknown_enum"); + CAMPAIGN("campaign"); private String value; @@ -156,7 +152,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -194,7 +190,7 @@ public LoyaltiesRewardAssignmentsGetResponseBody id(String id) { * Unique reward assignment ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -215,7 +211,7 @@ public LoyaltiesRewardAssignmentsGetResponseBody rewardId(String rewardId) { * Associated reward ID. * @return rewardId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRewardId() { return rewardId; } @@ -236,7 +232,7 @@ public LoyaltiesRewardAssignmentsGetResponseBody createdAt(OffsetDateTime create * Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -278,7 +274,7 @@ public LoyaltiesRewardAssignmentsGetResponseBody _object(ObjectEnum _object) { * The type of the object represented by the JSON. This object stores information about the reward assignment. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -299,7 +295,7 @@ public LoyaltiesRewardAssignmentsGetResponseBody relatedObjectId(String relatedO * Related object ID to which the reward was assigned. * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -320,7 +316,7 @@ public LoyaltiesRewardAssignmentsGetResponseBody relatedObjectType(RelatedObject * Related object type to which the reward was assigned. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -479,12 +475,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("reward_id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("related_object_id"); - openapiRequiredFields.add("related_object_type"); } /** @@ -499,21 +489,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesRewardAssignmentsGetResponseBody is not found in the empty JSON string", LoyaltiesRewardAssignmentsGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesRewardAssignmentsGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("reward_id").isJsonPrimitive()) { + if ((jsonObj.get("reward_id") != null && !jsonObj.get("reward_id").isJsonNull()) && !jsonObj.get("reward_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reward_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reward_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -529,10 +512,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { diff --git a/src/main/java/voucherify/client/model/LoyaltiesRewardAssignmentsRewardGetResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesRewardAssignmentsRewardGetResponseBody.java index 24ecc697..c00396d2 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesRewardAssignmentsRewardGetResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesRewardAssignmentsRewardGetResponseBody.java @@ -89,9 +89,7 @@ public enum TypeEnum { COIN("COIN"), - MATERIAL("MATERIAL"), - - UNKNOWN_ENUM("unknown_enum"); + MATERIAL("MATERIAL"); private String value; @@ -114,7 +112,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -152,9 +150,7 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - REWARD("reward"), - - UNKNOWN_ENUM("unknown_enum"); + REWARD("reward"); private String value; @@ -177,7 +173,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -211,7 +207,7 @@ public LoyaltiesRewardAssignmentsRewardGetResponseBody id(String id) { * Unique reward ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -232,7 +228,7 @@ public LoyaltiesRewardAssignmentsRewardGetResponseBody name(String name) { * Reward name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -316,7 +312,7 @@ public LoyaltiesRewardAssignmentsRewardGetResponseBody metadata(Object metadata) * The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -337,7 +333,7 @@ public LoyaltiesRewardAssignmentsRewardGetResponseBody type(TypeEnum type) { * Reward type. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -379,7 +375,7 @@ public LoyaltiesRewardAssignmentsRewardGetResponseBody createdAt(OffsetDateTime * Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -421,7 +417,7 @@ public LoyaltiesRewardAssignmentsRewardGetResponseBody _object(ObjectEnum _objec * The type of the object represented by the JSON. This object stores information about the reward. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -568,12 +564,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -588,25 +578,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesRewardAssignmentsRewardGetResponseBody is not found in the empty JSON string", LoyaltiesRewardAssignmentsRewardGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesRewardAssignmentsRewardGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the optional field `attributes` if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { RewardAttributes.validateJsonElement(jsonObj.get("attributes")); } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -626,7 +609,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { RewardType.validateJsonElement(jsonObj.get("parameters")); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/LoyaltiesRewardsGetResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesRewardsGetResponseBody.java index 7202c9f0..776c29a5 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesRewardsGetResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesRewardsGetResponseBody.java @@ -76,9 +76,7 @@ public class LoyaltiesRewardsGetResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - REWARD_ASSIGNMENT("reward_assignment"), - - UNKNOWN_ENUM("unknown_enum"); + REWARD_ASSIGNMENT("reward_assignment"); private String value; @@ -101,7 +99,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -131,9 +129,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(RelatedObjectTypeEnum.Adapter.class) public enum RelatedObjectTypeEnum { - CAMPAIGN("campaign"), - - UNKNOWN_ENUM("unknown_enum"); + CAMPAIGN("campaign"); private String value; @@ -156,7 +152,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -194,7 +190,7 @@ public LoyaltiesRewardsGetResponseBody id(String id) { * Unique reward assignment ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -215,7 +211,7 @@ public LoyaltiesRewardsGetResponseBody rewardId(String rewardId) { * Associated reward ID. * @return rewardId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRewardId() { return rewardId; } @@ -236,7 +232,7 @@ public LoyaltiesRewardsGetResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -278,7 +274,7 @@ public LoyaltiesRewardsGetResponseBody _object(ObjectEnum _object) { * The type of the object represented by the JSON. This object stores information about the reward assignment. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -299,7 +295,7 @@ public LoyaltiesRewardsGetResponseBody relatedObjectId(String relatedObjectId) { * Related object ID to which the reward was assigned. * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -320,7 +316,7 @@ public LoyaltiesRewardsGetResponseBody relatedObjectType(RelatedObjectTypeEnum r * Related object type to which the reward was assigned. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -479,12 +475,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("reward_id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("related_object_id"); - openapiRequiredFields.add("related_object_type"); } /** @@ -499,21 +489,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesRewardsGetResponseBody is not found in the empty JSON string", LoyaltiesRewardsGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesRewardsGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("reward_id").isJsonPrimitive()) { + if ((jsonObj.get("reward_id") != null && !jsonObj.get("reward_id").isJsonNull()) && !jsonObj.get("reward_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reward_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reward_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -529,10 +512,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { diff --git a/src/main/java/voucherify/client/model/LoyaltiesTiersCreateInBulkRequestBodyItem.java b/src/main/java/voucherify/client/model/LoyaltiesTiersCreateInBulkRequestBodyItem.java index dd1cb35a..a4a20545 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesTiersCreateInBulkRequestBodyItem.java +++ b/src/main/java/voucherify/client/model/LoyaltiesTiersCreateInBulkRequestBodyItem.java @@ -89,7 +89,7 @@ public LoyaltiesTiersCreateInBulkRequestBodyItem name(String name) { * Loyalty Tier name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -168,7 +168,7 @@ public LoyaltiesTiersCreateInBulkRequestBodyItem points(LoyaltyTierBasePoints po * Get points * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public LoyaltyTierBasePoints getPoints() { return points; } @@ -307,8 +307,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("points"); } /** @@ -323,19 +321,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesTiersCreateInBulkRequestBodyItem is not found in the empty JSON string", LoyaltiesTiersCreateInBulkRequestBodyItem.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesTiersCreateInBulkRequestBodyItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // validate the required field `points` - LoyaltyTierBasePoints.validateJsonElement(jsonObj.get("points")); + // validate the optional field `points` + if (jsonObj.get("points") != null && !jsonObj.get("points").isJsonNull()) { + LoyaltyTierBasePoints.validateJsonElement(jsonObj.get("points")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/LoyaltiesTiersEarningRulesListResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesTiersEarningRulesListResponseBody.java index 930a4b7a..fdaf6221 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesTiersEarningRulesListResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesTiersEarningRulesListResponseBody.java @@ -60,9 +60,7 @@ public class LoyaltiesTiersEarningRulesListResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -85,7 +83,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -111,9 +109,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - DATA("data"), - - UNKNOWN_ENUM("unknown_enum"); + DATA("data"); private String value; @@ -136,7 +132,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -159,7 +155,7 @@ public DataRefEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -178,7 +174,7 @@ public LoyaltiesTiersEarningRulesListResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about earning rules in a dictionary. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -199,7 +195,7 @@ public LoyaltiesTiersEarningRulesListResponseBody dataRef(DataRefEnum dataRef) { * Identifies the name of the attribute that contains the array of earning rule objects. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -228,7 +224,7 @@ public LoyaltiesTiersEarningRulesListResponseBody addDataItem(EarningRule dataIt * Contains array of earning rule objects. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -249,7 +245,7 @@ public LoyaltiesTiersEarningRulesListResponseBody total(Integer total) { * Total number of earning rule objects. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -364,10 +360,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -382,15 +374,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesTiersEarningRulesListResponseBody is not found in the empty JSON string", LoyaltiesTiersEarningRulesListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesTiersEarningRulesListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -406,7 +391,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { @@ -422,16 +407,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a valid element of DataRefEnum enum got `%s` instead", jsonObj.get("data_ref").toString())); } } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + EarningRule.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - EarningRule.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/LoyaltiesTiersGetResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesTiersGetResponseBody.java index 30fc1fe7..a569552c 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesTiersGetResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesTiersGetResponseBody.java @@ -109,9 +109,7 @@ public class LoyaltiesTiersGetResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LOYALTY_TIER("loyalty_tier"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_TIER("loyalty_tier"); private String value; @@ -134,7 +132,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -168,7 +166,7 @@ public LoyaltiesTiersGetResponseBody name(String name) { * Loyalty Tier name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -247,7 +245,7 @@ public LoyaltiesTiersGetResponseBody points(LoyaltyTierBasePoints points) { * Get points * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public LoyaltyTierBasePoints getPoints() { return points; } @@ -268,7 +266,7 @@ public LoyaltiesTiersGetResponseBody id(String id) { * Unique loyalty tier ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -289,7 +287,7 @@ public LoyaltiesTiersGetResponseBody campaignId(String campaignId) { * Unique parent campaign ID. * @return campaignId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCampaignId() { return campaignId; } @@ -331,7 +329,7 @@ public LoyaltiesTiersGetResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -373,7 +371,7 @@ public LoyaltiesTiersGetResponseBody config(LoyaltyTierAllOfConfig config) { * Get config * @return config **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public LoyaltyTierAllOfConfig getConfig() { return config; } @@ -415,7 +413,7 @@ public LoyaltiesTiersGetResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the loyalty. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -565,13 +563,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("points"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("campaign_id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("config"); - openapiRequiredFields.add("object"); } /** @@ -586,32 +577,29 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesTiersGetResponseBody is not found in the empty JSON string", LoyaltiesTiersGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesTiersGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // validate the required field `points` - LoyaltyTierBasePoints.validateJsonElement(jsonObj.get("points")); - if (!jsonObj.get("id").isJsonPrimitive()) { + // validate the optional field `points` + if (jsonObj.get("points") != null && !jsonObj.get("points").isJsonNull()) { + LoyaltyTierBasePoints.validateJsonElement(jsonObj.get("points")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("campaign_id").isJsonPrimitive()) { + if ((jsonObj.get("campaign_id") != null && !jsonObj.get("campaign_id").isJsonNull()) && !jsonObj.get("campaign_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign_id").toString())); } - // validate the required field `config` - LoyaltyTierAllOfConfig.validateJsonElement(jsonObj.get("config")); + // validate the optional field `config` + if (jsonObj.get("config") != null && !jsonObj.get("config").isJsonNull()) { + LoyaltyTierAllOfConfig.validateJsonElement(jsonObj.get("config")); + } // validate the optional field `expiration` if (jsonObj.get("expiration") != null && !jsonObj.get("expiration").isJsonNull()) { LoyaltyTierExpiration.validateJsonElement(jsonObj.get("expiration")); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/LoyaltiesTiersListResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesTiersListResponseBody.java index 8a82df23..61eec42d 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesTiersListResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesTiersListResponseBody.java @@ -60,9 +60,7 @@ public class LoyaltiesTiersListResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -85,7 +83,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -111,9 +109,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - DATA("data"), - - UNKNOWN_ENUM("unknown_enum"); + DATA("data"); private String value; @@ -136,7 +132,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -159,7 +155,7 @@ public DataRefEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -178,7 +174,7 @@ public LoyaltiesTiersListResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about loyalty tiers in a dictionary. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -199,7 +195,7 @@ public LoyaltiesTiersListResponseBody dataRef(DataRefEnum dataRef) { * Identifies the name of the attribute that contains the array of loyalty tier objects. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -228,7 +224,7 @@ public LoyaltiesTiersListResponseBody addDataItem(LoyaltyTier dataItem) { * This is an object representing a loyalty tier. Loyalty tiers are used to create a loyalty program with different levels of membership and varied earning rules and rewards based on customer’s tiers. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -249,7 +245,7 @@ public LoyaltiesTiersListResponseBody total(Integer total) { * Total number of loyalty tier objects. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -364,10 +360,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -382,15 +374,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesTiersListResponseBody is not found in the empty JSON string", LoyaltiesTiersListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesTiersListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -406,7 +391,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { @@ -422,16 +407,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a valid element of DataRefEnum enum got `%s` instead", jsonObj.get("data_ref").toString())); } } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + LoyaltyTier.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - LoyaltyTier.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/LoyaltiesTiersRewardsListResponseBody.java b/src/main/java/voucherify/client/model/LoyaltiesTiersRewardsListResponseBody.java index 57090921..46d42fbf 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesTiersRewardsListResponseBody.java +++ b/src/main/java/voucherify/client/model/LoyaltiesTiersRewardsListResponseBody.java @@ -65,7 +65,7 @@ public class LoyaltiesTiersRewardsListResponseBody { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public LoyaltiesTiersRewardsListResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about loyalty tier rewards in a dictionary. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public LoyaltiesTiersRewardsListResponseBody dataRef(String dataRef) { * Identifies the name of the attribute that contains the array of loyalty tier reward objects. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public LoyaltiesTiersRewardsListResponseBody addDataItem(LoyaltiesLoyaltyTierRew * Contains array of loyalty tier reward objects. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -155,7 +155,7 @@ public LoyaltiesTiersRewardsListResponseBody total(Integer total) { * Total number of loyalty tier reward objects. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesTiersRewardsListResponseBody is not found in the empty JSON string", LoyaltiesTiersRewardsListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesTiersRewardsListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + LoyaltiesLoyaltyTierReward.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - LoyaltiesLoyaltyTierReward.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/LoyaltiesTransferPoints.java b/src/main/java/voucherify/client/model/LoyaltiesTransferPoints.java index fbd87449..eb1b50f7 100644 --- a/src/main/java/voucherify/client/model/LoyaltiesTransferPoints.java +++ b/src/main/java/voucherify/client/model/LoyaltiesTransferPoints.java @@ -81,7 +81,7 @@ public LoyaltiesTransferPoints code(String code) { * Unique loyalty card code from which the user wants to transfer loyalty points (source). * @return code **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCode() { return code; } @@ -102,7 +102,7 @@ public LoyaltiesTransferPoints points(Integer points) { * The number of loyalty points that the user wants to transfer to another loyalty card. The number of points cannot be higher than the current balance on the loyalty card (source). * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPoints() { return points; } @@ -144,7 +144,7 @@ public LoyaltiesTransferPoints sourceId(String sourceId) { * The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. * @return sourceId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getSourceId() { return sourceId; } @@ -259,9 +259,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("code"); - openapiRequiredFields.add("points"); - openapiRequiredFields.add("source_id"); } /** @@ -276,21 +273,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltiesTransferPoints is not found in the empty JSON string", LoyaltiesTransferPoints.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltiesTransferPoints.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("code").isJsonPrimitive()) { + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } - if (!jsonObj.get("source_id").isJsonPrimitive()) { + if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/LoyaltyCardTransaction.java b/src/main/java/voucherify/client/model/LoyaltyCardTransaction.java index 8be3516c..ad5e8f4e 100644 --- a/src/main/java/voucherify/client/model/LoyaltyCardTransaction.java +++ b/src/main/java/voucherify/client/model/LoyaltyCardTransaction.java @@ -109,7 +109,7 @@ public LoyaltyCardTransaction id(String id) { * Unique transaction ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -151,7 +151,7 @@ public LoyaltyCardTransaction voucherId(String voucherId) { * Unique voucher ID. * @return voucherId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getVoucherId() { return voucherId; } @@ -172,7 +172,7 @@ public LoyaltyCardTransaction campaignId(String campaignId) { * Unqiue campaign ID of the voucher's parent campaign if it is part of campaign that generates bulk codes. * @return campaignId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCampaignId() { return campaignId; } @@ -235,7 +235,7 @@ public LoyaltyCardTransaction type(LoyaltyCardTransactionsType type) { * Get type * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public LoyaltyCardTransactionsType getType() { return type; } @@ -256,7 +256,7 @@ public LoyaltyCardTransaction details(VoucherTransactionDetails details) { * Get details * @return details **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VoucherTransactionDetails getDetails() { return details; } @@ -298,7 +298,7 @@ public LoyaltyCardTransaction createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -442,12 +442,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("voucher_id"); - openapiRequiredFields.add("campaign_id"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("details"); - openapiRequiredFields.add("created_at"); } /** @@ -462,24 +456,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltyCardTransaction is not found in the empty JSON string", LoyaltyCardTransaction.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltyCardTransaction.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); } - if (!jsonObj.get("voucher_id").isJsonPrimitive()) { + if ((jsonObj.get("voucher_id") != null && !jsonObj.get("voucher_id").isJsonNull()) && !jsonObj.get("voucher_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `voucher_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("voucher_id").toString())); } - if (!jsonObj.get("campaign_id").isJsonPrimitive()) { + if ((jsonObj.get("campaign_id") != null && !jsonObj.get("campaign_id").isJsonNull()) && !jsonObj.get("campaign_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign_id").toString())); } if ((jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) && !jsonObj.get("source").isJsonPrimitive()) { @@ -488,8 +475,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } - // validate the required field `details` - VoucherTransactionDetails.validateJsonElement(jsonObj.get("details")); + // validate the optional field `details` + if (jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) { + VoucherTransactionDetails.validateJsonElement(jsonObj.get("details")); + } if ((jsonObj.get("related_transaction_id") != null && !jsonObj.get("related_transaction_id").isJsonNull()) && !jsonObj.get("related_transaction_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_transaction_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_transaction_id").toString())); } diff --git a/src/main/java/voucherify/client/model/LoyaltyCardTransactionsType.java b/src/main/java/voucherify/client/model/LoyaltyCardTransactionsType.java index 565e84d0..006e06e0 100644 --- a/src/main/java/voucherify/client/model/LoyaltyCardTransactionsType.java +++ b/src/main/java/voucherify/client/model/LoyaltyCardTransactionsType.java @@ -44,9 +44,7 @@ public enum LoyaltyCardTransactionsType { TRANSFER_IN("POINTS_TRANSFER_IN"), - TRANSFER_OUT("POINTS_TRANSFER_OUT"), - - UNKNOWN_ENUM("unknown_enum"); + TRANSFER_OUT("POINTS_TRANSFER_OUT"); private String value; @@ -69,7 +67,7 @@ public static LoyaltyCardTransactionsType fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/LoyaltyTier.java b/src/main/java/voucherify/client/model/LoyaltyTier.java index 3e9a208a..7aa480c2 100644 --- a/src/main/java/voucherify/client/model/LoyaltyTier.java +++ b/src/main/java/voucherify/client/model/LoyaltyTier.java @@ -109,9 +109,7 @@ public class LoyaltyTier { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LOYALTY_TIER("loyalty_tier"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_TIER("loyalty_tier"); private String value; @@ -134,7 +132,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -168,7 +166,7 @@ public LoyaltyTier name(String name) { * Loyalty Tier name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -247,7 +245,7 @@ public LoyaltyTier points(LoyaltyTierBasePoints points) { * Get points * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public LoyaltyTierBasePoints getPoints() { return points; } @@ -268,7 +266,7 @@ public LoyaltyTier id(String id) { * Unique loyalty tier ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -289,7 +287,7 @@ public LoyaltyTier campaignId(String campaignId) { * Unique parent campaign ID. * @return campaignId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCampaignId() { return campaignId; } @@ -331,7 +329,7 @@ public LoyaltyTier createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -373,7 +371,7 @@ public LoyaltyTier config(LoyaltyTierAllOfConfig config) { * Get config * @return config **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public LoyaltyTierAllOfConfig getConfig() { return config; } @@ -415,7 +413,7 @@ public LoyaltyTier _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the loyalty. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -565,13 +563,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("points"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("campaign_id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("config"); - openapiRequiredFields.add("object"); } /** @@ -586,32 +577,29 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltyTier is not found in the empty JSON string", LoyaltyTier.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltyTier.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // validate the required field `points` - LoyaltyTierBasePoints.validateJsonElement(jsonObj.get("points")); - if (!jsonObj.get("id").isJsonPrimitive()) { + // validate the optional field `points` + if (jsonObj.get("points") != null && !jsonObj.get("points").isJsonNull()) { + LoyaltyTierBasePoints.validateJsonElement(jsonObj.get("points")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("campaign_id").isJsonPrimitive()) { + if ((jsonObj.get("campaign_id") != null && !jsonObj.get("campaign_id").isJsonNull()) && !jsonObj.get("campaign_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign_id").toString())); } - // validate the required field `config` - LoyaltyTierAllOfConfig.validateJsonElement(jsonObj.get("config")); + // validate the optional field `config` + if (jsonObj.get("config") != null && !jsonObj.get("config").isJsonNull()) { + LoyaltyTierAllOfConfig.validateJsonElement(jsonObj.get("config")); + } // validate the optional field `expiration` if (jsonObj.get("expiration") != null && !jsonObj.get("expiration").isJsonNull()) { LoyaltyTierExpiration.validateJsonElement(jsonObj.get("expiration")); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/LoyaltyTierAllOfConfig.java b/src/main/java/voucherify/client/model/LoyaltyTierAllOfConfig.java index 888d0e3a..7a6f39df 100644 --- a/src/main/java/voucherify/client/model/LoyaltyTierAllOfConfig.java +++ b/src/main/java/voucherify/client/model/LoyaltyTierAllOfConfig.java @@ -70,7 +70,7 @@ public LoyaltyTierAllOfConfig points(LoyaltyTierAllOfConfigPoints points) { * Get points * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public LoyaltyTierAllOfConfigPoints getPoints() { return points; } @@ -176,7 +176,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("points"); } /** @@ -191,16 +190,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltyTierAllOfConfig is not found in the empty JSON string", LoyaltyTierAllOfConfig.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltyTierAllOfConfig.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `points` - LoyaltyTierAllOfConfigPoints.validateJsonElement(jsonObj.get("points")); + // validate the optional field `points` + if (jsonObj.get("points") != null && !jsonObj.get("points").isJsonNull()) { + LoyaltyTierAllOfConfigPoints.validateJsonElement(jsonObj.get("points")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/LoyaltyTierBase.java b/src/main/java/voucherify/client/model/LoyaltyTierBase.java index 7cc092a9..c01adec4 100644 --- a/src/main/java/voucherify/client/model/LoyaltyTierBase.java +++ b/src/main/java/voucherify/client/model/LoyaltyTierBase.java @@ -85,7 +85,7 @@ public LoyaltyTierBase name(String name) { * Loyalty Tier name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -164,7 +164,7 @@ public LoyaltyTierBase points(LoyaltyTierBasePoints points) { * Get points * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public LoyaltyTierBasePoints getPoints() { return points; } @@ -279,8 +279,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("points"); } /** @@ -295,19 +293,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltyTierBase is not found in the empty JSON string", LoyaltyTierBase.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltyTierBase.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // validate the required field `points` - LoyaltyTierBasePoints.validateJsonElement(jsonObj.get("points")); + // validate the optional field `points` + if (jsonObj.get("points") != null && !jsonObj.get("points").isJsonNull()) { + LoyaltyTierBasePoints.validateJsonElement(jsonObj.get("points")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/LoyaltyTierExpiration.java b/src/main/java/voucherify/client/model/LoyaltyTierExpiration.java index 53f00404..f726c8f1 100644 --- a/src/main/java/voucherify/client/model/LoyaltyTierExpiration.java +++ b/src/main/java/voucherify/client/model/LoyaltyTierExpiration.java @@ -94,7 +94,7 @@ public LoyaltyTierExpiration customerId(String customerId) { * Unique customer ID of the customer making the purchase. * @return customerId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCustomerId() { return customerId; } @@ -115,7 +115,7 @@ public LoyaltyTierExpiration campaignId(String campaignId) { * Unique campaign ID, assigned by Voucherify. * @return campaignId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCampaignId() { return campaignId; } @@ -136,7 +136,7 @@ public LoyaltyTierExpiration tierId(String tierId) { * Unique tier ID, assigned by Voucherify. * @return tierId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getTierId() { return tierId; } @@ -199,7 +199,7 @@ public LoyaltyTierExpiration createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -344,10 +344,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("customer_id"); - openapiRequiredFields.add("campaign_id"); - openapiRequiredFields.add("tier_id"); - openapiRequiredFields.add("created_at"); } /** @@ -362,21 +358,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltyTierExpiration is not found in the empty JSON string", LoyaltyTierExpiration.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltyTierExpiration.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("customer_id").isJsonPrimitive()) { + if ((jsonObj.get("customer_id") != null && !jsonObj.get("customer_id").isJsonNull()) && !jsonObj.get("customer_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `customer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customer_id").toString())); } - if (!jsonObj.get("campaign_id").isJsonPrimitive()) { + if ((jsonObj.get("campaign_id") != null && !jsonObj.get("campaign_id").isJsonNull()) && !jsonObj.get("campaign_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign_id").toString())); } - if (!jsonObj.get("tier_id").isJsonPrimitive()) { + if ((jsonObj.get("tier_id") != null && !jsonObj.get("tier_id").isJsonNull()) && !jsonObj.get("tier_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tier_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tier_id").toString())); } if ((jsonObj.get("start_date") != null && !jsonObj.get("start_date").isJsonNull()) && !jsonObj.get("start_date").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAll.java b/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAll.java index 29f71664..9dc8118a 100644 --- a/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAll.java +++ b/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAll.java @@ -61,9 +61,7 @@ public class LoyaltyTiersExpirationAll { public enum QualificationTypeEnum { BALANCE("BALANCE"), - POINTS_IN_PERIOD("POINTS_IN_PERIOD"), - - UNKNOWN_ENUM("unknown_enum"); + POINTS_IN_PERIOD("POINTS_IN_PERIOD"); private String value; @@ -86,7 +84,7 @@ public static QualificationTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -118,9 +116,7 @@ public enum QualificationPeriodEnum { HALF_YEAR("HALF_YEAR"), - YEAR("YEAR"), - - UNKNOWN_ENUM("unknown_enum"); + YEAR("YEAR"); private String value; @@ -143,7 +139,7 @@ public static QualificationPeriodEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -185,7 +181,7 @@ public LoyaltyTiersExpirationAll qualificationType(QualificationTypeEnum qualifi * Tier qualification. `BALANCE`: Points balance is based on the customer's current points balance. Customers qualify for the tier if their points balance is in the points range of the tier. `POINTS_IN_PERIOD`: A customer qualifies for the tier only if the sum of the accumulated points in a **defined time interval** reaches the tier threshold. * @return qualificationType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public QualificationTypeEnum getQualificationType() { return qualificationType; } @@ -227,7 +223,7 @@ public LoyaltyTiersExpirationAll startDate(LoyaltyTiersExpirationAllStartDate st * Get startDate * @return startDate **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public LoyaltyTiersExpirationAllStartDate getStartDate() { return startDate; } @@ -248,7 +244,7 @@ public LoyaltyTiersExpirationAll expirationDate(LoyaltyTiersExpirationAllExpirat * Get expirationDate * @return expirationDate **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public LoyaltyTiersExpirationAllExpirationDate getExpirationDate() { return expirationDate; } @@ -363,9 +359,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("qualification_type"); - openapiRequiredFields.add("start_date"); - openapiRequiredFields.add("expiration_date"); } /** @@ -380,15 +373,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltyTiersExpirationAll is not found in the empty JSON string", LoyaltyTiersExpirationAll.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltyTiersExpirationAll.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("qualification_type").isJsonPrimitive()) { + if ((jsonObj.get("qualification_type") != null && !jsonObj.get("qualification_type").isJsonNull()) && !jsonObj.get("qualification_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `qualification_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("qualification_type").toString())); } try { @@ -420,10 +406,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `qualification_period` to be a valid element of QualificationPeriodEnum enum got `%s` instead", jsonObj.get("qualification_period").toString())); } } - // validate the required field `start_date` - LoyaltyTiersExpirationAllStartDate.validateJsonElement(jsonObj.get("start_date")); - // validate the required field `expiration_date` - LoyaltyTiersExpirationAllExpirationDate.validateJsonElement(jsonObj.get("expiration_date")); + // validate the optional field `start_date` + if (jsonObj.get("start_date") != null && !jsonObj.get("start_date").isJsonNull()) { + LoyaltyTiersExpirationAllStartDate.validateJsonElement(jsonObj.get("start_date")); + } + // validate the optional field `expiration_date` + if (jsonObj.get("expiration_date") != null && !jsonObj.get("expiration_date").isJsonNull()) { + LoyaltyTiersExpirationAllExpirationDate.validateJsonElement(jsonObj.get("expiration_date")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAllExpirationDate.java b/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAllExpirationDate.java index e0deec12..254a23be 100644 --- a/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAllExpirationDate.java +++ b/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAllExpirationDate.java @@ -64,9 +64,7 @@ public enum TypeEnum { BALANCE_DROP("BALANCE_DROP"), - CUSTOM("CUSTOM"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOM("CUSTOM"); private String value; @@ -89,7 +87,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -131,7 +129,7 @@ public LoyaltyTiersExpirationAllExpirationDate type(TypeEnum type) { * What triggers the tier to expire for a customer. `END_OF_PERIOD`: Expire tier at the end of the period. `END_OF_NEXT_PERIOD`: Expire tier at the end of the next period. `BALANCE_DROP`: Tier expires when the points balance drops below the required range of the tier. `CUSTOM`: Tier expires after a certain time period passes following the instance the points balance drops below the required range of the tier. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -152,7 +150,7 @@ public LoyaltyTiersExpirationAllExpirationDate extend(String extend) { * Extend the expiration by adding extra months or days in ISO 8601 format. The tier will remain active even though it reaches its expiration time period. For example, a tier with a duration of `P3M` will be valid for an additional duration of 3 months and a tier with a duration of `P1D` will be valid for an additional duration of 1 day. * @return extend **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getExtend() { return extend; } @@ -285,8 +283,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("extend"); } /** @@ -301,15 +297,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltyTiersExpirationAllExpirationDate is not found in the empty JSON string", LoyaltyTiersExpirationAllExpirationDate.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltyTiersExpirationAllExpirationDate.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -325,7 +314,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `type` to be a valid element of TypeEnum enum got `%s` instead", jsonObj.get("type").toString())); } } - if (!jsonObj.get("extend").isJsonPrimitive()) { + if ((jsonObj.get("extend") != null && !jsonObj.get("extend").isJsonNull()) && !jsonObj.get("extend").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `extend` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extend").toString())); } // validate the optional field `rounding` diff --git a/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAllExpirationDateRounding.java b/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAllExpirationDateRounding.java index 3ea42158..a159f81f 100644 --- a/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAllExpirationDateRounding.java +++ b/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAllExpirationDateRounding.java @@ -65,9 +65,7 @@ public enum TypeEnum { YEAR("YEAR"), - CUSTOM("CUSTOM"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOM("CUSTOM"); private String value; @@ -90,7 +88,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -118,9 +116,7 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { public enum StrategyEnum { START("START"), - END("END"), - - UNKNOWN_ENUM("unknown_enum"); + END("END"); private String value; @@ -143,7 +139,7 @@ public static StrategyEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -169,9 +165,7 @@ public StrategyEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(UnitEnum.Adapter.class) public enum UnitEnum { - MONTH("MONTH"), - - UNKNOWN_ENUM("unknown_enum"); + MONTH("MONTH"); private String value; @@ -194,7 +188,7 @@ public static UnitEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAllStartDate.java b/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAllStartDate.java index 807a2f5c..8b720205 100644 --- a/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAllStartDate.java +++ b/src/main/java/voucherify/client/model/LoyaltyTiersExpirationAllStartDate.java @@ -59,9 +59,7 @@ public class LoyaltyTiersExpirationAllStartDate { public enum TypeEnum { IMMEDIATE("IMMEDIATE"), - NEXT_PERIOD("NEXT_PERIOD"), - - UNKNOWN_ENUM("unknown_enum"); + NEXT_PERIOD("NEXT_PERIOD"); private String value; @@ -84,7 +82,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -118,7 +116,7 @@ public LoyaltyTiersExpirationAllStartDate type(TypeEnum type) { * What triggers the tier to be valid for a customer. `IMMEDIATE`: After reaching the minimum required points. `NEXT_PERIOD`: When the next qualification period starts. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -224,7 +222,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); } /** @@ -239,15 +236,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in LoyaltyTiersExpirationAllStartDate is not found in the empty JSON string", LoyaltyTiersExpirationAllStartDate.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LoyaltyTiersExpirationAllStartDate.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { diff --git a/src/main/java/voucherify/client/model/MappingPoints.java b/src/main/java/voucherify/client/model/MappingPoints.java index 2dd738de..e32e53fa 100644 --- a/src/main/java/voucherify/client/model/MappingPoints.java +++ b/src/main/java/voucherify/client/model/MappingPoints.java @@ -60,9 +60,7 @@ public class MappingPoints { public enum TypeEnum { MULTIPLY("MULTIPLY"), - CUSTOM("CUSTOM"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOM("CUSTOM"); private String value; @@ -85,7 +83,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/Order.java b/src/main/java/voucherify/client/model/Order.java index c5536513..86ce3d52 100644 --- a/src/main/java/voucherify/client/model/Order.java +++ b/src/main/java/voucherify/client/model/Order.java @@ -68,9 +68,7 @@ public enum StatusEnum { CANCELED("CANCELED"), - FULFILLED("FULFILLED"), - - UNKNOWN_ENUM("unknown_enum"); + FULFILLED("FULFILLED"); private String value; @@ -93,7 +91,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/OrderBase.java b/src/main/java/voucherify/client/model/OrderBase.java index 42824373..715747f9 100644 --- a/src/main/java/voucherify/client/model/OrderBase.java +++ b/src/main/java/voucherify/client/model/OrderBase.java @@ -68,9 +68,7 @@ public enum StatusEnum { CANCELED("CANCELED"), - FULFILLED("FULFILLED"), - - UNKNOWN_ENUM("unknown_enum"); + FULFILLED("FULFILLED"); private String value; @@ -93,7 +91,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/OrderCalculated.java b/src/main/java/voucherify/client/model/OrderCalculated.java index 29257c6a..1ff1a41f 100644 --- a/src/main/java/voucherify/client/model/OrderCalculated.java +++ b/src/main/java/voucherify/client/model/OrderCalculated.java @@ -88,9 +88,7 @@ public enum StatusEnum { CANCELED("CANCELED"), - FULFILLED("FULFILLED"), - - UNKNOWN_ENUM("unknown_enum"); + FULFILLED("FULFILLED"); private String value; @@ -113,7 +111,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -191,9 +189,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - ORDER("order"), - - UNKNOWN_ENUM("unknown_enum"); + ORDER("order"); private String value; @@ -216,7 +212,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -648,7 +644,7 @@ public OrderCalculated _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -899,7 +895,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); } /** @@ -914,13 +909,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCalculated is not found in the empty JSON string", OrderCalculated.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OrderCalculated.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); @@ -964,7 +952,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("referrer_id") != null && !jsonObj.get("referrer_id").isJsonNull()) && !jsonObj.get("referrer_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referrer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referrer_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/OrderCalculatedBase.java b/src/main/java/voucherify/client/model/OrderCalculatedBase.java index 29a41e38..a0f96250 100644 --- a/src/main/java/voucherify/client/model/OrderCalculatedBase.java +++ b/src/main/java/voucherify/client/model/OrderCalculatedBase.java @@ -87,9 +87,7 @@ public enum StatusEnum { CANCELED("CANCELED"), - FULFILLED("FULFILLED"), - - UNKNOWN_ENUM("unknown_enum"); + FULFILLED("FULFILLED"); private String value; @@ -112,7 +110,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -190,9 +188,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - ORDER("order"), - - UNKNOWN_ENUM("unknown_enum"); + ORDER("order"); private String value; @@ -215,7 +211,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -639,7 +635,7 @@ public OrderCalculatedBase _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -796,7 +792,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); } /** @@ -819,13 +814,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrderCalculatedBase` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OrderCalculatedBase.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); @@ -869,7 +857,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("referrer_id") != null && !jsonObj.get("referrer_id").isJsonNull()) && !jsonObj.get("referrer_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referrer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referrer_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/OrderCalculatedNoCustomerData.java b/src/main/java/voucherify/client/model/OrderCalculatedNoCustomerData.java index acd3f4c0..dfc9e9d5 100644 --- a/src/main/java/voucherify/client/model/OrderCalculatedNoCustomerData.java +++ b/src/main/java/voucherify/client/model/OrderCalculatedNoCustomerData.java @@ -89,9 +89,7 @@ public enum StatusEnum { CANCELED("CANCELED"), - FULFILLED("FULFILLED"), - - UNKNOWN_ENUM("unknown_enum"); + FULFILLED("FULFILLED"); private String value; @@ -114,7 +112,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -192,9 +190,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - ORDER("order"), - - UNKNOWN_ENUM("unknown_enum"); + ORDER("order"); private String value; @@ -217,7 +213,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -649,7 +645,7 @@ public OrderCalculatedNoCustomerData _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -900,7 +896,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); } /** @@ -915,13 +910,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in OrderCalculatedNoCustomerData is not found in the empty JSON string", OrderCalculatedNoCustomerData.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OrderCalculatedNoCustomerData.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); @@ -965,7 +953,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("referrer_id") != null && !jsonObj.get("referrer_id").isJsonNull()) && !jsonObj.get("referrer_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referrer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referrer_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/OrderItem.java b/src/main/java/voucherify/client/model/OrderItem.java index 232b5855..fe9a3445 100644 --- a/src/main/java/voucherify/client/model/OrderItem.java +++ b/src/main/java/voucherify/client/model/OrderItem.java @@ -69,9 +69,7 @@ public class OrderItem { public enum RelatedObjectEnum { PRODUCT("product"), - SKU("sku"), - - UNKNOWN_ENUM("unknown_enum"); + SKU("sku"); private String value; @@ -94,7 +92,7 @@ public static RelatedObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/OrderItemCalculated.java b/src/main/java/voucherify/client/model/OrderItemCalculated.java index 3d0c229a..95533b9c 100644 --- a/src/main/java/voucherify/client/model/OrderItemCalculated.java +++ b/src/main/java/voucherify/client/model/OrderItemCalculated.java @@ -69,9 +69,7 @@ public class OrderItemCalculated { public enum RelatedObjectEnum { PRODUCT("product"), - SKU("sku"), - - UNKNOWN_ENUM("unknown_enum"); + SKU("sku"); private String value; @@ -94,7 +92,7 @@ public static RelatedObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -172,9 +170,7 @@ public RelatedObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - ORDER_ITEM("order_item"), - - UNKNOWN_ENUM("unknown_enum"); + ORDER_ITEM("order_item"); private String value; @@ -197,7 +193,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -571,7 +567,7 @@ public OrderItemCalculated _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -749,7 +745,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); } /** @@ -764,13 +759,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in OrderItemCalculated is not found in the empty JSON string", OrderItemCalculated.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OrderItemCalculated.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("sku_id") != null && !jsonObj.get("sku_id").isJsonNull()) && !jsonObj.get("sku_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `sku_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sku_id").toString())); @@ -805,7 +793,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("sku") != null && !jsonObj.get("sku").isJsonNull()) { OrderItemCalculatedSku.validateJsonElement(jsonObj.get("sku")); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/OrdersCreateRequestBody.java b/src/main/java/voucherify/client/model/OrdersCreateRequestBody.java index 108cd1ee..f302a183 100644 --- a/src/main/java/voucherify/client/model/OrdersCreateRequestBody.java +++ b/src/main/java/voucherify/client/model/OrdersCreateRequestBody.java @@ -76,9 +76,7 @@ public enum StatusEnum { CANCELED("CANCELED"), - FULFILLED("FULFILLED"), - - UNKNOWN_ENUM("unknown_enum"); + FULFILLED("FULFILLED"); private String value; @@ -101,7 +99,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/OrdersCreateResponseBody.java b/src/main/java/voucherify/client/model/OrdersCreateResponseBody.java index 658cc573..92d1527c 100644 --- a/src/main/java/voucherify/client/model/OrdersCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/OrdersCreateResponseBody.java @@ -88,9 +88,7 @@ public enum StatusEnum { CANCELED("CANCELED"), - FULFILLED("FULFILLED"), - - UNKNOWN_ENUM("unknown_enum"); + FULFILLED("FULFILLED"); private String value; @@ -113,7 +111,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -191,9 +189,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - ORDER("order"), - - UNKNOWN_ENUM("unknown_enum"); + ORDER("order"); private String value; @@ -216,7 +212,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -648,7 +644,7 @@ public OrdersCreateResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -899,7 +895,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); } /** @@ -914,13 +909,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in OrdersCreateResponseBody is not found in the empty JSON string", OrdersCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OrdersCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); @@ -964,7 +952,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("referrer_id") != null && !jsonObj.get("referrer_id").isJsonNull()) && !jsonObj.get("referrer_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referrer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referrer_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/OrdersExportCreateResponseBody.java b/src/main/java/voucherify/client/model/OrdersExportCreateResponseBody.java index 4018f3e6..348acf7e 100644 --- a/src/main/java/voucherify/client/model/OrdersExportCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/OrdersExportCreateResponseBody.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import voucherify.client.model.OrdersExportCreateRequestBodyParameters; import com.google.gson.Gson; @@ -63,9 +64,7 @@ public class OrdersExportCreateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EXPORT("export"), - - UNKNOWN_ENUM("unknown_enum"); + EXPORT("export"); private String value; @@ -88,7 +87,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -118,9 +117,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - SCHEDULED("SCHEDULED"), - - UNKNOWN_ENUM("unknown_enum"); + SCHEDULED("SCHEDULED"); private String value; @@ -143,7 +140,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -181,9 +178,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ExportedObjectEnum.Adapter.class) public enum ExportedObjectEnum { - ORDER("order"), - - UNKNOWN_ENUM("unknown_enum"); + ORDER("order"); private String value; @@ -206,7 +201,7 @@ public static ExportedObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -244,7 +239,7 @@ public OrdersExportCreateResponseBody id(String id) { * Unique export ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -265,7 +260,7 @@ public OrdersExportCreateResponseBody _object(ObjectEnum _object) { * The type of object being represented. This object stores information about the export. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -286,7 +281,7 @@ public OrdersExportCreateResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the export was scheduled in ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -307,7 +302,7 @@ public OrdersExportCreateResponseBody status(StatusEnum status) { * Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -370,7 +365,7 @@ public OrdersExportCreateResponseBody userId(String userId) { * Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. * @return userId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getUserId() { return userId; } @@ -391,7 +386,7 @@ public OrdersExportCreateResponseBody exportedObject(ExportedObjectEnum exported * The type of object to be exported. * @return exportedObject **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ExportedObjectEnum getExportedObject() { return exportedObject; } @@ -489,11 +484,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, ordersExportCreateResponseBody.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(id, _object, createdAt, status, channel, result, userId, exportedObject, parameters, additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -542,13 +548,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("result"); - openapiRequiredFields.add("user_id"); - openapiRequiredFields.add("exported_object"); } /** @@ -563,18 +562,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in OrdersExportCreateResponseBody is not found in the empty JSON string", OrdersExportCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OrdersExportCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -590,7 +582,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -609,10 +601,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("channel") != null && !jsonObj.get("channel").isJsonNull()) && !jsonObj.get("channel").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `channel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("channel").toString())); } - if (!jsonObj.get("user_id").isJsonPrimitive()) { + if ((jsonObj.get("user_id") != null && !jsonObj.get("user_id").isJsonNull()) && !jsonObj.get("user_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); } - if (!jsonObj.get("exported_object").isJsonPrimitive()) { + if ((jsonObj.get("exported_object") != null && !jsonObj.get("exported_object").isJsonNull()) && !jsonObj.get("exported_object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `exported_object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exported_object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/OrdersGetResponseBody.java b/src/main/java/voucherify/client/model/OrdersGetResponseBody.java index 635f1c9e..29000308 100644 --- a/src/main/java/voucherify/client/model/OrdersGetResponseBody.java +++ b/src/main/java/voucherify/client/model/OrdersGetResponseBody.java @@ -89,9 +89,7 @@ public enum StatusEnum { CANCELED("CANCELED"), - FULFILLED("FULFILLED"), - - UNKNOWN_ENUM("unknown_enum"); + FULFILLED("FULFILLED"); private String value; @@ -114,7 +112,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -192,9 +190,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - ORDER("order"), - - UNKNOWN_ENUM("unknown_enum"); + ORDER("order"); private String value; @@ -217,7 +213,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -649,7 +645,7 @@ public OrdersGetResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -900,7 +896,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); } /** @@ -915,13 +910,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in OrdersGetResponseBody is not found in the empty JSON string", OrdersGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OrdersGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); @@ -965,7 +953,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("referrer_id") != null && !jsonObj.get("referrer_id").isJsonNull()) && !jsonObj.get("referrer_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referrer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referrer_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/OrdersImportCreateRequestBodyItem.java b/src/main/java/voucherify/client/model/OrdersImportCreateRequestBodyItem.java index 3e647751..5bc2f7fa 100644 --- a/src/main/java/voucherify/client/model/OrdersImportCreateRequestBodyItem.java +++ b/src/main/java/voucherify/client/model/OrdersImportCreateRequestBodyItem.java @@ -68,9 +68,7 @@ public enum StatusEnum { CANCELED("CANCELED"), - FULFILLED("FULFILLED"), - - UNKNOWN_ENUM("unknown_enum"); + FULFILLED("FULFILLED"); private String value; @@ -93,7 +91,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/OrdersImportCreateResponseBody.java b/src/main/java/voucherify/client/model/OrdersImportCreateResponseBody.java index 8c8659d5..18bc381f 100644 --- a/src/main/java/voucherify/client/model/OrdersImportCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/OrdersImportCreateResponseBody.java @@ -69,7 +69,7 @@ public OrdersImportCreateResponseBody asyncActionId(String asyncActionId) { * The ID of the scheduled asynchronous action. * @return asyncActionId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAsyncActionId() { return asyncActionId; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("async_action_id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in OrdersImportCreateResponseBody is not found in the empty JSON string", OrdersImportCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OrdersImportCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("async_action_id").isJsonPrimitive()) { + if ((jsonObj.get("async_action_id") != null && !jsonObj.get("async_action_id").isJsonNull()) && !jsonObj.get("async_action_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `async_action_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_action_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/OrdersListResponseBody.java b/src/main/java/voucherify/client/model/OrdersListResponseBody.java index cf19c2c5..73269e77 100644 --- a/src/main/java/voucherify/client/model/OrdersListResponseBody.java +++ b/src/main/java/voucherify/client/model/OrdersListResponseBody.java @@ -60,9 +60,7 @@ public class OrdersListResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -85,7 +83,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -111,9 +109,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - ORDERS("orders"), - - UNKNOWN_ENUM("unknown_enum"); + ORDERS("orders"); private String value; @@ -136,7 +132,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -159,7 +155,7 @@ public DataRefEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_ORDERS = "orders"; @SerializedName(SERIALIZED_NAME_ORDERS) - private List orders = new ArrayList<>(); + private List orders; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -178,7 +174,7 @@ public OrdersListResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about orders in a dictionary. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -199,7 +195,7 @@ public OrdersListResponseBody dataRef(DataRefEnum dataRef) { * Identifies the name of the attribute that contains the array of order objects. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -228,7 +224,7 @@ public OrdersListResponseBody addOrdersItem(OrderCalculatedNoCustomerData orders * Contains array of order objects. * @return orders **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getOrders() { return orders; } @@ -249,7 +245,7 @@ public OrdersListResponseBody total(Integer total) { * Total number of orders. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -364,10 +360,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("orders"); - openapiRequiredFields.add("total"); } /** @@ -382,15 +374,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in OrdersListResponseBody is not found in the empty JSON string", OrdersListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OrdersListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -406,7 +391,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { @@ -422,16 +407,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a valid element of DataRefEnum enum got `%s` instead", jsonObj.get("data_ref").toString())); } } - // ensure the json data is an array - if (!jsonObj.get("orders").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `orders` to be an array in the JSON string but got `%s`", jsonObj.get("orders").toString())); + if (jsonObj.get("orders") != null && !jsonObj.get("orders").isJsonNull()) { + JsonArray jsonArrayorders = jsonObj.getAsJsonArray("orders"); + if (jsonArrayorders != null) { + // ensure the json data is an array + if (!jsonObj.get("orders").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `orders` to be an array in the JSON string but got `%s`", jsonObj.get("orders").toString())); + } + + // validate the optional field `orders` (array) + for (int i = 0; i < jsonArrayorders.size(); i++) { + OrderCalculatedNoCustomerData.validateJsonElement(jsonArrayorders.get(i)); + }; + } } - - JsonArray jsonArrayorders = jsonObj.getAsJsonArray("orders"); - // validate the required field `orders` (array) - for (int i = 0; i < jsonArrayorders.size(); i++) { - OrderCalculatedNoCustomerData.validateJsonElement(jsonArrayorders.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/OrdersUpdateRequestBody.java b/src/main/java/voucherify/client/model/OrdersUpdateRequestBody.java index eb9ae66d..5b88537f 100644 --- a/src/main/java/voucherify/client/model/OrdersUpdateRequestBody.java +++ b/src/main/java/voucherify/client/model/OrdersUpdateRequestBody.java @@ -68,9 +68,7 @@ public enum StatusEnum { CANCELED("CANCELED"), - FULFILLED("FULFILLED"), - - UNKNOWN_ENUM("unknown_enum"); + FULFILLED("FULFILLED"); private String value; @@ -93,7 +91,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/OrdersUpdateResponseBody.java b/src/main/java/voucherify/client/model/OrdersUpdateResponseBody.java index 0e62f27c..92f2e7ea 100644 --- a/src/main/java/voucherify/client/model/OrdersUpdateResponseBody.java +++ b/src/main/java/voucherify/client/model/OrdersUpdateResponseBody.java @@ -88,9 +88,7 @@ public enum StatusEnum { CANCELED("CANCELED"), - FULFILLED("FULFILLED"), - - UNKNOWN_ENUM("unknown_enum"); + FULFILLED("FULFILLED"); private String value; @@ -113,7 +111,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -191,9 +189,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - ORDER("order"), - - UNKNOWN_ENUM("unknown_enum"); + ORDER("order"); private String value; @@ -216,7 +212,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -648,7 +644,7 @@ public OrdersUpdateResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -899,7 +895,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); } /** @@ -914,13 +909,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in OrdersUpdateResponseBody is not found in the empty JSON string", OrdersUpdateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OrdersUpdateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); @@ -964,7 +952,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("referrer_id") != null && !jsonObj.get("referrer_id").isJsonNull()) && !jsonObj.get("referrer_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referrer_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referrer_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ParameterCampaignType.java b/src/main/java/voucherify/client/model/ParameterCampaignType.java index 69d5669c..744a442f 100644 --- a/src/main/java/voucherify/client/model/ParameterCampaignType.java +++ b/src/main/java/voucherify/client/model/ParameterCampaignType.java @@ -38,9 +38,7 @@ public enum ParameterCampaignType { LOYALTY_PROGRAM("LOYALTY_PROGRAM"), - LUCKY_DRAW("LUCKY_DRAW"), - - UNKNOWN_ENUM("unknown_enum"); + LUCKY_DRAW("LUCKY_DRAW"); private String value; @@ -63,7 +61,7 @@ public static ParameterCampaignType fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ParameterExpandListCampaigns.java b/src/main/java/voucherify/client/model/ParameterExpandListCampaigns.java index 6ad3b9e1..e7471f93 100644 --- a/src/main/java/voucherify/client/model/ParameterExpandListCampaigns.java +++ b/src/main/java/voucherify/client/model/ParameterExpandListCampaigns.java @@ -28,9 +28,7 @@ @JsonAdapter(ParameterExpandListCampaigns.Adapter.class) public enum ParameterExpandListCampaigns { - CATEGORY("category"), - - UNKNOWN_ENUM("unknown_enum"); + CATEGORY("category"); private String value; @@ -53,7 +51,7 @@ public static ParameterExpandListCampaigns fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ParameterOrder.java b/src/main/java/voucherify/client/model/ParameterOrder.java index e28ab4fc..d97ee019 100644 --- a/src/main/java/voucherify/client/model/ParameterOrder.java +++ b/src/main/java/voucherify/client/model/ParameterOrder.java @@ -50,9 +50,7 @@ public enum ParameterOrder { CATEGORY("category"), - _CATEGORY("-category"), - - UNKNOWN_ENUM("unknown_enum"); + _CATEGORY("-category"); private String value; @@ -75,7 +73,7 @@ public static ParameterOrder fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ParameterOrderListAllPromotionStacks.java b/src/main/java/voucherify/client/model/ParameterOrderListAllPromotionStacks.java index 04f12571..e493157c 100644 --- a/src/main/java/voucherify/client/model/ParameterOrderListAllPromotionStacks.java +++ b/src/main/java/voucherify/client/model/ParameterOrderListAllPromotionStacks.java @@ -38,9 +38,7 @@ public enum ParameterOrderListAllPromotionStacks { NAME("name"), - _NAME("-name"), - - UNKNOWN_ENUM("unknown_enum"); + _NAME("-name"); private String value; @@ -63,7 +61,7 @@ public static ParameterOrderListAllPromotionStacks fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ParameterOrderListCampaigns.java b/src/main/java/voucherify/client/model/ParameterOrderListCampaigns.java index bc0d4ec9..c4dc3a1a 100644 --- a/src/main/java/voucherify/client/model/ParameterOrderListCampaigns.java +++ b/src/main/java/voucherify/client/model/ParameterOrderListCampaigns.java @@ -34,9 +34,7 @@ public enum ParameterOrderListCampaigns { UPDATED_AT("updated_at"), - _UPDATED_AT("-updated_at"), - - UNKNOWN_ENUM("unknown_enum"); + _UPDATED_AT("-updated_at"); private String value; @@ -59,7 +57,7 @@ public static ParameterOrderListCampaigns fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ParameterOrderListCustomers.java b/src/main/java/voucherify/client/model/ParameterOrderListCustomers.java index b522835d..2e3b6ef3 100644 --- a/src/main/java/voucherify/client/model/ParameterOrderListCustomers.java +++ b/src/main/java/voucherify/client/model/ParameterOrderListCustomers.java @@ -38,9 +38,7 @@ public enum ParameterOrderListCustomers { SOURCE_ID("source_id"), - _SOURCE_ID("-source_id"), - - UNKNOWN_ENUM("unknown_enum"); + _SOURCE_ID("-source_id"); private String value; @@ -63,7 +61,7 @@ public static ParameterOrderListCustomers fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ParameterOrderListExports.java b/src/main/java/voucherify/client/model/ParameterOrderListExports.java index 770ad44b..d515a1fb 100644 --- a/src/main/java/voucherify/client/model/ParameterOrderListExports.java +++ b/src/main/java/voucherify/client/model/ParameterOrderListExports.java @@ -34,9 +34,7 @@ public enum ParameterOrderListExports { STATUS("status"), - _STATUS("-status"), - - UNKNOWN_ENUM("unknown_enum"); + _STATUS("-status"); private String value; @@ -59,7 +57,7 @@ public static ParameterOrderListExports fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ParameterOrderListLoyaltyTiers.java b/src/main/java/voucherify/client/model/ParameterOrderListLoyaltyTiers.java index 9f518a07..8bc02d1e 100644 --- a/src/main/java/voucherify/client/model/ParameterOrderListLoyaltyTiers.java +++ b/src/main/java/voucherify/client/model/ParameterOrderListLoyaltyTiers.java @@ -34,9 +34,7 @@ public enum ParameterOrderListLoyaltyTiers { UPDATED_AT("updated_at"), - _UPDATED_AT("-updated_at"), - - UNKNOWN_ENUM("unknown_enum"); + _UPDATED_AT("-updated_at"); private String value; @@ -59,7 +57,7 @@ public static ParameterOrderListLoyaltyTiers fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ParameterOrderListOrders.java b/src/main/java/voucherify/client/model/ParameterOrderListOrders.java index 2e75d65a..de48b1b8 100644 --- a/src/main/java/voucherify/client/model/ParameterOrderListOrders.java +++ b/src/main/java/voucherify/client/model/ParameterOrderListOrders.java @@ -34,9 +34,7 @@ public enum ParameterOrderListOrders { UPDATED_AT("updated_at"), - _UPDATED_AT("-updated_at"), - - UNKNOWN_ENUM("unknown_enum"); + _UPDATED_AT("-updated_at"); private String value; @@ -59,7 +57,7 @@ public static ParameterOrderListOrders fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ParameterOrderListPublications.java b/src/main/java/voucherify/client/model/ParameterOrderListPublications.java index 91193c05..2a11c2de 100644 --- a/src/main/java/voucherify/client/model/ParameterOrderListPublications.java +++ b/src/main/java/voucherify/client/model/ParameterOrderListPublications.java @@ -50,9 +50,7 @@ public enum ParameterOrderListPublications { CHANNEL("channel"), - _CHANNEL("-channel"), - - UNKNOWN_ENUM("unknown_enum"); + _CHANNEL("-channel"); private String value; @@ -75,7 +73,7 @@ public static ParameterOrderListPublications fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ParameterOrderListRedemptions.java b/src/main/java/voucherify/client/model/ParameterOrderListRedemptions.java index 92188493..dae5b7fa 100644 --- a/src/main/java/voucherify/client/model/ParameterOrderListRedemptions.java +++ b/src/main/java/voucherify/client/model/ParameterOrderListRedemptions.java @@ -46,9 +46,7 @@ public enum ParameterOrderListRedemptions { CUSTOMER_ID("customer_id"), - _CUSTOMER_ID("-customer_id"), - - UNKNOWN_ENUM("unknown_enum"); + _CUSTOMER_ID("-customer_id"); private String value; @@ -71,7 +69,7 @@ public static ParameterOrderListRedemptions fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ParameterOrderListValidationRuleAssignments.java b/src/main/java/voucherify/client/model/ParameterOrderListValidationRuleAssignments.java index 4151ff48..6e953e4e 100644 --- a/src/main/java/voucherify/client/model/ParameterOrderListValidationRuleAssignments.java +++ b/src/main/java/voucherify/client/model/ParameterOrderListValidationRuleAssignments.java @@ -30,9 +30,7 @@ public enum ParameterOrderListValidationRuleAssignments { CREATED_AT("created_at"), - _CREATED_AT("-created_at"), - - UNKNOWN_ENUM("unknown_enum"); + _CREATED_AT("-created_at"); private String value; @@ -55,7 +53,7 @@ public static ParameterOrderListValidationRuleAssignments fromValue(String value return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ParameterOrderListValidationRules.java b/src/main/java/voucherify/client/model/ParameterOrderListValidationRules.java index 7ad39eb2..3c752880 100644 --- a/src/main/java/voucherify/client/model/ParameterOrderListValidationRules.java +++ b/src/main/java/voucherify/client/model/ParameterOrderListValidationRules.java @@ -38,9 +38,7 @@ public enum ParameterOrderListValidationRules { NAME("name"), - _NAME("-name"), - - UNKNOWN_ENUM("unknown_enum"); + _NAME("-name"); private String value; @@ -63,7 +61,7 @@ public static ParameterOrderListValidationRules fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ParameterResultListPublications.java b/src/main/java/voucherify/client/model/ParameterResultListPublications.java index f45d7397..2ea95f8c 100644 --- a/src/main/java/voucherify/client/model/ParameterResultListPublications.java +++ b/src/main/java/voucherify/client/model/ParameterResultListPublications.java @@ -30,9 +30,7 @@ public enum ParameterResultListPublications { SUCCESS("SUCCESS"), - FAILURE("FAILURE"), - - UNKNOWN_ENUM("unknown_enum"); + FAILURE("FAILURE"); private String value; @@ -55,7 +53,7 @@ public static ParameterResultListPublications fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ParameterVoucherTypeListPublications.java b/src/main/java/voucherify/client/model/ParameterVoucherTypeListPublications.java index 8157ca3e..fb6c943b 100644 --- a/src/main/java/voucherify/client/model/ParameterVoucherTypeListPublications.java +++ b/src/main/java/voucherify/client/model/ParameterVoucherTypeListPublications.java @@ -32,9 +32,7 @@ public enum ParameterVoucherTypeListPublications { LOYALTY("loyalty"), - LUCKY_DRAW("lucky_draw"), - - UNKNOWN_ENUM("unknown_enum"); + LUCKY_DRAW("lucky_draw"); private String value; @@ -57,7 +55,7 @@ public static ParameterVoucherTypeListPublications fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/PointsExpirationTypes.java b/src/main/java/voucherify/client/model/PointsExpirationTypes.java index 82b9e1d3..7a3d9831 100644 --- a/src/main/java/voucherify/client/model/PointsExpirationTypes.java +++ b/src/main/java/voucherify/client/model/PointsExpirationTypes.java @@ -32,9 +32,7 @@ public enum PointsExpirationTypes { CUSTOM_DATE("CUSTOM_DATE"), - NON_EXPIRING("NON_EXPIRING"), - - UNKNOWN_ENUM("unknown_enum"); + NON_EXPIRING("NON_EXPIRING"); private String value; @@ -57,7 +55,7 @@ public static PointsExpirationTypes fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/Product.java b/src/main/java/voucherify/client/model/Product.java index c0b3049b..140ab749 100644 --- a/src/main/java/voucherify/client/model/Product.java +++ b/src/main/java/voucherify/client/model/Product.java @@ -75,7 +75,7 @@ public class Product { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private List attributes = new ArrayList<>(); + private List attributes; public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) @@ -98,9 +98,7 @@ public class Product { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PRODUCT("product"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCT("product"); private String value; @@ -123,7 +121,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -161,7 +159,7 @@ public Product id(String id) { * Unique product ID assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -253,7 +251,7 @@ public Product addAttributesItem(String attributesItem) { * A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. * @return attributes **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getAttributes() { return attributes; } @@ -274,7 +272,7 @@ public Product metadata(Object metadata) { * The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -358,7 +356,7 @@ public Product _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the product. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -526,10 +524,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("object"); } /** @@ -544,15 +538,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in Product is not found in the empty JSON string", Product.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Product.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { @@ -561,16 +548,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // ensure the required json array is present - if (jsonObj.get("attributes") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("attributes").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull() && !jsonObj.get("attributes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `attributes` to be an array in the JSON string but got `%s`", jsonObj.get("attributes").toString())); } if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ProductCollectionsCreateDynamicRequestBodyProductsItem.java b/src/main/java/voucherify/client/model/ProductCollectionsCreateDynamicRequestBodyProductsItem.java index f29500f7..e059eb1c 100644 --- a/src/main/java/voucherify/client/model/ProductCollectionsCreateDynamicRequestBodyProductsItem.java +++ b/src/main/java/voucherify/client/model/ProductCollectionsCreateDynamicRequestBodyProductsItem.java @@ -67,9 +67,7 @@ public class ProductCollectionsCreateDynamicRequestBodyProductsItem { public enum ObjectEnum { SKU("sku"), - PRODUCT("product"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCT("product"); private String value; @@ -92,7 +90,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ProductCollectionsCreateRequestBody.java b/src/main/java/voucherify/client/model/ProductCollectionsCreateRequestBody.java index 3a029bc6..5881e59e 100644 --- a/src/main/java/voucherify/client/model/ProductCollectionsCreateRequestBody.java +++ b/src/main/java/voucherify/client/model/ProductCollectionsCreateRequestBody.java @@ -61,9 +61,7 @@ public class ProductCollectionsCreateRequestBody { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - STATIC("STATIC"), - - UNKNOWN_ENUM("unknown_enum"); + STATIC("STATIC"); private String value; @@ -86,7 +84,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -132,7 +130,7 @@ public ProductCollectionsCreateRequestBody type(TypeEnum type) { * Show that the product collection is static (manually selected products). * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -153,7 +151,7 @@ public ProductCollectionsCreateRequestBody name(String name) { * Unique user-defined product collection name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -318,8 +316,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("name"); } /** @@ -334,15 +330,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductCollectionsCreateRequestBody is not found in the empty JSON string", ProductCollectionsCreateRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductCollectionsCreateRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -358,7 +347,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `type` to be a valid element of TypeEnum enum got `%s` instead", jsonObj.get("type").toString())); } } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (jsonObj.get("products") != null && !jsonObj.get("products").isJsonNull()) { diff --git a/src/main/java/voucherify/client/model/ProductCollectionsCreateRequestBodyFilter.java b/src/main/java/voucherify/client/model/ProductCollectionsCreateRequestBodyFilter.java index e971c6ae..7a10dabd 100644 --- a/src/main/java/voucherify/client/model/ProductCollectionsCreateRequestBodyFilter.java +++ b/src/main/java/voucherify/client/model/ProductCollectionsCreateRequestBodyFilter.java @@ -119,7 +119,7 @@ public ProductCollectionsCreateRequestBodyFilter junction(Junction junction) { * Get junction * @return junction **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Junction getJunction() { return junction; } @@ -467,7 +467,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("junction"); } /** @@ -490,13 +489,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ProductCollectionsCreateRequestBodyFilter` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductCollectionsCreateRequestBodyFilter.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `id` if (jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) { diff --git a/src/main/java/voucherify/client/model/ProductCollectionsCreateResponseBody.java b/src/main/java/voucherify/client/model/ProductCollectionsCreateResponseBody.java index a759c154..c4fc1a7d 100644 --- a/src/main/java/voucherify/client/model/ProductCollectionsCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/ProductCollectionsCreateResponseBody.java @@ -72,9 +72,7 @@ public class ProductCollectionsCreateResponseBody { public enum TypeEnum { STATIC("STATIC"), - AUTO_UPDATE("AUTO_UPDATE"), - - UNKNOWN_ENUM("unknown_enum"); + AUTO_UPDATE("AUTO_UPDATE"); private String value; @@ -97,7 +95,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -135,9 +133,7 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PRODUCTS_COLLECTION("products_collection"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCTS_COLLECTION("products_collection"); private String value; @@ -160,7 +156,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -194,7 +190,7 @@ public ProductCollectionsCreateResponseBody id(String id) { * Product collection ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -215,7 +211,7 @@ public ProductCollectionsCreateResponseBody name(String name) { * Unique user-defined product collection name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -236,7 +232,7 @@ public ProductCollectionsCreateResponseBody type(TypeEnum type) { * Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -307,7 +303,7 @@ public ProductCollectionsCreateResponseBody createdAt(OffsetDateTime createdAt) * Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -328,7 +324,7 @@ public ProductCollectionsCreateResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the static product collection. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -452,11 +448,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -471,21 +462,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductCollectionsCreateResponseBody is not found in the empty JSON string", ProductCollectionsCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductCollectionsCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -519,7 +503,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ProductCollectionsGetResponseBody.java b/src/main/java/voucherify/client/model/ProductCollectionsGetResponseBody.java index d04caee3..0ec12879 100644 --- a/src/main/java/voucherify/client/model/ProductCollectionsGetResponseBody.java +++ b/src/main/java/voucherify/client/model/ProductCollectionsGetResponseBody.java @@ -72,9 +72,7 @@ public class ProductCollectionsGetResponseBody { public enum TypeEnum { STATIC("STATIC"), - AUTO_UPDATE("AUTO_UPDATE"), - - UNKNOWN_ENUM("unknown_enum"); + AUTO_UPDATE("AUTO_UPDATE"); private String value; @@ -97,7 +95,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -135,9 +133,7 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PRODUCTS_COLLECTION("products_collection"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCTS_COLLECTION("products_collection"); private String value; @@ -160,7 +156,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -194,7 +190,7 @@ public ProductCollectionsGetResponseBody id(String id) { * Product collection ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -215,7 +211,7 @@ public ProductCollectionsGetResponseBody name(String name) { * Unique user-defined product collection name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -236,7 +232,7 @@ public ProductCollectionsGetResponseBody type(TypeEnum type) { * Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -307,7 +303,7 @@ public ProductCollectionsGetResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -328,7 +324,7 @@ public ProductCollectionsGetResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the static product collection. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -452,11 +448,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -471,21 +462,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductCollectionsGetResponseBody is not found in the empty JSON string", ProductCollectionsGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductCollectionsGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -519,7 +503,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ProductCollectionsItem.java b/src/main/java/voucherify/client/model/ProductCollectionsItem.java index 432646f1..beed2d0d 100644 --- a/src/main/java/voucherify/client/model/ProductCollectionsItem.java +++ b/src/main/java/voucherify/client/model/ProductCollectionsItem.java @@ -72,9 +72,7 @@ public class ProductCollectionsItem { public enum TypeEnum { STATIC("STATIC"), - AUTO_UPDATE("AUTO_UPDATE"), - - UNKNOWN_ENUM("unknown_enum"); + AUTO_UPDATE("AUTO_UPDATE"); private String value; @@ -97,7 +95,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -135,9 +133,7 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PRODUCTS_COLLECTION("products_collection"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCTS_COLLECTION("products_collection"); private String value; @@ -160,7 +156,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -194,7 +190,7 @@ public ProductCollectionsItem id(String id) { * Product collection ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -215,7 +211,7 @@ public ProductCollectionsItem name(String name) { * Unique user-defined product collection name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -236,7 +232,7 @@ public ProductCollectionsItem type(TypeEnum type) { * Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -307,7 +303,7 @@ public ProductCollectionsItem createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -328,7 +324,7 @@ public ProductCollectionsItem _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the static product collection. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -452,11 +448,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -471,21 +462,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductCollectionsItem is not found in the empty JSON string", ProductCollectionsItem.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductCollectionsItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -519,7 +503,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ProductCollectionsItemProductsItem.java b/src/main/java/voucherify/client/model/ProductCollectionsItemProductsItem.java index 1ba2d310..6c34166e 100644 --- a/src/main/java/voucherify/client/model/ProductCollectionsItemProductsItem.java +++ b/src/main/java/voucherify/client/model/ProductCollectionsItemProductsItem.java @@ -67,9 +67,7 @@ public class ProductCollectionsItemProductsItem { public enum ObjectEnum { SKU("sku"), - PRODUCT("product"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCT("product"); private String value; @@ -92,7 +90,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ProductCollectionsList.java b/src/main/java/voucherify/client/model/ProductCollectionsList.java index e7638b67..8bf23b12 100644 --- a/src/main/java/voucherify/client/model/ProductCollectionsList.java +++ b/src/main/java/voucherify/client/model/ProductCollectionsList.java @@ -60,9 +60,7 @@ public class ProductCollectionsList { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -85,7 +83,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -111,9 +109,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - DATA("data"), - - UNKNOWN_ENUM("unknown_enum"); + DATA("data"); private String value; @@ -136,7 +132,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -159,7 +155,7 @@ public DataRefEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -178,7 +174,7 @@ public ProductCollectionsList _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about product collections. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -199,7 +195,7 @@ public ProductCollectionsList dataRef(DataRefEnum dataRef) { * Identifies the name of the JSON property that contains the array of product collections. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -228,7 +224,7 @@ public ProductCollectionsList addDataItem(ProductCollectionsItem dataItem) { * A dictionary that contains an array of product collections and their details. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -249,7 +245,7 @@ public ProductCollectionsList total(Integer total) { * Total number of product collections. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -364,10 +360,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -382,15 +374,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductCollectionsList is not found in the empty JSON string", ProductCollectionsList.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductCollectionsList.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -406,7 +391,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { @@ -422,16 +407,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a valid element of DataRefEnum enum got `%s` instead", jsonObj.get("data_ref").toString())); } } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ProductCollectionsItem.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ProductCollectionsItem.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/ProductCollectionsListResponseBody.java b/src/main/java/voucherify/client/model/ProductCollectionsListResponseBody.java index 38bb6d78..b25ba456 100644 --- a/src/main/java/voucherify/client/model/ProductCollectionsListResponseBody.java +++ b/src/main/java/voucherify/client/model/ProductCollectionsListResponseBody.java @@ -60,9 +60,7 @@ public class ProductCollectionsListResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -85,7 +83,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -111,9 +109,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - DATA("data"), - - UNKNOWN_ENUM("unknown_enum"); + DATA("data"); private String value; @@ -136,7 +132,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -159,7 +155,7 @@ public DataRefEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -178,7 +174,7 @@ public ProductCollectionsListResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about product collections. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -199,7 +195,7 @@ public ProductCollectionsListResponseBody dataRef(DataRefEnum dataRef) { * Identifies the name of the JSON property that contains the array of product collections. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -228,7 +224,7 @@ public ProductCollectionsListResponseBody addDataItem(ProductCollectionsItem dat * A dictionary that contains an array of product collections and their details. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -249,7 +245,7 @@ public ProductCollectionsListResponseBody total(Integer total) { * Total number of product collections. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -364,10 +360,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -382,15 +374,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductCollectionsListResponseBody is not found in the empty JSON string", ProductCollectionsListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductCollectionsListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -406,7 +391,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { @@ -422,16 +407,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a valid element of DataRefEnum enum got `%s` instead", jsonObj.get("data_ref").toString())); } } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ProductCollectionsItem.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ProductCollectionsItem.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/ProductCollectionsProductsList.java b/src/main/java/voucherify/client/model/ProductCollectionsProductsList.java index 589ceb16..283944d1 100644 --- a/src/main/java/voucherify/client/model/ProductCollectionsProductsList.java +++ b/src/main/java/voucherify/client/model/ProductCollectionsProductsList.java @@ -65,7 +65,7 @@ public class ProductCollectionsProductsList { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public ProductCollectionsProductsList _object(String _object) { * The type of the object represented by JSON. This object stores information about products and SKUs. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public ProductCollectionsProductsList dataRef(String dataRef) { * Identifies the name of the JSON property that contains the array of products and SKUs. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public ProductCollectionsProductsList addDataItem(ProductCollectionsProductsList * Get data * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -155,7 +155,7 @@ public ProductCollectionsProductsList total(Integer total) { * Total number of products & SKUs in the product collection. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductCollectionsProductsList is not found in the empty JSON string", ProductCollectionsProductsList.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductCollectionsProductsList.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ProductCollectionsProductsListDataItem.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ProductCollectionsProductsListDataItem.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/ProductCollectionsProductsListDataItem.java b/src/main/java/voucherify/client/model/ProductCollectionsProductsListDataItem.java index a2834f6b..028ad0d9 100644 --- a/src/main/java/voucherify/client/model/ProductCollectionsProductsListDataItem.java +++ b/src/main/java/voucherify/client/model/ProductCollectionsProductsListDataItem.java @@ -99,9 +99,7 @@ public class ProductCollectionsProductsListDataItem { public enum ObjectEnum { PRODUCT("product"), - SKU("sku"), - - UNKNOWN_ENUM("unknown_enum"); + SKU("sku"); private String value; @@ -124,7 +122,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ProductCollectionsProductsListResponseBody.java b/src/main/java/voucherify/client/model/ProductCollectionsProductsListResponseBody.java index 6110173e..ee96d7c2 100644 --- a/src/main/java/voucherify/client/model/ProductCollectionsProductsListResponseBody.java +++ b/src/main/java/voucherify/client/model/ProductCollectionsProductsListResponseBody.java @@ -65,7 +65,7 @@ public class ProductCollectionsProductsListResponseBody { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public ProductCollectionsProductsListResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about products and SKUs. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public ProductCollectionsProductsListResponseBody dataRef(String dataRef) { * Identifies the name of the JSON property that contains the array of products and SKUs. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public ProductCollectionsProductsListResponseBody addDataItem(ProductCollections * Get data * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -155,7 +155,7 @@ public ProductCollectionsProductsListResponseBody total(Integer total) { * Total number of products & SKUs in the product collection. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductCollectionsProductsListResponseBody is not found in the empty JSON string", ProductCollectionsProductsListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductCollectionsProductsListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ProductCollectionsProductsListDataItem.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ProductCollectionsProductsListDataItem.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/ProductWithoutSkus.java b/src/main/java/voucherify/client/model/ProductWithoutSkus.java index 3a214125..38f0d97d 100644 --- a/src/main/java/voucherify/client/model/ProductWithoutSkus.java +++ b/src/main/java/voucherify/client/model/ProductWithoutSkus.java @@ -74,7 +74,7 @@ public class ProductWithoutSkus { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private List attributes = new ArrayList<>(); + private List attributes; public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) @@ -97,9 +97,7 @@ public class ProductWithoutSkus { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PRODUCT("product"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCT("product"); private String value; @@ -122,7 +120,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -156,7 +154,7 @@ public ProductWithoutSkus id(String id) { * Unique product ID assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -248,7 +246,7 @@ public ProductWithoutSkus addAttributesItem(String attributesItem) { * A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. * @return attributes **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getAttributes() { return attributes; } @@ -269,7 +267,7 @@ public ProductWithoutSkus metadata(Object metadata) { * The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -353,7 +351,7 @@ public ProductWithoutSkus _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the product. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -497,10 +495,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("object"); } /** @@ -515,15 +509,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductWithoutSkus is not found in the empty JSON string", ProductWithoutSkus.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductWithoutSkus.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { @@ -532,16 +519,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // ensure the required json array is present - if (jsonObj.get("attributes") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("attributes").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull() && !jsonObj.get("attributes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `attributes` to be an array in the JSON string but got `%s`", jsonObj.get("attributes").toString())); } if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ProductsCreateResponseBody.java b/src/main/java/voucherify/client/model/ProductsCreateResponseBody.java index 2dffe272..ef631671 100644 --- a/src/main/java/voucherify/client/model/ProductsCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/ProductsCreateResponseBody.java @@ -75,7 +75,7 @@ public class ProductsCreateResponseBody { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private List attributes = new ArrayList<>(); + private List attributes; public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) @@ -98,9 +98,7 @@ public class ProductsCreateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PRODUCT("product"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCT("product"); private String value; @@ -123,7 +121,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -161,7 +159,7 @@ public ProductsCreateResponseBody id(String id) { * Unique product ID assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -253,7 +251,7 @@ public ProductsCreateResponseBody addAttributesItem(String attributesItem) { * A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. * @return attributes **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getAttributes() { return attributes; } @@ -274,7 +272,7 @@ public ProductsCreateResponseBody metadata(Object metadata) { * The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -358,7 +356,7 @@ public ProductsCreateResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the product. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -526,10 +524,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("object"); } /** @@ -544,15 +538,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductsCreateResponseBody is not found in the empty JSON string", ProductsCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductsCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { @@ -561,16 +548,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // ensure the required json array is present - if (jsonObj.get("attributes") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("attributes").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull() && !jsonObj.get("attributes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `attributes` to be an array in the JSON string but got `%s`", jsonObj.get("attributes").toString())); } if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ProductsGetResponseBody.java b/src/main/java/voucherify/client/model/ProductsGetResponseBody.java index 0b053ee1..d57bfd12 100644 --- a/src/main/java/voucherify/client/model/ProductsGetResponseBody.java +++ b/src/main/java/voucherify/client/model/ProductsGetResponseBody.java @@ -75,7 +75,7 @@ public class ProductsGetResponseBody { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private List attributes = new ArrayList<>(); + private List attributes; public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) @@ -98,9 +98,7 @@ public class ProductsGetResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PRODUCT("product"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCT("product"); private String value; @@ -123,7 +121,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -161,7 +159,7 @@ public ProductsGetResponseBody id(String id) { * Unique product ID assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -253,7 +251,7 @@ public ProductsGetResponseBody addAttributesItem(String attributesItem) { * A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. * @return attributes **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getAttributes() { return attributes; } @@ -274,7 +272,7 @@ public ProductsGetResponseBody metadata(Object metadata) { * The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -358,7 +356,7 @@ public ProductsGetResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the product. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -526,10 +524,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("object"); } /** @@ -544,15 +538,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductsGetResponseBody is not found in the empty JSON string", ProductsGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductsGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { @@ -561,16 +548,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // ensure the required json array is present - if (jsonObj.get("attributes") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("attributes").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull() && !jsonObj.get("attributes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `attributes` to be an array in the JSON string but got `%s`", jsonObj.get("attributes").toString())); } if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ProductsImportCsvCreateResponseBody.java b/src/main/java/voucherify/client/model/ProductsImportCsvCreateResponseBody.java index 4f55652f..3a0d20fe 100644 --- a/src/main/java/voucherify/client/model/ProductsImportCsvCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/ProductsImportCsvCreateResponseBody.java @@ -69,7 +69,7 @@ public ProductsImportCsvCreateResponseBody asyncActionId(String asyncActionId) { * The ID of the scheduled asynchronous action. * @return asyncActionId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAsyncActionId() { return asyncActionId; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("async_action_id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductsImportCsvCreateResponseBody is not found in the empty JSON string", ProductsImportCsvCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductsImportCsvCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("async_action_id").isJsonPrimitive()) { + if ((jsonObj.get("async_action_id") != null && !jsonObj.get("async_action_id").isJsonNull()) && !jsonObj.get("async_action_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `async_action_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_action_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/ProductsListResponseBody.java b/src/main/java/voucherify/client/model/ProductsListResponseBody.java index 7b6f9ebf..d57dce17 100644 --- a/src/main/java/voucherify/client/model/ProductsListResponseBody.java +++ b/src/main/java/voucherify/client/model/ProductsListResponseBody.java @@ -65,7 +65,7 @@ public class ProductsListResponseBody { public static final String SERIALIZED_NAME_PRODUCTS = "products"; @SerializedName(SERIALIZED_NAME_PRODUCTS) - private List products = new ArrayList<>(); + private List products; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public ProductsListResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about products in a dictionary. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public ProductsListResponseBody dataRef(String dataRef) { * Identifies the name of the attribute that contains the array of product objects. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public ProductsListResponseBody addProductsItem(Product productsItem) { * Contains array of product objects. * @return products **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getProducts() { return products; } @@ -155,7 +155,7 @@ public ProductsListResponseBody total(Integer total) { * Total number of product objects. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("products"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductsListResponseBody is not found in the empty JSON string", ProductsListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductsListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("products").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `products` to be an array in the JSON string but got `%s`", jsonObj.get("products").toString())); + if (jsonObj.get("products") != null && !jsonObj.get("products").isJsonNull()) { + JsonArray jsonArrayproducts = jsonObj.getAsJsonArray("products"); + if (jsonArrayproducts != null) { + // ensure the json data is an array + if (!jsonObj.get("products").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `products` to be an array in the JSON string but got `%s`", jsonObj.get("products").toString())); + } + + // validate the optional field `products` (array) + for (int i = 0; i < jsonArrayproducts.size(); i++) { + Product.validateJsonElement(jsonArrayproducts.get(i)); + }; + } } - - JsonArray jsonArrayproducts = jsonObj.getAsJsonArray("products"); - // validate the required field `products` (array) - for (int i = 0; i < jsonArrayproducts.size(); i++) { - Product.validateJsonElement(jsonArrayproducts.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/ProductsMetadataUpdateInBulkRequestBody.java b/src/main/java/voucherify/client/model/ProductsMetadataUpdateInBulkRequestBody.java index 7d39e9c1..23fa43ec 100644 --- a/src/main/java/voucherify/client/model/ProductsMetadataUpdateInBulkRequestBody.java +++ b/src/main/java/voucherify/client/model/ProductsMetadataUpdateInBulkRequestBody.java @@ -56,7 +56,7 @@ public class ProductsMetadataUpdateInBulkRequestBody { public static final String SERIALIZED_NAME_SOURCE_IDS = "source_ids"; @SerializedName(SERIALIZED_NAME_SOURCE_IDS) - private List sourceIds = new ArrayList<>(); + private List sourceIds; public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) @@ -83,7 +83,7 @@ public ProductsMetadataUpdateInBulkRequestBody addSourceIdsItem(String sourceIds * Array of unique product source IDs. * @return sourceIds **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getSourceIds() { return sourceIds; } @@ -104,7 +104,7 @@ public ProductsMetadataUpdateInBulkRequestBody metadata(Object metadata) { * The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -213,8 +213,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("source_ids"); - openapiRequiredFields.add("metadata"); } /** @@ -229,18 +227,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductsMetadataUpdateInBulkRequestBody is not found in the empty JSON string", ProductsMetadataUpdateInBulkRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductsMetadataUpdateInBulkRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the required json array is present - if (jsonObj.get("source_ids") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("source_ids").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("source_ids") != null && !jsonObj.get("source_ids").isJsonNull() && !jsonObj.get("source_ids").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `source_ids` to be an array in the JSON string but got `%s`", jsonObj.get("source_ids").toString())); } } diff --git a/src/main/java/voucherify/client/model/ProductsMetadataUpdateInBulkResponseBody.java b/src/main/java/voucherify/client/model/ProductsMetadataUpdateInBulkResponseBody.java index fb820ac5..6f22b0f6 100644 --- a/src/main/java/voucherify/client/model/ProductsMetadataUpdateInBulkResponseBody.java +++ b/src/main/java/voucherify/client/model/ProductsMetadataUpdateInBulkResponseBody.java @@ -69,7 +69,7 @@ public ProductsMetadataUpdateInBulkResponseBody asyncActionId(String asyncAction * The ID of the scheduled asynchronous action. * @return asyncActionId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAsyncActionId() { return asyncActionId; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("async_action_id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductsMetadataUpdateInBulkResponseBody is not found in the empty JSON string", ProductsMetadataUpdateInBulkResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductsMetadataUpdateInBulkResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("async_action_id").isJsonPrimitive()) { + if ((jsonObj.get("async_action_id") != null && !jsonObj.get("async_action_id").isJsonNull()) && !jsonObj.get("async_action_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `async_action_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_action_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/ProductsSkusCreateResponseBody.java b/src/main/java/voucherify/client/model/ProductsSkusCreateResponseBody.java index 28f77e97..325b217a 100644 --- a/src/main/java/voucherify/client/model/ProductsSkusCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/ProductsSkusCreateResponseBody.java @@ -103,9 +103,7 @@ public class ProductsSkusCreateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - SKU("sku"), - - UNKNOWN_ENUM("unknown_enum"); + SKU("sku"); private String value; @@ -128,7 +126,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -162,7 +160,7 @@ public ProductsSkusCreateResponseBody id(String id) { * A unique identifier that represents the SKU and is assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -204,7 +202,7 @@ public ProductsSkusCreateResponseBody productId(String productId) { * The parent product's unique ID. * @return productId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getProductId() { return productId; } @@ -288,7 +286,7 @@ public ProductsSkusCreateResponseBody attributes(Object attributes) { * The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. * @return attributes **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getAttributes() { return attributes; } @@ -330,7 +328,7 @@ public ProductsSkusCreateResponseBody metadata(Object metadata) { * The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -351,7 +349,7 @@ public ProductsSkusCreateResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -393,7 +391,7 @@ public ProductsSkusCreateResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the `SKU`. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -543,12 +541,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("product_id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -563,21 +555,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductsSkusCreateResponseBody is not found in the empty JSON string", ProductsSkusCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductsSkusCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); } - if (!jsonObj.get("product_id").isJsonPrimitive()) { + if ((jsonObj.get("product_id") != null && !jsonObj.get("product_id").isJsonNull()) && !jsonObj.get("product_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `product_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product_id").toString())); } if ((jsonObj.get("sku") != null && !jsonObj.get("sku").isJsonNull()) && !jsonObj.get("sku").isJsonPrimitive()) { @@ -589,7 +574,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ProductsSkusListResponseBody.java b/src/main/java/voucherify/client/model/ProductsSkusListResponseBody.java index 43c2ddd8..4ce3b494 100644 --- a/src/main/java/voucherify/client/model/ProductsSkusListResponseBody.java +++ b/src/main/java/voucherify/client/model/ProductsSkusListResponseBody.java @@ -65,7 +65,7 @@ public class ProductsSkusListResponseBody { public static final String SERIALIZED_NAME_SKUS = "skus"; @SerializedName(SERIALIZED_NAME_SKUS) - private List skus = new ArrayList<>(); + private List skus; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public ProductsSkusListResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about SKUs. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public ProductsSkusListResponseBody dataRef(String dataRef) { * Identifies the name of the JSON property that contains the array of SKUs. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public ProductsSkusListResponseBody addSkusItem(Sku skusItem) { * A dictionary that contains an array of SKUs. * @return skus **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getSkus() { return skus; } @@ -155,7 +155,7 @@ public ProductsSkusListResponseBody total(Integer total) { * Total number of SKUs in the product. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("skus"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductsSkusListResponseBody is not found in the empty JSON string", ProductsSkusListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductsSkusListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("skus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `skus` to be an array in the JSON string but got `%s`", jsonObj.get("skus").toString())); + if (jsonObj.get("skus") != null && !jsonObj.get("skus").isJsonNull()) { + JsonArray jsonArrayskus = jsonObj.getAsJsonArray("skus"); + if (jsonArrayskus != null) { + // ensure the json data is an array + if (!jsonObj.get("skus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `skus` to be an array in the JSON string but got `%s`", jsonObj.get("skus").toString())); + } + + // validate the optional field `skus` (array) + for (int i = 0; i < jsonArrayskus.size(); i++) { + Sku.validateJsonElement(jsonArrayskus.get(i)); + }; + } } - - JsonArray jsonArrayskus = jsonObj.getAsJsonArray("skus"); - // validate the required field `skus` (array) - for (int i = 0; i < jsonArrayskus.size(); i++) { - Sku.validateJsonElement(jsonArrayskus.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/ProductsSkusUpdateResponseBody.java b/src/main/java/voucherify/client/model/ProductsSkusUpdateResponseBody.java index e2e8b2e2..e322aead 100644 --- a/src/main/java/voucherify/client/model/ProductsSkusUpdateResponseBody.java +++ b/src/main/java/voucherify/client/model/ProductsSkusUpdateResponseBody.java @@ -103,9 +103,7 @@ public class ProductsSkusUpdateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - SKU("sku"), - - UNKNOWN_ENUM("unknown_enum"); + SKU("sku"); private String value; @@ -128,7 +126,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -162,7 +160,7 @@ public ProductsSkusUpdateResponseBody id(String id) { * A unique identifier that represents the SKU and is assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -204,7 +202,7 @@ public ProductsSkusUpdateResponseBody productId(String productId) { * The parent product's unique ID. * @return productId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getProductId() { return productId; } @@ -288,7 +286,7 @@ public ProductsSkusUpdateResponseBody attributes(Object attributes) { * The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. * @return attributes **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getAttributes() { return attributes; } @@ -330,7 +328,7 @@ public ProductsSkusUpdateResponseBody metadata(Object metadata) { * The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -351,7 +349,7 @@ public ProductsSkusUpdateResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -393,7 +391,7 @@ public ProductsSkusUpdateResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the `SKU`. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -543,12 +541,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("product_id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -563,21 +555,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductsSkusUpdateResponseBody is not found in the empty JSON string", ProductsSkusUpdateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductsSkusUpdateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); } - if (!jsonObj.get("product_id").isJsonPrimitive()) { + if ((jsonObj.get("product_id") != null && !jsonObj.get("product_id").isJsonNull()) && !jsonObj.get("product_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `product_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product_id").toString())); } if ((jsonObj.get("sku") != null && !jsonObj.get("sku").isJsonNull()) && !jsonObj.get("sku").isJsonPrimitive()) { @@ -589,7 +574,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ProductsUpdateInBulkRequestBody.java b/src/main/java/voucherify/client/model/ProductsUpdateInBulkRequestBody.java index 3e8ac121..0a2e830f 100644 --- a/src/main/java/voucherify/client/model/ProductsUpdateInBulkRequestBody.java +++ b/src/main/java/voucherify/client/model/ProductsUpdateInBulkRequestBody.java @@ -91,7 +91,7 @@ public ProductsUpdateInBulkRequestBody sourceId(String sourceId) { * Unique product source ID from your inventory system. * @return sourceId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getSourceId() { return sourceId; } @@ -325,7 +325,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("source_id"); } /** @@ -340,15 +339,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductsUpdateInBulkRequestBody is not found in the empty JSON string", ProductsUpdateInBulkRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductsUpdateInBulkRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("source_id").isJsonPrimitive()) { + if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/ProductsUpdateInBulkResponseBody.java b/src/main/java/voucherify/client/model/ProductsUpdateInBulkResponseBody.java index 25632094..371b70ad 100644 --- a/src/main/java/voucherify/client/model/ProductsUpdateInBulkResponseBody.java +++ b/src/main/java/voucherify/client/model/ProductsUpdateInBulkResponseBody.java @@ -69,7 +69,7 @@ public ProductsUpdateInBulkResponseBody asyncActionId(String asyncActionId) { * The ID of the scheduled asynchronous action. * @return asyncActionId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAsyncActionId() { return asyncActionId; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("async_action_id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductsUpdateInBulkResponseBody is not found in the empty JSON string", ProductsUpdateInBulkResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductsUpdateInBulkResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("async_action_id").isJsonPrimitive()) { + if ((jsonObj.get("async_action_id") != null && !jsonObj.get("async_action_id").isJsonNull()) && !jsonObj.get("async_action_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `async_action_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_action_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/ProductsUpdateResponseBody.java b/src/main/java/voucherify/client/model/ProductsUpdateResponseBody.java index 9de7877b..bb4e21d8 100644 --- a/src/main/java/voucherify/client/model/ProductsUpdateResponseBody.java +++ b/src/main/java/voucherify/client/model/ProductsUpdateResponseBody.java @@ -75,7 +75,7 @@ public class ProductsUpdateResponseBody { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private List attributes = new ArrayList<>(); + private List attributes; public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) @@ -98,9 +98,7 @@ public class ProductsUpdateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PRODUCT("product"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCT("product"); private String value; @@ -123,7 +121,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -161,7 +159,7 @@ public ProductsUpdateResponseBody id(String id) { * Unique product ID assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -253,7 +251,7 @@ public ProductsUpdateResponseBody addAttributesItem(String attributesItem) { * A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. * @return attributes **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getAttributes() { return attributes; } @@ -274,7 +272,7 @@ public ProductsUpdateResponseBody metadata(Object metadata) { * The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -358,7 +356,7 @@ public ProductsUpdateResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the product. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -526,10 +524,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("object"); } /** @@ -544,15 +538,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ProductsUpdateResponseBody is not found in the empty JSON string", ProductsUpdateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProductsUpdateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { @@ -561,16 +548,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // ensure the required json array is present - if (jsonObj.get("attributes") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("attributes").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull() && !jsonObj.get("attributes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `attributes` to be an array in the JSON string but got `%s`", jsonObj.get("attributes").toString())); } if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/PromotionStack.java b/src/main/java/voucherify/client/model/PromotionStack.java index bc929252..c186134f 100644 --- a/src/main/java/voucherify/client/model/PromotionStack.java +++ b/src/main/java/voucherify/client/model/PromotionStack.java @@ -87,9 +87,7 @@ public class PromotionStack { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PROMOTION_STACK("promotion_stack"), - - UNKNOWN_ENUM("unknown_enum"); + PROMOTION_STACK("promotion_stack"); private String value; @@ -112,7 +110,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -139,7 +137,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CATEGORIES = "categories"; @SerializedName(SERIALIZED_NAME_CATEGORIES) - private List categories = new ArrayList<>(); + private List categories; public PromotionStack() { } @@ -154,7 +152,7 @@ public PromotionStack name(String name) { * Promotion stack name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -175,7 +173,7 @@ public PromotionStack tiers(PromotionStackBaseTiers tiers) { * Get tiers * @return tiers **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public PromotionStackBaseTiers getTiers() { return tiers; } @@ -196,7 +194,7 @@ public PromotionStack id(String id) { * Unique promotion stack ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -217,7 +215,7 @@ public PromotionStack createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -259,7 +257,7 @@ public PromotionStack campaignId(String campaignId) { * Promotion stack's parent campaign's unique ID. * @return campaignId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCampaignId() { return campaignId; } @@ -280,7 +278,7 @@ public PromotionStack _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -330,7 +328,7 @@ public PromotionStack addCategoriesItem(Category categoriesItem) { * Details about the category assigned to the promotion stack. * @return categories **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getCategories() { return categories; } @@ -471,13 +469,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("tiers"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("campaign_id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("categories"); } /** @@ -492,26 +483,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in PromotionStack is not found in the empty JSON string", PromotionStack.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PromotionStack.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // validate the required field `tiers` - PromotionStackBaseTiers.validateJsonElement(jsonObj.get("tiers")); - if (!jsonObj.get("id").isJsonPrimitive()) { + // validate the optional field `tiers` + if (jsonObj.get("tiers") != null && !jsonObj.get("tiers").isJsonNull()) { + PromotionStackBaseTiers.validateJsonElement(jsonObj.get("tiers")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("campaign_id").isJsonPrimitive()) { + if ((jsonObj.get("campaign_id") != null && !jsonObj.get("campaign_id").isJsonNull()) && !jsonObj.get("campaign_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -530,16 +516,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("category_id") != null && !jsonObj.get("category_id").isJsonNull()) && !jsonObj.get("category_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category_id").toString())); } - // ensure the json data is an array - if (!jsonObj.get("categories").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull()) { + JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); + if (jsonArraycategories != null) { + // ensure the json data is an array + if (!jsonObj.get("categories").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + } + + // validate the optional field `categories` (array) + for (int i = 0; i < jsonArraycategories.size(); i++) { + Category.validateJsonElement(jsonArraycategories.get(i)); + }; + } } - - JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); - // validate the required field `categories` (array) - for (int i = 0; i < jsonArraycategories.size(); i++) { - Category.validateJsonElement(jsonArraycategories.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/PromotionStackBase.java b/src/main/java/voucherify/client/model/PromotionStackBase.java index 77c4568d..e0447b74 100644 --- a/src/main/java/voucherify/client/model/PromotionStackBase.java +++ b/src/main/java/voucherify/client/model/PromotionStackBase.java @@ -74,7 +74,7 @@ public PromotionStackBase name(String name) { * Promotion stack name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -95,7 +95,7 @@ public PromotionStackBase tiers(PromotionStackBaseTiers tiers) { * Get tiers * @return tiers **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public PromotionStackBaseTiers getTiers() { return tiers; } @@ -204,8 +204,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("tiers"); } /** @@ -220,19 +218,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in PromotionStackBase is not found in the empty JSON string", PromotionStackBase.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PromotionStackBase.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // validate the required field `tiers` - PromotionStackBaseTiers.validateJsonElement(jsonObj.get("tiers")); + // validate the optional field `tiers` + if (jsonObj.get("tiers") != null && !jsonObj.get("tiers").isJsonNull()) { + PromotionStackBaseTiers.validateJsonElement(jsonObj.get("tiers")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/PromotionStackBaseTiers.java b/src/main/java/voucherify/client/model/PromotionStackBaseTiers.java index f1dd3c0f..e822804e 100644 --- a/src/main/java/voucherify/client/model/PromotionStackBaseTiers.java +++ b/src/main/java/voucherify/client/model/PromotionStackBaseTiers.java @@ -56,16 +56,14 @@ public class PromotionStackBaseTiers { public static final String SERIALIZED_NAME_IDS = "ids"; @SerializedName(SERIALIZED_NAME_IDS) - private List ids = new ArrayList<>(); + private List ids; /** * Gets or Sets hierarchyMode */ @JsonAdapter(HierarchyModeEnum.Adapter.class) public enum HierarchyModeEnum { - MANUAL("MANUAL"), - - UNKNOWN_ENUM("unknown_enum"); + MANUAL("MANUAL"); private String value; @@ -88,7 +86,7 @@ public static HierarchyModeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -130,7 +128,7 @@ public PromotionStackBaseTiers addIdsItem(String idsItem) { * Contains the list of tiers in a pre-defined sequence. * @return ids **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getIds() { return ids; } @@ -260,7 +258,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ids"); } /** @@ -275,18 +272,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in PromotionStackBaseTiers is not found in the empty JSON string", PromotionStackBaseTiers.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PromotionStackBaseTiers.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the required json array is present - if (jsonObj.get("ids") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("ids").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("ids") != null && !jsonObj.get("ids").isJsonNull() && !jsonObj.get("ids").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `ids` to be an array in the JSON string but got `%s`", jsonObj.get("ids").toString())); } if ((jsonObj.get("hierarchy_mode") != null && !jsonObj.get("hierarchy_mode").isJsonNull()) && !jsonObj.get("hierarchy_mode").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/PromotionTierCampaign.java b/src/main/java/voucherify/client/model/PromotionTierCampaign.java index 5482cac8..7b4f3c7a 100644 --- a/src/main/java/voucherify/client/model/PromotionTierCampaign.java +++ b/src/main/java/voucherify/client/model/PromotionTierCampaign.java @@ -90,9 +90,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -115,7 +113,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/PromotionTierCreateParams.java b/src/main/java/voucherify/client/model/PromotionTierCreateParams.java index 202149c8..381e5528 100644 --- a/src/main/java/voucherify/client/model/PromotionTierCreateParams.java +++ b/src/main/java/voucherify/client/model/PromotionTierCreateParams.java @@ -115,9 +115,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -140,7 +138,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -186,7 +184,7 @@ public PromotionTierCreateParams name(String name) { * Name of the promotion tier. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -620,7 +618,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); } /** @@ -635,15 +632,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in PromotionTierCreateParams is not found in the empty JSON string", PromotionTierCreateParams.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PromotionTierCreateParams.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("banner") != null && !jsonObj.get("banner").isJsonNull()) && !jsonObj.get("banner").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/PromotionsStacksCreateRequestBody.java b/src/main/java/voucherify/client/model/PromotionsStacksCreateRequestBody.java index bad51070..48e73cf5 100644 --- a/src/main/java/voucherify/client/model/PromotionsStacksCreateRequestBody.java +++ b/src/main/java/voucherify/client/model/PromotionsStacksCreateRequestBody.java @@ -78,7 +78,7 @@ public PromotionsStacksCreateRequestBody name(String name) { * Promotion stack name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -99,7 +99,7 @@ public PromotionsStacksCreateRequestBody tiers(PromotionStackBaseTiers tiers) { * Get tiers * @return tiers **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public PromotionStackBaseTiers getTiers() { return tiers; } @@ -232,8 +232,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("tiers"); } /** @@ -248,19 +246,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in PromotionsStacksCreateRequestBody is not found in the empty JSON string", PromotionsStacksCreateRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PromotionsStacksCreateRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // validate the required field `tiers` - PromotionStackBaseTiers.validateJsonElement(jsonObj.get("tiers")); + // validate the optional field `tiers` + if (jsonObj.get("tiers") != null && !jsonObj.get("tiers").isJsonNull()) { + PromotionStackBaseTiers.validateJsonElement(jsonObj.get("tiers")); + } if ((jsonObj.get("category_id") != null && !jsonObj.get("category_id").isJsonNull()) && !jsonObj.get("category_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category_id").toString())); } diff --git a/src/main/java/voucherify/client/model/PromotionsStacksCreateResponseBody.java b/src/main/java/voucherify/client/model/PromotionsStacksCreateResponseBody.java index 23b54246..aac93586 100644 --- a/src/main/java/voucherify/client/model/PromotionsStacksCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/PromotionsStacksCreateResponseBody.java @@ -83,9 +83,7 @@ public class PromotionsStacksCreateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PROMOTION_STACK("promotion_stack"), - - UNKNOWN_ENUM("unknown_enum"); + PROMOTION_STACK("promotion_stack"); private String value; @@ -108,7 +106,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -135,7 +133,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CATEGORIES = "categories"; @SerializedName(SERIALIZED_NAME_CATEGORIES) - private List categories = new ArrayList<>(); + private List categories; public PromotionsStacksCreateResponseBody() { } @@ -150,7 +148,7 @@ public PromotionsStacksCreateResponseBody name(String name) { * Promotion stack name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -171,7 +169,7 @@ public PromotionsStacksCreateResponseBody tiers(PromotionStackBaseTiers tiers) { * Get tiers * @return tiers **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public PromotionStackBaseTiers getTiers() { return tiers; } @@ -192,7 +190,7 @@ public PromotionsStacksCreateResponseBody id(String id) { * Unique promotion stack ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -213,7 +211,7 @@ public PromotionsStacksCreateResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -234,7 +232,7 @@ public PromotionsStacksCreateResponseBody campaignId(String campaignId) { * Promotion stack's parent campaign's unique ID. * @return campaignId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCampaignId() { return campaignId; } @@ -255,7 +253,7 @@ public PromotionsStacksCreateResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -305,7 +303,7 @@ public PromotionsStacksCreateResponseBody addCategoriesItem(PromotionStackBase c * Details about the category assigned to the promotion stack. * @return categories **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getCategories() { return categories; } @@ -443,13 +441,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("tiers"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("campaign_id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("categories"); } /** @@ -464,26 +455,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in PromotionsStacksCreateResponseBody is not found in the empty JSON string", PromotionsStacksCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PromotionsStacksCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // validate the required field `tiers` - PromotionStackBaseTiers.validateJsonElement(jsonObj.get("tiers")); - if (!jsonObj.get("id").isJsonPrimitive()) { + // validate the optional field `tiers` + if (jsonObj.get("tiers") != null && !jsonObj.get("tiers").isJsonNull()) { + PromotionStackBaseTiers.validateJsonElement(jsonObj.get("tiers")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("campaign_id").isJsonPrimitive()) { + if ((jsonObj.get("campaign_id") != null && !jsonObj.get("campaign_id").isJsonNull()) && !jsonObj.get("campaign_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -502,16 +488,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("category_id") != null && !jsonObj.get("category_id").isJsonNull()) && !jsonObj.get("category_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category_id").toString())); } - // ensure the json data is an array - if (!jsonObj.get("categories").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull()) { + JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); + if (jsonArraycategories != null) { + // ensure the json data is an array + if (!jsonObj.get("categories").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + } + + // validate the optional field `categories` (array) + for (int i = 0; i < jsonArraycategories.size(); i++) { + PromotionStackBase.validateJsonElement(jsonArraycategories.get(i)); + }; + } } - - JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); - // validate the required field `categories` (array) - for (int i = 0; i < jsonArraycategories.size(); i++) { - PromotionStackBase.validateJsonElement(jsonArraycategories.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/PromotionsStacksGetResponseBody.java b/src/main/java/voucherify/client/model/PromotionsStacksGetResponseBody.java index 6695b61d..7bc72003 100644 --- a/src/main/java/voucherify/client/model/PromotionsStacksGetResponseBody.java +++ b/src/main/java/voucherify/client/model/PromotionsStacksGetResponseBody.java @@ -87,9 +87,7 @@ public class PromotionsStacksGetResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PROMOTION_STACK("promotion_stack"), - - UNKNOWN_ENUM("unknown_enum"); + PROMOTION_STACK("promotion_stack"); private String value; @@ -112,7 +110,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -139,7 +137,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CATEGORIES = "categories"; @SerializedName(SERIALIZED_NAME_CATEGORIES) - private List categories = new ArrayList<>(); + private List categories; public PromotionsStacksGetResponseBody() { } @@ -154,7 +152,7 @@ public PromotionsStacksGetResponseBody name(String name) { * Promotion stack name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -175,7 +173,7 @@ public PromotionsStacksGetResponseBody tiers(PromotionStackBaseTiers tiers) { * Get tiers * @return tiers **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public PromotionStackBaseTiers getTiers() { return tiers; } @@ -196,7 +194,7 @@ public PromotionsStacksGetResponseBody id(String id) { * Unique promotion stack ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -217,7 +215,7 @@ public PromotionsStacksGetResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -259,7 +257,7 @@ public PromotionsStacksGetResponseBody campaignId(String campaignId) { * Promotion stack's parent campaign's unique ID. * @return campaignId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCampaignId() { return campaignId; } @@ -280,7 +278,7 @@ public PromotionsStacksGetResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -330,7 +328,7 @@ public PromotionsStacksGetResponseBody addCategoriesItem(Category categoriesItem * Details about the category assigned to the promotion stack. * @return categories **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getCategories() { return categories; } @@ -471,13 +469,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("tiers"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("campaign_id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("categories"); } /** @@ -492,26 +483,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in PromotionsStacksGetResponseBody is not found in the empty JSON string", PromotionsStacksGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PromotionsStacksGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // validate the required field `tiers` - PromotionStackBaseTiers.validateJsonElement(jsonObj.get("tiers")); - if (!jsonObj.get("id").isJsonPrimitive()) { + // validate the optional field `tiers` + if (jsonObj.get("tiers") != null && !jsonObj.get("tiers").isJsonNull()) { + PromotionStackBaseTiers.validateJsonElement(jsonObj.get("tiers")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("campaign_id").isJsonPrimitive()) { + if ((jsonObj.get("campaign_id") != null && !jsonObj.get("campaign_id").isJsonNull()) && !jsonObj.get("campaign_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -530,16 +516,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("category_id") != null && !jsonObj.get("category_id").isJsonNull()) && !jsonObj.get("category_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category_id").toString())); } - // ensure the json data is an array - if (!jsonObj.get("categories").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull()) { + JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); + if (jsonArraycategories != null) { + // ensure the json data is an array + if (!jsonObj.get("categories").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + } + + // validate the optional field `categories` (array) + for (int i = 0; i < jsonArraycategories.size(); i++) { + Category.validateJsonElement(jsonArraycategories.get(i)); + }; + } } - - JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); - // validate the required field `categories` (array) - for (int i = 0; i < jsonArraycategories.size(); i++) { - Category.validateJsonElement(jsonArraycategories.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/PromotionsStacksListResponseBody.java b/src/main/java/voucherify/client/model/PromotionsStacksListResponseBody.java index b0602199..f01b61a4 100644 --- a/src/main/java/voucherify/client/model/PromotionsStacksListResponseBody.java +++ b/src/main/java/voucherify/client/model/PromotionsStacksListResponseBody.java @@ -60,9 +60,7 @@ public class PromotionsStacksListResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -85,7 +83,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -111,9 +109,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - DATA("data"), - - UNKNOWN_ENUM("unknown_enum"); + DATA("data"); private String value; @@ -136,7 +132,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -159,7 +155,7 @@ public DataRefEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -178,7 +174,7 @@ public PromotionsStacksListResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about promotion stacks in a dictionary. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -199,7 +195,7 @@ public PromotionsStacksListResponseBody dataRef(DataRefEnum dataRef) { * Identifies the name of the attribute that contains the array of promotion stack objects. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -228,7 +224,7 @@ public PromotionsStacksListResponseBody addDataItem(PromotionStack dataItem) { * Contains array of promotion stack objects. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -250,7 +246,7 @@ public PromotionsStacksListResponseBody total(Integer total) { * minimum: 0 * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -365,10 +361,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -383,15 +375,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in PromotionsStacksListResponseBody is not found in the empty JSON string", PromotionsStacksListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PromotionsStacksListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -407,7 +392,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { @@ -423,16 +408,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a valid element of DataRefEnum enum got `%s` instead", jsonObj.get("data_ref").toString())); } } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + PromotionStack.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - PromotionStack.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/PromotionsStacksUpdateRequestBodyTiers.java b/src/main/java/voucherify/client/model/PromotionsStacksUpdateRequestBodyTiers.java index bf97e8d2..223baf0c 100644 --- a/src/main/java/voucherify/client/model/PromotionsStacksUpdateRequestBodyTiers.java +++ b/src/main/java/voucherify/client/model/PromotionsStacksUpdateRequestBodyTiers.java @@ -63,9 +63,7 @@ public class PromotionsStacksUpdateRequestBodyTiers { */ @JsonAdapter(HierarchyModeEnum.Adapter.class) public enum HierarchyModeEnum { - MANUAL("MANUAL"), - - UNKNOWN_ENUM("unknown_enum"); + MANUAL("MANUAL"); private String value; @@ -88,7 +86,7 @@ public static HierarchyModeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/PromotionsStacksUpdateResponseBody.java b/src/main/java/voucherify/client/model/PromotionsStacksUpdateResponseBody.java index d80b7a1e..ca8c3971 100644 --- a/src/main/java/voucherify/client/model/PromotionsStacksUpdateResponseBody.java +++ b/src/main/java/voucherify/client/model/PromotionsStacksUpdateResponseBody.java @@ -87,9 +87,7 @@ public class PromotionsStacksUpdateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PROMOTION_STACK("promotion_stack"), - - UNKNOWN_ENUM("unknown_enum"); + PROMOTION_STACK("promotion_stack"); private String value; @@ -112,7 +110,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -139,7 +137,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CATEGORIES = "categories"; @SerializedName(SERIALIZED_NAME_CATEGORIES) - private List categories = new ArrayList<>(); + private List categories; public PromotionsStacksUpdateResponseBody() { } @@ -154,7 +152,7 @@ public PromotionsStacksUpdateResponseBody name(String name) { * Promotion stack name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -175,7 +173,7 @@ public PromotionsStacksUpdateResponseBody tiers(PromotionStackBaseTiers tiers) { * Get tiers * @return tiers **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public PromotionStackBaseTiers getTiers() { return tiers; } @@ -196,7 +194,7 @@ public PromotionsStacksUpdateResponseBody id(String id) { * Unique promotion stack ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -217,7 +215,7 @@ public PromotionsStacksUpdateResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -238,7 +236,7 @@ public PromotionsStacksUpdateResponseBody updatedAt(OffsetDateTime updatedAt) { * Timestamp representing the date and time when the promotion stack was updated. The value is shown in the ISO 8601 format. * @return updatedAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { return updatedAt; } @@ -259,7 +257,7 @@ public PromotionsStacksUpdateResponseBody campaignId(String campaignId) { * Promotion stack's parent campaign's unique ID. * @return campaignId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCampaignId() { return campaignId; } @@ -280,7 +278,7 @@ public PromotionsStacksUpdateResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -330,7 +328,7 @@ public PromotionsStacksUpdateResponseBody addCategoriesItem(PromotionStackBase c * Details about the category assigned to the promotion stack. * @return categories **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getCategories() { return categories; } @@ -471,14 +469,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("tiers"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("updated_at"); - openapiRequiredFields.add("campaign_id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("categories"); } /** @@ -493,26 +483,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in PromotionsStacksUpdateResponseBody is not found in the empty JSON string", PromotionsStacksUpdateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PromotionsStacksUpdateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // validate the required field `tiers` - PromotionStackBaseTiers.validateJsonElement(jsonObj.get("tiers")); - if (!jsonObj.get("id").isJsonPrimitive()) { + // validate the optional field `tiers` + if (jsonObj.get("tiers") != null && !jsonObj.get("tiers").isJsonNull()) { + PromotionStackBaseTiers.validateJsonElement(jsonObj.get("tiers")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("campaign_id").isJsonPrimitive()) { + if ((jsonObj.get("campaign_id") != null && !jsonObj.get("campaign_id").isJsonNull()) && !jsonObj.get("campaign_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -531,16 +516,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("category_id") != null && !jsonObj.get("category_id").isJsonNull()) && !jsonObj.get("category_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `category_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category_id").toString())); } - // ensure the json data is an array - if (!jsonObj.get("categories").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull()) { + JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); + if (jsonArraycategories != null) { + // ensure the json data is an array + if (!jsonObj.get("categories").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); + } + + // validate the optional field `categories` (array) + for (int i = 0; i < jsonArraycategories.size(); i++) { + PromotionStackBase.validateJsonElement(jsonArraycategories.get(i)); + }; + } } - - JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); - // validate the required field `categories` (array) - for (int i = 0; i < jsonArraycategories.size(); i++) { - PromotionStackBase.validateJsonElement(jsonArraycategories.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/PublicationsCreateResponseBody.java b/src/main/java/voucherify/client/model/PublicationsCreateResponseBody.java index 6eb53e95..3a1f0634 100644 --- a/src/main/java/voucherify/client/model/PublicationsCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/PublicationsCreateResponseBody.java @@ -67,9 +67,7 @@ public class PublicationsCreateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PUBLICATION("publication"), - - UNKNOWN_ENUM("unknown_enum"); + PUBLICATION("publication"); private String value; @@ -92,7 +90,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -134,9 +132,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ChannelEnum.Adapter.class) public enum ChannelEnum { - API("API"), - - UNKNOWN_ENUM("unknown_enum"); + API("API"); private String value; @@ -159,7 +155,7 @@ public static ChannelEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -189,9 +185,7 @@ public ChannelEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ResultEnum.Adapter.class) public enum ResultEnum { - SUCCESS("SUCCESS"), - - UNKNOWN_ENUM("unknown_enum"); + SUCCESS("SUCCESS"); private String value; @@ -214,7 +208,7 @@ public static ResultEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/PublicationsListResponseBody.java b/src/main/java/voucherify/client/model/PublicationsListResponseBody.java index 87caac6f..ef20fb82 100644 --- a/src/main/java/voucherify/client/model/PublicationsListResponseBody.java +++ b/src/main/java/voucherify/client/model/PublicationsListResponseBody.java @@ -65,7 +65,7 @@ public class PublicationsListResponseBody { public static final String SERIALIZED_NAME_PUBLICATIONS = "publications"; @SerializedName(SERIALIZED_NAME_PUBLICATIONS) - private List publications = new ArrayList<>(); + private List publications; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public PublicationsListResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about publications in a dictionary. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public PublicationsListResponseBody dataRef(String dataRef) { * Identifies the name of the attribute that contains the array of publications. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public PublicationsListResponseBody addPublicationsItem(PublicationsListResponse * Response schema model for publishing vouchers to a specific customer. * @return publications **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getPublications() { return publications; } @@ -155,7 +155,7 @@ public PublicationsListResponseBody total(Integer total) { * Total number of publications. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("publications"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in PublicationsListResponseBody is not found in the empty JSON string", PublicationsListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PublicationsListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("publications").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `publications` to be an array in the JSON string but got `%s`", jsonObj.get("publications").toString())); + if (jsonObj.get("publications") != null && !jsonObj.get("publications").isJsonNull()) { + JsonArray jsonArraypublications = jsonObj.getAsJsonArray("publications"); + if (jsonArraypublications != null) { + // ensure the json data is an array + if (!jsonObj.get("publications").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `publications` to be an array in the JSON string but got `%s`", jsonObj.get("publications").toString())); + } + + // validate the optional field `publications` (array) + for (int i = 0; i < jsonArraypublications.size(); i++) { + PublicationsListResponseBodyPublicationsItem.validateJsonElement(jsonArraypublications.get(i)); + }; + } } - - JsonArray jsonArraypublications = jsonObj.getAsJsonArray("publications"); - // validate the required field `publications` (array) - for (int i = 0; i < jsonArraypublications.size(); i++) { - PublicationsListResponseBodyPublicationsItem.validateJsonElement(jsonArraypublications.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/PublicationsListResponseBodyPublicationsItem.java b/src/main/java/voucherify/client/model/PublicationsListResponseBodyPublicationsItem.java index 82a4b8d6..f10047c9 100644 --- a/src/main/java/voucherify/client/model/PublicationsListResponseBodyPublicationsItem.java +++ b/src/main/java/voucherify/client/model/PublicationsListResponseBodyPublicationsItem.java @@ -68,9 +68,7 @@ public class PublicationsListResponseBodyPublicationsItem { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PUBLICATION("publication"), - - UNKNOWN_ENUM("unknown_enum"); + PUBLICATION("publication"); private String value; @@ -93,7 +91,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -157,9 +155,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public enum ResultEnum { SUCCESS("SUCCESS"), - FAILURE("FAILURE"), - - UNKNOWN_ENUM("unknown_enum"); + FAILURE("FAILURE"); private String value; @@ -182,7 +178,7 @@ public static ResultEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/QualificationsCheckEligibilityRequestBody.java b/src/main/java/voucherify/client/model/QualificationsCheckEligibilityRequestBody.java index 889bf37c..aa90ded8 100644 --- a/src/main/java/voucherify/client/model/QualificationsCheckEligibilityRequestBody.java +++ b/src/main/java/voucherify/client/model/QualificationsCheckEligibilityRequestBody.java @@ -86,9 +86,7 @@ public enum ScenarioEnum { PRODUCTS_BY_CUSTOMER("PRODUCTS_BY_CUSTOMER"), - PRODUCTS_DISCOUNT_BY_CUSTOMER("PRODUCTS_DISCOUNT_BY_CUSTOMER"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCTS_DISCOUNT_BY_CUSTOMER("PRODUCTS_DISCOUNT_BY_CUSTOMER"); private String value; @@ -111,7 +109,7 @@ public static ScenarioEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/QualificationsOption.java b/src/main/java/voucherify/client/model/QualificationsOption.java index c9731e08..2a88bacc 100644 --- a/src/main/java/voucherify/client/model/QualificationsOption.java +++ b/src/main/java/voucherify/client/model/QualificationsOption.java @@ -78,9 +78,7 @@ public enum ExpandEnum { CATEGORY("category"), - VALIDATION_RULES("validation_rules"), - - UNKNOWN_ENUM("unknown_enum"); + VALIDATION_RULES("validation_rules"); private String value; @@ -103,7 +101,7 @@ public static ExpandEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -133,9 +131,7 @@ public enum SortingRuleEnum { LEAST_DEAL("LEAST_DEAL"), - DEFAULT("DEFAULT"), - - UNKNOWN_ENUM("unknown_enum"); + DEFAULT("DEFAULT"); private String value; @@ -158,7 +154,7 @@ public static SortingRuleEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/QualificationsRedeemable.java b/src/main/java/voucherify/client/model/QualificationsRedeemable.java index 3cdfd8c7..36c69e95 100644 --- a/src/main/java/voucherify/client/model/QualificationsRedeemable.java +++ b/src/main/java/voucherify/client/model/QualificationsRedeemable.java @@ -77,9 +77,7 @@ public enum ObjectEnum { PROMOTION_STACK("promotion_stack"), - VOUCHER("voucher"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER("voucher"); private String value; @@ -102,7 +100,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/QualificationsRedeemableBase.java b/src/main/java/voucherify/client/model/QualificationsRedeemableBase.java index d97442fd..3c77fda7 100644 --- a/src/main/java/voucherify/client/model/QualificationsRedeemableBase.java +++ b/src/main/java/voucherify/client/model/QualificationsRedeemableBase.java @@ -76,9 +76,7 @@ public enum ObjectEnum { PROMOTION_STACK("promotion_stack"), - VOUCHER("voucher"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER("voucher"); private String value; @@ -101,7 +99,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/QualificationsRedeemables.java b/src/main/java/voucherify/client/model/QualificationsRedeemables.java index e07908cb..28234ea0 100644 --- a/src/main/java/voucherify/client/model/QualificationsRedeemables.java +++ b/src/main/java/voucherify/client/model/QualificationsRedeemables.java @@ -61,9 +61,7 @@ public class QualificationsRedeemables { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -86,7 +84,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -112,9 +110,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - DATA("data"), - - UNKNOWN_ENUM("unknown_enum"); + DATA("data"); private String value; @@ -137,7 +133,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -160,7 +156,7 @@ public DataRefEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -187,7 +183,7 @@ public QualificationsRedeemables _object(ObjectEnum _object) { * The type of the object represented by JSON. Default is `list`. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -208,7 +204,7 @@ public QualificationsRedeemables dataRef(DataRefEnum dataRef) { * Identifies the name of the attribute that contains the array of qualified redeemables. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -237,7 +233,7 @@ public QualificationsRedeemables addDataItem(QualificationsRedeemable dataItem) * Array of qualified redeemables. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -258,7 +254,7 @@ public QualificationsRedeemables total(Integer total) { * The number of redeemables returned in the API request. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -279,7 +275,7 @@ public QualificationsRedeemables hasMore(Boolean hasMore) { * As results are always limited, the `has_more` flag indicates if there are more records for given parameters. This lets you know if you can run another request (with different options) to get more records returned in the results. * @return hasMore **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getHasMore() { return hasMore; } @@ -421,11 +417,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); - openapiRequiredFields.add("has_more"); } /** @@ -440,15 +431,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in QualificationsRedeemables is not found in the empty JSON string", QualificationsRedeemables.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : QualificationsRedeemables.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -464,7 +448,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { @@ -480,16 +464,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a valid element of DataRefEnum enum got `%s` instead", jsonObj.get("data_ref").toString())); } } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + QualificationsRedeemable.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - QualificationsRedeemable.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/Redemption.java b/src/main/java/voucherify/client/model/Redemption.java index 8618d013..fb2358f4 100644 --- a/src/main/java/voucherify/client/model/Redemption.java +++ b/src/main/java/voucherify/client/model/Redemption.java @@ -72,9 +72,7 @@ public class Redemption { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - REDEMPTION("redemption"), - - UNKNOWN_ENUM("unknown_enum"); + REDEMPTION("redemption"); private String value; @@ -97,7 +95,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -149,9 +147,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public enum ResultEnum { SUCCESS("SUCCESS"), - FAILURE("FAILURE"), - - UNKNOWN_ENUM("unknown_enum"); + FAILURE("FAILURE"); private String value; @@ -174,7 +170,7 @@ public static ResultEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -204,9 +200,7 @@ public enum StatusEnum { FAILED("FAILED"), - ROLLED_BACK("ROLLED_BACK"), - - UNKNOWN_ENUM("unknown_enum"); + ROLLED_BACK("ROLLED_BACK"); private String value; @@ -229,7 +223,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -283,9 +277,7 @@ public enum RelatedObjectTypeEnum { PROMOTION_TIER("promotion_tier"), - REDEMPTION("redemption"), - - UNKNOWN_ENUM("unknown_enum"); + REDEMPTION("redemption"); private String value; @@ -308,7 +300,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -366,7 +358,7 @@ public Redemption id(String id) { * Unique redemption ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -387,7 +379,7 @@ public Redemption _object(ObjectEnum _object) { * The type of the object represented by the JSON * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -408,7 +400,7 @@ public Redemption date(OffsetDateTime date) { * Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. * @return date **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getDate() { return date; } @@ -534,7 +526,7 @@ public Redemption result(ResultEnum result) { * Redemption result. * @return result **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ResultEnum getResult() { return result; } @@ -555,7 +547,7 @@ public Redemption status(StatusEnum status) { * Redemption status. * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -660,7 +652,7 @@ public Redemption channel(RedemptionChannel channel) { * Get channel * @return channel **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RedemptionChannel getChannel() { return channel; } @@ -702,7 +694,7 @@ public Redemption relatedObjectType(RelatedObjectTypeEnum relatedObjectType) { * Defines the related object. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -723,7 +715,7 @@ public Redemption relatedObjectId(String relatedObjectId) { * Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -1011,14 +1003,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("date"); - openapiRequiredFields.add("result"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("channel"); - openapiRequiredFields.add("related_object_type"); - openapiRequiredFields.add("related_object_id"); } /** @@ -1033,18 +1017,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in Redemption is not found in the empty JSON string", Redemption.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Redemption.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -1069,7 +1046,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("redemption") != null && !jsonObj.get("redemption").isJsonNull()) && !jsonObj.get("redemption").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redemption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redemption").toString())); } - if (!jsonObj.get("result").isJsonPrimitive()) { + if ((jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) && !jsonObj.get("result").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `result` to be a primitive type in the JSON string but got `%s`", jsonObj.get("result").toString())); } try { @@ -1085,7 +1062,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `result` to be a valid element of ResultEnum enum got `%s` instead", jsonObj.get("result").toString())); } } - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -1115,13 +1092,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { OrderCalculatedNoCustomerData.validateJsonElement(jsonObj.get("order")); } - // validate the required field `channel` - RedemptionChannel.validateJsonElement(jsonObj.get("channel")); + // validate the optional field `channel` + if (jsonObj.get("channel") != null && !jsonObj.get("channel").isJsonNull()) { + RedemptionChannel.validateJsonElement(jsonObj.get("channel")); + } // validate the optional field `customer` if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { SimpleCustomer.validateJsonElement(jsonObj.get("customer")); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { @@ -1137,7 +1116,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a valid element of RelatedObjectTypeEnum enum got `%s` instead", jsonObj.get("related_object_type").toString())); } } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } // validate the optional field `voucher` diff --git a/src/main/java/voucherify/client/model/RedemptionChannel.java b/src/main/java/voucherify/client/model/RedemptionChannel.java index 048e60c4..6f1dce65 100644 --- a/src/main/java/voucherify/client/model/RedemptionChannel.java +++ b/src/main/java/voucherify/client/model/RedemptionChannel.java @@ -63,9 +63,7 @@ public class RedemptionChannel { public enum ChannelTypeEnum { USER("USER"), - API("API"), - - UNKNOWN_ENUM("unknown_enum"); + API("API"); private String value; @@ -88,7 +86,7 @@ public static ChannelTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionRewardResult.java b/src/main/java/voucherify/client/model/RedemptionRewardResult.java index 0c7d9253..7e70a3b9 100644 --- a/src/main/java/voucherify/client/model/RedemptionRewardResult.java +++ b/src/main/java/voucherify/client/model/RedemptionRewardResult.java @@ -96,9 +96,7 @@ public class RedemptionRewardResult { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - REWARD("reward"), - - UNKNOWN_ENUM("unknown_enum"); + REWARD("reward"); private String value; @@ -121,7 +119,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -163,9 +161,7 @@ public enum TypeEnum { COIN("COIN"), - MATERIAL("MATERIAL"), - - UNKNOWN_ENUM("unknown_enum"); + MATERIAL("MATERIAL"); private String value; @@ -188,7 +184,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionRewardResultProduct.java b/src/main/java/voucherify/client/model/RedemptionRewardResultProduct.java index 2005974b..0956b7be 100644 --- a/src/main/java/voucherify/client/model/RedemptionRewardResultProduct.java +++ b/src/main/java/voucherify/client/model/RedemptionRewardResultProduct.java @@ -75,7 +75,7 @@ public class RedemptionRewardResultProduct { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private List attributes = new ArrayList<>(); + private List attributes; public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) @@ -98,9 +98,7 @@ public class RedemptionRewardResultProduct { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - PRODUCT("product"), - - UNKNOWN_ENUM("unknown_enum"); + PRODUCT("product"); private String value; @@ -123,7 +121,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -161,7 +159,7 @@ public RedemptionRewardResultProduct id(String id) { * Unique product ID assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -253,7 +251,7 @@ public RedemptionRewardResultProduct addAttributesItem(String attributesItem) { * A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. * @return attributes **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getAttributes() { return attributes; } @@ -274,7 +272,7 @@ public RedemptionRewardResultProduct metadata(Object metadata) { * The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -358,7 +356,7 @@ public RedemptionRewardResultProduct _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the product. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -526,10 +524,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("object"); } /** @@ -544,15 +538,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RedemptionRewardResultProduct is not found in the empty JSON string", RedemptionRewardResultProduct.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RedemptionRewardResultProduct.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { @@ -561,16 +548,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // ensure the required json array is present - if (jsonObj.get("attributes") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("attributes").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull() && !jsonObj.get("attributes").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `attributes` to be an array in the JSON string but got `%s`", jsonObj.get("attributes").toString())); } if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/RedemptionRewardResultSku.java b/src/main/java/voucherify/client/model/RedemptionRewardResultSku.java index b350c99e..8810e6cf 100644 --- a/src/main/java/voucherify/client/model/RedemptionRewardResultSku.java +++ b/src/main/java/voucherify/client/model/RedemptionRewardResultSku.java @@ -103,9 +103,7 @@ public class RedemptionRewardResultSku { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - SKU("sku"), - - UNKNOWN_ENUM("unknown_enum"); + SKU("sku"); private String value; @@ -128,7 +126,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -162,7 +160,7 @@ public RedemptionRewardResultSku id(String id) { * A unique identifier that represents the SKU and is assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -204,7 +202,7 @@ public RedemptionRewardResultSku productId(String productId) { * The parent product's unique ID. * @return productId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getProductId() { return productId; } @@ -288,7 +286,7 @@ public RedemptionRewardResultSku attributes(Object attributes) { * The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. * @return attributes **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getAttributes() { return attributes; } @@ -330,7 +328,7 @@ public RedemptionRewardResultSku metadata(Object metadata) { * The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -351,7 +349,7 @@ public RedemptionRewardResultSku createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -393,7 +391,7 @@ public RedemptionRewardResultSku _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the `SKU`. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -543,12 +541,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("product_id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -563,21 +555,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RedemptionRewardResultSku is not found in the empty JSON string", RedemptionRewardResultSku.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RedemptionRewardResultSku.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); } - if (!jsonObj.get("product_id").isJsonPrimitive()) { + if ((jsonObj.get("product_id") != null && !jsonObj.get("product_id").isJsonNull()) && !jsonObj.get("product_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `product_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product_id").toString())); } if ((jsonObj.get("sku") != null && !jsonObj.get("sku").isJsonNull()) && !jsonObj.get("sku").isJsonPrimitive()) { @@ -589,7 +574,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/RedemptionRewardResultVoucher.java b/src/main/java/voucherify/client/model/RedemptionRewardResultVoucher.java index f6876b86..f54be7df 100644 --- a/src/main/java/voucherify/client/model/RedemptionRewardResultVoucher.java +++ b/src/main/java/voucherify/client/model/RedemptionRewardResultVoucher.java @@ -103,9 +103,7 @@ public enum TypeEnum { DISCOUNT_VOUCHER("DISCOUNT_VOUCHER"), - LOYALTY_CARD("LOYALTY_CARD"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("LOYALTY_CARD"); private String value; @@ -128,7 +126,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -190,9 +188,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -215,7 +211,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionRollback.java b/src/main/java/voucherify/client/model/RedemptionRollback.java index bcc2198f..d35366af 100644 --- a/src/main/java/voucherify/client/model/RedemptionRollback.java +++ b/src/main/java/voucherify/client/model/RedemptionRollback.java @@ -72,9 +72,7 @@ public class RedemptionRollback { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - REDEMPTION_ROLLBACK("redemption_rollback"), - - UNKNOWN_ENUM("unknown_enum"); + REDEMPTION_ROLLBACK("redemption_rollback"); private String value; @@ -97,7 +95,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -153,9 +151,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public enum ResultEnum { SUCCESS("SUCCESS"), - FAILURE("FAILURE"), - - UNKNOWN_ENUM("unknown_enum"); + FAILURE("FAILURE"); private String value; @@ -178,7 +174,7 @@ public static ResultEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -206,9 +202,7 @@ public ResultEnum read(final JsonReader jsonReader) throws IOException { public enum StatusEnum { SUCCEEDED("SUCCEEDED"), - FAILED("FAILED"), - - UNKNOWN_ENUM("unknown_enum"); + FAILED("FAILED"); private String value; @@ -231,7 +225,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -285,9 +279,7 @@ public enum RelatedObjectTypeEnum { PROMOTION_TIER("promotion_tier"), - REDEMPTION("redemption"), - - UNKNOWN_ENUM("unknown_enum"); + REDEMPTION("redemption"); private String value; @@ -310,7 +302,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -368,7 +360,7 @@ public RedemptionRollback id(String id) { * Unique identifier of the redemption rollback. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -389,7 +381,7 @@ public RedemptionRollback _object(ObjectEnum _object) { * The type of the object represented by the JSON * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -410,7 +402,7 @@ public RedemptionRollback date(OffsetDateTime date) { * Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. * @return date **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getDate() { return date; } @@ -557,7 +549,7 @@ public RedemptionRollback result(ResultEnum result) { * Redemption result. * @return result **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ResultEnum getResult() { return result; } @@ -578,7 +570,7 @@ public RedemptionRollback status(StatusEnum status) { * Redemption status. * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -683,7 +675,7 @@ public RedemptionRollback channel(RedemptionRollbackChannel channel) { * Get channel * @return channel **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RedemptionRollbackChannel getChannel() { return channel; } @@ -725,7 +717,7 @@ public RedemptionRollback relatedObjectType(RelatedObjectTypeEnum relatedObjectT * Defines the related object. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -746,7 +738,7 @@ public RedemptionRollback relatedObjectId(String relatedObjectId) { * Unique identifier of the related object. It is assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher. * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -1037,14 +1029,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("date"); - openapiRequiredFields.add("result"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("channel"); - openapiRequiredFields.add("related_object_type"); - openapiRequiredFields.add("related_object_id"); } /** @@ -1059,18 +1043,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RedemptionRollback is not found in the empty JSON string", RedemptionRollback.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RedemptionRollback.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -1098,7 +1075,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } - if (!jsonObj.get("result").isJsonPrimitive()) { + if ((jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) && !jsonObj.get("result").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `result` to be a primitive type in the JSON string but got `%s`", jsonObj.get("result").toString())); } try { @@ -1114,7 +1091,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `result` to be a valid element of ResultEnum enum got `%s` instead", jsonObj.get("result").toString())); } } - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -1144,13 +1121,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { OrderCalculatedNoCustomerData.validateJsonElement(jsonObj.get("order")); } - // validate the required field `channel` - RedemptionRollbackChannel.validateJsonElement(jsonObj.get("channel")); + // validate the optional field `channel` + if (jsonObj.get("channel") != null && !jsonObj.get("channel").isJsonNull()) { + RedemptionRollbackChannel.validateJsonElement(jsonObj.get("channel")); + } // validate the optional field `customer` if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { SimpleCustomer.validateJsonElement(jsonObj.get("customer")); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { @@ -1166,7 +1145,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a valid element of RelatedObjectTypeEnum enum got `%s` instead", jsonObj.get("related_object_type").toString())); } } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } // validate the optional field `voucher` diff --git a/src/main/java/voucherify/client/model/RedemptionRollbackChannel.java b/src/main/java/voucherify/client/model/RedemptionRollbackChannel.java index 0317a464..57c239af 100644 --- a/src/main/java/voucherify/client/model/RedemptionRollbackChannel.java +++ b/src/main/java/voucherify/client/model/RedemptionRollbackChannel.java @@ -63,9 +63,7 @@ public class RedemptionRollbackChannel { public enum ChannelTypeEnum { USER("USER"), - API("API"), - - UNKNOWN_ENUM("unknown_enum"); + API("API"); private String value; @@ -88,7 +86,7 @@ public static ChannelTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionVoucher.java b/src/main/java/voucherify/client/model/RedemptionVoucher.java index 8cc96923..251dd927 100644 --- a/src/main/java/voucherify/client/model/RedemptionVoucher.java +++ b/src/main/java/voucherify/client/model/RedemptionVoucher.java @@ -104,9 +104,7 @@ public enum TypeEnum { DISCOUNT_VOUCHER("DISCOUNT_VOUCHER"), - LOYALTY_CARD("LOYALTY_CARD"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("LOYALTY_CARD"); private String value; @@ -129,7 +127,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -191,9 +189,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -216,7 +212,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionsGetResponseBody.java b/src/main/java/voucherify/client/model/RedemptionsGetResponseBody.java index 1deaa27c..cb660725 100644 --- a/src/main/java/voucherify/client/model/RedemptionsGetResponseBody.java +++ b/src/main/java/voucherify/client/model/RedemptionsGetResponseBody.java @@ -74,9 +74,7 @@ public class RedemptionsGetResponseBody { public enum ObjectEnum { REDEMPTION("redemption"), - REDEMPTION_ROLLBACK("redemption_rollback"), - - UNKNOWN_ENUM("unknown_enum"); + REDEMPTION_ROLLBACK("redemption_rollback"); private String value; @@ -99,7 +97,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -151,9 +149,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public enum ResultEnum { SUCCESS("SUCCESS"), - FAILURE("FAILURE"), - - UNKNOWN_ENUM("unknown_enum"); + FAILURE("FAILURE"); private String value; @@ -176,7 +172,7 @@ public static ResultEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -206,9 +202,7 @@ public enum StatusEnum { FAILED("FAILED"), - ROLLED_BACK("ROLLED_BACK"), - - UNKNOWN_ENUM("unknown_enum"); + ROLLED_BACK("ROLLED_BACK"); private String value; @@ -231,7 +225,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -285,9 +279,7 @@ public enum RelatedObjectTypeEnum { PROMOTION_TIER("promotion_tier"), - REDEMPTION("redemption"), - - UNKNOWN_ENUM("unknown_enum"); + REDEMPTION("redemption"); private String value; @@ -310,7 +302,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -372,7 +364,7 @@ public RedemptionsGetResponseBody id(String id) { * Get id * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -393,7 +385,7 @@ public RedemptionsGetResponseBody _object(ObjectEnum _object) { * Get _object * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -414,7 +406,7 @@ public RedemptionsGetResponseBody date(OffsetDateTime date) { * Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. * @return date **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getDate() { return date; } @@ -540,7 +532,7 @@ public RedemptionsGetResponseBody result(ResultEnum result) { * Redemption result. * @return result **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ResultEnum getResult() { return result; } @@ -561,7 +553,7 @@ public RedemptionsGetResponseBody status(StatusEnum status) { * Get status * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -666,7 +658,7 @@ public RedemptionsGetResponseBody channel(RedemptionsGetResponseBodyChannel chan * Get channel * @return channel **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RedemptionsGetResponseBodyChannel getChannel() { return channel; } @@ -708,7 +700,7 @@ public RedemptionsGetResponseBody relatedObjectType(RelatedObjectTypeEnum relate * Defines the related object. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -729,7 +721,7 @@ public RedemptionsGetResponseBody relatedObjectId(String relatedObjectId) { * Get relatedObjectId * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -1041,14 +1033,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("date"); - openapiRequiredFields.add("result"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("channel"); - openapiRequiredFields.add("related_object_type"); - openapiRequiredFields.add("related_object_id"); } /** @@ -1063,18 +1047,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RedemptionsGetResponseBody is not found in the empty JSON string", RedemptionsGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RedemptionsGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -1099,7 +1076,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("redemption") != null && !jsonObj.get("redemption").isJsonNull()) && !jsonObj.get("redemption").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redemption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redemption").toString())); } - if (!jsonObj.get("result").isJsonPrimitive()) { + if ((jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) && !jsonObj.get("result").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `result` to be a primitive type in the JSON string but got `%s`", jsonObj.get("result").toString())); } try { @@ -1115,7 +1092,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `result` to be a valid element of ResultEnum enum got `%s` instead", jsonObj.get("result").toString())); } } - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -1145,13 +1122,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { RedemptionsGetResponseBodyOrder.validateJsonElement(jsonObj.get("order")); } - // validate the required field `channel` - RedemptionsGetResponseBodyChannel.validateJsonElement(jsonObj.get("channel")); + // validate the optional field `channel` + if (jsonObj.get("channel") != null && !jsonObj.get("channel").isJsonNull()) { + RedemptionsGetResponseBodyChannel.validateJsonElement(jsonObj.get("channel")); + } // validate the optional field `customer` if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { RedemptionsGetResponseBodyCustomer.validateJsonElement(jsonObj.get("customer")); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { @@ -1167,7 +1146,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a valid element of RelatedObjectTypeEnum enum got `%s` instead", jsonObj.get("related_object_type").toString())); } } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } // validate the optional field `voucher` diff --git a/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyChannel.java b/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyChannel.java index 5cc75916..16f44982 100644 --- a/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyChannel.java +++ b/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyChannel.java @@ -63,9 +63,7 @@ public class RedemptionsGetResponseBodyChannel { public enum ChannelTypeEnum { USER("USER"), - API("API"), - - UNKNOWN_ENUM("unknown_enum"); + API("API"); private String value; @@ -88,7 +86,7 @@ public static ChannelTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyCustomer.java b/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyCustomer.java index 44b7e182..c9369dd4 100644 --- a/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyCustomer.java +++ b/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyCustomer.java @@ -77,9 +77,7 @@ public class RedemptionsGetResponseBodyCustomer { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CUSTOMER("customer"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOMER("customer"); private String value; @@ -102,7 +100,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyOrder.java b/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyOrder.java index b8a63ef0..a0b125ac 100644 --- a/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyOrder.java +++ b/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyOrder.java @@ -86,9 +86,7 @@ public enum StatusEnum { CANCELED("CANCELED"), - FULFILLED("FULFILLED"), - - UNKNOWN_ENUM("unknown_enum"); + FULFILLED("FULFILLED"); private String value; @@ -111,7 +109,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -189,9 +187,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - ORDER("order"), - - UNKNOWN_ENUM("unknown_enum"); + ORDER("order"); private String value; @@ -214,7 +210,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyPromotionTierCampaign.java b/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyPromotionTierCampaign.java index 486a6a6c..c48351e8 100644 --- a/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyPromotionTierCampaign.java +++ b/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyPromotionTierCampaign.java @@ -90,9 +90,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -115,7 +113,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyVoucher.java b/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyVoucher.java index 83296cd4..6f0eb7a5 100644 --- a/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyVoucher.java +++ b/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyVoucher.java @@ -104,9 +104,7 @@ public enum TypeEnum { DISCOUNT_VOUCHER("DISCOUNT_VOUCHER"), - LOYALTY_CARD("LOYALTY_CARD"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("LOYALTY_CARD"); private String value; @@ -129,7 +127,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -191,9 +189,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -216,7 +212,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyVoucherGift.java b/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyVoucherGift.java index ccc9522b..177daf05 100644 --- a/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyVoucherGift.java +++ b/src/main/java/voucherify/client/model/RedemptionsGetResponseBodyVoucherGift.java @@ -67,9 +67,7 @@ public class RedemptionsGetResponseBodyVoucherGift { public enum EffectEnum { ORDER("APPLY_TO_ORDER"), - ITEMS("APPLY_TO_ITEMS"), - - UNKNOWN_ENUM("unknown_enum"); + ITEMS("APPLY_TO_ITEMS"); private String value; @@ -92,7 +90,7 @@ public static EffectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionsListResponseBody.java b/src/main/java/voucherify/client/model/RedemptionsListResponseBody.java index 5a78cdbc..e5669a16 100644 --- a/src/main/java/voucherify/client/model/RedemptionsListResponseBody.java +++ b/src/main/java/voucherify/client/model/RedemptionsListResponseBody.java @@ -65,7 +65,7 @@ public class RedemptionsListResponseBody { public static final String SERIALIZED_NAME_REDEMPTIONS = "redemptions"; @SerializedName(SERIALIZED_NAME_REDEMPTIONS) - private List redemptions = new ArrayList<>(); + private List redemptions; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public RedemptionsListResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about redemptions in a dictionary. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public RedemptionsListResponseBody dataRef(String dataRef) { * Identifies the name of the attribute that contains the array of redemption objects. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public RedemptionsListResponseBody addRedemptionsItem(RedemptionsListResponseBod * Get redemptions * @return redemptions **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getRedemptions() { return redemptions; } @@ -155,7 +155,7 @@ public RedemptionsListResponseBody total(Integer total) { * Total number of redemptions. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("redemptions"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RedemptionsListResponseBody is not found in the empty JSON string", RedemptionsListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RedemptionsListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("redemptions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `redemptions` to be an array in the JSON string but got `%s`", jsonObj.get("redemptions").toString())); + if (jsonObj.get("redemptions") != null && !jsonObj.get("redemptions").isJsonNull()) { + JsonArray jsonArrayredemptions = jsonObj.getAsJsonArray("redemptions"); + if (jsonArrayredemptions != null) { + // ensure the json data is an array + if (!jsonObj.get("redemptions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `redemptions` to be an array in the JSON string but got `%s`", jsonObj.get("redemptions").toString())); + } + + // validate the optional field `redemptions` (array) + for (int i = 0; i < jsonArrayredemptions.size(); i++) { + RedemptionsListResponseBodyRedemptionsItem.validateJsonElement(jsonArrayredemptions.get(i)); + }; + } } - - JsonArray jsonArrayredemptions = jsonObj.getAsJsonArray("redemptions"); - // validate the required field `redemptions` (array) - for (int i = 0; i < jsonArrayredemptions.size(); i++) { - RedemptionsListResponseBodyRedemptionsItem.validateJsonElement(jsonArrayredemptions.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItem.java b/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItem.java index 4fd44973..026d7fd2 100644 --- a/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItem.java +++ b/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItem.java @@ -74,9 +74,7 @@ public class RedemptionsListResponseBodyRedemptionsItem { public enum ObjectEnum { REDEMPTION("redemption"), - REDEMPTION_ROLLBACK("redemption_rollback"), - - UNKNOWN_ENUM("unknown_enum"); + REDEMPTION_ROLLBACK("redemption_rollback"); private String value; @@ -99,7 +97,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -151,9 +149,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public enum ResultEnum { SUCCESS("SUCCESS"), - FAILURE("FAILURE"), - - UNKNOWN_ENUM("unknown_enum"); + FAILURE("FAILURE"); private String value; @@ -176,7 +172,7 @@ public static ResultEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -206,9 +202,7 @@ public enum StatusEnum { FAILED("FAILED"), - ROLLED_BACK("ROLLED_BACK"), - - UNKNOWN_ENUM("unknown_enum"); + ROLLED_BACK("ROLLED_BACK"); private String value; @@ -231,7 +225,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -285,9 +279,7 @@ public enum RelatedObjectTypeEnum { PROMOTION_TIER("promotion_tier"), - REDEMPTION("redemption"), - - UNKNOWN_ENUM("unknown_enum"); + REDEMPTION("redemption"); private String value; @@ -310,7 +302,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -372,7 +364,7 @@ public RedemptionsListResponseBodyRedemptionsItem id(String id) { * Get id * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -393,7 +385,7 @@ public RedemptionsListResponseBodyRedemptionsItem _object(ObjectEnum _object) { * Get _object * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -414,7 +406,7 @@ public RedemptionsListResponseBodyRedemptionsItem date(OffsetDateTime date) { * Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. * @return date **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getDate() { return date; } @@ -540,7 +532,7 @@ public RedemptionsListResponseBodyRedemptionsItem result(ResultEnum result) { * Redemption result. * @return result **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ResultEnum getResult() { return result; } @@ -561,7 +553,7 @@ public RedemptionsListResponseBodyRedemptionsItem status(StatusEnum status) { * Get status * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -666,7 +658,7 @@ public RedemptionsListResponseBodyRedemptionsItem channel(RedemptionsListRespons * Get channel * @return channel **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RedemptionsListResponseBodyRedemptionsItemChannel getChannel() { return channel; } @@ -708,7 +700,7 @@ public RedemptionsListResponseBodyRedemptionsItem relatedObjectType(RelatedObjec * Defines the related object. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -729,7 +721,7 @@ public RedemptionsListResponseBodyRedemptionsItem relatedObjectId(String related * Get relatedObjectId * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -1041,14 +1033,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("date"); - openapiRequiredFields.add("result"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("channel"); - openapiRequiredFields.add("related_object_type"); - openapiRequiredFields.add("related_object_id"); } /** @@ -1063,18 +1047,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RedemptionsListResponseBodyRedemptionsItem is not found in the empty JSON string", RedemptionsListResponseBodyRedemptionsItem.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RedemptionsListResponseBodyRedemptionsItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -1099,7 +1076,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("redemption") != null && !jsonObj.get("redemption").isJsonNull()) && !jsonObj.get("redemption").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redemption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redemption").toString())); } - if (!jsonObj.get("result").isJsonPrimitive()) { + if ((jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) && !jsonObj.get("result").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `result` to be a primitive type in the JSON string but got `%s`", jsonObj.get("result").toString())); } try { @@ -1115,7 +1092,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `result` to be a valid element of ResultEnum enum got `%s` instead", jsonObj.get("result").toString())); } } - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -1145,13 +1122,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { RedemptionsListResponseBodyRedemptionsItemOrder.validateJsonElement(jsonObj.get("order")); } - // validate the required field `channel` - RedemptionsListResponseBodyRedemptionsItemChannel.validateJsonElement(jsonObj.get("channel")); + // validate the optional field `channel` + if (jsonObj.get("channel") != null && !jsonObj.get("channel").isJsonNull()) { + RedemptionsListResponseBodyRedemptionsItemChannel.validateJsonElement(jsonObj.get("channel")); + } // validate the optional field `customer` if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { RedemptionsListResponseBodyRedemptionsItemCustomer.validateJsonElement(jsonObj.get("customer")); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { @@ -1167,7 +1146,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a valid element of RelatedObjectTypeEnum enum got `%s` instead", jsonObj.get("related_object_type").toString())); } } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } // validate the optional field `voucher` diff --git a/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemChannel.java b/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemChannel.java index f0375467..e31a32f8 100644 --- a/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemChannel.java +++ b/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemChannel.java @@ -63,9 +63,7 @@ public class RedemptionsListResponseBodyRedemptionsItemChannel { public enum ChannelTypeEnum { USER("USER"), - API("API"), - - UNKNOWN_ENUM("unknown_enum"); + API("API"); private String value; @@ -88,7 +86,7 @@ public static ChannelTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemCustomer.java b/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemCustomer.java index d11cf7a8..afaa71ab 100644 --- a/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemCustomer.java +++ b/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemCustomer.java @@ -77,9 +77,7 @@ public class RedemptionsListResponseBodyRedemptionsItemCustomer { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CUSTOMER("customer"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOMER("customer"); private String value; @@ -102,7 +100,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemOrder.java b/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemOrder.java index b4efde3a..45197f11 100644 --- a/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemOrder.java +++ b/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemOrder.java @@ -86,9 +86,7 @@ public enum StatusEnum { CANCELED("CANCELED"), - FULFILLED("FULFILLED"), - - UNKNOWN_ENUM("unknown_enum"); + FULFILLED("FULFILLED"); private String value; @@ -111,7 +109,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -189,9 +187,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - ORDER("order"), - - UNKNOWN_ENUM("unknown_enum"); + ORDER("order"); private String value; @@ -214,7 +210,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaign.java b/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaign.java index 59d9016d..ccd63226 100644 --- a/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaign.java +++ b/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemPromotionTierCampaign.java @@ -90,9 +90,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -115,7 +113,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemVoucher.java b/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemVoucher.java index 0853d1c8..7e7b9536 100644 --- a/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemVoucher.java +++ b/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemVoucher.java @@ -104,9 +104,7 @@ public enum TypeEnum { DISCOUNT_VOUCHER("DISCOUNT_VOUCHER"), - LOYALTY_CARD("LOYALTY_CARD"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("LOYALTY_CARD"); private String value; @@ -129,7 +127,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -191,9 +189,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -216,7 +212,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemVoucherGift.java b/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemVoucherGift.java index d9197bd0..6b0d7e77 100644 --- a/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemVoucherGift.java +++ b/src/main/java/voucherify/client/model/RedemptionsListResponseBodyRedemptionsItemVoucherGift.java @@ -67,9 +67,7 @@ public class RedemptionsListResponseBodyRedemptionsItemVoucherGift { public enum EffectEnum { ORDER("APPLY_TO_ORDER"), - ITEMS("APPLY_TO_ITEMS"), - - UNKNOWN_ENUM("unknown_enum"); + ITEMS("APPLY_TO_ITEMS"); private String value; @@ -92,7 +90,7 @@ public static EffectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/RedemptionsRedeemRequestBody.java b/src/main/java/voucherify/client/model/RedemptionsRedeemRequestBody.java index b8d3c5b4..3f549cae 100644 --- a/src/main/java/voucherify/client/model/RedemptionsRedeemRequestBody.java +++ b/src/main/java/voucherify/client/model/RedemptionsRedeemRequestBody.java @@ -61,7 +61,7 @@ public class RedemptionsRedeemRequestBody { public static final String SERIALIZED_NAME_REDEEMABLES = "redeemables"; @SerializedName(SERIALIZED_NAME_REDEEMABLES) - private List redeemables = new ArrayList<>(); + private List redeemables; public static final String SERIALIZED_NAME_ORDER = "order"; @SerializedName(SERIALIZED_NAME_ORDER) @@ -108,7 +108,7 @@ public RedemptionsRedeemRequestBody addRedeemablesItem(StackableValidateRedeemBa * Get redeemables * @return redeemables **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getRedeemables() { return redeemables; } @@ -358,7 +358,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("redeemables"); } /** @@ -373,24 +372,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RedemptionsRedeemRequestBody is not found in the empty JSON string", RedemptionsRedeemRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RedemptionsRedeemRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("redeemables").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `redeemables` to be an array in the JSON string but got `%s`", jsonObj.get("redeemables").toString())); + if (jsonObj.get("redeemables") != null && !jsonObj.get("redeemables").isJsonNull()) { + JsonArray jsonArrayredeemables = jsonObj.getAsJsonArray("redeemables"); + if (jsonArrayredeemables != null) { + // ensure the json data is an array + if (!jsonObj.get("redeemables").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `redeemables` to be an array in the JSON string but got `%s`", jsonObj.get("redeemables").toString())); + } + + // validate the optional field `redeemables` (array) + for (int i = 0; i < jsonArrayredeemables.size(); i++) { + StackableValidateRedeemBaseRedeemablesItem.validateJsonElement(jsonArrayredeemables.get(i)); + }; + } } - - JsonArray jsonArrayredeemables = jsonObj.getAsJsonArray("redeemables"); - // validate the required field `redeemables` (array) - for (int i = 0; i < jsonArrayredeemables.size(); i++) { - StackableValidateRedeemBaseRedeemablesItem.validateJsonElement(jsonArrayredeemables.get(i)); - }; // validate the optional field `order` if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { Order.validateJsonElement(jsonObj.get("order")); diff --git a/src/main/java/voucherify/client/model/RedemptionsRollbackCreateResponseBody.java b/src/main/java/voucherify/client/model/RedemptionsRollbackCreateResponseBody.java index 969a8d8b..2f602023 100644 --- a/src/main/java/voucherify/client/model/RedemptionsRollbackCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/RedemptionsRollbackCreateResponseBody.java @@ -72,9 +72,7 @@ public class RedemptionsRollbackCreateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - REDEMPTION_ROLLBACK("redemption_rollback"), - - UNKNOWN_ENUM("unknown_enum"); + REDEMPTION_ROLLBACK("redemption_rollback"); private String value; @@ -97,7 +95,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -153,9 +151,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public enum ResultEnum { SUCCESS("SUCCESS"), - FAILURE("FAILURE"), - - UNKNOWN_ENUM("unknown_enum"); + FAILURE("FAILURE"); private String value; @@ -178,7 +174,7 @@ public static ResultEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -206,9 +202,7 @@ public ResultEnum read(final JsonReader jsonReader) throws IOException { public enum StatusEnum { SUCCEEDED("SUCCEEDED"), - FAILED("FAILED"), - - UNKNOWN_ENUM("unknown_enum"); + FAILED("FAILED"); private String value; @@ -231,7 +225,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -285,9 +279,7 @@ public enum RelatedObjectTypeEnum { PROMOTION_TIER("promotion_tier"), - REDEMPTION("redemption"), - - UNKNOWN_ENUM("unknown_enum"); + REDEMPTION("redemption"); private String value; @@ -310,7 +302,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -368,7 +360,7 @@ public RedemptionsRollbackCreateResponseBody id(String id) { * Unique identifier of the redemption rollback. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -389,7 +381,7 @@ public RedemptionsRollbackCreateResponseBody _object(ObjectEnum _object) { * The type of the object represented by the JSON * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -410,7 +402,7 @@ public RedemptionsRollbackCreateResponseBody date(OffsetDateTime date) { * Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. * @return date **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getDate() { return date; } @@ -557,7 +549,7 @@ public RedemptionsRollbackCreateResponseBody result(ResultEnum result) { * Redemption result. * @return result **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ResultEnum getResult() { return result; } @@ -578,7 +570,7 @@ public RedemptionsRollbackCreateResponseBody status(StatusEnum status) { * Redemption status. * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -683,7 +675,7 @@ public RedemptionsRollbackCreateResponseBody channel(RedemptionRollbackChannel c * Get channel * @return channel **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RedemptionRollbackChannel getChannel() { return channel; } @@ -725,7 +717,7 @@ public RedemptionsRollbackCreateResponseBody relatedObjectType(RelatedObjectType * Defines the related object. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -746,7 +738,7 @@ public RedemptionsRollbackCreateResponseBody relatedObjectId(String relatedObjec * Unique identifier of the related object. It is assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher. * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -1037,14 +1029,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("date"); - openapiRequiredFields.add("result"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("channel"); - openapiRequiredFields.add("related_object_type"); - openapiRequiredFields.add("related_object_id"); } /** @@ -1059,18 +1043,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RedemptionsRollbackCreateResponseBody is not found in the empty JSON string", RedemptionsRollbackCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RedemptionsRollbackCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -1098,7 +1075,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } - if (!jsonObj.get("result").isJsonPrimitive()) { + if ((jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) && !jsonObj.get("result").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `result` to be a primitive type in the JSON string but got `%s`", jsonObj.get("result").toString())); } try { @@ -1114,7 +1091,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `result` to be a valid element of ResultEnum enum got `%s` instead", jsonObj.get("result").toString())); } } - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -1144,13 +1121,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { OrderCalculatedNoCustomerData.validateJsonElement(jsonObj.get("order")); } - // validate the required field `channel` - RedemptionRollbackChannel.validateJsonElement(jsonObj.get("channel")); + // validate the optional field `channel` + if (jsonObj.get("channel") != null && !jsonObj.get("channel").isJsonNull()) { + RedemptionRollbackChannel.validateJsonElement(jsonObj.get("channel")); + } // validate the optional field `customer` if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { SimpleCustomer.validateJsonElement(jsonObj.get("customer")); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { @@ -1166,7 +1145,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a valid element of RelatedObjectTypeEnum enum got `%s` instead", jsonObj.get("related_object_type").toString())); } } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } // validate the optional field `voucher` diff --git a/src/main/java/voucherify/client/model/ReferralProgram.java b/src/main/java/voucherify/client/model/ReferralProgram.java index 92415ee7..e67e20d1 100644 --- a/src/main/java/voucherify/client/model/ReferralProgram.java +++ b/src/main/java/voucherify/client/model/ReferralProgram.java @@ -61,9 +61,7 @@ public class ReferralProgram { public enum ConversionEventTypeEnum { REDEMPTION("redemption"), - CUSTOM_EVENT("custom_event"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOM_EVENT("custom_event"); private String value; @@ -86,7 +84,7 @@ public static ConversionEventTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ReferralProgramRefereeReward.java b/src/main/java/voucherify/client/model/ReferralProgramRefereeReward.java index 8a9da69e..159cc4b8 100644 --- a/src/main/java/voucherify/client/model/ReferralProgramRefereeReward.java +++ b/src/main/java/voucherify/client/model/ReferralProgramRefereeReward.java @@ -68,9 +68,7 @@ public enum TypeEnum { GIFT_VOUCHER("GIFT_VOUCHER"), - LUCKY_DRAW_CODE("LUCKY_DRAW_CODE"), - - UNKNOWN_ENUM("unknown_enum"); + LUCKY_DRAW_CODE("LUCKY_DRAW_CODE"); private String value; @@ -93,7 +91,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ReferralProgramRefereeRewardRelatedObjectParent.java b/src/main/java/voucherify/client/model/ReferralProgramRefereeRewardRelatedObjectParent.java index 0662b51d..7f77b523 100644 --- a/src/main/java/voucherify/client/model/ReferralProgramRefereeRewardRelatedObjectParent.java +++ b/src/main/java/voucherify/client/model/ReferralProgramRefereeRewardRelatedObjectParent.java @@ -65,9 +65,7 @@ public class ReferralProgramRefereeRewardRelatedObjectParent { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CAMPAIGN("CAMPAIGN"), - - UNKNOWN_ENUM("unknown_enum"); + CAMPAIGN("CAMPAIGN"); private String value; @@ -90,7 +88,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ReferrerId.java b/src/main/java/voucherify/client/model/ReferrerId.java index b13a0ff8..9908dc11 100644 --- a/src/main/java/voucherify/client/model/ReferrerId.java +++ b/src/main/java/voucherify/client/model/ReferrerId.java @@ -61,9 +61,7 @@ public class ReferrerId { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CUSTOMER("customer"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOMER("customer"); private String value; @@ -86,7 +84,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -120,7 +118,7 @@ public ReferrerId id(String id) { * A unique identifier of an existing customer. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -141,7 +139,7 @@ public ReferrerId _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -250,8 +248,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); } /** @@ -266,18 +262,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ReferrerId is not found in the empty JSON string", ReferrerId.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReferrerId.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ResourceTypes.java b/src/main/java/voucherify/client/model/ResourceTypes.java index c79c1d0d..fe847d70 100644 --- a/src/main/java/voucherify/client/model/ResourceTypes.java +++ b/src/main/java/voucherify/client/model/ResourceTypes.java @@ -32,9 +32,7 @@ public enum ResourceTypes { VOUCHER("voucher"), - PROMOTION_TIER("promotion_tier"), - - UNKNOWN_ENUM("unknown_enum"); + PROMOTION_TIER("promotion_tier"); private String value; @@ -57,7 +55,7 @@ public static ResourceTypes fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/Reward.java b/src/main/java/voucherify/client/model/Reward.java index 030edf40..0534004e 100644 --- a/src/main/java/voucherify/client/model/Reward.java +++ b/src/main/java/voucherify/client/model/Reward.java @@ -89,9 +89,7 @@ public enum TypeEnum { COIN("COIN"), - MATERIAL("MATERIAL"), - - UNKNOWN_ENUM("unknown_enum"); + MATERIAL("MATERIAL"); private String value; @@ -114,7 +112,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -152,9 +150,7 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - REWARD("reward"), - - UNKNOWN_ENUM("unknown_enum"); + REWARD("reward"); private String value; @@ -177,7 +173,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -211,7 +207,7 @@ public Reward id(String id) { * Unique reward ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -232,7 +228,7 @@ public Reward name(String name) { * Reward name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -316,7 +312,7 @@ public Reward metadata(Object metadata) { * The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -337,7 +333,7 @@ public Reward type(TypeEnum type) { * Reward type. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -379,7 +375,7 @@ public Reward createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -421,7 +417,7 @@ public Reward _object(ObjectEnum _object) { * The type of the object represented by the JSON. This object stores information about the reward. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -568,12 +564,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -588,25 +578,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in Reward is not found in the empty JSON string", Reward.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Reward.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the optional field `attributes` if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { RewardAttributes.validateJsonElement(jsonObj.get("attributes")); } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -626,7 +609,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { RewardType.validateJsonElement(jsonObj.get("parameters")); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/RewardAssignment.java b/src/main/java/voucherify/client/model/RewardAssignment.java index dfa4a950..cff076c7 100644 --- a/src/main/java/voucherify/client/model/RewardAssignment.java +++ b/src/main/java/voucherify/client/model/RewardAssignment.java @@ -76,9 +76,7 @@ public class RewardAssignment { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - REWARD_ASSIGNMENT("reward_assignment"), - - UNKNOWN_ENUM("unknown_enum"); + REWARD_ASSIGNMENT("reward_assignment"); private String value; @@ -101,7 +99,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -131,9 +129,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(RelatedObjectTypeEnum.Adapter.class) public enum RelatedObjectTypeEnum { - CAMPAIGN("campaign"), - - UNKNOWN_ENUM("unknown_enum"); + CAMPAIGN("campaign"); private String value; @@ -156,7 +152,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -194,7 +190,7 @@ public RewardAssignment id(String id) { * Unique reward assignment ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -215,7 +211,7 @@ public RewardAssignment rewardId(String rewardId) { * Associated reward ID. * @return rewardId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRewardId() { return rewardId; } @@ -236,7 +232,7 @@ public RewardAssignment createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -278,7 +274,7 @@ public RewardAssignment _object(ObjectEnum _object) { * The type of the object represented by the JSON. This object stores information about the reward assignment. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -299,7 +295,7 @@ public RewardAssignment relatedObjectId(String relatedObjectId) { * Related object ID to which the reward was assigned. * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -320,7 +316,7 @@ public RewardAssignment relatedObjectType(RelatedObjectTypeEnum relatedObjectTyp * Related object type to which the reward was assigned. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -479,12 +475,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("reward_id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("related_object_id"); - openapiRequiredFields.add("related_object_type"); } /** @@ -499,21 +489,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RewardAssignment is not found in the empty JSON string", RewardAssignment.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardAssignment.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("reward_id").isJsonPrimitive()) { + if ((jsonObj.get("reward_id") != null && !jsonObj.get("reward_id").isJsonNull()) && !jsonObj.get("reward_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reward_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reward_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -529,10 +512,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { diff --git a/src/main/java/voucherify/client/model/RewardAssignmentBase.java b/src/main/java/voucherify/client/model/RewardAssignmentBase.java index 723a37ac..7aaf8646 100644 --- a/src/main/java/voucherify/client/model/RewardAssignmentBase.java +++ b/src/main/java/voucherify/client/model/RewardAssignmentBase.java @@ -75,9 +75,7 @@ public class RewardAssignmentBase { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - REWARD_ASSIGNMENT("reward_assignment"), - - UNKNOWN_ENUM("unknown_enum"); + REWARD_ASSIGNMENT("reward_assignment"); private String value; @@ -100,7 +98,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -130,9 +128,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(RelatedObjectTypeEnum.Adapter.class) public enum RelatedObjectTypeEnum { - CAMPAIGN("campaign"), - - UNKNOWN_ENUM("unknown_enum"); + CAMPAIGN("campaign"); private String value; @@ -155,7 +151,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -189,7 +185,7 @@ public RewardAssignmentBase id(String id) { * Unique reward assignment ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -210,7 +206,7 @@ public RewardAssignmentBase rewardId(String rewardId) { * Associated reward ID. * @return rewardId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRewardId() { return rewardId; } @@ -231,7 +227,7 @@ public RewardAssignmentBase createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -273,7 +269,7 @@ public RewardAssignmentBase _object(ObjectEnum _object) { * The type of the object represented by the JSON. This object stores information about the reward assignment. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -294,7 +290,7 @@ public RewardAssignmentBase relatedObjectId(String relatedObjectId) { * Related object ID to which the reward was assigned. * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -315,7 +311,7 @@ public RewardAssignmentBase relatedObjectType(RelatedObjectTypeEnum relatedObjec * Related object type to which the reward was assigned. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -450,12 +446,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("reward_id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("related_object_id"); - openapiRequiredFields.add("related_object_type"); } /** @@ -470,21 +460,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RewardAssignmentBase is not found in the empty JSON string", RewardAssignmentBase.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardAssignmentBase.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("reward_id").isJsonPrimitive()) { + if ((jsonObj.get("reward_id") != null && !jsonObj.get("reward_id").isJsonNull()) && !jsonObj.get("reward_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reward_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reward_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -500,10 +483,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { diff --git a/src/main/java/voucherify/client/model/RewardAssignmentParametersParameters.java b/src/main/java/voucherify/client/model/RewardAssignmentParametersParameters.java index 438c4553..98cf4105 100644 --- a/src/main/java/voucherify/client/model/RewardAssignmentParametersParameters.java +++ b/src/main/java/voucherify/client/model/RewardAssignmentParametersParameters.java @@ -70,7 +70,7 @@ public RewardAssignmentParametersParameters loyalty(RewardAssignmentParametersPa * Get loyalty * @return loyalty **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RewardAssignmentParametersParametersLoyalty getLoyalty() { return loyalty; } @@ -176,7 +176,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("loyalty"); } /** @@ -191,16 +190,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RewardAssignmentParametersParameters is not found in the empty JSON string", RewardAssignmentParametersParameters.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardAssignmentParametersParameters.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `loyalty` - RewardAssignmentParametersParametersLoyalty.validateJsonElement(jsonObj.get("loyalty")); + // validate the optional field `loyalty` + if (jsonObj.get("loyalty") != null && !jsonObj.get("loyalty").isJsonNull()) { + RewardAssignmentParametersParametersLoyalty.validateJsonElement(jsonObj.get("loyalty")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/RewardTypeCampaign.java b/src/main/java/voucherify/client/model/RewardTypeCampaign.java index f6c1c132..3c7266d3 100644 --- a/src/main/java/voucherify/client/model/RewardTypeCampaign.java +++ b/src/main/java/voucherify/client/model/RewardTypeCampaign.java @@ -73,9 +73,7 @@ public enum TypeEnum { REFERRAL_PROGRAM("REFERRAL_PROGRAM"), - LOYALTY_PROGRAM("LOYALTY_PROGRAM"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_PROGRAM("LOYALTY_PROGRAM"); private String value; @@ -98,7 +96,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -132,7 +130,7 @@ public RewardTypeCampaign id(String id) { * Unique campaign ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -174,7 +172,7 @@ public RewardTypeCampaign type(TypeEnum type) { * Campaign type. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -286,8 +284,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); } /** @@ -302,18 +298,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RewardTypeCampaign is not found in the empty JSON string", RewardTypeCampaign.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardTypeCampaign.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { diff --git a/src/main/java/voucherify/client/model/RewardTypeCoin.java b/src/main/java/voucherify/client/model/RewardTypeCoin.java index 28330f6f..caea2a9c 100644 --- a/src/main/java/voucherify/client/model/RewardTypeCoin.java +++ b/src/main/java/voucherify/client/model/RewardTypeCoin.java @@ -74,7 +74,7 @@ public RewardTypeCoin exchangeRatio(BigDecimal exchangeRatio) { * The cash equivalent of the points defined in the points_ratio property. * @return exchangeRatio **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public BigDecimal getExchangeRatio() { return exchangeRatio; } @@ -204,7 +204,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("exchange_ratio"); } /** @@ -219,13 +218,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RewardTypeCoin is not found in the empty JSON string", RewardTypeCoin.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardTypeCoin.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); } diff --git a/src/main/java/voucherify/client/model/RewardTypeProduct.java b/src/main/java/voucherify/client/model/RewardTypeProduct.java index 31ba5ede..208d6ce0 100644 --- a/src/main/java/voucherify/client/model/RewardTypeProduct.java +++ b/src/main/java/voucherify/client/model/RewardTypeProduct.java @@ -74,7 +74,7 @@ public RewardTypeProduct id(String id) { * Unique product ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -215,7 +215,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); } /** @@ -230,15 +229,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RewardTypeProduct is not found in the empty JSON string", RewardTypeProduct.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardTypeProduct.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("sku_id") != null && !jsonObj.get("sku_id").isJsonNull()) && !jsonObj.get("sku_id").isJsonPrimitive()) { diff --git a/src/main/java/voucherify/client/model/RewardsAssignmentsCreateRequestBody.java b/src/main/java/voucherify/client/model/RewardsAssignmentsCreateRequestBody.java index 6fafe6c4..abcb5579 100644 --- a/src/main/java/voucherify/client/model/RewardsAssignmentsCreateRequestBody.java +++ b/src/main/java/voucherify/client/model/RewardsAssignmentsCreateRequestBody.java @@ -80,7 +80,7 @@ public RewardsAssignmentsCreateRequestBody campaign(String campaign) { * The campaign ID of the campaign to which the reward is to be assigned. * @return campaign **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCampaign() { return campaign; } @@ -242,7 +242,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("campaign"); } /** @@ -257,15 +256,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RewardsAssignmentsCreateRequestBody is not found in the empty JSON string", RewardsAssignmentsCreateRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardsAssignmentsCreateRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("campaign").isJsonPrimitive()) { + if ((jsonObj.get("campaign") != null && !jsonObj.get("campaign").isJsonNull()) && !jsonObj.get("campaign").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign").toString())); } // validate the optional field `parameters` diff --git a/src/main/java/voucherify/client/model/RewardsAssignmentsCreateRequestBodyParameters.java b/src/main/java/voucherify/client/model/RewardsAssignmentsCreateRequestBodyParameters.java index f0352031..e7fb541f 100644 --- a/src/main/java/voucherify/client/model/RewardsAssignmentsCreateRequestBodyParameters.java +++ b/src/main/java/voucherify/client/model/RewardsAssignmentsCreateRequestBodyParameters.java @@ -70,7 +70,7 @@ public RewardsAssignmentsCreateRequestBodyParameters loyalty(RewardsAssignmentsC * Get loyalty * @return loyalty **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RewardsAssignmentsCreateRequestBodyParametersLoyalty getLoyalty() { return loyalty; } @@ -176,7 +176,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("loyalty"); } /** @@ -191,16 +190,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RewardsAssignmentsCreateRequestBodyParameters is not found in the empty JSON string", RewardsAssignmentsCreateRequestBodyParameters.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardsAssignmentsCreateRequestBodyParameters.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `loyalty` - RewardsAssignmentsCreateRequestBodyParametersLoyalty.validateJsonElement(jsonObj.get("loyalty")); + // validate the optional field `loyalty` + if (jsonObj.get("loyalty") != null && !jsonObj.get("loyalty").isJsonNull()) { + RewardsAssignmentsCreateRequestBodyParametersLoyalty.validateJsonElement(jsonObj.get("loyalty")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/RewardsAssignmentsCreateResponseBody.java b/src/main/java/voucherify/client/model/RewardsAssignmentsCreateResponseBody.java index ebd50556..bb574d68 100644 --- a/src/main/java/voucherify/client/model/RewardsAssignmentsCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/RewardsAssignmentsCreateResponseBody.java @@ -76,9 +76,7 @@ public class RewardsAssignmentsCreateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - REWARD_ASSIGNMENT("reward_assignment"), - - UNKNOWN_ENUM("unknown_enum"); + REWARD_ASSIGNMENT("reward_assignment"); private String value; @@ -101,7 +99,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -131,9 +129,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(RelatedObjectTypeEnum.Adapter.class) public enum RelatedObjectTypeEnum { - CAMPAIGN("campaign"), - - UNKNOWN_ENUM("unknown_enum"); + CAMPAIGN("campaign"); private String value; @@ -156,7 +152,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -194,7 +190,7 @@ public RewardsAssignmentsCreateResponseBody id(String id) { * Unique reward assignment ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -215,7 +211,7 @@ public RewardsAssignmentsCreateResponseBody rewardId(String rewardId) { * Associated reward ID. * @return rewardId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRewardId() { return rewardId; } @@ -236,7 +232,7 @@ public RewardsAssignmentsCreateResponseBody createdAt(OffsetDateTime createdAt) * Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -278,7 +274,7 @@ public RewardsAssignmentsCreateResponseBody _object(ObjectEnum _object) { * The type of the object represented by the JSON. This object stores information about the reward assignment. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -299,7 +295,7 @@ public RewardsAssignmentsCreateResponseBody relatedObjectId(String relatedObject * Related object ID to which the reward was assigned. * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -320,7 +316,7 @@ public RewardsAssignmentsCreateResponseBody relatedObjectType(RelatedObjectTypeE * Related object type to which the reward was assigned. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -479,12 +475,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("reward_id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("related_object_id"); - openapiRequiredFields.add("related_object_type"); } /** @@ -499,21 +489,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RewardsAssignmentsCreateResponseBody is not found in the empty JSON string", RewardsAssignmentsCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardsAssignmentsCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("reward_id").isJsonPrimitive()) { + if ((jsonObj.get("reward_id") != null && !jsonObj.get("reward_id").isJsonNull()) && !jsonObj.get("reward_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reward_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reward_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -529,10 +512,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { diff --git a/src/main/java/voucherify/client/model/RewardsAssignmentsGetResponseBody.java b/src/main/java/voucherify/client/model/RewardsAssignmentsGetResponseBody.java index d40945f3..b467812b 100644 --- a/src/main/java/voucherify/client/model/RewardsAssignmentsGetResponseBody.java +++ b/src/main/java/voucherify/client/model/RewardsAssignmentsGetResponseBody.java @@ -76,9 +76,7 @@ public class RewardsAssignmentsGetResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - REWARD_ASSIGNMENT("reward_assignment"), - - UNKNOWN_ENUM("unknown_enum"); + REWARD_ASSIGNMENT("reward_assignment"); private String value; @@ -101,7 +99,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -131,9 +129,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(RelatedObjectTypeEnum.Adapter.class) public enum RelatedObjectTypeEnum { - CAMPAIGN("campaign"), - - UNKNOWN_ENUM("unknown_enum"); + CAMPAIGN("campaign"); private String value; @@ -156,7 +152,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -194,7 +190,7 @@ public RewardsAssignmentsGetResponseBody id(String id) { * Unique reward assignment ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -215,7 +211,7 @@ public RewardsAssignmentsGetResponseBody rewardId(String rewardId) { * Associated reward ID. * @return rewardId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRewardId() { return rewardId; } @@ -236,7 +232,7 @@ public RewardsAssignmentsGetResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -278,7 +274,7 @@ public RewardsAssignmentsGetResponseBody _object(ObjectEnum _object) { * The type of the object represented by the JSON. This object stores information about the reward assignment. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -299,7 +295,7 @@ public RewardsAssignmentsGetResponseBody relatedObjectId(String relatedObjectId) * Related object ID to which the reward was assigned. * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -320,7 +316,7 @@ public RewardsAssignmentsGetResponseBody relatedObjectType(RelatedObjectTypeEnum * Related object type to which the reward was assigned. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -479,12 +475,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("reward_id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("related_object_id"); - openapiRequiredFields.add("related_object_type"); } /** @@ -499,21 +489,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RewardsAssignmentsGetResponseBody is not found in the empty JSON string", RewardsAssignmentsGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardsAssignmentsGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("reward_id").isJsonPrimitive()) { + if ((jsonObj.get("reward_id") != null && !jsonObj.get("reward_id").isJsonNull()) && !jsonObj.get("reward_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reward_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reward_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -529,10 +512,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { diff --git a/src/main/java/voucherify/client/model/RewardsAssignmentsListResponseBody.java b/src/main/java/voucherify/client/model/RewardsAssignmentsListResponseBody.java index 3d548a17..dcbf87b9 100644 --- a/src/main/java/voucherify/client/model/RewardsAssignmentsListResponseBody.java +++ b/src/main/java/voucherify/client/model/RewardsAssignmentsListResponseBody.java @@ -65,7 +65,7 @@ public class RewardsAssignmentsListResponseBody { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public RewardsAssignmentsListResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about reward assignments in a dictionary. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public RewardsAssignmentsListResponseBody dataRef(String dataRef) { * Identifies the name of the attribute that contains the array of reward assignments. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public RewardsAssignmentsListResponseBody addDataItem(RewardAssignment dataItem) * Get data * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -155,7 +155,7 @@ public RewardsAssignmentsListResponseBody total(Integer total) { * Total number of reward assignments. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RewardsAssignmentsListResponseBody is not found in the empty JSON string", RewardsAssignmentsListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardsAssignmentsListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + RewardAssignment.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - RewardAssignment.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/RewardsAssignmentsUpdateResponseBody.java b/src/main/java/voucherify/client/model/RewardsAssignmentsUpdateResponseBody.java index 7c801d56..e668e7aa 100644 --- a/src/main/java/voucherify/client/model/RewardsAssignmentsUpdateResponseBody.java +++ b/src/main/java/voucherify/client/model/RewardsAssignmentsUpdateResponseBody.java @@ -76,9 +76,7 @@ public class RewardsAssignmentsUpdateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - REWARD_ASSIGNMENT("reward_assignment"), - - UNKNOWN_ENUM("unknown_enum"); + REWARD_ASSIGNMENT("reward_assignment"); private String value; @@ -101,7 +99,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -131,9 +129,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(RelatedObjectTypeEnum.Adapter.class) public enum RelatedObjectTypeEnum { - CAMPAIGN("campaign"), - - UNKNOWN_ENUM("unknown_enum"); + CAMPAIGN("campaign"); private String value; @@ -156,7 +152,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -194,7 +190,7 @@ public RewardsAssignmentsUpdateResponseBody id(String id) { * Unique reward assignment ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -215,7 +211,7 @@ public RewardsAssignmentsUpdateResponseBody rewardId(String rewardId) { * Associated reward ID. * @return rewardId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRewardId() { return rewardId; } @@ -236,7 +232,7 @@ public RewardsAssignmentsUpdateResponseBody createdAt(OffsetDateTime createdAt) * Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -278,7 +274,7 @@ public RewardsAssignmentsUpdateResponseBody _object(ObjectEnum _object) { * The type of the object represented by the JSON. This object stores information about the reward assignment. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -299,7 +295,7 @@ public RewardsAssignmentsUpdateResponseBody relatedObjectId(String relatedObject * Related object ID to which the reward was assigned. * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -320,7 +316,7 @@ public RewardsAssignmentsUpdateResponseBody relatedObjectType(RelatedObjectTypeE * Related object type to which the reward was assigned. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -479,12 +475,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("reward_id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("related_object_id"); - openapiRequiredFields.add("related_object_type"); } /** @@ -499,21 +489,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in RewardsAssignmentsUpdateResponseBody is not found in the empty JSON string", RewardsAssignmentsUpdateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RewardsAssignmentsUpdateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("reward_id").isJsonPrimitive()) { + if ((jsonObj.get("reward_id") != null && !jsonObj.get("reward_id").isJsonNull()) && !jsonObj.get("reward_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reward_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reward_id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -529,10 +512,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { diff --git a/src/main/java/voucherify/client/model/Session.java b/src/main/java/voucherify/client/model/Session.java index 4cf1b766..86ddd095 100644 --- a/src/main/java/voucherify/client/model/Session.java +++ b/src/main/java/voucherify/client/model/Session.java @@ -58,9 +58,7 @@ public class Session { */ @JsonAdapter(KeyEnum.Adapter.class) public enum KeyEnum { - LOCK("LOCK"), - - UNKNOWN_ENUM("unknown_enum"); + LOCK("LOCK"); private String value; @@ -83,7 +81,7 @@ public static KeyEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -109,9 +107,7 @@ public KeyEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - LOCK("LOCK"), - - UNKNOWN_ENUM("unknown_enum"); + LOCK("LOCK"); private String value; @@ -134,7 +130,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -176,9 +172,7 @@ public enum TtlUnitEnum { NANOSECONDS("NANOSECONDS"), - SECONDS("SECONDS"), - - UNKNOWN_ENUM("unknown_enum"); + SECONDS("SECONDS"); private String value; @@ -201,7 +195,7 @@ public static TtlUnitEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/SimpleCustomer.java b/src/main/java/voucherify/client/model/SimpleCustomer.java index afea2396..0175d967 100644 --- a/src/main/java/voucherify/client/model/SimpleCustomer.java +++ b/src/main/java/voucherify/client/model/SimpleCustomer.java @@ -77,9 +77,7 @@ public class SimpleCustomer { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CUSTOMER("customer"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOMER("customer"); private String value; @@ -102,7 +100,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/SimpleCustomerRequiredObjectType.java b/src/main/java/voucherify/client/model/SimpleCustomerRequiredObjectType.java index d7871129..ddf6ccce 100644 --- a/src/main/java/voucherify/client/model/SimpleCustomerRequiredObjectType.java +++ b/src/main/java/voucherify/client/model/SimpleCustomerRequiredObjectType.java @@ -194,7 +194,7 @@ public SimpleCustomerRequiredObjectType _object(String _object) { * The type of the object represented by the JSON. This object stores information about the customer. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -315,7 +315,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); } /** @@ -330,13 +329,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in SimpleCustomerRequiredObjectType is not found in the empty JSON string", SimpleCustomerRequiredObjectType.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SimpleCustomerRequiredObjectType.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); @@ -350,7 +342,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } } diff --git a/src/main/java/voucherify/client/model/SimpleLoyaltyCard.java b/src/main/java/voucherify/client/model/SimpleLoyaltyCard.java index 895c3161..7dcc897f 100644 --- a/src/main/java/voucherify/client/model/SimpleLoyaltyCard.java +++ b/src/main/java/voucherify/client/model/SimpleLoyaltyCard.java @@ -81,7 +81,7 @@ public SimpleLoyaltyCard points(Integer points) { * Total points incurred over lifespan of loyalty card. * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPoints() { return points; } @@ -102,7 +102,7 @@ public SimpleLoyaltyCard balance(Integer balance) { * Points available for reward redemption. * @return balance **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getBalance() { return balance; } @@ -259,8 +259,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("points"); - openapiRequiredFields.add("balance"); } /** @@ -275,13 +273,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in SimpleLoyaltyCard is not found in the empty JSON string", SimpleLoyaltyCard.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SimpleLoyaltyCard.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("next_expiration_date") != null && !jsonObj.get("next_expiration_date").isJsonNull()) && !jsonObj.get("next_expiration_date").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `next_expiration_date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("next_expiration_date").toString())); diff --git a/src/main/java/voucherify/client/model/SimpleProductDiscountUnit.java b/src/main/java/voucherify/client/model/SimpleProductDiscountUnit.java index 9661ae65..0a5a74af 100644 --- a/src/main/java/voucherify/client/model/SimpleProductDiscountUnit.java +++ b/src/main/java/voucherify/client/model/SimpleProductDiscountUnit.java @@ -77,7 +77,7 @@ public SimpleProductDiscountUnit id(String id) { * Unique product ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -119,7 +119,7 @@ public SimpleProductDiscountUnit name(String name) { * Product name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -231,8 +231,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); } /** @@ -247,21 +245,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in SimpleProductDiscountUnit is not found in the empty JSON string", SimpleProductDiscountUnit.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SimpleProductDiscountUnit.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } diff --git a/src/main/java/voucherify/client/model/SimpleSegment.java b/src/main/java/voucherify/client/model/SimpleSegment.java index 57a1edaa..7779c605 100644 --- a/src/main/java/voucherify/client/model/SimpleSegment.java +++ b/src/main/java/voucherify/client/model/SimpleSegment.java @@ -65,9 +65,7 @@ public class SimpleSegment { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - SEGMENT("segment"), - - UNKNOWN_ENUM("unknown_enum"); + SEGMENT("segment"); private String value; @@ -90,7 +88,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -124,7 +122,7 @@ public SimpleSegment id(String id) { * Unique segment ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -145,7 +143,7 @@ public SimpleSegment name(String name) { * Segment name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -166,7 +164,7 @@ public SimpleSegment _object(ObjectEnum _object) { * The type of the object represented by the ID. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -278,9 +276,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("object"); } /** @@ -295,21 +290,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in SimpleSegment is not found in the empty JSON string", SimpleSegment.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SimpleSegment.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/SimpleSkuDiscountUnit.java b/src/main/java/voucherify/client/model/SimpleSkuDiscountUnit.java index 113a32ca..9e80b3d1 100644 --- a/src/main/java/voucherify/client/model/SimpleSkuDiscountUnit.java +++ b/src/main/java/voucherify/client/model/SimpleSkuDiscountUnit.java @@ -77,7 +77,7 @@ public SimpleSkuDiscountUnit id(String id) { * Unique SKU ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -119,7 +119,7 @@ public SimpleSkuDiscountUnit name(String name) { * Sku name * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -231,8 +231,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); } /** @@ -247,21 +245,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in SimpleSkuDiscountUnit is not found in the empty JSON string", SimpleSkuDiscountUnit.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SimpleSkuDiscountUnit.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } diff --git a/src/main/java/voucherify/client/model/SimpleVoucher.java b/src/main/java/voucherify/client/model/SimpleVoucher.java index 89b9f2a4..9ef97e29 100644 --- a/src/main/java/voucherify/client/model/SimpleVoucher.java +++ b/src/main/java/voucherify/client/model/SimpleVoucher.java @@ -90,9 +90,7 @@ public enum TypeEnum { LOYALTY_CARD("LOYALTY_CARD"), - GIFT_VOUCHER("GIFT_VOUCHER"), - - UNKNOWN_ENUM("unknown_enum"); + GIFT_VOUCHER("GIFT_VOUCHER"); private String value; @@ -115,7 +113,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -197,9 +195,7 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - VOUCHER("voucher"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER("voucher"); private String value; @@ -222,7 +218,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -277,7 +273,7 @@ public SimpleVoucher code(String code) { * Voucher code. * @return code **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCode() { return code; } @@ -361,7 +357,7 @@ public SimpleVoucher type(TypeEnum type) { * Type of the voucher. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -558,7 +554,7 @@ public SimpleVoucher createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the order was created. Timestamp is presented in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -684,7 +680,7 @@ public SimpleVoucher _object(ObjectEnum _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -861,10 +857,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("code"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -879,18 +871,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in SimpleVoucher is not found in the empty JSON string", SimpleVoucher.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SimpleVoucher.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("code").isJsonPrimitive()) { + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } // validate the optional field `gift` @@ -905,7 +890,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("loyalty_card") != null && !jsonObj.get("loyalty_card").isJsonNull()) { SimpleLoyaltyCard.validateJsonElement(jsonObj.get("loyalty_card")); } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -954,7 +939,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("redemption") != null && !jsonObj.get("redemption").isJsonNull()) { SimpleVoucherRedemption.validateJsonElement(jsonObj.get("redemption")); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/SimpleVoucherRedemption.java b/src/main/java/voucherify/client/model/SimpleVoucherRedemption.java index 7f3003f8..23c5f473 100644 --- a/src/main/java/voucherify/client/model/SimpleVoucherRedemption.java +++ b/src/main/java/voucherify/client/model/SimpleVoucherRedemption.java @@ -95,7 +95,7 @@ public SimpleVoucherRedemption redeemedQuantity(Integer redeemedQuantity) { * How many times a voucher has already been redeemed. * @return redeemedQuantity **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getRedeemedQuantity() { return redeemedQuantity; } @@ -215,7 +215,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("redeemed_quantity"); } /** @@ -230,13 +229,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in SimpleVoucherRedemption is not found in the empty JSON string", SimpleVoucherRedemption.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SimpleVoucherRedemption.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); } diff --git a/src/main/java/voucherify/client/model/Sku.java b/src/main/java/voucherify/client/model/Sku.java index 86e6be37..b58be1ff 100644 --- a/src/main/java/voucherify/client/model/Sku.java +++ b/src/main/java/voucherify/client/model/Sku.java @@ -103,9 +103,7 @@ public class Sku { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - SKU("sku"), - - UNKNOWN_ENUM("unknown_enum"); + SKU("sku"); private String value; @@ -128,7 +126,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -162,7 +160,7 @@ public Sku id(String id) { * A unique identifier that represents the SKU and is assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -204,7 +202,7 @@ public Sku productId(String productId) { * The parent product's unique ID. * @return productId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getProductId() { return productId; } @@ -288,7 +286,7 @@ public Sku attributes(Object attributes) { * The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. * @return attributes **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getAttributes() { return attributes; } @@ -330,7 +328,7 @@ public Sku metadata(Object metadata) { * The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -351,7 +349,7 @@ public Sku createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -393,7 +391,7 @@ public Sku _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the `SKU`. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -543,12 +541,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("product_id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -563,21 +555,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in Sku is not found in the empty JSON string", Sku.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Sku.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); } - if (!jsonObj.get("product_id").isJsonPrimitive()) { + if ((jsonObj.get("product_id") != null && !jsonObj.get("product_id").isJsonNull()) && !jsonObj.get("product_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `product_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product_id").toString())); } if ((jsonObj.get("sku") != null && !jsonObj.get("sku").isJsonNull()) && !jsonObj.get("sku").isJsonPrimitive()) { @@ -589,7 +574,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/SkusGetResponseBody.java b/src/main/java/voucherify/client/model/SkusGetResponseBody.java index abfd47ef..95c9fb53 100644 --- a/src/main/java/voucherify/client/model/SkusGetResponseBody.java +++ b/src/main/java/voucherify/client/model/SkusGetResponseBody.java @@ -103,9 +103,7 @@ public class SkusGetResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - SKU("sku"), - - UNKNOWN_ENUM("unknown_enum"); + SKU("sku"); private String value; @@ -128,7 +126,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -162,7 +160,7 @@ public SkusGetResponseBody id(String id) { * A unique identifier that represents the SKU and is assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -204,7 +202,7 @@ public SkusGetResponseBody productId(String productId) { * The parent product's unique ID. * @return productId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getProductId() { return productId; } @@ -288,7 +286,7 @@ public SkusGetResponseBody attributes(Object attributes) { * The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. * @return attributes **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getAttributes() { return attributes; } @@ -330,7 +328,7 @@ public SkusGetResponseBody metadata(Object metadata) { * The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. * @return metadata **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getMetadata() { return metadata; } @@ -351,7 +349,7 @@ public SkusGetResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -393,7 +391,7 @@ public SkusGetResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about the `SKU`. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -543,12 +541,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("product_id"); - openapiRequiredFields.add("attributes"); - openapiRequiredFields.add("metadata"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -563,21 +555,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in SkusGetResponseBody is not found in the empty JSON string", SkusGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SkusGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); } - if (!jsonObj.get("product_id").isJsonPrimitive()) { + if ((jsonObj.get("product_id") != null && !jsonObj.get("product_id").isJsonNull()) && !jsonObj.get("product_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `product_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product_id").toString())); } if ((jsonObj.get("sku") != null && !jsonObj.get("sku").isJsonNull()) && !jsonObj.get("sku").isJsonPrimitive()) { @@ -589,7 +574,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/SkusImportCsvCreateResponseBody.java b/src/main/java/voucherify/client/model/SkusImportCsvCreateResponseBody.java index 24b7fdd7..2dc732fa 100644 --- a/src/main/java/voucherify/client/model/SkusImportCsvCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/SkusImportCsvCreateResponseBody.java @@ -69,7 +69,7 @@ public SkusImportCsvCreateResponseBody asyncActionId(String asyncActionId) { * The ID of the scheduled asynchronous action. * @return asyncActionId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAsyncActionId() { return asyncActionId; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("async_action_id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in SkusImportCsvCreateResponseBody is not found in the empty JSON string", SkusImportCsvCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SkusImportCsvCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("async_action_id").isJsonPrimitive()) { + if ((jsonObj.get("async_action_id") != null && !jsonObj.get("async_action_id").isJsonNull()) && !jsonObj.get("async_action_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `async_action_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_action_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/SkusList.java b/src/main/java/voucherify/client/model/SkusList.java index c48e50d2..87f86738 100644 --- a/src/main/java/voucherify/client/model/SkusList.java +++ b/src/main/java/voucherify/client/model/SkusList.java @@ -65,7 +65,7 @@ public class SkusList { public static final String SERIALIZED_NAME_SKUS = "skus"; @SerializedName(SERIALIZED_NAME_SKUS) - private List skus = new ArrayList<>(); + private List skus; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public SkusList _object(String _object) { * The type of the object represented by JSON. This object stores information about SKUs. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public SkusList dataRef(String dataRef) { * Identifies the name of the JSON property that contains the array of SKUs. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public SkusList addSkusItem(Sku skusItem) { * A dictionary that contains an array of SKUs. * @return skus **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getSkus() { return skus; } @@ -155,7 +155,7 @@ public SkusList total(Integer total) { * Total number of SKUs in the product. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("skus"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in SkusList is not found in the empty JSON string", SkusList.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SkusList.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("skus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `skus` to be an array in the JSON string but got `%s`", jsonObj.get("skus").toString())); + if (jsonObj.get("skus") != null && !jsonObj.get("skus").isJsonNull()) { + JsonArray jsonArrayskus = jsonObj.getAsJsonArray("skus"); + if (jsonArrayskus != null) { + // ensure the json data is an array + if (!jsonObj.get("skus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `skus` to be an array in the JSON string but got `%s`", jsonObj.get("skus").toString())); + } + + // validate the optional field `skus` (array) + for (int i = 0; i < jsonArrayskus.size(); i++) { + Sku.validateJsonElement(jsonArrayskus.get(i)); + }; + } } - - JsonArray jsonArrayskus = jsonObj.getAsJsonArray("skus"); - // validate the required field `skus` (array) - for (int i = 0; i < jsonArrayskus.size(); i++) { - Sku.validateJsonElement(jsonArrayskus.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/SkusListForProduct.java b/src/main/java/voucherify/client/model/SkusListForProduct.java index a1f18bdd..c513c92b 100644 --- a/src/main/java/voucherify/client/model/SkusListForProduct.java +++ b/src/main/java/voucherify/client/model/SkusListForProduct.java @@ -65,7 +65,7 @@ public class SkusListForProduct { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public SkusListForProduct _object(String _object) { * The type of the object represented by JSON. This object stores information about SKUs. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public SkusListForProduct dataRef(String dataRef) { * Identifies the name of the JSON property that contains the array of SKUs. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public SkusListForProduct addDataItem(Sku dataItem) { * A dictionary that contains an array of SKUs. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -155,7 +155,7 @@ public SkusListForProduct total(Integer total) { * Total number of SKUs in the product. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in SkusListForProduct is not found in the empty JSON string", SkusListForProduct.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SkusListForProduct.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + Sku.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Sku.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/StackableValidateRedeemBase.java b/src/main/java/voucherify/client/model/StackableValidateRedeemBase.java index a67abe31..539b5e53 100644 --- a/src/main/java/voucherify/client/model/StackableValidateRedeemBase.java +++ b/src/main/java/voucherify/client/model/StackableValidateRedeemBase.java @@ -60,7 +60,7 @@ public class StackableValidateRedeemBase { public static final String SERIALIZED_NAME_REDEEMABLES = "redeemables"; @SerializedName(SERIALIZED_NAME_REDEEMABLES) - private List redeemables = new ArrayList<>(); + private List redeemables; public static final String SERIALIZED_NAME_ORDER = "order"; @SerializedName(SERIALIZED_NAME_ORDER) @@ -103,7 +103,7 @@ public StackableValidateRedeemBase addRedeemablesItem(StackableValidateRedeemBas * Get redeemables * @return redeemables **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getRedeemables() { return redeemables; } @@ -329,7 +329,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("redeemables"); } /** @@ -344,24 +343,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in StackableValidateRedeemBase is not found in the empty JSON string", StackableValidateRedeemBase.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StackableValidateRedeemBase.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("redeemables").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `redeemables` to be an array in the JSON string but got `%s`", jsonObj.get("redeemables").toString())); + if (jsonObj.get("redeemables") != null && !jsonObj.get("redeemables").isJsonNull()) { + JsonArray jsonArrayredeemables = jsonObj.getAsJsonArray("redeemables"); + if (jsonArrayredeemables != null) { + // ensure the json data is an array + if (!jsonObj.get("redeemables").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `redeemables` to be an array in the JSON string but got `%s`", jsonObj.get("redeemables").toString())); + } + + // validate the optional field `redeemables` (array) + for (int i = 0; i < jsonArrayredeemables.size(); i++) { + StackableValidateRedeemBaseRedeemablesItem.validateJsonElement(jsonArrayredeemables.get(i)); + }; + } } - - JsonArray jsonArrayredeemables = jsonObj.getAsJsonArray("redeemables"); - // validate the required field `redeemables` (array) - for (int i = 0; i < jsonArrayredeemables.size(); i++) { - StackableValidateRedeemBaseRedeemablesItem.validateJsonElement(jsonArrayredeemables.get(i)); - }; // validate the optional field `order` if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { Order.validateJsonElement(jsonObj.get("order")); diff --git a/src/main/java/voucherify/client/model/StackableValidateRedeemBaseRedeemablesItem.java b/src/main/java/voucherify/client/model/StackableValidateRedeemBaseRedeemablesItem.java index 5086f634..95502ea8 100644 --- a/src/main/java/voucherify/client/model/StackableValidateRedeemBaseRedeemablesItem.java +++ b/src/main/java/voucherify/client/model/StackableValidateRedeemBaseRedeemablesItem.java @@ -63,9 +63,7 @@ public enum ObjectEnum { PROMOTION_TIER("promotion_tier"), - PROMOTION_STACK("promotion_stack"), - - UNKNOWN_ENUM("unknown_enum"); + PROMOTION_STACK("promotion_stack"); private String value; @@ -88,7 +86,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/StackingRules.java b/src/main/java/voucherify/client/model/StackingRules.java index 037b1429..bcb092dd 100644 --- a/src/main/java/voucherify/client/model/StackingRules.java +++ b/src/main/java/voucherify/client/model/StackingRules.java @@ -89,9 +89,7 @@ public class StackingRules { public enum RedeemablesApplicationModeEnum { ALL("ALL"), - PARTIAL("PARTIAL"), - - UNKNOWN_ENUM("unknown_enum"); + PARTIAL("PARTIAL"); private String value; @@ -114,7 +112,7 @@ public static RedeemablesApplicationModeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -142,9 +140,7 @@ public RedeemablesApplicationModeEnum read(final JsonReader jsonReader) throws I public enum RedeemablesSortingRuleEnum { CATEGORY_HIERARCHY("CATEGORY_HIERARCHY"), - REQUESTED_ORDER("REQUESTED_ORDER"), - - UNKNOWN_ENUM("unknown_enum"); + REQUESTED_ORDER("REQUESTED_ORDER"); private String value; @@ -167,7 +163,7 @@ public static RedeemablesSortingRuleEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -203,7 +199,7 @@ public StackingRules redeemablesLimit(Integer redeemablesLimit) { * maximum: 30 * @return redeemablesLimit **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getRedeemablesLimit() { return redeemablesLimit; } @@ -226,7 +222,7 @@ public StackingRules applicableRedeemablesLimit(Integer applicableRedeemablesLim * maximum: 30 * @return applicableRedeemablesLimit **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getApplicableRedeemablesLimit() { return applicableRedeemablesLimit; } @@ -272,7 +268,7 @@ public StackingRules applicableExclusiveRedeemablesLimit(Integer applicableExclu * maximum: 5 * @return applicableExclusiveRedeemablesLimit **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getApplicableExclusiveRedeemablesLimit() { return applicableExclusiveRedeemablesLimit; } @@ -324,7 +320,7 @@ public StackingRules addExclusiveCategoriesItem(String exclusiveCategoriesItem) * Lists all exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint. * @return exclusiveCategories **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getExclusiveCategories() { return exclusiveCategories; } @@ -353,7 +349,7 @@ public StackingRules addJointCategoriesItem(String jointCategoriesItem) { * Lists all joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns. * @return jointCategories **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getJointCategories() { return jointCategories; } @@ -374,7 +370,7 @@ public StackingRules redeemablesApplicationMode(RedeemablesApplicationModeEnum r * Defines redeemables application mode. * @return redeemablesApplicationMode **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RedeemablesApplicationModeEnum getRedeemablesApplicationMode() { return redeemablesApplicationMode; } @@ -395,7 +391,7 @@ public StackingRules redeemablesSortingRule(RedeemablesSortingRuleEnum redeemabl * Defines redeemables sorting rule. * @return redeemablesSortingRule **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RedeemablesSortingRuleEnum getRedeemablesSortingRule() { return redeemablesSortingRule; } @@ -525,13 +521,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("redeemables_limit"); - openapiRequiredFields.add("applicable_redeemables_limit"); - openapiRequiredFields.add("applicable_exclusive_redeemables_limit"); - openapiRequiredFields.add("exclusive_categories"); - openapiRequiredFields.add("joint_categories"); - openapiRequiredFields.add("redeemables_application_mode"); - openapiRequiredFields.add("redeemables_sorting_rule"); } /** @@ -546,27 +535,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in StackingRules is not found in the empty JSON string", StackingRules.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : StackingRules.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the required json array is present - if (jsonObj.get("exclusive_categories") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("exclusive_categories").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("exclusive_categories") != null && !jsonObj.get("exclusive_categories").isJsonNull() && !jsonObj.get("exclusive_categories").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `exclusive_categories` to be an array in the JSON string but got `%s`", jsonObj.get("exclusive_categories").toString())); } - // ensure the required json array is present - if (jsonObj.get("joint_categories") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("joint_categories").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("joint_categories") != null && !jsonObj.get("joint_categories").isJsonNull() && !jsonObj.get("joint_categories").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `joint_categories` to be an array in the JSON string but got `%s`", jsonObj.get("joint_categories").toString())); } - if (!jsonObj.get("redeemables_application_mode").isJsonPrimitive()) { + if ((jsonObj.get("redeemables_application_mode") != null && !jsonObj.get("redeemables_application_mode").isJsonNull()) && !jsonObj.get("redeemables_application_mode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redeemables_application_mode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redeemables_application_mode").toString())); } try { @@ -582,7 +560,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `redeemables_application_mode` to be a valid element of RedeemablesApplicationModeEnum enum got `%s` instead", jsonObj.get("redeemables_application_mode").toString())); } } - if (!jsonObj.get("redeemables_sorting_rule").isJsonPrimitive()) { + if ((jsonObj.get("redeemables_sorting_rule") != null && !jsonObj.get("redeemables_sorting_rule").isJsonNull()) && !jsonObj.get("redeemables_sorting_rule").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redeemables_sorting_rule` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redeemables_sorting_rule").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ValidationRule.java b/src/main/java/voucherify/client/model/ValidationRule.java index ebbd4090..2f2ba8ac 100644 --- a/src/main/java/voucherify/client/model/ValidationRule.java +++ b/src/main/java/voucherify/client/model/ValidationRule.java @@ -82,9 +82,7 @@ public enum TypeEnum { ADVANCED("advanced"), - COMPLEX("complex"), - - UNKNOWN_ENUM("unknown_enum"); + COMPLEX("complex"); private String value; @@ -107,7 +105,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -245,9 +243,7 @@ public enum ContextTypeEnum { REWARD_ASSIGNMENT_PAY_WITH_POINTS("reward_assignment.pay_with_points"), - GLOBAL("global"), - - UNKNOWN_ENUM("unknown_enum"); + GLOBAL("global"); private String value; @@ -270,7 +266,7 @@ public static ContextTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -324,7 +320,7 @@ public ValidationRule name(String name) { * Custom, unique name for set of validation rules. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -345,7 +341,7 @@ public ValidationRule rules(Object rules) { * Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. * @return rules **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getRules() { return rules; } @@ -387,7 +383,7 @@ public ValidationRule applicableTo(ValidationRuleBaseApplicableTo applicableTo) * Get applicableTo * @return applicableTo **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ValidationRuleBaseApplicableTo getApplicableTo() { return applicableTo; } @@ -408,7 +404,7 @@ public ValidationRule type(TypeEnum type) { * Type of validation rule. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -429,7 +425,7 @@ public ValidationRule contextType(ContextTypeEnum contextType) { * Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | * @return contextType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ContextTypeEnum getContextType() { return contextType; } @@ -450,7 +446,7 @@ public ValidationRule id(String id) { * Unique validation rule ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -471,7 +467,7 @@ public ValidationRule createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -534,7 +530,7 @@ public ValidationRule _object(String _object) { * The type of the object represented by JSON. This object stores information about the validation rule. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -670,14 +666,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("rules"); - openapiRequiredFields.add("applicable_to"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("context_type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -692,24 +680,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationRule is not found in the empty JSON string", ValidationRule.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationRule.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the optional field `error` if (jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) { ValidationRuleBaseError.validateJsonElement(jsonObj.get("error")); } - // validate the required field `applicable_to` - ValidationRuleBaseApplicableTo.validateJsonElement(jsonObj.get("applicable_to")); - if (!jsonObj.get("type").isJsonPrimitive()) { + // validate the optional field `applicable_to` + if (jsonObj.get("applicable_to") != null && !jsonObj.get("applicable_to").isJsonNull()) { + ValidationRuleBaseApplicableTo.validateJsonElement(jsonObj.get("applicable_to")); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -725,7 +708,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `type` to be a valid element of TypeEnum enum got `%s` instead", jsonObj.get("type").toString())); } } - if (!jsonObj.get("context_type").isJsonPrimitive()) { + if ((jsonObj.get("context_type") != null && !jsonObj.get("context_type").isJsonNull()) && !jsonObj.get("context_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `context_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("context_type").toString())); } try { @@ -741,10 +724,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `context_type` to be a valid element of ContextTypeEnum enum got `%s` instead", jsonObj.get("context_type").toString())); } } - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } } diff --git a/src/main/java/voucherify/client/model/ValidationRuleAssignment.java b/src/main/java/voucherify/client/model/ValidationRuleAssignment.java index 9388dcd9..e4244772 100644 --- a/src/main/java/voucherify/client/model/ValidationRuleAssignment.java +++ b/src/main/java/voucherify/client/model/ValidationRuleAssignment.java @@ -80,9 +80,7 @@ public enum RelatedObjectTypeEnum { PROMOTION_TIER("promotion_tier"), - DISTRIBUTION("distribution"), - - UNKNOWN_ENUM("unknown_enum"); + DISTRIBUTION("distribution"); private String value; @@ -105,7 +103,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -135,9 +133,7 @@ public RelatedObjectTypeEnum read(final JsonReader jsonReader) throws IOExceptio */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - VALIDATION_RULES_ASSIGNMENT("validation_rules_assignment"), - - UNKNOWN_ENUM("unknown_enum"); + VALIDATION_RULES_ASSIGNMENT("validation_rules_assignment"); private String value; @@ -160,7 +156,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -194,7 +190,7 @@ public ValidationRuleAssignment id(String id) { * Validation rule assignment ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -215,7 +211,7 @@ public ValidationRuleAssignment ruleId(String ruleId) { * Validation rule ID. * @return ruleId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRuleId() { return ruleId; } @@ -236,7 +232,7 @@ public ValidationRuleAssignment relatedObjectId(String relatedObjectId) { * The resource ID to which the validation rule was assigned. * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -257,7 +253,7 @@ public ValidationRuleAssignment relatedObjectType(RelatedObjectTypeEnum relatedO * The type of resource to which the validation rule was assigned. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -278,7 +274,7 @@ public ValidationRuleAssignment createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -299,7 +295,7 @@ public ValidationRuleAssignment _object(ObjectEnum _object) { * The type of the object represented by the ID. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -420,12 +416,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("rule_id"); - openapiRequiredFields.add("related_object_id"); - openapiRequiredFields.add("related_object_type"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -440,24 +430,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationRuleAssignment is not found in the empty JSON string", ValidationRuleAssignment.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationRuleAssignment.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("rule_id").isJsonPrimitive()) { + if ((jsonObj.get("rule_id") != null && !jsonObj.get("rule_id").isJsonNull()) && !jsonObj.get("rule_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `rule_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rule_id").toString())); } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { @@ -473,7 +456,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a valid element of RelatedObjectTypeEnum enum got `%s` instead", jsonObj.get("related_object_type").toString())); } } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ValidationRuleAssignmentsList.java b/src/main/java/voucherify/client/model/ValidationRuleAssignmentsList.java index 3d2ea1e0..071d319f 100644 --- a/src/main/java/voucherify/client/model/ValidationRuleAssignmentsList.java +++ b/src/main/java/voucherify/client/model/ValidationRuleAssignmentsList.java @@ -65,7 +65,7 @@ public class ValidationRuleAssignmentsList { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public ValidationRuleAssignmentsList _object(String _object) { * The type of the object represented by JSON. This object stores information about validation rule assignments. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public ValidationRuleAssignmentsList dataRef(String dataRef) { * Identifies the name of the JSON property that contains the array of validation rule assignments. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public ValidationRuleAssignmentsList addDataItem(ValidationRuleAssignment dataIt * A dictionary that contains an array of validation rule assignments. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -155,7 +155,7 @@ public ValidationRuleAssignmentsList total(Integer total) { * Total number of validation rule assignments. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationRuleAssignmentsList is not found in the empty JSON string", ValidationRuleAssignmentsList.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationRuleAssignmentsList.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ValidationRuleAssignment.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ValidationRuleAssignment.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/ValidationRuleBase.java b/src/main/java/voucherify/client/model/ValidationRuleBase.java index 97df314b..00cf54a9 100644 --- a/src/main/java/voucherify/client/model/ValidationRuleBase.java +++ b/src/main/java/voucherify/client/model/ValidationRuleBase.java @@ -81,9 +81,7 @@ public enum TypeEnum { ADVANCED("advanced"), - COMPLEX("complex"), - - UNKNOWN_ENUM("unknown_enum"); + COMPLEX("complex"); private String value; @@ -106,7 +104,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -244,9 +242,7 @@ public enum ContextTypeEnum { REWARD_ASSIGNMENT_PAY_WITH_POINTS("reward_assignment.pay_with_points"), - GLOBAL("global"), - - UNKNOWN_ENUM("unknown_enum"); + GLOBAL("global"); private String value; @@ -269,7 +265,7 @@ public static ContextTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ValidationRulesAssignmentsCreateRequestBody.java b/src/main/java/voucherify/client/model/ValidationRulesAssignmentsCreateRequestBody.java index a381fa09..249d9236 100644 --- a/src/main/java/voucherify/client/model/ValidationRulesAssignmentsCreateRequestBody.java +++ b/src/main/java/voucherify/client/model/ValidationRulesAssignmentsCreateRequestBody.java @@ -67,9 +67,7 @@ public enum RelatedObjectTypeEnum { DISTRIBUTION("distribution"), - REWARD_ASSIGNMENT("reward_assignment"), - - UNKNOWN_ENUM("unknown_enum"); + REWARD_ASSIGNMENT("reward_assignment"); private String value; @@ -92,7 +90,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ValidationRulesAssignmentsCreateResponseBody.java b/src/main/java/voucherify/client/model/ValidationRulesAssignmentsCreateResponseBody.java index 07ebac66..7c0c2017 100644 --- a/src/main/java/voucherify/client/model/ValidationRulesAssignmentsCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/ValidationRulesAssignmentsCreateResponseBody.java @@ -80,9 +80,7 @@ public enum RelatedObjectTypeEnum { PROMOTION_TIER("promotion_tier"), - DISTRIBUTION("distribution"), - - UNKNOWN_ENUM("unknown_enum"); + DISTRIBUTION("distribution"); private String value; @@ -105,7 +103,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -135,9 +133,7 @@ public RelatedObjectTypeEnum read(final JsonReader jsonReader) throws IOExceptio */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - VALIDATION_RULES_ASSIGNMENT("validation_rules_assignment"), - - UNKNOWN_ENUM("unknown_enum"); + VALIDATION_RULES_ASSIGNMENT("validation_rules_assignment"); private String value; @@ -160,7 +156,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -194,7 +190,7 @@ public ValidationRulesAssignmentsCreateResponseBody id(String id) { * Validation rule assignment ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -215,7 +211,7 @@ public ValidationRulesAssignmentsCreateResponseBody ruleId(String ruleId) { * Validation rule ID. * @return ruleId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRuleId() { return ruleId; } @@ -236,7 +232,7 @@ public ValidationRulesAssignmentsCreateResponseBody relatedObjectId(String relat * The resource ID to which the validation rule was assigned. * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -257,7 +253,7 @@ public ValidationRulesAssignmentsCreateResponseBody relatedObjectType(RelatedObj * The type of resource to which the validation rule was assigned. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -278,7 +274,7 @@ public ValidationRulesAssignmentsCreateResponseBody createdAt(OffsetDateTime cre * Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -299,7 +295,7 @@ public ValidationRulesAssignmentsCreateResponseBody _object(ObjectEnum _object) * The type of the object represented by the ID. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -420,12 +416,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("rule_id"); - openapiRequiredFields.add("related_object_id"); - openapiRequiredFields.add("related_object_type"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -440,24 +430,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationRulesAssignmentsCreateResponseBody is not found in the empty JSON string", ValidationRulesAssignmentsCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationRulesAssignmentsCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("rule_id").isJsonPrimitive()) { + if ((jsonObj.get("rule_id") != null && !jsonObj.get("rule_id").isJsonNull()) && !jsonObj.get("rule_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `rule_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rule_id").toString())); } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { @@ -473,7 +456,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a valid element of RelatedObjectTypeEnum enum got `%s` instead", jsonObj.get("related_object_type").toString())); } } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ValidationRulesAssignmentsList.java b/src/main/java/voucherify/client/model/ValidationRulesAssignmentsList.java index 0fafa53e..1d284873 100644 --- a/src/main/java/voucherify/client/model/ValidationRulesAssignmentsList.java +++ b/src/main/java/voucherify/client/model/ValidationRulesAssignmentsList.java @@ -60,9 +60,7 @@ public class ValidationRulesAssignmentsList { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - LIST("list"), - - UNKNOWN_ENUM("unknown_enum"); + LIST("list"); private String value; @@ -85,7 +83,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -111,9 +109,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(DataRefEnum.Adapter.class) public enum DataRefEnum { - DATA("data"), - - UNKNOWN_ENUM("unknown_enum"); + DATA("data"); private String value; @@ -136,7 +132,7 @@ public static DataRefEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -159,7 +155,7 @@ public DataRefEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -178,7 +174,7 @@ public ValidationRulesAssignmentsList _object(ObjectEnum _object) { * The type of the object represented by JSON. This object stores information about validation rules assignments. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -199,7 +195,7 @@ public ValidationRulesAssignmentsList dataRef(DataRefEnum dataRef) { * Identifies the name of the attribute that contains the array of validation rules assignments. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public DataRefEnum getDataRef() { return dataRef; } @@ -228,7 +224,7 @@ public ValidationRulesAssignmentsList addDataItem(BusValRuleAssignment dataItem) * Contains array of validation rules assignments. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -250,7 +246,7 @@ public ValidationRulesAssignmentsList total(Integer total) { * minimum: 0 * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -365,10 +361,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -383,15 +375,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationRulesAssignmentsList is not found in the empty JSON string", ValidationRulesAssignmentsList.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationRulesAssignmentsList.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -407,7 +392,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } try { @@ -423,16 +408,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a valid element of DataRefEnum enum got `%s` instead", jsonObj.get("data_ref").toString())); } } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + BusValRuleAssignment.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - BusValRuleAssignment.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/ValidationRulesAssignmentsListResponseBody.java b/src/main/java/voucherify/client/model/ValidationRulesAssignmentsListResponseBody.java index df8d4464..9763a436 100644 --- a/src/main/java/voucherify/client/model/ValidationRulesAssignmentsListResponseBody.java +++ b/src/main/java/voucherify/client/model/ValidationRulesAssignmentsListResponseBody.java @@ -65,7 +65,7 @@ public class ValidationRulesAssignmentsListResponseBody { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public ValidationRulesAssignmentsListResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about validation rule assignments. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public ValidationRulesAssignmentsListResponseBody dataRef(String dataRef) { * Identifies the name of the JSON property that contains the array of validation rule assignments. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public ValidationRulesAssignmentsListResponseBody addDataItem(ValidationRuleAssi * A dictionary that contains an array of validation rule assignments. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -155,7 +155,7 @@ public ValidationRulesAssignmentsListResponseBody total(Integer total) { * Total number of validation rule assignments. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationRulesAssignmentsListResponseBody is not found in the empty JSON string", ValidationRulesAssignmentsListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationRulesAssignmentsListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ValidationRuleAssignment.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ValidationRuleAssignment.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/ValidationRulesCreateRequestBody.java b/src/main/java/voucherify/client/model/ValidationRulesCreateRequestBody.java index b4d118fc..669b3648 100644 --- a/src/main/java/voucherify/client/model/ValidationRulesCreateRequestBody.java +++ b/src/main/java/voucherify/client/model/ValidationRulesCreateRequestBody.java @@ -81,9 +81,7 @@ public enum TypeEnum { ADVANCED("advanced"), - COMPLEX("complex"), - - UNKNOWN_ENUM("unknown_enum"); + COMPLEX("complex"); private String value; @@ -106,7 +104,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -244,9 +242,7 @@ public enum ContextTypeEnum { REWARD_ASSIGNMENT_PAY_WITH_POINTS("reward_assignment.pay_with_points"), - GLOBAL("global"), - - UNKNOWN_ENUM("unknown_enum"); + GLOBAL("global"); private String value; @@ -269,7 +265,7 @@ public static ContextTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ValidationRulesCreateResponseBody.java b/src/main/java/voucherify/client/model/ValidationRulesCreateResponseBody.java index 7df82f38..d9fba4c7 100644 --- a/src/main/java/voucherify/client/model/ValidationRulesCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/ValidationRulesCreateResponseBody.java @@ -82,9 +82,7 @@ public enum TypeEnum { ADVANCED("advanced"), - COMPLEX("complex"), - - UNKNOWN_ENUM("unknown_enum"); + COMPLEX("complex"); private String value; @@ -107,7 +105,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -245,9 +243,7 @@ public enum ContextTypeEnum { REWARD_ASSIGNMENT_PAY_WITH_POINTS("reward_assignment.pay_with_points"), - GLOBAL("global"), - - UNKNOWN_ENUM("unknown_enum"); + GLOBAL("global"); private String value; @@ -270,7 +266,7 @@ public static ContextTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -324,7 +320,7 @@ public ValidationRulesCreateResponseBody name(String name) { * Custom, unique name for set of validation rules. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -345,7 +341,7 @@ public ValidationRulesCreateResponseBody rules(Object rules) { * Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. * @return rules **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getRules() { return rules; } @@ -387,7 +383,7 @@ public ValidationRulesCreateResponseBody applicableTo(ValidationRuleBaseApplicab * Get applicableTo * @return applicableTo **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ValidationRuleBaseApplicableTo getApplicableTo() { return applicableTo; } @@ -408,7 +404,7 @@ public ValidationRulesCreateResponseBody type(TypeEnum type) { * Type of validation rule. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -429,7 +425,7 @@ public ValidationRulesCreateResponseBody contextType(ContextTypeEnum contextType * Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | * @return contextType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ContextTypeEnum getContextType() { return contextType; } @@ -450,7 +446,7 @@ public ValidationRulesCreateResponseBody id(String id) { * Unique validation rule ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -471,7 +467,7 @@ public ValidationRulesCreateResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -534,7 +530,7 @@ public ValidationRulesCreateResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about the validation rule. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -670,14 +666,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("rules"); - openapiRequiredFields.add("applicable_to"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("context_type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -692,24 +680,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationRulesCreateResponseBody is not found in the empty JSON string", ValidationRulesCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationRulesCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the optional field `error` if (jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) { ValidationRuleBaseError.validateJsonElement(jsonObj.get("error")); } - // validate the required field `applicable_to` - ValidationRuleBaseApplicableTo.validateJsonElement(jsonObj.get("applicable_to")); - if (!jsonObj.get("type").isJsonPrimitive()) { + // validate the optional field `applicable_to` + if (jsonObj.get("applicable_to") != null && !jsonObj.get("applicable_to").isJsonNull()) { + ValidationRuleBaseApplicableTo.validateJsonElement(jsonObj.get("applicable_to")); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -725,7 +708,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `type` to be a valid element of TypeEnum enum got `%s` instead", jsonObj.get("type").toString())); } } - if (!jsonObj.get("context_type").isJsonPrimitive()) { + if ((jsonObj.get("context_type") != null && !jsonObj.get("context_type").isJsonNull()) && !jsonObj.get("context_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `context_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("context_type").toString())); } try { @@ -741,10 +724,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `context_type` to be a valid element of ContextTypeEnum enum got `%s` instead", jsonObj.get("context_type").toString())); } } - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } } diff --git a/src/main/java/voucherify/client/model/ValidationRulesGetResponseBody.java b/src/main/java/voucherify/client/model/ValidationRulesGetResponseBody.java index 1fc8fcc2..4175a948 100644 --- a/src/main/java/voucherify/client/model/ValidationRulesGetResponseBody.java +++ b/src/main/java/voucherify/client/model/ValidationRulesGetResponseBody.java @@ -82,9 +82,7 @@ public enum TypeEnum { ADVANCED("advanced"), - COMPLEX("complex"), - - UNKNOWN_ENUM("unknown_enum"); + COMPLEX("complex"); private String value; @@ -107,7 +105,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -245,9 +243,7 @@ public enum ContextTypeEnum { REWARD_ASSIGNMENT_PAY_WITH_POINTS("reward_assignment.pay_with_points"), - GLOBAL("global"), - - UNKNOWN_ENUM("unknown_enum"); + GLOBAL("global"); private String value; @@ -270,7 +266,7 @@ public static ContextTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -324,7 +320,7 @@ public ValidationRulesGetResponseBody name(String name) { * Custom, unique name for set of validation rules. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -345,7 +341,7 @@ public ValidationRulesGetResponseBody rules(Object rules) { * Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. * @return rules **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getRules() { return rules; } @@ -387,7 +383,7 @@ public ValidationRulesGetResponseBody applicableTo(ValidationRuleBaseApplicableT * Get applicableTo * @return applicableTo **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ValidationRuleBaseApplicableTo getApplicableTo() { return applicableTo; } @@ -408,7 +404,7 @@ public ValidationRulesGetResponseBody type(TypeEnum type) { * Type of validation rule. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -429,7 +425,7 @@ public ValidationRulesGetResponseBody contextType(ContextTypeEnum contextType) { * Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | * @return contextType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ContextTypeEnum getContextType() { return contextType; } @@ -450,7 +446,7 @@ public ValidationRulesGetResponseBody id(String id) { * Unique validation rule ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -471,7 +467,7 @@ public ValidationRulesGetResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -534,7 +530,7 @@ public ValidationRulesGetResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about the validation rule. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -670,14 +666,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("rules"); - openapiRequiredFields.add("applicable_to"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("context_type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -692,24 +680,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationRulesGetResponseBody is not found in the empty JSON string", ValidationRulesGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationRulesGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the optional field `error` if (jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) { ValidationRuleBaseError.validateJsonElement(jsonObj.get("error")); } - // validate the required field `applicable_to` - ValidationRuleBaseApplicableTo.validateJsonElement(jsonObj.get("applicable_to")); - if (!jsonObj.get("type").isJsonPrimitive()) { + // validate the optional field `applicable_to` + if (jsonObj.get("applicable_to") != null && !jsonObj.get("applicable_to").isJsonNull()) { + ValidationRuleBaseApplicableTo.validateJsonElement(jsonObj.get("applicable_to")); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -725,7 +708,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `type` to be a valid element of TypeEnum enum got `%s` instead", jsonObj.get("type").toString())); } } - if (!jsonObj.get("context_type").isJsonPrimitive()) { + if ((jsonObj.get("context_type") != null && !jsonObj.get("context_type").isJsonNull()) && !jsonObj.get("context_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `context_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("context_type").toString())); } try { @@ -741,10 +724,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `context_type` to be a valid element of ContextTypeEnum enum got `%s` instead", jsonObj.get("context_type").toString())); } } - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } } diff --git a/src/main/java/voucherify/client/model/ValidationRulesListResponseBody.java b/src/main/java/voucherify/client/model/ValidationRulesListResponseBody.java index 21b99214..ad31eabc 100644 --- a/src/main/java/voucherify/client/model/ValidationRulesListResponseBody.java +++ b/src/main/java/voucherify/client/model/ValidationRulesListResponseBody.java @@ -65,7 +65,7 @@ public class ValidationRulesListResponseBody { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_TOTAL = "total"; @SerializedName(SERIALIZED_NAME_TOTAL) @@ -84,7 +84,7 @@ public ValidationRulesListResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about validation rules. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public ValidationRulesListResponseBody dataRef(String dataRef) { * Identifies the name of the attribute that contains the array of validation rules. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public ValidationRulesListResponseBody addDataItem(ValidationRule dataItem) { * An array of validation rules. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -155,7 +155,7 @@ public ValidationRulesListResponseBody total(Integer total) { * Total number of validation rules in the project. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("total"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationRulesListResponseBody is not found in the empty JSON string", ValidationRulesListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationRulesListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ValidationRule.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - ValidationRule.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/ValidationRulesUpdateRequestBody.java b/src/main/java/voucherify/client/model/ValidationRulesUpdateRequestBody.java index a5e5dc7f..e482a4ca 100644 --- a/src/main/java/voucherify/client/model/ValidationRulesUpdateRequestBody.java +++ b/src/main/java/voucherify/client/model/ValidationRulesUpdateRequestBody.java @@ -81,9 +81,7 @@ public enum TypeEnum { ADVANCED("advanced"), - COMPLEX("complex"), - - UNKNOWN_ENUM("unknown_enum"); + COMPLEX("complex"); private String value; @@ -106,7 +104,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -244,9 +242,7 @@ public enum ContextTypeEnum { REWARD_ASSIGNMENT_PAY_WITH_POINTS("reward_assignment.pay_with_points"), - GLOBAL("global"), - - UNKNOWN_ENUM("unknown_enum"); + GLOBAL("global"); private String value; @@ -269,7 +265,7 @@ public static ContextTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/ValidationRulesUpdateResponseBody.java b/src/main/java/voucherify/client/model/ValidationRulesUpdateResponseBody.java index eab43c2d..6bd89787 100644 --- a/src/main/java/voucherify/client/model/ValidationRulesUpdateResponseBody.java +++ b/src/main/java/voucherify/client/model/ValidationRulesUpdateResponseBody.java @@ -82,9 +82,7 @@ public enum TypeEnum { ADVANCED("advanced"), - COMPLEX("complex"), - - UNKNOWN_ENUM("unknown_enum"); + COMPLEX("complex"); private String value; @@ -107,7 +105,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -245,9 +243,7 @@ public enum ContextTypeEnum { REWARD_ASSIGNMENT_PAY_WITH_POINTS("reward_assignment.pay_with_points"), - GLOBAL("global"), - - UNKNOWN_ENUM("unknown_enum"); + GLOBAL("global"); private String value; @@ -270,7 +266,7 @@ public static ContextTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -324,7 +320,7 @@ public ValidationRulesUpdateResponseBody name(String name) { * Custom, unique name for set of validation rules. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -345,7 +341,7 @@ public ValidationRulesUpdateResponseBody rules(Object rules) { * Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. * @return rules **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Object getRules() { return rules; } @@ -387,7 +383,7 @@ public ValidationRulesUpdateResponseBody applicableTo(ValidationRuleBaseApplicab * Get applicableTo * @return applicableTo **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ValidationRuleBaseApplicableTo getApplicableTo() { return applicableTo; } @@ -408,7 +404,7 @@ public ValidationRulesUpdateResponseBody type(TypeEnum type) { * Type of validation rule. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -429,7 +425,7 @@ public ValidationRulesUpdateResponseBody contextType(ContextTypeEnum contextType * Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | * @return contextType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ContextTypeEnum getContextType() { return contextType; } @@ -450,7 +446,7 @@ public ValidationRulesUpdateResponseBody id(String id) { * Unique validation rule ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -471,7 +467,7 @@ public ValidationRulesUpdateResponseBody createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -534,7 +530,7 @@ public ValidationRulesUpdateResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about the validation rule. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -670,14 +666,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("rules"); - openapiRequiredFields.add("applicable_to"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("context_type"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("object"); } /** @@ -692,24 +680,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationRulesUpdateResponseBody is not found in the empty JSON string", ValidationRulesUpdateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationRulesUpdateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } // validate the optional field `error` if (jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) { ValidationRuleBaseError.validateJsonElement(jsonObj.get("error")); } - // validate the required field `applicable_to` - ValidationRuleBaseApplicableTo.validateJsonElement(jsonObj.get("applicable_to")); - if (!jsonObj.get("type").isJsonPrimitive()) { + // validate the optional field `applicable_to` + if (jsonObj.get("applicable_to") != null && !jsonObj.get("applicable_to").isJsonNull()) { + ValidationRuleBaseApplicableTo.validateJsonElement(jsonObj.get("applicable_to")); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -725,7 +708,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `type` to be a valid element of TypeEnum enum got `%s` instead", jsonObj.get("type").toString())); } } - if (!jsonObj.get("context_type").isJsonPrimitive()) { + if ((jsonObj.get("context_type") != null && !jsonObj.get("context_type").isJsonNull()) && !jsonObj.get("context_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `context_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("context_type").toString())); } try { @@ -741,10 +724,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `context_type` to be a valid element of ContextTypeEnum enum got `%s` instead", jsonObj.get("context_type").toString())); } } - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } } diff --git a/src/main/java/voucherify/client/model/ValidationsRedeemableInapplicable.java b/src/main/java/voucherify/client/model/ValidationsRedeemableInapplicable.java index 55e7372b..c34a73f7 100644 --- a/src/main/java/voucherify/client/model/ValidationsRedeemableInapplicable.java +++ b/src/main/java/voucherify/client/model/ValidationsRedeemableInapplicable.java @@ -61,9 +61,7 @@ public class ValidationsRedeemableInapplicable { */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - INAPPLICABLE("INAPPLICABLE"), - - UNKNOWN_ENUM("unknown_enum"); + INAPPLICABLE("INAPPLICABLE"); private String value; @@ -86,7 +84,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -118,9 +116,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { public enum ObjectEnum { VOUCHER("voucher"), - PROMOTION_TIER("promotion_tier"), - - UNKNOWN_ENUM("unknown_enum"); + PROMOTION_TIER("promotion_tier"); private String value; @@ -143,7 +139,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -189,7 +185,7 @@ public ValidationsRedeemableInapplicable status(StatusEnum status) { * Indicates whether the redeemable can be applied or not applied based on the validation rules. * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -210,7 +206,7 @@ public ValidationsRedeemableInapplicable id(String id) { * Redeemable ID, i.e. the voucher code. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -231,7 +227,7 @@ public ValidationsRedeemableInapplicable _object(ObjectEnum _object) { * Redeemable's object type. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -252,7 +248,7 @@ public ValidationsRedeemableInapplicable result(ValidationsRedeemableInapplicabl * Get result * @return result **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ValidationsRedeemableInapplicableResult getResult() { return result; } @@ -423,10 +419,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("result"); } /** @@ -441,15 +433,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationsRedeemableInapplicable is not found in the empty JSON string", ValidationsRedeemableInapplicable.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationsRedeemableInapplicable.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -465,10 +450,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `status` to be a valid element of StatusEnum enum got `%s` instead", jsonObj.get("status").toString())); } } - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -484,8 +469,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - // validate the required field `result` - ValidationsRedeemableInapplicableResult.validateJsonElement(jsonObj.get("result")); + // validate the optional field `result` + if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { + ValidationsRedeemableInapplicableResult.validateJsonElement(jsonObj.get("result")); + } if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull()) { JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); if (jsonArraycategories != null) { diff --git a/src/main/java/voucherify/client/model/ValidationsRedeemableSkipped.java b/src/main/java/voucherify/client/model/ValidationsRedeemableSkipped.java index b6434f59..574ecd7c 100644 --- a/src/main/java/voucherify/client/model/ValidationsRedeemableSkipped.java +++ b/src/main/java/voucherify/client/model/ValidationsRedeemableSkipped.java @@ -61,9 +61,7 @@ public class ValidationsRedeemableSkipped { */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - SKIPPED("SKIPPED"), - - UNKNOWN_ENUM("unknown_enum"); + SKIPPED("SKIPPED"); private String value; @@ -86,7 +84,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -118,9 +116,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { public enum ObjectEnum { VOUCHER("voucher"), - PROMOTION_TIER("promotion_tier"), - - UNKNOWN_ENUM("unknown_enum"); + PROMOTION_TIER("promotion_tier"); private String value; @@ -143,7 +139,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -189,7 +185,7 @@ public ValidationsRedeemableSkipped status(StatusEnum status) { * Indicates whether the redeemable can be applied or not applied based on the validation rules. * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -210,7 +206,7 @@ public ValidationsRedeemableSkipped id(String id) { * Redeemable ID, i.e. the voucher code. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -231,7 +227,7 @@ public ValidationsRedeemableSkipped _object(ObjectEnum _object) { * Redeemable's object type. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -252,7 +248,7 @@ public ValidationsRedeemableSkipped result(ValidationsRedeemableSkippedResult re * Get result * @return result **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ValidationsRedeemableSkippedResult getResult() { return result; } @@ -423,10 +419,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("result"); } /** @@ -441,15 +433,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationsRedeemableSkipped is not found in the empty JSON string", ValidationsRedeemableSkipped.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationsRedeemableSkipped.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -465,10 +450,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `status` to be a valid element of StatusEnum enum got `%s` instead", jsonObj.get("status").toString())); } } - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -484,8 +469,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - // validate the required field `result` - ValidationsRedeemableSkippedResult.validateJsonElement(jsonObj.get("result")); + // validate the optional field `result` + if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { + ValidationsRedeemableSkippedResult.validateJsonElement(jsonObj.get("result")); + } if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull()) { JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); if (jsonArraycategories != null) { diff --git a/src/main/java/voucherify/client/model/ValidationsRedeemableSkippedDetails.java b/src/main/java/voucherify/client/model/ValidationsRedeemableSkippedDetails.java index 0552d0af..b4ee38c5 100644 --- a/src/main/java/voucherify/client/model/ValidationsRedeemableSkippedDetails.java +++ b/src/main/java/voucherify/client/model/ValidationsRedeemableSkippedDetails.java @@ -67,9 +67,7 @@ public enum KeyEnum { EXCLUSION_RULES_NOT_MET("exclusion_rules_not_met"), - PRECEDING_VALIDATION_FAILED("preceding_validation_failed"), - - UNKNOWN_ENUM("unknown_enum"); + PRECEDING_VALIDATION_FAILED("preceding_validation_failed"); private String value; @@ -92,7 +90,7 @@ public static KeyEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -113,66 +111,9 @@ public KeyEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_KEY) private KeyEnum key; - /** - * Gets or Sets message - */ - @JsonAdapter(MessageEnum.Adapter.class) - public enum MessageEnum { - APPLICABLE_REDEEMABLES_LIMIT_EXCEEDED("Applicable redeemables limit exceeded"), - - APPLICABLE_REDEEMABLES_LIMIT_PER_CATEGORY_EXCEEDED("Applicable redeemables limit per category exceeded"), - - APPLICABLE_EXCLUSIVE_REDEEMABLES_LIMIT_EXCEEDED("Applicable exclusive redeemables limit exceeded"), - - APPLICABLE_EXCLUSIVE_REDEEMABLES_LIMIT_PER_CATEGORY_EXCEEDED("Applicable exclusive redeemables limit per category exceeded"), - - REDEEMABLE_CANNOT_BE_APPLIED_DUE_TO_EXCLUSION_RULES("Redeemable cannot be applied due to exclusion rules"), - - REDEEMABLE_CANNOT_BE_APPLIED_DUE_TO_PRECEDING_VALIDATION_FAILURE("Redeemable cannot be applied due to preceding validation failure"), - - UNKNOWN_ENUM("unknown_enum"); - - private String value; - - MessageEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MessageEnum fromValue(String value) { - for (MessageEnum b : MessageEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return UNKNOWN_ENUM; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MessageEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MessageEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MessageEnum.fromValue(value); - } - } - } - public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) - private MessageEnum message; + private String message; public ValidationsRedeemableSkippedDetails() { } @@ -198,7 +139,7 @@ public void setKey(KeyEnum key) { } - public ValidationsRedeemableSkippedDetails message(MessageEnum message) { + public ValidationsRedeemableSkippedDetails message(String message) { this.message = message; return this; @@ -209,12 +150,12 @@ public ValidationsRedeemableSkippedDetails message(MessageEnum message) { * @return message **/ @javax.annotation.Nullable - public MessageEnum getMessage() { + public String getMessage() { return message; } - public void setMessage(MessageEnum message) { + public void setMessage(String message) { this.message = message; } @@ -351,19 +292,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } - try { - JsonElement objectElement = jsonObj.get("message"); - - if (objectElement != null && !objectElement.isJsonNull()) { - MessageEnum.fromValue(objectElement.getAsString()); - } else { - throw new IllegalArgumentException("Expected the field `message` to be not null"); - } - } catch (IllegalArgumentException e) { - if(jsonObj.get("message") != null) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a valid element of MessageEnum enum got `%s` instead", jsonObj.get("message").toString())); - } - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/ValidationsValidateRequestBody.java b/src/main/java/voucherify/client/model/ValidationsValidateRequestBody.java index dc26e5bb..a3d932e9 100644 --- a/src/main/java/voucherify/client/model/ValidationsValidateRequestBody.java +++ b/src/main/java/voucherify/client/model/ValidationsValidateRequestBody.java @@ -61,7 +61,7 @@ public class ValidationsValidateRequestBody { public static final String SERIALIZED_NAME_REDEEMABLES = "redeemables"; @SerializedName(SERIALIZED_NAME_REDEEMABLES) - private List redeemables = new ArrayList<>(); + private List redeemables; public static final String SERIALIZED_NAME_ORDER = "order"; @SerializedName(SERIALIZED_NAME_ORDER) @@ -108,7 +108,7 @@ public ValidationsValidateRequestBody addRedeemablesItem(StackableValidateRedeem * Get redeemables * @return redeemables **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getRedeemables() { return redeemables; } @@ -358,7 +358,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("redeemables"); } /** @@ -373,24 +372,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationsValidateRequestBody is not found in the empty JSON string", ValidationsValidateRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationsValidateRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("redeemables").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `redeemables` to be an array in the JSON string but got `%s`", jsonObj.get("redeemables").toString())); + if (jsonObj.get("redeemables") != null && !jsonObj.get("redeemables").isJsonNull()) { + JsonArray jsonArrayredeemables = jsonObj.getAsJsonArray("redeemables"); + if (jsonArrayredeemables != null) { + // ensure the json data is an array + if (!jsonObj.get("redeemables").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `redeemables` to be an array in the JSON string but got `%s`", jsonObj.get("redeemables").toString())); + } + + // validate the optional field `redeemables` (array) + for (int i = 0; i < jsonArrayredeemables.size(); i++) { + StackableValidateRedeemBaseRedeemablesItem.validateJsonElement(jsonArrayredeemables.get(i)); + }; + } } - - JsonArray jsonArrayredeemables = jsonObj.getAsJsonArray("redeemables"); - // validate the required field `redeemables` (array) - for (int i = 0; i < jsonArrayredeemables.size(); i++) { - StackableValidateRedeemBaseRedeemablesItem.validateJsonElement(jsonArrayredeemables.get(i)); - }; // validate the optional field `order` if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { Order.validateJsonElement(jsonObj.get("order")); diff --git a/src/main/java/voucherify/client/model/ValidationsValidateResponseBody.java b/src/main/java/voucherify/client/model/ValidationsValidateResponseBody.java index 6275cb42..70083485 100644 --- a/src/main/java/voucherify/client/model/ValidationsValidateResponseBody.java +++ b/src/main/java/voucherify/client/model/ValidationsValidateResponseBody.java @@ -66,7 +66,7 @@ public class ValidationsValidateResponseBody { public static final String SERIALIZED_NAME_REDEEMABLES = "redeemables"; @SerializedName(SERIALIZED_NAME_REDEEMABLES) - private List redeemables = new ArrayList<>(); + private List redeemables; public static final String SERIALIZED_NAME_SKIPPED_REDEEMABLES = "skipped_redeemables"; @SerializedName(SERIALIZED_NAME_SKIPPED_REDEEMABLES) @@ -105,7 +105,7 @@ public ValidationsValidateResponseBody valid(Boolean valid) { * The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable. * @return valid **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getValid() { return valid; } @@ -134,7 +134,7 @@ public ValidationsValidateResponseBody addRedeemablesItem(ValidationsValidateRes * Get redeemables * @return redeemables **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getRedeemables() { return redeemables; } @@ -276,7 +276,7 @@ public ValidationsValidateResponseBody stackingRules(StackingRules stackingRules * Get stackingRules * @return stackingRules **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StackingRules getStackingRules() { return stackingRules; } @@ -403,9 +403,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("valid"); - openapiRequiredFields.add("redeemables"); - openapiRequiredFields.add("stacking_rules"); } /** @@ -420,24 +417,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationsValidateResponseBody is not found in the empty JSON string", ValidationsValidateResponseBody.openapiRequiredFields.toString())); } } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("redeemables") != null && !jsonObj.get("redeemables").isJsonNull()) { + JsonArray jsonArrayredeemables = jsonObj.getAsJsonArray("redeemables"); + if (jsonArrayredeemables != null) { + // ensure the json data is an array + if (!jsonObj.get("redeemables").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `redeemables` to be an array in the JSON string but got `%s`", jsonObj.get("redeemables").toString())); + } - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationsValidateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + // validate the optional field `redeemables` (array) + for (int i = 0; i < jsonArrayredeemables.size(); i++) { + ValidationsValidateResponseBodyRedeemablesItem.validateJsonElement(jsonArrayredeemables.get(i)); + }; } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the json data is an array - if (!jsonObj.get("redeemables").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `redeemables` to be an array in the JSON string but got `%s`", jsonObj.get("redeemables").toString())); - } - - JsonArray jsonArrayredeemables = jsonObj.getAsJsonArray("redeemables"); - // validate the required field `redeemables` (array) - for (int i = 0; i < jsonArrayredeemables.size(); i++) { - ValidationsValidateResponseBodyRedeemablesItem.validateJsonElement(jsonArrayredeemables.get(i)); - }; if (jsonObj.get("skipped_redeemables") != null && !jsonObj.get("skipped_redeemables").isJsonNull()) { JsonArray jsonArrayskippedRedeemables = jsonObj.getAsJsonArray("skipped_redeemables"); if (jsonArrayskippedRedeemables != null) { @@ -477,8 +471,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("session") != null && !jsonObj.get("session").isJsonNull()) { Session.validateJsonElement(jsonObj.get("session")); } - // validate the required field `stacking_rules` - StackingRules.validateJsonElement(jsonObj.get("stacking_rules")); + // validate the optional field `stacking_rules` + if (jsonObj.get("stacking_rules") != null && !jsonObj.get("stacking_rules").isJsonNull()) { + StackingRules.validateJsonElement(jsonObj.get("stacking_rules")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItem.java b/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItem.java index 9d6f9341..6d5cf93e 100644 --- a/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItem.java +++ b/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItem.java @@ -68,9 +68,7 @@ public enum StatusEnum { INAPPLICABLE("INAPPLICABLE"), - SKIPPED("SKIPPED"), - - UNKNOWN_ENUM("unknown_enum"); + SKIPPED("SKIPPED"); private String value; @@ -93,7 +91,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -125,9 +123,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { public enum ObjectEnum { VOUCHER("voucher"), - PROMOTION_TIER("promotion_tier"), - - UNKNOWN_ENUM("unknown_enum"); + PROMOTION_TIER("promotion_tier"); private String value; @@ -150,7 +146,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -208,7 +204,7 @@ public ValidationsValidateResponseBodyRedeemablesItem status(StatusEnum status) * Get status * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -229,7 +225,7 @@ public ValidationsValidateResponseBodyRedeemablesItem id(String id) { * Redeemable ID, i.e. the voucher code. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -250,7 +246,7 @@ public ValidationsValidateResponseBodyRedeemablesItem _object(ObjectEnum _object * Redeemable's object type. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -334,7 +330,7 @@ public ValidationsValidateResponseBodyRedeemablesItem result(ValidationsValidate * Get result * @return result **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ValidationsValidateResponseBodyRedeemablesItemResult getResult() { return result; } @@ -514,10 +510,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("result"); } /** @@ -532,15 +524,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationsValidateResponseBodyRedeemablesItem is not found in the empty JSON string", ValidationsValidateResponseBodyRedeemablesItem.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationsValidateResponseBodyRedeemablesItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -556,10 +541,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `status` to be a valid element of StatusEnum enum got `%s` instead", jsonObj.get("status").toString())); } } - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -587,8 +572,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("inapplicable_to") != null && !jsonObj.get("inapplicable_to").isJsonNull()) { InapplicableToResultList.validateJsonElement(jsonObj.get("inapplicable_to")); } - // validate the required field `result` - ValidationsValidateResponseBodyRedeemablesItemResult.validateJsonElement(jsonObj.get("result")); + // validate the optional field `result` + if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { + ValidationsValidateResponseBodyRedeemablesItemResult.validateJsonElement(jsonObj.get("result")); + } if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull()) { JsonArray jsonArraycategories = jsonObj.getAsJsonArray("categories"); if (jsonArraycategories != null) { diff --git a/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItemResultDetails.java b/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItemResultDetails.java index 5d6ae018..a79f814b 100644 --- a/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItemResultDetails.java +++ b/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItemResultDetails.java @@ -67,9 +67,7 @@ public enum KeyEnum { EXCLUSION_RULES_NOT_MET("exclusion_rules_not_met"), - PRECEDING_VALIDATION_FAILED("preceding_validation_failed"), - - UNKNOWN_ENUM("unknown_enum"); + PRECEDING_VALIDATION_FAILED("preceding_validation_failed"); private String value; @@ -92,7 +90,7 @@ public static KeyEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -113,66 +111,9 @@ public KeyEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_KEY) private KeyEnum key; - /** - * Gets or Sets message - */ - @JsonAdapter(MessageEnum.Adapter.class) - public enum MessageEnum { - APPLICABLE_REDEEMABLES_LIMIT_EXCEEDED("Applicable redeemables limit exceeded"), - - APPLICABLE_REDEEMABLES_LIMIT_PER_CATEGORY_EXCEEDED("Applicable redeemables limit per category exceeded"), - - APPLICABLE_EXCLUSIVE_REDEEMABLES_LIMIT_EXCEEDED("Applicable exclusive redeemables limit exceeded"), - - APPLICABLE_EXCLUSIVE_REDEEMABLES_LIMIT_PER_CATEGORY_EXCEEDED("Applicable exclusive redeemables limit per category exceeded"), - - REDEEMABLE_CANNOT_BE_APPLIED_DUE_TO_EXCLUSION_RULES("Redeemable cannot be applied due to exclusion rules"), - - REDEEMABLE_CANNOT_BE_APPLIED_DUE_TO_PRECEDING_VALIDATION_FAILURE("Redeemable cannot be applied due to preceding validation failure"), - - UNKNOWN_ENUM("unknown_enum"); - - private String value; - - MessageEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static MessageEnum fromValue(String value) { - for (MessageEnum b : MessageEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return UNKNOWN_ENUM; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final MessageEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public MessageEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return MessageEnum.fromValue(value); - } - } - } - public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) - private MessageEnum message; + private String message; public ValidationsValidateResponseBodyRedeemablesItemResultDetails() { } @@ -198,7 +139,7 @@ public void setKey(KeyEnum key) { } - public ValidationsValidateResponseBodyRedeemablesItemResultDetails message(MessageEnum message) { + public ValidationsValidateResponseBodyRedeemablesItemResultDetails message(String message) { this.message = message; return this; @@ -209,12 +150,12 @@ public ValidationsValidateResponseBodyRedeemablesItemResultDetails message(Messa * @return message **/ @javax.annotation.Nullable - public MessageEnum getMessage() { + public String getMessage() { return message; } - public void setMessage(MessageEnum message) { + public void setMessage(String message) { this.message = message; } @@ -351,19 +292,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } - try { - JsonElement objectElement = jsonObj.get("message"); - - if (objectElement != null && !objectElement.isJsonNull()) { - MessageEnum.fromValue(objectElement.getAsString()); - } else { - throw new IllegalArgumentException("Expected the field `message` to be not null"); - } - } catch (IllegalArgumentException e) { - if(jsonObj.get("message") != null) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a valid element of MessageEnum enum got `%s` instead", jsonObj.get("message").toString())); - } - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItemResultDiscount.java b/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItemResultDiscount.java index c0081b1b..bf109689 100644 --- a/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItemResultDiscount.java +++ b/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItemResultDiscount.java @@ -69,9 +69,7 @@ public enum TypeEnum { PERCENT("PERCENT"), - FIXED("FIXED"), - - UNKNOWN_ENUM("unknown_enum"); + FIXED("FIXED"); private String value; @@ -94,7 +92,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -146,9 +144,7 @@ public enum EffectEnum { ADD_NEW_ITEMS("ADD_NEW_ITEMS"), - ADD_MANY_ITEMS("ADD_MANY_ITEMS"), - - UNKNOWN_ENUM("unknown_enum"); + ADD_MANY_ITEMS("ADD_MANY_ITEMS"); private String value; @@ -171,7 +167,7 @@ public static EffectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -253,7 +249,7 @@ public ValidationsValidateResponseBodyRedeemablesItemResultDiscount type(TypeEnu * Get type * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -751,7 +747,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); } /** @@ -766,15 +761,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationsValidateResponseBodyRedeemablesItemResultDiscount is not found in the empty JSON string", ValidationsValidateResponseBodyRedeemablesItemResultDiscount.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationsValidateResponseBodyRedeemablesItemResultDiscount.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { diff --git a/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct.java b/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct.java index 206daffc..95418512 100644 --- a/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct.java +++ b/src/main/java/voucherify/client/model/ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct.java @@ -77,7 +77,7 @@ public ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct id(St * Unique product ID, assigned by Voucherify. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -119,7 +119,7 @@ public ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct name( * Product name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -231,8 +231,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); } /** @@ -247,21 +245,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct is not found in the empty JSON string", ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ValidationsValidateResponseBodyRedeemablesItemResultDiscountProduct.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } diff --git a/src/main/java/voucherify/client/model/ValidityHoursDailyInner.java b/src/main/java/voucherify/client/model/ValidityHoursDailyInner.java index 1228c8fd..b85ddc17 100644 --- a/src/main/java/voucherify/client/model/ValidityHoursDailyInner.java +++ b/src/main/java/voucherify/client/model/ValidityHoursDailyInner.java @@ -75,9 +75,7 @@ public enum DaysOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -100,7 +98,7 @@ public static DaysOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/Voucher.java b/src/main/java/voucherify/client/model/Voucher.java index 97443094..d4547194 100644 --- a/src/main/java/voucherify/client/model/Voucher.java +++ b/src/main/java/voucherify/client/model/Voucher.java @@ -103,9 +103,7 @@ public enum TypeEnum { DISCOUNT_VOUCHER("DISCOUNT_VOUCHER"), - LOYALTY_CARD("LOYALTY_CARD"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("LOYALTY_CARD"); private String value; @@ -128,7 +126,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -190,9 +188,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -215,7 +211,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/VoucherTransaction.java b/src/main/java/voucherify/client/model/VoucherTransaction.java index 8829db2b..dde17a69 100644 --- a/src/main/java/voucherify/client/model/VoucherTransaction.java +++ b/src/main/java/voucherify/client/model/VoucherTransaction.java @@ -109,7 +109,7 @@ public VoucherTransaction id(String id) { * Unique transaction ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -151,7 +151,7 @@ public VoucherTransaction voucherId(String voucherId) { * Unique voucher ID. * @return voucherId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getVoucherId() { return voucherId; } @@ -172,7 +172,7 @@ public VoucherTransaction campaignId(String campaignId) { * Unqiue campaign ID of the voucher's parent campaign if it is part of campaign that generates bulk codes. * @return campaignId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCampaignId() { return campaignId; } @@ -235,7 +235,7 @@ public VoucherTransaction type(LoyaltyCardTransactionsType type) { * Get type * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public LoyaltyCardTransactionsType getType() { return type; } @@ -256,7 +256,7 @@ public VoucherTransaction details(VoucherTransactionDetails details) { * Get details * @return details **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VoucherTransactionDetails getDetails() { return details; } @@ -298,7 +298,7 @@ public VoucherTransaction createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -442,12 +442,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("voucher_id"); - openapiRequiredFields.add("campaign_id"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("details"); - openapiRequiredFields.add("created_at"); } /** @@ -462,24 +456,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransaction is not found in the empty JSON string", VoucherTransaction.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransaction.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); } - if (!jsonObj.get("voucher_id").isJsonPrimitive()) { + if ((jsonObj.get("voucher_id") != null && !jsonObj.get("voucher_id").isJsonNull()) && !jsonObj.get("voucher_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `voucher_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("voucher_id").toString())); } - if (!jsonObj.get("campaign_id").isJsonPrimitive()) { + if ((jsonObj.get("campaign_id") != null && !jsonObj.get("campaign_id").isJsonNull()) && !jsonObj.get("campaign_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `campaign_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaign_id").toString())); } if ((jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) && !jsonObj.get("source").isJsonPrimitive()) { @@ -488,8 +475,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } - // validate the required field `details` - VoucherTransactionDetails.validateJsonElement(jsonObj.get("details")); + // validate the optional field `details` + if (jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) { + VoucherTransactionDetails.validateJsonElement(jsonObj.get("details")); + } if ((jsonObj.get("related_transaction_id") != null && !jsonObj.get("related_transaction_id").isJsonNull()) && !jsonObj.get("related_transaction_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_transaction_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_transaction_id").toString())); } diff --git a/src/main/java/voucherify/client/model/VoucherTransactionDetailsBalance.java b/src/main/java/voucherify/client/model/VoucherTransactionDetailsBalance.java index 2d5c2c2b..183e8102 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionDetailsBalance.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionDetailsBalance.java @@ -58,9 +58,7 @@ public class VoucherTransactionDetailsBalance { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - LOYALTY_CARD("loyalty_card"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("loyalty_card"); private String value; @@ -83,7 +81,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -113,9 +111,7 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - BALANCE("balance"), - - UNKNOWN_ENUM("unknown_enum"); + BALANCE("balance"); private String value; @@ -138,7 +134,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -184,7 +180,7 @@ public VoucherTransactionDetailsBalance type(TypeEnum type) { * The type of voucher whose balance is being adjusted due to the transaction. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -205,7 +201,7 @@ public VoucherTransactionDetailsBalance total(Integer total) { * The number of all points accumulated on the card as affected by add or subtract operations. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -226,7 +222,7 @@ public VoucherTransactionDetailsBalance _object(ObjectEnum _object) { * The type of the object represented by the JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -247,7 +243,7 @@ public VoucherTransactionDetailsBalance points(Integer points) { * Points added or subtracted in the transaction. * @return points **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getPoints() { return points; } @@ -268,7 +264,7 @@ public VoucherTransactionDetailsBalance balance(Integer balance) { * The available points on the card after the transaction as affected by redemption or rollback. * @return balance **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getBalance() { return balance; } @@ -289,7 +285,7 @@ public VoucherTransactionDetailsBalance relatedObject(VoucherTransactionDetailsB * Get relatedObject * @return relatedObject **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VoucherTransactionDetailsBalanceRelatedObject getRelatedObject() { return relatedObject; } @@ -410,12 +406,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("total"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("points"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("related_object"); } /** @@ -430,15 +420,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionDetailsBalance is not found in the empty JSON string", VoucherTransactionDetailsBalance.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionDetailsBalance.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -454,7 +437,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `type` to be a valid element of TypeEnum enum got `%s` instead", jsonObj.get("type").toString())); } } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -470,8 +453,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - // validate the required field `related_object` - VoucherTransactionDetailsBalanceRelatedObject.validateJsonElement(jsonObj.get("related_object")); + // validate the optional field `related_object` + if (jsonObj.get("related_object") != null && !jsonObj.get("related_object").isJsonNull()) { + VoucherTransactionDetailsBalanceRelatedObject.validateJsonElement(jsonObj.get("related_object")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/VoucherTransactionDetailsBalanceRelatedObject.java b/src/main/java/voucherify/client/model/VoucherTransactionDetailsBalanceRelatedObject.java index dc25d068..59ceb54f 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionDetailsBalanceRelatedObject.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionDetailsBalanceRelatedObject.java @@ -61,9 +61,7 @@ public class VoucherTransactionDetailsBalanceRelatedObject { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - VOUCHER("voucher"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER("voucher"); private String value; @@ -86,7 +84,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -120,7 +118,7 @@ public VoucherTransactionDetailsBalanceRelatedObject id(String id) { * Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -141,7 +139,7 @@ public VoucherTransactionDetailsBalanceRelatedObject type(TypeEnum type) { * The object being modified, i.e. voucher. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -250,8 +248,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); } /** @@ -266,18 +262,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionDetailsBalanceRelatedObject is not found in the empty JSON string", VoucherTransactionDetailsBalanceRelatedObject.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionDetailsBalanceRelatedObject.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { diff --git a/src/main/java/voucherify/client/model/VoucherTransactionDetailsCustomEvent.java b/src/main/java/voucherify/client/model/VoucherTransactionDetailsCustomEvent.java index 5e53a0d6..6345c9bb 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionDetailsCustomEvent.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionDetailsCustomEvent.java @@ -73,7 +73,7 @@ public VoucherTransactionDetailsCustomEvent id(String id) { * Unique event ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -94,7 +94,7 @@ public VoucherTransactionDetailsCustomEvent type(String type) { * Type of custom event. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getType() { return type; } @@ -203,8 +203,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); } /** @@ -219,18 +217,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionDetailsCustomEvent is not found in the empty JSON string", VoucherTransactionDetailsCustomEvent.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionDetailsCustomEvent.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } diff --git a/src/main/java/voucherify/client/model/VoucherTransactionDetailsEarningRule.java b/src/main/java/voucherify/client/model/VoucherTransactionDetailsEarningRule.java index e8ee5124..b7575625 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionDetailsEarningRule.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionDetailsEarningRule.java @@ -74,7 +74,7 @@ public VoucherTransactionDetailsEarningRule id(String id) { * Unique earning rule ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -95,7 +95,7 @@ public VoucherTransactionDetailsEarningRule source(VoucherTransactionDetailsEarn * Get source * @return source **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VoucherTransactionDetailsEarningRuleSource getSource() { return source; } @@ -204,8 +204,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("source"); } /** @@ -220,19 +218,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionDetailsEarningRule is not found in the empty JSON string", VoucherTransactionDetailsEarningRule.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionDetailsEarningRule.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - // validate the required field `source` - VoucherTransactionDetailsEarningRuleSource.validateJsonElement(jsonObj.get("source")); + // validate the optional field `source` + if (jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) { + VoucherTransactionDetailsEarningRuleSource.validateJsonElement(jsonObj.get("source")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/VoucherTransactionDetailsEarningRuleSource.java b/src/main/java/voucherify/client/model/VoucherTransactionDetailsEarningRuleSource.java index 45b7e444..28283f31 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionDetailsEarningRuleSource.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionDetailsEarningRuleSource.java @@ -69,7 +69,7 @@ public VoucherTransactionDetailsEarningRuleSource banner(String banner) { * Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. * @return banner **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getBanner() { return banner; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("banner"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionDetailsEarningRuleSource is not found in the empty JSON string", VoucherTransactionDetailsEarningRuleSource.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionDetailsEarningRuleSource.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("banner").isJsonPrimitive()) { + if ((jsonObj.get("banner") != null && !jsonObj.get("banner").isJsonNull()) && !jsonObj.get("banner").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `banner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("banner").toString())); } } diff --git a/src/main/java/voucherify/client/model/VoucherTransactionDetailsEvent.java b/src/main/java/voucherify/client/model/VoucherTransactionDetailsEvent.java index 7716331a..c94c2be1 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionDetailsEvent.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionDetailsEvent.java @@ -73,7 +73,7 @@ public VoucherTransactionDetailsEvent id(String id) { * Unique event ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -94,7 +94,7 @@ public VoucherTransactionDetailsEvent type(String type) { * Type of event. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getType() { return type; } @@ -203,8 +203,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); } /** @@ -219,18 +217,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionDetailsEvent is not found in the empty JSON string", VoucherTransactionDetailsEvent.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionDetailsEvent.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } } diff --git a/src/main/java/voucherify/client/model/VoucherTransactionDetailsEventSchema.java b/src/main/java/voucherify/client/model/VoucherTransactionDetailsEventSchema.java index 5b92668b..f50811a2 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionDetailsEventSchema.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionDetailsEventSchema.java @@ -73,7 +73,7 @@ public VoucherTransactionDetailsEventSchema id(String id) { * Unique metadata schema ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -94,7 +94,7 @@ public VoucherTransactionDetailsEventSchema name(String name) { * Type of custom event. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -203,8 +203,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); } /** @@ -219,18 +217,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionDetailsEventSchema is not found in the empty JSON string", VoucherTransactionDetailsEventSchema.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionDetailsEventSchema.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } diff --git a/src/main/java/voucherify/client/model/VoucherTransactionDetailsLoyaltyTier.java b/src/main/java/voucherify/client/model/VoucherTransactionDetailsLoyaltyTier.java index 94f339ac..a9128276 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionDetailsLoyaltyTier.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionDetailsLoyaltyTier.java @@ -73,7 +73,7 @@ public VoucherTransactionDetailsLoyaltyTier id(String id) { * Get id * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -94,7 +94,7 @@ public VoucherTransactionDetailsLoyaltyTier name(String name) { * Get name * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -203,8 +203,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); } /** @@ -219,18 +217,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionDetailsLoyaltyTier is not found in the empty JSON string", VoucherTransactionDetailsLoyaltyTier.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionDetailsLoyaltyTier.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } diff --git a/src/main/java/voucherify/client/model/VoucherTransactionDetailsOrder.java b/src/main/java/voucherify/client/model/VoucherTransactionDetailsOrder.java index fdc9fdc6..b7d64246 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionDetailsOrder.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionDetailsOrder.java @@ -73,7 +73,7 @@ public VoucherTransactionDetailsOrder id(String id) { * Unique order ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -94,7 +94,7 @@ public VoucherTransactionDetailsOrder sourceId(String sourceId) { * The merchant’s order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service. * @return sourceId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getSourceId() { return sourceId; } @@ -203,8 +203,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("source_id"); } /** @@ -219,18 +217,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionDetailsOrder is not found in the empty JSON string", VoucherTransactionDetailsOrder.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionDetailsOrder.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("source_id").isJsonPrimitive()) { + if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/VoucherTransactionDetailsRedemption.java b/src/main/java/voucherify/client/model/VoucherTransactionDetailsRedemption.java index aaa0e88c..91c133ea 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionDetailsRedemption.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionDetailsRedemption.java @@ -69,7 +69,7 @@ public VoucherTransactionDetailsRedemption id(String id) { * Unique redemption ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionDetailsRedemption is not found in the empty JSON string", VoucherTransactionDetailsRedemption.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionDetailsRedemption.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } } diff --git a/src/main/java/voucherify/client/model/VoucherTransactionDetailsReward.java b/src/main/java/voucherify/client/model/VoucherTransactionDetailsReward.java index 43e9e9be..51b4a996 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionDetailsReward.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionDetailsReward.java @@ -73,7 +73,7 @@ public VoucherTransactionDetailsReward id(String id) { * Unique reward ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -94,7 +94,7 @@ public VoucherTransactionDetailsReward name(String name) { * Reward name. * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -203,8 +203,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); } /** @@ -219,18 +217,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionDetailsReward is not found in the empty JSON string", VoucherTransactionDetailsReward.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionDetailsReward.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } diff --git a/src/main/java/voucherify/client/model/VoucherTransactionDetailsRollback.java b/src/main/java/voucherify/client/model/VoucherTransactionDetailsRollback.java index 6f061a50..29b84a16 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionDetailsRollback.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionDetailsRollback.java @@ -69,7 +69,7 @@ public VoucherTransactionDetailsRollback id(String id) { * Unique redemption rollback ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionDetailsRollback is not found in the empty JSON string", VoucherTransactionDetailsRollback.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionDetailsRollback.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } } diff --git a/src/main/java/voucherify/client/model/VoucherTransactionDetailsSegment.java b/src/main/java/voucherify/client/model/VoucherTransactionDetailsSegment.java index b0066dde..75deaabe 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionDetailsSegment.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionDetailsSegment.java @@ -73,7 +73,7 @@ public VoucherTransactionDetailsSegment id(String id) { * Get id * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -94,7 +94,7 @@ public VoucherTransactionDetailsSegment name(String name) { * Get name * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -203,8 +203,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); } /** @@ -219,18 +217,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionDetailsSegment is not found in the empty JSON string", VoucherTransactionDetailsSegment.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionDetailsSegment.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } } diff --git a/src/main/java/voucherify/client/model/VoucherTransactionsExport.java b/src/main/java/voucherify/client/model/VoucherTransactionsExport.java index 7f2be08a..f26f63d9 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionsExport.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionsExport.java @@ -65,9 +65,7 @@ public class VoucherTransactionsExport { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EXPORT("export"), - - UNKNOWN_ENUM("unknown_enum"); + EXPORT("export"); private String value; @@ -90,7 +88,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -120,9 +118,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - SCHEDULED("SCHEDULED"), - - UNKNOWN_ENUM("unknown_enum"); + SCHEDULED("SCHEDULED"); private String value; @@ -145,7 +141,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -175,9 +171,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ExportedObjectEnum.Adapter.class) public enum ExportedObjectEnum { - VOUCHER_TRANSACTIONS("voucher_transactions"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER_TRANSACTIONS("voucher_transactions"); private String value; @@ -200,7 +194,7 @@ public static ExportedObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -246,7 +240,7 @@ public VoucherTransactionsExport id(String id) { * Unique export ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -267,7 +261,7 @@ public VoucherTransactionsExport _object(ObjectEnum _object) { * The type of object being represented. This object stores information about the `export`. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -288,7 +282,7 @@ public VoucherTransactionsExport createdAt(OffsetDateTime createdAt) { * Timestamp representing the date and time when the export was scheduled in ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -309,7 +303,7 @@ public VoucherTransactionsExport status(StatusEnum status) { * Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -330,7 +324,7 @@ public VoucherTransactionsExport channel(String channel) { * The channel through which the export was triggered. * @return channel **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getChannel() { return channel; } @@ -351,7 +345,7 @@ public VoucherTransactionsExport exportedObject(ExportedObjectEnum exportedObjec * The type of exported object. * @return exportedObject **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ExportedObjectEnum getExportedObject() { return exportedObject; } @@ -372,7 +366,7 @@ public VoucherTransactionsExport parameters(VoucherTransactionsFilters parameter * Get parameters * @return parameters **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VoucherTransactionsFilters getParameters() { return parameters; } @@ -555,13 +549,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("channel"); - openapiRequiredFields.add("exported_object"); - openapiRequiredFields.add("parameters"); } /** @@ -576,18 +563,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionsExport is not found in the empty JSON string", VoucherTransactionsExport.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionsExport.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -603,7 +583,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -619,10 +599,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `status` to be a valid element of StatusEnum enum got `%s` instead", jsonObj.get("status").toString())); } } - if (!jsonObj.get("channel").isJsonPrimitive()) { + if ((jsonObj.get("channel") != null && !jsonObj.get("channel").isJsonNull()) && !jsonObj.get("channel").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `channel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("channel").toString())); } - if (!jsonObj.get("exported_object").isJsonPrimitive()) { + if ((jsonObj.get("exported_object") != null && !jsonObj.get("exported_object").isJsonNull()) && !jsonObj.get("exported_object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `exported_object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exported_object").toString())); } try { @@ -638,8 +618,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `exported_object` to be a valid element of ExportedObjectEnum enum got `%s` instead", jsonObj.get("exported_object").toString())); } } - // validate the required field `parameters` - VoucherTransactionsFilters.validateJsonElement(jsonObj.get("parameters")); + // validate the optional field `parameters` + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { + VoucherTransactionsFilters.validateJsonElement(jsonObj.get("parameters")); + } // validate the optional field `result` if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { VoucherTransactionsExportResult.validateJsonElement(jsonObj.get("result")); diff --git a/src/main/java/voucherify/client/model/VoucherTransactionsExportFilterConditions.java b/src/main/java/voucherify/client/model/VoucherTransactionsExportFilterConditions.java index 9018f87c..db9a8782 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionsExportFilterConditions.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionsExportFilterConditions.java @@ -70,7 +70,7 @@ public VoucherTransactionsExportFilterConditions voucherId(VoucherTransactionsEx * Get voucherId * @return voucherId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VoucherTransactionsExportFilterConditionsVoucherId getVoucherId() { return voucherId; } @@ -176,7 +176,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("voucher_id"); } /** @@ -191,16 +190,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionsExportFilterConditions is not found in the empty JSON string", VoucherTransactionsExportFilterConditions.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionsExportFilterConditions.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `voucher_id` - VoucherTransactionsExportFilterConditionsVoucherId.validateJsonElement(jsonObj.get("voucher_id")); + // validate the optional field `voucher_id` + if (jsonObj.get("voucher_id") != null && !jsonObj.get("voucher_id").isJsonNull()) { + VoucherTransactionsExportFilterConditionsVoucherId.validateJsonElement(jsonObj.get("voucher_id")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/VoucherTransactionsExportFilterConditionsVoucherId.java b/src/main/java/voucherify/client/model/VoucherTransactionsExportFilterConditionsVoucherId.java index 22f3393d..b52bb140 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionsExportFilterConditionsVoucherId.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionsExportFilterConditionsVoucherId.java @@ -70,7 +70,7 @@ public VoucherTransactionsExportFilterConditionsVoucherId conditions(VoucherTran * Get conditions * @return conditions **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VoucherTransactionsExportFilterConditionsVoucherIdConditions getConditions() { return conditions; } @@ -176,7 +176,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("conditions"); } /** @@ -191,16 +190,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionsExportFilterConditionsVoucherId is not found in the empty JSON string", VoucherTransactionsExportFilterConditionsVoucherId.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionsExportFilterConditionsVoucherId.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `conditions` - VoucherTransactionsExportFilterConditionsVoucherIdConditions.validateJsonElement(jsonObj.get("conditions")); + // validate the optional field `conditions` + if (jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) { + VoucherTransactionsExportFilterConditionsVoucherIdConditions.validateJsonElement(jsonObj.get("conditions")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/VoucherTransactionsExportFilterConditionsVoucherIdConditions.java b/src/main/java/voucherify/client/model/VoucherTransactionsExportFilterConditionsVoucherIdConditions.java index f9f60547..55ba70e5 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionsExportFilterConditionsVoucherIdConditions.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionsExportFilterConditionsVoucherIdConditions.java @@ -56,7 +56,7 @@ public class VoucherTransactionsExportFilterConditionsVoucherIdConditions { public static final String SERIALIZED_NAME_$_IN = "$in"; @SerializedName(SERIALIZED_NAME_$_IN) - private List $in = new ArrayList<>(); + private List $in; public VoucherTransactionsExportFilterConditionsVoucherIdConditions() { } @@ -79,7 +79,7 @@ public VoucherTransactionsExportFilterConditionsVoucherIdConditions() { * Get $in * @return $in **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List get$In() { return $in; } @@ -185,7 +185,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("$in"); } /** @@ -200,18 +199,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionsExportFilterConditionsVoucherIdConditions is not found in the empty JSON string", VoucherTransactionsExportFilterConditionsVoucherIdConditions.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionsExportFilterConditionsVoucherIdConditions.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the required json array is present - if (jsonObj.get("$in") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("$in").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("$in") != null && !jsonObj.get("$in").isJsonNull() && !jsonObj.get("$in").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `$in` to be an array in the JSON string but got `%s`", jsonObj.get("$in").toString())); } } diff --git a/src/main/java/voucherify/client/model/VoucherTransactionsExportParameters.java b/src/main/java/voucherify/client/model/VoucherTransactionsExportParameters.java index efbb3682..e3e4a3a2 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionsExportParameters.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionsExportParameters.java @@ -61,9 +61,7 @@ public class VoucherTransactionsExportParameters { public enum OrderEnum { _CREATED_AT("-created_at"), - CREATED_AT("created_at"), - - UNKNOWN_ENUM("unknown_enum"); + CREATED_AT("created_at"); private String value; @@ -86,7 +84,7 @@ public static OrderEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -134,9 +132,7 @@ public enum FieldsEnum { DETAILS("details"), - RELATED_TRANSACTION_ID("related_transaction_id"), - - UNKNOWN_ENUM("unknown_enum"); + RELATED_TRANSACTION_ID("related_transaction_id"); private String value; @@ -159,7 +155,7 @@ public static FieldsEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/VoucherTransactionsExportResult.java b/src/main/java/voucherify/client/model/VoucherTransactionsExportResult.java index 8327aee6..50825ed9 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionsExportResult.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionsExportResult.java @@ -69,7 +69,7 @@ public VoucherTransactionsExportResult url(String url) { * URL of the CSV file location. It contains the `token` used for authorization in the <!-- [Download export](OpenAPI.json/paths/~1exports~1{export_Id}/get) -->[Download export](ref:download-export) method. * @return url **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getUrl() { return url; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("url"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionsExportResult is not found in the empty JSON string", VoucherTransactionsExportResult.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionsExportResult.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("url").isJsonPrimitive()) { + if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } diff --git a/src/main/java/voucherify/client/model/VoucherTransactionsFilters.java b/src/main/java/voucherify/client/model/VoucherTransactionsFilters.java index eacaa17f..8e112244 100644 --- a/src/main/java/voucherify/client/model/VoucherTransactionsFilters.java +++ b/src/main/java/voucherify/client/model/VoucherTransactionsFilters.java @@ -62,9 +62,7 @@ public class VoucherTransactionsFilters { public enum OrderEnum { _CREATED_AT("-created_at"), - CREATED_AT("created_at"), - - UNKNOWN_ENUM("unknown_enum"); + CREATED_AT("created_at"); private String value; @@ -87,7 +85,7 @@ public static OrderEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -135,9 +133,7 @@ public enum FieldsEnum { DETAILS("details"), - RELATED_TRANSACTION_ID("related_transaction_id"), - - UNKNOWN_ENUM("unknown_enum"); + RELATED_TRANSACTION_ID("related_transaction_id"); private String value; @@ -160,7 +156,7 @@ public static FieldsEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -248,7 +244,7 @@ public VoucherTransactionsFilters filters(VoucherTransactionsExportFilterConditi * Get filters * @return filters **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VoucherTransactionsExportFilterConditions getFilters() { return filters; } @@ -360,7 +356,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("filters"); } /** @@ -375,13 +370,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VoucherTransactionsFilters is not found in the empty JSON string", VoucherTransactionsFilters.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VoucherTransactionsFilters.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) && !jsonObj.get("order").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `order` to be a primitive type in the JSON string but got `%s`", jsonObj.get("order").toString())); @@ -403,8 +391,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("fields") != null && !jsonObj.get("fields").isJsonNull() && !jsonObj.get("fields").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `fields` to be an array in the JSON string but got `%s`", jsonObj.get("fields").toString())); } - // validate the required field `filters` - VoucherTransactionsExportFilterConditions.validateJsonElement(jsonObj.get("filters")); + // validate the optional field `filters` + if (jsonObj.get("filters") != null && !jsonObj.get("filters").isJsonNull()) { + VoucherTransactionsExportFilterConditions.validateJsonElement(jsonObj.get("filters")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/VouchersBalanceUpdateRequestBody.java b/src/main/java/voucherify/client/model/VouchersBalanceUpdateRequestBody.java index a1e01bb7..73ab4316 100644 --- a/src/main/java/voucherify/client/model/VouchersBalanceUpdateRequestBody.java +++ b/src/main/java/voucherify/client/model/VouchersBalanceUpdateRequestBody.java @@ -77,7 +77,7 @@ public VouchersBalanceUpdateRequestBody amount(Integer amount) { * The incremental amount to be added to or removed from the current balance on the gift card or loyalty card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. To remove balance, simply add a minus sign before the value, i.e. to remove $20, use -2000. * @return amount **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getAmount() { return amount; } @@ -231,7 +231,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); } /** @@ -246,13 +245,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VouchersBalanceUpdateRequestBody is not found in the empty JSON string", VouchersBalanceUpdateRequestBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VouchersBalanceUpdateRequestBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("source_id") != null && !jsonObj.get("source_id").isJsonNull()) && !jsonObj.get("source_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `source_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source_id").toString())); diff --git a/src/main/java/voucherify/client/model/VouchersBalanceUpdateResponseBody.java b/src/main/java/voucherify/client/model/VouchersBalanceUpdateResponseBody.java index 6912c8f5..c36eae7f 100644 --- a/src/main/java/voucherify/client/model/VouchersBalanceUpdateResponseBody.java +++ b/src/main/java/voucherify/client/model/VouchersBalanceUpdateResponseBody.java @@ -72,9 +72,7 @@ public class VouchersBalanceUpdateResponseBody { public enum TypeEnum { GIFT_VOUCHER("gift_voucher"), - LOYALTY_CARD("loyalty_card"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("loyalty_card"); private String value; @@ -97,7 +95,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -123,9 +121,7 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(OperationTypeEnum.Adapter.class) public enum OperationTypeEnum { - MANUAL("MANUAL"), - - UNKNOWN_ENUM("unknown_enum"); + MANUAL("MANUAL"); private String value; @@ -148,7 +144,7 @@ public static OperationTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -174,9 +170,7 @@ public OperationTypeEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - BALANCE("balance"), - - UNKNOWN_ENUM("unknown_enum"); + BALANCE("balance"); private String value; @@ -199,7 +193,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -237,7 +231,7 @@ public VouchersBalanceUpdateResponseBody amount(Integer amount) { * The incremental amount added (positive integer) or subtracted (negative integer) to the current balance on the gift card or loyalty card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. * @return amount **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getAmount() { return amount; } @@ -258,7 +252,7 @@ public VouchersBalanceUpdateResponseBody total(Integer total) { * Total income incurred over the lifespan of the gift card or loyalty card. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -279,7 +273,7 @@ public VouchersBalanceUpdateResponseBody balance(Integer balance) { * The balance after adding or subtracting a specified amount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. * @return balance **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getBalance() { return balance; } @@ -300,7 +294,7 @@ public VouchersBalanceUpdateResponseBody type(TypeEnum type) { * The type of voucher being modified. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -321,7 +315,7 @@ public VouchersBalanceUpdateResponseBody operationType(OperationTypeEnum operati * Get operationType * @return operationType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OperationTypeEnum getOperationType() { return operationType; } @@ -342,7 +336,7 @@ public VouchersBalanceUpdateResponseBody _object(ObjectEnum _object) { * The type of the object represented by JSON. Default is `balance`. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -363,7 +357,7 @@ public VouchersBalanceUpdateResponseBody relatedObject(VouchersBalanceUpdateResp * Get relatedObject * @return relatedObject **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VouchersBalanceUpdateResponseBodyRelatedObject getRelatedObject() { return relatedObject; } @@ -487,13 +481,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("amount"); - openapiRequiredFields.add("total"); - openapiRequiredFields.add("balance"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("operation_type"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("related_object"); } /** @@ -508,15 +495,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VouchersBalanceUpdateResponseBody is not found in the empty JSON string", VouchersBalanceUpdateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VouchersBalanceUpdateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -532,7 +512,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `type` to be a valid element of TypeEnum enum got `%s` instead", jsonObj.get("type").toString())); } } - if (!jsonObj.get("operation_type").isJsonPrimitive()) { + if ((jsonObj.get("operation_type") != null && !jsonObj.get("operation_type").isJsonNull()) && !jsonObj.get("operation_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `operation_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operation_type").toString())); } try { @@ -548,7 +528,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `operation_type` to be a valid element of OperationTypeEnum enum got `%s` instead", jsonObj.get("operation_type").toString())); } } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -564,8 +544,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - // validate the required field `related_object` - VouchersBalanceUpdateResponseBodyRelatedObject.validateJsonElement(jsonObj.get("related_object")); + // validate the optional field `related_object` + if (jsonObj.get("related_object") != null && !jsonObj.get("related_object").isJsonNull()) { + VouchersBalanceUpdateResponseBodyRelatedObject.validateJsonElement(jsonObj.get("related_object")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/VouchersBalanceUpdateResponseBodyRelatedObject.java b/src/main/java/voucherify/client/model/VouchersBalanceUpdateResponseBodyRelatedObject.java index e57e6e21..186c40c8 100644 --- a/src/main/java/voucherify/client/model/VouchersBalanceUpdateResponseBodyRelatedObject.java +++ b/src/main/java/voucherify/client/model/VouchersBalanceUpdateResponseBodyRelatedObject.java @@ -57,9 +57,7 @@ public class VouchersBalanceUpdateResponseBodyRelatedObject { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - VOUCHER("voucher"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER("voucher"); private String value; @@ -82,7 +80,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -120,7 +118,7 @@ public VouchersBalanceUpdateResponseBodyRelatedObject type(TypeEnum type) { * The object being modified, i.e. `voucher`. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public TypeEnum getType() { return type; } @@ -141,7 +139,7 @@ public VouchersBalanceUpdateResponseBodyRelatedObject id(String id) { * Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -250,8 +248,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("id"); } /** @@ -266,15 +262,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VouchersBalanceUpdateResponseBodyRelatedObject is not found in the empty JSON string", VouchersBalanceUpdateResponseBodyRelatedObject.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VouchersBalanceUpdateResponseBodyRelatedObject.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } try { @@ -290,7 +279,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `type` to be a valid element of TypeEnum enum got `%s` instead", jsonObj.get("type").toString())); } } - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } } diff --git a/src/main/java/voucherify/client/model/VouchersDisableResponseBody.java b/src/main/java/voucherify/client/model/VouchersDisableResponseBody.java index 1b684c27..f95a952a 100644 --- a/src/main/java/voucherify/client/model/VouchersDisableResponseBody.java +++ b/src/main/java/voucherify/client/model/VouchersDisableResponseBody.java @@ -103,9 +103,7 @@ public enum TypeEnum { DISCOUNT_VOUCHER("DISCOUNT_VOUCHER"), - LOYALTY_CARD("LOYALTY_CARD"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("LOYALTY_CARD"); private String value; @@ -128,7 +126,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -190,9 +188,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -215,7 +211,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/VouchersEnableResponseBody.java b/src/main/java/voucherify/client/model/VouchersEnableResponseBody.java index 9788a8cc..ab01aff8 100644 --- a/src/main/java/voucherify/client/model/VouchersEnableResponseBody.java +++ b/src/main/java/voucherify/client/model/VouchersEnableResponseBody.java @@ -103,9 +103,7 @@ public enum TypeEnum { DISCOUNT_VOUCHER("DISCOUNT_VOUCHER"), - LOYALTY_CARD("LOYALTY_CARD"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("LOYALTY_CARD"); private String value; @@ -128,7 +126,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -190,9 +188,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -215,7 +211,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/VouchersGetResponseBody.java b/src/main/java/voucherify/client/model/VouchersGetResponseBody.java index 465b1bef..978b33c2 100644 --- a/src/main/java/voucherify/client/model/VouchersGetResponseBody.java +++ b/src/main/java/voucherify/client/model/VouchersGetResponseBody.java @@ -103,9 +103,7 @@ public enum TypeEnum { DISCOUNT_VOUCHER("DISCOUNT_VOUCHER"), - LOYALTY_CARD("LOYALTY_CARD"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("LOYALTY_CARD"); private String value; @@ -128,7 +126,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -190,9 +188,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -215,7 +211,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/VouchersImportCsvCreateResponseBody.java b/src/main/java/voucherify/client/model/VouchersImportCsvCreateResponseBody.java index 1f2d9f2e..3af0ff9d 100644 --- a/src/main/java/voucherify/client/model/VouchersImportCsvCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/VouchersImportCsvCreateResponseBody.java @@ -69,7 +69,7 @@ public VouchersImportCsvCreateResponseBody asyncActionId(String asyncActionId) { * The ID of the scheduled asynchronous action. * @return asyncActionId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAsyncActionId() { return asyncActionId; } @@ -175,7 +175,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("async_action_id"); } /** @@ -190,15 +189,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VouchersImportCsvCreateResponseBody is not found in the empty JSON string", VouchersImportCsvCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VouchersImportCsvCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("async_action_id").isJsonPrimitive()) { + if ((jsonObj.get("async_action_id") != null && !jsonObj.get("async_action_id").isJsonNull()) && !jsonObj.get("async_action_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `async_action_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("async_action_id").toString())); } } diff --git a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBody.java b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBody.java index 4585c35e..2def6826 100644 --- a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBody.java +++ b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBody.java @@ -82,7 +82,7 @@ public class VouchersRedemptionGetResponseBody { public static final String SERIALIZED_NAME_REDEMPTION_ENTRIES = "redemption_entries"; @SerializedName(SERIALIZED_NAME_REDEMPTION_ENTRIES) - private List redemptionEntries = new ArrayList<>(); + private List redemptionEntries; public VouchersRedemptionGetResponseBody() { } @@ -118,7 +118,7 @@ public VouchersRedemptionGetResponseBody redeemedQuantity(Integer redeemedQuanti * The number of times the voucher was redeemed successfully. * @return redeemedQuantity **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getRedeemedQuantity() { return redeemedQuantity; } @@ -139,7 +139,7 @@ public VouchersRedemptionGetResponseBody _object(String _object) { * The type of the object represented by JSON. This object stores information about redemptions in a dictionary. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -160,7 +160,7 @@ public VouchersRedemptionGetResponseBody url(String url) { * URL * @return url **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getUrl() { return url; } @@ -181,7 +181,7 @@ public VouchersRedemptionGetResponseBody dataRef(String dataRef) { * Identifies the name of the attribute that contains the array of `redemption_entries`. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -202,7 +202,7 @@ public VouchersRedemptionGetResponseBody total(Integer total) { * Total number of redemption objects. * @return total **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getTotal() { return total; } @@ -231,7 +231,7 @@ public VouchersRedemptionGetResponseBody addRedemptionEntriesItem(VouchersRedemp * Get redemptionEntries * @return redemptionEntries **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getRedemptionEntries() { return redemptionEntries; } @@ -366,12 +366,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("redeemed_quantity"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("url"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("total"); - openapiRequiredFields.add("redemption_entries"); } /** @@ -386,33 +380,30 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VouchersRedemptionGetResponseBody is not found in the empty JSON string", VouchersRedemptionGetResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VouchersRedemptionGetResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("url").isJsonPrimitive()) { + if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("redemption_entries").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `redemption_entries` to be an array in the JSON string but got `%s`", jsonObj.get("redemption_entries").toString())); + if (jsonObj.get("redemption_entries") != null && !jsonObj.get("redemption_entries").isJsonNull()) { + JsonArray jsonArrayredemptionEntries = jsonObj.getAsJsonArray("redemption_entries"); + if (jsonArrayredemptionEntries != null) { + // ensure the json data is an array + if (!jsonObj.get("redemption_entries").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `redemption_entries` to be an array in the JSON string but got `%s`", jsonObj.get("redemption_entries").toString())); + } + + // validate the optional field `redemption_entries` (array) + for (int i = 0; i < jsonArrayredemptionEntries.size(); i++) { + VouchersRedemptionGetResponseBodyRedemptionEntriesItem.validateJsonElement(jsonArrayredemptionEntries.get(i)); + }; + } } - - JsonArray jsonArrayredemptionEntries = jsonObj.getAsJsonArray("redemption_entries"); - // validate the required field `redemption_entries` (array) - for (int i = 0; i < jsonArrayredemptionEntries.size(); i++) { - VouchersRedemptionGetResponseBodyRedemptionEntriesItem.validateJsonElement(jsonArrayredemptionEntries.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItem.java b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItem.java index ca12a5be..1b1904a7 100644 --- a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItem.java +++ b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItem.java @@ -74,9 +74,7 @@ public class VouchersRedemptionGetResponseBodyRedemptionEntriesItem { public enum ObjectEnum { REDEMPTION("redemption"), - REDEMPTION_ROLLBACK("redemption_rollback"), - - UNKNOWN_ENUM("unknown_enum"); + REDEMPTION_ROLLBACK("redemption_rollback"); private String value; @@ -99,7 +97,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -151,9 +149,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { public enum ResultEnum { SUCCESS("SUCCESS"), - FAILURE("FAILURE"), - - UNKNOWN_ENUM("unknown_enum"); + FAILURE("FAILURE"); private String value; @@ -176,7 +172,7 @@ public static ResultEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -206,9 +202,7 @@ public enum StatusEnum { FAILED("FAILED"), - ROLLED_BACK("ROLLED_BACK"), - - UNKNOWN_ENUM("unknown_enum"); + ROLLED_BACK("ROLLED_BACK"); private String value; @@ -231,7 +225,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -285,9 +279,7 @@ public enum RelatedObjectTypeEnum { PROMOTION_TIER("promotion_tier"), - REDEMPTION("redemption"), - - UNKNOWN_ENUM("unknown_enum"); + REDEMPTION("redemption"); private String value; @@ -310,7 +302,7 @@ public static RelatedObjectTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -372,7 +364,7 @@ public VouchersRedemptionGetResponseBodyRedemptionEntriesItem id(String id) { * Get id * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -393,7 +385,7 @@ public VouchersRedemptionGetResponseBodyRedemptionEntriesItem _object(ObjectEnum * Get _object * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -414,7 +406,7 @@ public VouchersRedemptionGetResponseBodyRedemptionEntriesItem date(OffsetDateTim * Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format. * @return date **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getDate() { return date; } @@ -540,7 +532,7 @@ public VouchersRedemptionGetResponseBodyRedemptionEntriesItem result(ResultEnum * Redemption result. * @return result **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ResultEnum getResult() { return result; } @@ -561,7 +553,7 @@ public VouchersRedemptionGetResponseBodyRedemptionEntriesItem status(StatusEnum * Get status * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -666,7 +658,7 @@ public VouchersRedemptionGetResponseBodyRedemptionEntriesItem channel(VouchersRe * Get channel * @return channel **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel getChannel() { return channel; } @@ -708,7 +700,7 @@ public VouchersRedemptionGetResponseBodyRedemptionEntriesItem relatedObjectType( * Defines the related object. * @return relatedObjectType **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public RelatedObjectTypeEnum getRelatedObjectType() { return relatedObjectType; } @@ -729,7 +721,7 @@ public VouchersRedemptionGetResponseBodyRedemptionEntriesItem relatedObjectId(St * Get relatedObjectId * @return relatedObjectId **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getRelatedObjectId() { return relatedObjectId; } @@ -1041,14 +1033,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("date"); - openapiRequiredFields.add("result"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("channel"); - openapiRequiredFields.add("related_object_type"); - openapiRequiredFields.add("related_object_id"); } /** @@ -1063,18 +1047,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VouchersRedemptionGetResponseBodyRedemptionEntriesItem is not found in the empty JSON string", VouchersRedemptionGetResponseBodyRedemptionEntriesItem.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VouchersRedemptionGetResponseBodyRedemptionEntriesItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -1099,7 +1076,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("redemption") != null && !jsonObj.get("redemption").isJsonNull()) && !jsonObj.get("redemption").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redemption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redemption").toString())); } - if (!jsonObj.get("result").isJsonPrimitive()) { + if ((jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) && !jsonObj.get("result").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `result` to be a primitive type in the JSON string but got `%s`", jsonObj.get("result").toString())); } try { @@ -1115,7 +1092,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `result` to be a valid element of ResultEnum enum got `%s` instead", jsonObj.get("result").toString())); } } - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -1145,13 +1122,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { VouchersRedemptionGetResponseBodyRedemptionEntriesItemOrder.validateJsonElement(jsonObj.get("order")); } - // validate the required field `channel` - VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel.validateJsonElement(jsonObj.get("channel")); + // validate the optional field `channel` + if (jsonObj.get("channel") != null && !jsonObj.get("channel").isJsonNull()) { + VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel.validateJsonElement(jsonObj.get("channel")); + } // validate the optional field `customer` if (jsonObj.get("customer") != null && !jsonObj.get("customer").isJsonNull()) { VouchersRedemptionGetResponseBodyRedemptionEntriesItemCustomer.validateJsonElement(jsonObj.get("customer")); } - if (!jsonObj.get("related_object_type").isJsonPrimitive()) { + if ((jsonObj.get("related_object_type") != null && !jsonObj.get("related_object_type").isJsonNull()) && !jsonObj.get("related_object_type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_type").toString())); } try { @@ -1167,7 +1146,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `related_object_type` to be a valid element of RelatedObjectTypeEnum enum got `%s` instead", jsonObj.get("related_object_type").toString())); } } - if (!jsonObj.get("related_object_id").isJsonPrimitive()) { + if ((jsonObj.get("related_object_id") != null && !jsonObj.get("related_object_id").isJsonNull()) && !jsonObj.get("related_object_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `related_object_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("related_object_id").toString())); } // validate the optional field `voucher` diff --git a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel.java b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel.java index 7c373f2f..935281f1 100644 --- a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel.java +++ b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel.java @@ -63,9 +63,7 @@ public class VouchersRedemptionGetResponseBodyRedemptionEntriesItemChannel { public enum ChannelTypeEnum { USER("USER"), - API("API"), - - UNKNOWN_ENUM("unknown_enum"); + API("API"); private String value; @@ -88,7 +86,7 @@ public static ChannelTypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemCustomer.java b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemCustomer.java index 06039154..7b45b1ea 100644 --- a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemCustomer.java +++ b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemCustomer.java @@ -77,9 +77,7 @@ public class VouchersRedemptionGetResponseBodyRedemptionEntriesItemCustomer { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - CUSTOMER("customer"), - - UNKNOWN_ENUM("unknown_enum"); + CUSTOMER("customer"); private String value; @@ -102,7 +100,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemOrder.java b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemOrder.java index cf2aab79..33d75e5f 100644 --- a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemOrder.java +++ b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemOrder.java @@ -86,9 +86,7 @@ public enum StatusEnum { CANCELED("CANCELED"), - FULFILLED("FULFILLED"), - - UNKNOWN_ENUM("unknown_enum"); + FULFILLED("FULFILLED"); private String value; @@ -111,7 +109,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -189,9 +187,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - ORDER("order"), - - UNKNOWN_ENUM("unknown_enum"); + ORDER("order"); private String value; @@ -214,7 +210,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaign.java b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaign.java index ac0a8655..5f38a6ee 100644 --- a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaign.java +++ b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemPromotionTierCampaign.java @@ -90,9 +90,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -115,7 +113,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucher.java b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucher.java index ccccbd28..84f5e12d 100644 --- a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucher.java +++ b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucher.java @@ -104,9 +104,7 @@ public enum TypeEnum { DISCOUNT_VOUCHER("DISCOUNT_VOUCHER"), - LOYALTY_CARD("LOYALTY_CARD"), - - UNKNOWN_ENUM("unknown_enum"); + LOYALTY_CARD("LOYALTY_CARD"); private String value; @@ -129,7 +127,7 @@ public static TypeEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -191,9 +189,7 @@ public enum ValidityDayOfWeekEnum { NUMBER_5(5), - NUMBER_6(6), - - NUMBER_unknown_enum(11184809); + NUMBER_6(6); private Integer value; @@ -216,7 +212,7 @@ public static ValidityDayOfWeekEnum fromValue(Integer value) { return b; } } - return NUMBER_unknown_enum; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherGift.java b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherGift.java index c6b7f263..dbfc9976 100644 --- a/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherGift.java +++ b/src/main/java/voucherify/client/model/VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherGift.java @@ -67,9 +67,7 @@ public class VouchersRedemptionGetResponseBodyRedemptionEntriesItemVoucherGift { public enum EffectEnum { ORDER("APPLY_TO_ORDER"), - ITEMS("APPLY_TO_ITEMS"), - - UNKNOWN_ENUM("unknown_enum"); + ITEMS("APPLY_TO_ITEMS"); private String value; @@ -92,7 +90,7 @@ public static EffectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { diff --git a/src/main/java/voucherify/client/model/VouchersTransactionsExportCreateResponseBody.java b/src/main/java/voucherify/client/model/VouchersTransactionsExportCreateResponseBody.java index e9553a2a..e73dbcc4 100644 --- a/src/main/java/voucherify/client/model/VouchersTransactionsExportCreateResponseBody.java +++ b/src/main/java/voucherify/client/model/VouchersTransactionsExportCreateResponseBody.java @@ -65,9 +65,7 @@ public class VouchersTransactionsExportCreateResponseBody { */ @JsonAdapter(ObjectEnum.Adapter.class) public enum ObjectEnum { - EXPORT("export"), - - UNKNOWN_ENUM("unknown_enum"); + EXPORT("export"); private String value; @@ -90,7 +88,7 @@ public static ObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -120,9 +118,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - SCHEDULED("SCHEDULED"), - - UNKNOWN_ENUM("unknown_enum"); + SCHEDULED("SCHEDULED"); private String value; @@ -145,7 +141,7 @@ public static StatusEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -175,9 +171,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(ExportedObjectEnum.Adapter.class) public enum ExportedObjectEnum { - VOUCHER_TRANSACTIONS("voucher_transactions"), - - UNKNOWN_ENUM("unknown_enum"); + VOUCHER_TRANSACTIONS("voucher_transactions"); private String value; @@ -200,7 +194,7 @@ public static ExportedObjectEnum fromValue(String value) { return b; } } - return UNKNOWN_ENUM; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -246,7 +240,7 @@ public VouchersTransactionsExportCreateResponseBody id(String id) { * Unique export ID. * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getId() { return id; } @@ -267,7 +261,7 @@ public VouchersTransactionsExportCreateResponseBody _object(ObjectEnum _object) * The type of object being represented. This object stores information about the `export`. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ObjectEnum getObject() { return _object; } @@ -288,7 +282,7 @@ public VouchersTransactionsExportCreateResponseBody createdAt(OffsetDateTime cre * Timestamp representing the date and time when the export was scheduled in ISO 8601 format. * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { return createdAt; } @@ -309,7 +303,7 @@ public VouchersTransactionsExportCreateResponseBody status(StatusEnum status) { * Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -330,7 +324,7 @@ public VouchersTransactionsExportCreateResponseBody channel(String channel) { * The channel through which the export was triggered. * @return channel **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getChannel() { return channel; } @@ -351,7 +345,7 @@ public VouchersTransactionsExportCreateResponseBody exportedObject(ExportedObjec * The type of exported object. * @return exportedObject **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public ExportedObjectEnum getExportedObject() { return exportedObject; } @@ -372,7 +366,7 @@ public VouchersTransactionsExportCreateResponseBody parameters(VoucherTransactio * Get parameters * @return parameters **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public VoucherTransactionsFilters getParameters() { return parameters; } @@ -555,13 +549,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("created_at"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("channel"); - openapiRequiredFields.add("exported_object"); - openapiRequiredFields.add("parameters"); } /** @@ -576,18 +563,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VouchersTransactionsExportCreateResponseBody is not found in the empty JSON string", VouchersTransactionsExportCreateResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VouchersTransactionsExportCreateResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } try { @@ -603,7 +583,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `object` to be a valid element of ObjectEnum enum got `%s` instead", jsonObj.get("object").toString())); } } - if (!jsonObj.get("status").isJsonPrimitive()) { + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } try { @@ -619,10 +599,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `status` to be a valid element of StatusEnum enum got `%s` instead", jsonObj.get("status").toString())); } } - if (!jsonObj.get("channel").isJsonPrimitive()) { + if ((jsonObj.get("channel") != null && !jsonObj.get("channel").isJsonNull()) && !jsonObj.get("channel").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `channel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("channel").toString())); } - if (!jsonObj.get("exported_object").isJsonPrimitive()) { + if ((jsonObj.get("exported_object") != null && !jsonObj.get("exported_object").isJsonNull()) && !jsonObj.get("exported_object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `exported_object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exported_object").toString())); } try { @@ -638,8 +618,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("Expected the field `exported_object` to be a valid element of ExportedObjectEnum enum got `%s` instead", jsonObj.get("exported_object").toString())); } } - // validate the required field `parameters` - VoucherTransactionsFilters.validateJsonElement(jsonObj.get("parameters")); + // validate the optional field `parameters` + if (jsonObj.get("parameters") != null && !jsonObj.get("parameters").isJsonNull()) { + VoucherTransactionsFilters.validateJsonElement(jsonObj.get("parameters")); + } // validate the optional field `result` if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { VoucherTransactionsExportResult.validateJsonElement(jsonObj.get("result")); diff --git a/src/main/java/voucherify/client/model/VouchersTransactionsListResponseBody.java b/src/main/java/voucherify/client/model/VouchersTransactionsListResponseBody.java index 0c0e0cf1..14d5c168 100644 --- a/src/main/java/voucherify/client/model/VouchersTransactionsListResponseBody.java +++ b/src/main/java/voucherify/client/model/VouchersTransactionsListResponseBody.java @@ -65,7 +65,7 @@ public class VouchersTransactionsListResponseBody { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_HAS_MORE = "has_more"; @SerializedName(SERIALIZED_NAME_HAS_MORE) @@ -84,7 +84,7 @@ public VouchersTransactionsListResponseBody _object(String _object) { * The type of the object represented by JSON. * @return _object **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getObject() { return _object; } @@ -105,7 +105,7 @@ public VouchersTransactionsListResponseBody dataRef(String dataRef) { * Identifies the name of the attribute that contains the array of transaction objects. * @return dataRef **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDataRef() { return dataRef; } @@ -134,7 +134,7 @@ public VouchersTransactionsListResponseBody addDataItem(VoucherTransaction dataI * A dictionary that contains an array of transactions. Each entry in the array is a separate transaction object. * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getData() { return data; } @@ -155,7 +155,7 @@ public VouchersTransactionsListResponseBody hasMore(Boolean hasMore) { * 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 (with a different page or a different start date filter) to get more records returned in the results. * @return hasMore **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getHasMore() { return hasMore; } @@ -270,10 +270,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("object"); - openapiRequiredFields.add("data_ref"); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("has_more"); } /** @@ -288,30 +284,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VouchersTransactionsListResponseBody is not found in the empty JSON string", VouchersTransactionsListResponseBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VouchersTransactionsListResponseBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("object").isJsonPrimitive()) { + if ((jsonObj.get("object") != null && !jsonObj.get("object").isJsonNull()) && !jsonObj.get("object").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("object").toString())); } - if (!jsonObj.get("data_ref").isJsonPrimitive()) { + if ((jsonObj.get("data_ref") != null && !jsonObj.get("data_ref").isJsonNull()) && !jsonObj.get("data_ref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `data_ref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data_ref").toString())); } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + VoucherTransaction.validateJsonElement(jsonArraydata.get(i)); + }; + } } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - VoucherTransaction.validateJsonElement(jsonArraydata.get(i)); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory {