From 6d282b47ae8b68a3f8b06ef26468fcb45fc8a9eb Mon Sep 17 00:00:00 2001 From: Sebastian Bossert Date: Mon, 30 Jul 2018 11:10:03 +0200 Subject: [PATCH] Release 1.0.4 --- LICENSE | 201 ++ README.md | 19 +- docs/en/assets/base.css | 646 +++++ docs/en/assets/base.js | 12 + docs/en/assets/jquery.js | 2 + docs/en/assets/scrollspy.js | 9 + docs/en/assets/sticky-kit.js | 5 + docs/en/documentation.html | 399 +++ docs/en/resource/alert.png | Bin 0 -> 134535 bytes docs/en/resource/refund.png | Bin 0 -> 23306 bytes docs/en/resource/settings.png | Bin 0 -> 61236 bytes .../extension/payment/postfinancecheckout.php | 498 ++++ .../extension/postfinancecheckout/alert.php | 52 + .../postfinancecheckout/completion.php | 49 + .../extension/postfinancecheckout/event.php | 24 + .../extension/postfinancecheckout/pdf.php | 19 + .../extension/postfinancecheckout/refund.php | 184 ++ .../extension/postfinancecheckout/update.php | 56 + .../extension/postfinancecheckout/void.php | 45 + .../extension/payment/postfinancecheckout.php | 247 ++ .../extension/postfinancecheckout/alert.php | 47 + .../extension/postfinancecheckout/dynamic.php | 241 ++ .../postfinancecheckout/migration.php | 233 ++ .../postfinancecheckout/modification.php | 109 + .../extension/postfinancecheckout/order.php | 114 + .../extension/postfinancecheckout/setup.php | 88 + .../extension/payment/postfinancecheckout.png | Bin 0 -> 517 bytes .../javascript/postfinancecheckout/order.js | 43 + .../javascript/postfinancecheckout/refund.js | 68 + .../extension/payment/postfinancecheckout.tpl | 318 +++ .../extension/postfinancecheckout/error.tpl | 24 + .../extension/postfinancecheckout/labels.tpl | 39 + .../extension/postfinancecheckout/refund.tpl | 188 ++ .../extension/postfinancecheckout/cron.php | 100 + .../extension/postfinancecheckout/error.php | 35 + .../extension/postfinancecheckout/event.php | 210 ++ .../extension/postfinancecheckout/pdf.php | 20 + .../extension/postfinancecheckout/webhook.php | 47 + .../extension/payment/postfinancecheckout.php | 29 + .../extension/payment/postfinancecheckout.php | 11 + .../extension/postfinancecheckout/order.php | 55 + .../view/javascript/postfinancecheckout.js | 57 + .../payment/postfinancecheckout/iframe.tpl | 34 + .../extension/postfinancecheckout/error.tpl | 24 + .../library/postfinancecheckout/autoload.php | 75 + .../controller/abstract_controller.php | 67 + .../controller/abstract_event.php | 10 + .../controller/abstract_pdf.php | 44 + .../dynamic/admin/controller.mock | 10 + .../dynamic/admin/controller.php | 310 +++ .../dynamic/admin/language.mock | 3 + .../dynamic/catalog/controller.mock | 10 + .../dynamic/catalog/controller.php | 66 + .../dynamic/catalog/language.mock | 4 + .../dynamic/catalog/model.mock | 25 + .../dynamic/catalog/model.php | 53 + .../entity/abstract_entity.php | 219 ++ .../entity/abstract_job.php | 286 +++ .../postfinancecheckout/entity/alert.php | 70 + .../entity/completion_job.php | 22 + .../postfinancecheckout/entity/cron.php | 159 ++ .../entity/method_configuration.php | 82 + .../postfinancecheckout/entity/refund_job.php | 91 + .../entity/resource_type.php | 14 + .../entity/shipping_info.php | 56 + .../postfinancecheckout/entity/token_info.php | 58 + .../entity/transaction_info.php | 110 + .../postfinancecheckout/entity/void_job.php | 13 + .../library/postfinancecheckout/helper.php | 577 +++++ .../model/abstract_model.php | 49 + .../WalleeAdministration.ocmod.xml | 42 + .../modification/WalleeAlerts.ocmod.xml | 43 + .../modification/WalleeCore.ocmod.xml | 115 + .../modification/WalleeEvents.ocmod.xml | 39 + .../modification/WalleeFrontendPdf.ocmod.xml | 36 + .../WalleePreventConfirmationEmail.ocmod.xml | 18 + ...WalleeQuickCheckoutCompatibility.ocmod.xml | 19 + .../provider/abstract_provider.php | 102 + .../postfinancecheckout/provider/currency.php | 42 + .../provider/label_description_group.php | 43 + .../provider/label_descriptor.php | 42 + .../postfinancecheckout/provider/language.php | 68 + .../provider/payment_connector.php | 42 + .../provider/payment_method.php | 42 + .../service/abstract_job.php | 43 + .../service/abstract_service.php | 78 + .../service/completion.php | 64 + .../postfinancecheckout/service/line_item.php | 579 +++++ .../service/manual_task.php | 51 + .../service/method_configuration.php | 113 + .../postfinancecheckout/service/refund.php | 102 + .../postfinancecheckout/service/token.php | 110 + .../service/transaction.php | 470 ++++ .../postfinancecheckout/service/void_job.php | 63 + .../postfinancecheckout/service/webhook.php | 255 ++ .../postfinancecheckout/version_helper.php | 149 ++ .../wallee-sdk/.travis.yml | 9 + .../postfinancecheckout/wallee-sdk/LICENSE | 201 ++ .../postfinancecheckout/wallee-sdk/README.md | 75 + .../wallee-sdk/autoload.php | 60 + .../wallee-sdk/composer.json | 33 + .../wallee-sdk/lib/ApiClient.php | 537 ++++ .../wallee-sdk/lib/ApiException.php | 117 + .../wallee-sdk/lib/ApiResponse.php | 95 + .../lib/Http/ConnectionException.php | 99 + .../wallee-sdk/lib/Http/CurlHttpClient.php | 144 ++ .../wallee-sdk/lib/Http/HttpClientFactory.php | 102 + .../wallee-sdk/lib/Http/HttpRequest.php | 416 +++ .../wallee-sdk/lib/Http/HttpResponse.php | 176 ++ .../wallee-sdk/lib/Http/IHttpClient.php | 66 + .../wallee-sdk/lib/Http/SocketHttpClient.php | 454 ++++ .../lib/Model/AbstractAccountUpdate.php | 176 ++ .../Model/AbstractApplicationUserUpdate.php | 176 ++ .../AbstractDebtCollectionCaseUpdate.php | 380 +++ .../lib/Model/AbstractHumanUserUpdate.php | 312 +++ .../lib/Model/AbstractPaymentLinkUpdate.php | 482 ++++ .../lib/Model/AbstractSpaceUpdate.php | 312 +++ .../lib/Model/AbstractSubscriberUpdate.php | 414 +++ .../AbstractSubscriptionAffiliateUpdate.php | 244 ++ .../AbstractSubscriptionMetricUpdate.php | 176 ++ .../AbstractSubscriptionProductActive.php | 278 ++ .../lib/Model/AbstractTokenUpdate.php | 312 +++ .../lib/Model/AbstractTransactionPending.php | 720 ++++++ .../Model/AbstractWebhookListenerUpdate.php | 176 ++ .../lib/Model/AbstractWebhookUrlUpdate.php | 210 ++ .../wallee-sdk/lib/Model/Account.php | 465 ++++ .../wallee-sdk/lib/Model/AccountCreate.php | 146 ++ .../wallee-sdk/lib/Model/AccountState.php | 47 + .../wallee-sdk/lib/Model/AccountType.php | 44 + .../wallee-sdk/lib/Model/AccountUpdate.php | 186 ++ .../wallee-sdk/lib/Model/Address.php | 735 ++++++ .../wallee-sdk/lib/Model/AddressCreate.php | 789 ++++++ .../wallee-sdk/lib/Model/ApplicationUser.php | 202 ++ .../lib/Model/ApplicationUserCreate.php | 149 ++ .../Model/ApplicationUserCreateWithMacKey.php | 143 ++ .../lib/Model/ApplicationUserUpdate.php | 186 ++ .../lib/Model/AttachmentResource.php | 178 ++ .../wallee-sdk/lib/Model/Charge.php | 465 ++++ .../wallee-sdk/lib/Model/ChargeAttempt.php | 756 ++++++ .../lib/Model/ChargeAttemptEnvironment.php | 43 + .../lib/Model/ChargeAttemptState.php | 44 + .../wallee-sdk/lib/Model/ChargeFlow.php | 369 +++ .../wallee-sdk/lib/Model/ChargeFlowLevel.php | 431 ++++ .../Model/ChargeFlowLevelConfiguration.php | 431 ++++ .../ChargeFlowLevelConfigurationType.php | 208 ++ .../lib/Model/ChargeFlowLevelState.php | 44 + .../wallee-sdk/lib/Model/ChargeState.php | 44 + .../wallee-sdk/lib/Model/ChargeType.php | 44 + .../wallee-sdk/lib/Model/ClientError.php | 267 ++ .../wallee-sdk/lib/Model/ClientErrorType.php | 44 + .../wallee-sdk/lib/Model/Condition.php | 335 +++ .../wallee-sdk/lib/Model/ConditionType.php | 208 ++ .../lib/Model/ConnectorInvocation.php | 301 +++ .../lib/Model/ConnectorInvocationStage.php | 45 + .../lib/Model/CreationEntityState.php | 46 + .../wallee-sdk/lib/Model/CriteriaOperator.php | 51 + .../lib/Model/CustomersPresence.php | 44 + .../lib/Model/DataCollectionType.php | 43 + .../lib/Model/DatabaseTranslatedString.php | 208 ++ .../Model/DatabaseTranslatedStringCreate.php | 143 ++ .../Model/DatabaseTranslatedStringItem.php | 202 ++ .../DatabaseTranslatedStringItemCreate.php | 180 ++ .../lib/Model/DebtCollectionCase.php | 1100 ++++++++ .../lib/Model/DebtCollectionCaseCreate.php | 220 ++ .../lib/Model/DebtCollectionCaseDocument.php | 459 ++++ .../lib/Model/DebtCollectionCaseSource.php | 239 ++ .../lib/Model/DebtCollectionCaseState.php | 48 + .../lib/Model/DebtCollectionCaseUpdate.php | 186 ++ .../lib/Model/DebtCollectionEnvironment.php | 43 + .../lib/Model/DebtCollectionReceipt.php | 425 +++ .../lib/Model/DebtCollectionReceiptSource.php | 208 ++ .../wallee-sdk/lib/Model/DebtCollector.php | 208 ++ .../lib/Model/DebtCollectorCondition.php | 335 +++ .../lib/Model/DebtCollectorConditionType.php | 208 ++ .../lib/Model/DebtCollectorConfiguration.php | 465 ++++ .../lib/Model/DeliveryIndication.php | 431 ++++ .../DeliveryIndicationDecisionReason.php | 208 ++ .../lib/Model/DeliveryIndicationState.php | 45 + .../wallee-sdk/lib/Model/DocumentTemplate.php | 400 +++ .../lib/Model/DocumentTemplateType.php | 239 ++ .../wallee-sdk/lib/Model/EmailSender.php | 401 +++ .../wallee-sdk/lib/Model/EmailSenderType.php | 240 ++ .../wallee-sdk/lib/Model/EmailTemplate.php | 540 ++++ .../lib/Model/EmailTemplateType.php | 404 +++ .../lib/Model/EntityExportRequest.php | 180 ++ .../wallee-sdk/lib/Model/EntityQuery.php | 279 ++ .../lib/Model/EntityQueryFilter.php | 282 ++ .../lib/Model/EntityQueryFilterType.php | 44 + .../lib/Model/EntityQueryOrderBy.php | 183 ++ .../lib/Model/EntityQueryOrderByType.php | 43 + .../wallee-sdk/lib/Model/EntityReference.php | 111 + .../wallee-sdk/lib/Model/Environment.php | 43 + .../wallee-sdk/lib/Model/FailureCategory.php | 46 + .../wallee-sdk/lib/Model/FailureReason.php | 276 ++ .../wallee-sdk/lib/Model/Feature.php | 366 +++ .../wallee-sdk/lib/Model/Gender.php | 43 + .../wallee-sdk/lib/Model/HumanUser.php | 363 +++ .../wallee-sdk/lib/Model/HumanUserCreate.php | 146 ++ .../wallee-sdk/lib/Model/HumanUserUpdate.php | 186 ++ .../wallee-sdk/lib/Model/IEnum.php | 34 + .../lib/Model/InstallmentCalculatedPlan.php | 276 ++ .../lib/Model/InstallmentCalculatedSlice.php | 205 ++ .../lib/Model/InstallmentPayment.php | 403 +++ .../lib/Model/InstallmentPaymentSlice.php | 372 +++ .../Model/InstallmentPaymentSliceState.php | 48 + .../lib/Model/InstallmentPaymentState.php | 49 + .../Model/InstallmentPlanConfiguration.php | 663 +++++ .../InstallmentPlanSliceConfiguration.php | 434 ++++ .../wallee-sdk/lib/Model/Label.php | 276 ++ .../wallee-sdk/lib/Model/LabelDescriptor.php | 369 +++ .../lib/Model/LabelDescriptorCategory.php | 43 + .../lib/Model/LabelDescriptorGroup.php | 239 ++ .../lib/Model/LabelDescriptorType.php | 208 ++ .../lib/Model/LegalOrganizationForm.php | 270 ++ .../wallee-sdk/lib/Model/LineItem.php | 583 +++++ .../lib/Model/LineItemAttribute.php | 171 ++ .../lib/Model/LineItemAttributeCreate.php | 183 ++ .../wallee-sdk/lib/Model/LineItemCreate.php | 430 ++++ .../lib/Model/LineItemReduction.php | 202 ++ .../lib/Model/LineItemReductionCreate.php | 220 ++ .../wallee-sdk/lib/Model/LineItemType.php | 45 + .../wallee-sdk/lib/Model/LocalizedString.php | 202 ++ .../wallee-sdk/lib/Model/ManualTask.php | 425 +++ .../wallee-sdk/lib/Model/ManualTaskAction.php | 239 ++ .../lib/Model/ManualTaskActionStyle.php | 44 + .../wallee-sdk/lib/Model/ManualTaskState.php | 44 + .../wallee-sdk/lib/Model/ManualTaskType.php | 242 ++ .../wallee-sdk/lib/Model/MetricUsage.php | 239 ++ .../lib/Model/ModelResourcePath.php | 335 +++ .../lib/Model/OneClickPaymentMode.php | 44 + .../wallee-sdk/lib/Model/PaymentConnector.php | 539 ++++ .../Model/PaymentConnectorConfiguration.php | 533 ++++ .../lib/Model/PaymentConnectorFeature.php | 205 ++ .../wallee-sdk/lib/Model/PaymentContract.php | 598 +++++ .../lib/Model/PaymentContractState.php | 46 + .../lib/Model/PaymentContractType.php | 242 ++ .../wallee-sdk/lib/Model/PaymentLink.php | 716 ++++++ .../lib/Model/PaymentLinkActive.php | 146 ++ .../lib/Model/PaymentLinkCreate.php | 217 ++ .../lib/Model/PaymentLinkProtectionMode.php | 43 + .../lib/Model/PaymentLinkUpdate.php | 557 ++++ .../wallee-sdk/lib/Model/PaymentMethod.php | 341 +++ .../lib/Model/PaymentMethodBrand.php | 301 +++ .../lib/Model/PaymentMethodConfiguration.php | 666 +++++ .../lib/Model/PaymentPrimaryRiskTaker.php | 44 + .../wallee-sdk/lib/Model/PaymentProcessor.php | 372 +++ .../Model/PaymentProcessorConfiguration.php | 366 +++ .../wallee-sdk/lib/Model/Permission.php | 400 +++ .../lib/Model/PersistableCurrencyAmount.php | 171 ++ .../Model/PersistableCurrencyAmountUpdate.php | 177 ++ .../wallee-sdk/lib/Model/ProductFeeType.php | 44 + .../lib/Model/ProductMeteredFee.php | 412 +++ .../lib/Model/ProductMeteredFeeUpdate.php | 353 +++ .../lib/Model/ProductMeteredTierFee.php | 276 ++ .../lib/Model/ProductMeteredTierFeeUpdate.php | 285 ++ .../lib/Model/ProductMeteredTierPricing.php | 43 + .../wallee-sdk/lib/Model/ProductPeriodFee.php | 409 +++ .../lib/Model/ProductPeriodFeeUpdate.php | 353 +++ .../wallee-sdk/lib/Model/ProductSetupFee.php | 446 ++++ .../lib/Model/ProductSetupFeeUpdate.php | 387 +++ .../wallee-sdk/lib/Model/Refund.php | 954 +++++++ .../wallee-sdk/lib/Model/RefundCreate.php | 291 +++ .../wallee-sdk/lib/Model/RefundState.php | 46 + .../wallee-sdk/lib/Model/RefundType.php | 45 + .../wallee-sdk/lib/Model/RenderedDocument.php | 236 ++ .../wallee-sdk/lib/Model/ResourceState.php | 44 + .../lib/Model/RestAddressFormat.php | 242 ++ .../lib/Model/RestAddressFormatField.php | 51 + .../wallee-sdk/lib/Model/RestCountry.php | 301 +++ .../wallee-sdk/lib/Model/RestCountryState.php | 233 ++ .../wallee-sdk/lib/Model/RestCurrency.php | 202 ++ .../wallee-sdk/lib/Model/RestLanguage.php | 295 +++ .../wallee-sdk/lib/Model/Role.php | 344 +++ .../wallee-sdk/lib/Model/Scope.php | 465 ++++ .../wallee-sdk/lib/Model/ServerError.php | 202 ++ .../wallee-sdk/lib/Model/Space.php | 564 ++++ .../wallee-sdk/lib/Model/SpaceAddress.php | 512 ++++ .../lib/Model/SpaceAddressCreate.php | 551 ++++ .../lib/Model/SpaceAddressSetter.php | 426 +++ .../wallee-sdk/lib/Model/SpaceCreate.php | 149 ++ .../wallee-sdk/lib/Model/SpaceReference.php | 335 +++ .../lib/Model/SpaceReferenceState.php | 46 + .../wallee-sdk/lib/Model/SpaceUpdate.php | 186 ++ .../wallee-sdk/lib/Model/SpaceView.php | 338 +++ .../wallee-sdk/lib/Model/StaticValue.php | 242 ++ .../wallee-sdk/lib/Model/Subscriber.php | 598 +++++ .../wallee-sdk/lib/Model/SubscriberActive.php | 146 ++ .../wallee-sdk/lib/Model/SubscriberCreate.php | 183 ++ .../wallee-sdk/lib/Model/SubscriberUpdate.php | 489 ++++ .../wallee-sdk/lib/Model/Subscription.php | 623 +++++ .../lib/Model/SubscriptionAffiliate.php | 431 ++++ .../lib/Model/SubscriptionAffiliateCreate.php | 208 ++ .../Model/SubscriptionAffiliateDeleted.php | 113 + .../Model/SubscriptionAffiliateDeleting.php | 113 + .../Model/SubscriptionAffiliateInactive.php | 113 + .../lib/Model/SubscriptionAffiliateUpdate.php | 319 +++ .../lib/Model/SubscriptionChangeRequest.php | 285 ++ .../lib/Model/SubscriptionCharge.php | 753 ++++++ .../lib/Model/SubscriptionChargeCreate.php | 356 +++ .../SubscriptionChargeProcessingType.php | 43 + .../lib/Model/SubscriptionChargeState.php | 46 + .../lib/Model/SubscriptionChargeType.php | 43 + .../lib/Model/SubscriptionCreateRequest.php | 254 ++ .../lib/Model/SubscriptionLedgerEntry.php | 617 +++++ .../Model/SubscriptionLedgerEntryCreate.php | 328 +++ .../Model/SubscriptionLedgerEntryState.php | 44 + .../lib/Model/SubscriptionMetric.php | 375 +++ .../lib/Model/SubscriptionMetricActive.php | 113 + .../lib/Model/SubscriptionMetricCreate.php | 200 ++ .../lib/Model/SubscriptionMetricType.php | 242 ++ .../lib/Model/SubscriptionMetricUpdate.php | 251 ++ .../Model/SubscriptionMetricUsageReport.php | 456 ++++ .../SubscriptionMetricUsageReportCreate.php | 291 +++ .../lib/Model/SubscriptionPending.php | 248 ++ .../lib/Model/SubscriptionPeriodBill.php | 462 ++++ .../lib/Model/SubscriptionPeriodBillState.php | 43 + .../lib/Model/SubscriptionProduct.php | 462 ++++ .../lib/Model/SubscriptionProductActive.php | 186 ++ .../Model/SubscriptionProductComponent.php | 471 ++++ .../SubscriptionProductComponentGroup.php | 338 +++ ...ubscriptionProductComponentGroupUpdate.php | 319 +++ .../SubscriptionProductComponentReference.php | 335 +++ ...criptionProductComponentReferenceState.php | 45 + .../SubscriptionProductComponentUpdate.php | 455 ++++ .../lib/Model/SubscriptionProductCreate.php | 149 ++ .../Model/SubscriptionProductRetirement.php | 338 +++ .../SubscriptionProductRetirementCreate.php | 214 ++ .../lib/Model/SubscriptionProductState.php | 46 + .../lib/Model/SubscriptionProductVersion.php | 747 ++++++ .../SubscriptionProductVersionPending.php | 489 ++++ .../SubscriptionProductVersionRetirement.php | 338 +++ ...criptionProductVersionRetirementCreate.php | 214 ++ .../Model/SubscriptionProductVersionState.php | 46 + .../lib/Model/SubscriptionState.php | 48 + .../lib/Model/SubscriptionSuspension.php | 558 ++++ .../Model/SubscriptionSuspensionAction.php | 43 + .../Model/SubscriptionSuspensionCreate.php | 254 ++ .../Model/SubscriptionSuspensionReason.php | 44 + .../Model/SubscriptionSuspensionRunning.php | 113 + .../lib/Model/SubscriptionSuspensionState.php | 43 + .../lib/Model/SubscriptionUpdate.php | 251 ++ .../lib/Model/SubscriptionVersion.php | 685 +++++ .../lib/Model/SubscriptionVersionState.php | 47 + .../wallee-sdk/lib/Model/Tax.php | 171 ++ .../wallee-sdk/lib/Model/TaxClass.php | 335 +++ .../wallee-sdk/lib/Model/TaxCreate.php | 183 ++ .../wallee-sdk/lib/Model/TenantDatabase.php | 208 ++ .../wallee-sdk/lib/Model/Token.php | 521 ++++ .../wallee-sdk/lib/Model/TokenCreate.php | 183 ++ .../wallee-sdk/lib/Model/TokenUpdate.php | 186 ++ .../wallee-sdk/lib/Model/TokenVersion.php | 728 ++++++ .../lib/Model/TokenVersionState.php | 44 + .../wallee-sdk/lib/Model/TokenVersionType.php | 242 ++ .../lib/Model/TokenizationnMode.php | 44 + .../wallee-sdk/lib/Model/Transaction.php | 1871 ++++++++++++++ .../lib/Model/TransactionAwareEntity.php | 205 ++ .../lib/Model/TransactionCompletion.php | 654 +++++ .../lib/Model/TransactionCompletionMode.php | 44 + .../lib/Model/TransactionCompletionState.php | 45 + .../lib/Model/TransactionCreate.php | 450 ++++ ...ransactionEnvironmentSelectionStrategy.php | 43 + .../wallee-sdk/lib/Model/TransactionGroup.php | 366 +++ .../lib/Model/TransactionGroupState.php | 44 + .../lib/Model/TransactionInvoice.php | 651 +++++ .../Model/TransactionInvoiceReplacement.php | 285 ++ .../lib/Model/TransactionInvoiceState.php | 48 + .../TransactionLineItemUpdateRequest.php | 180 ++ .../lib/Model/TransactionLineItemVersion.php | 428 +++ .../lib/Model/TransactionPending.php | 186 ++ .../wallee-sdk/lib/Model/TransactionState.php | 51 + .../Model/TransactionUserInterfaceType.php | 44 + .../wallee-sdk/lib/Model/TransactionVoid.php | 623 +++++ .../lib/Model/TransactionVoidMode.php | 43 + .../lib/Model/TransactionVoidState.php | 45 + .../lib/Model/UnencryptedCardData.php | 233 ++ .../lib/Model/UnencryptedCardDataCreate.php | 248 ++ .../wallee-sdk/lib/Model/User.php | 310 +++ .../wallee-sdk/lib/Model/UserAccountRole.php | 301 +++ .../wallee-sdk/lib/Model/UserSpaceRole.php | 270 ++ .../wallee-sdk/lib/Model/UserType.php | 46 + .../wallee-sdk/lib/Model/WebhookIdentity.php | 304 +++ .../wallee-sdk/lib/Model/WebhookListener.php | 468 ++++ .../lib/Model/WebhookListenerCreate.php | 291 +++ .../lib/Model/WebhookListenerEntity.php | 205 ++ .../lib/Model/WebhookListenerUpdate.php | 186 ++ .../wallee-sdk/lib/Model/WebhookUrl.php | 335 +++ .../wallee-sdk/lib/Model/WebhookUrlCreate.php | 113 + .../wallee-sdk/lib/Model/WebhookUrlUpdate.php | 186 ++ .../wallee-sdk/lib/ObjectSerializer.php | 368 +++ .../wallee-sdk/lib/Service/AccountService.php | 631 +++++ .../lib/Service/ApplicationUserService.php | 631 +++++ .../lib/Service/CardProcessingService.php | 319 +++ .../lib/Service/ChargeAttemptService.php | 372 +++ .../lib/Service/ChargeFlowLevelService.php | 473 ++++ .../lib/Service/ChargeFlowService.php | 592 +++++ .../lib/Service/ConditionTypeService.php | 244 ++ .../wallee-sdk/lib/Service/CountryService.php | 152 ++ .../lib/Service/CountryStateService.php | 244 ++ .../lib/Service/CurrencyService.php | 152 ++ .../lib/Service/DebtCollectionCaseService.php | 1351 ++++++++++ .../DebtCollectorConfigurationService.php | 372 +++ .../lib/Service/DebtCollectorService.php | 244 ++ .../lib/Service/DeliveryIndicationService.php | 578 +++++ .../lib/Service/DocumentTemplateService.php | 372 +++ .../Service/DocumentTemplateTypeService.php | 244 ++ .../lib/Service/EmailSenderService.php | 365 +++ .../lib/Service/EmailSenderTypeService.php | 237 ++ .../lib/Service/EmailTemplateService.php | 361 +++ .../lib/Service/EmailTemplateTypeService.php | 237 ++ .../lib/Service/HumanUserService.php | 725 ++++++ .../lib/Service/InstallmentPaymentService.php | 486 ++++ .../InstallmentPaymentSliceService.php | 376 +++ .../InstallmentPlanCalculationService.php | 170 ++ .../InstallmentPlanConfigurationService.php | 376 +++ ...stallmentPlanSliceConfigurationService.php | 376 +++ .../Service/LabelDescriptionGroupService.php | 244 ++ .../lib/Service/LabelDescriptionService.php | 244 ++ .../lib/Service/LanguageService.php | 152 ++ .../Service/LegalOrganizationFormService.php | 336 +++ .../lib/Service/ManualTaskService.php | 372 +++ .../lib/Service/MerticUsageService.php | 179 ++ .../PaymentConnectorConfigurationService.php | 372 +++ .../lib/Service/PaymentConnectorService.php | 244 ++ .../lib/Service/PaymentLinkService.php | 685 +++++ .../PaymentMethodConfigurationService.php | 372 +++ .../lib/Service/PaymentMethodService.php | 244 ++ .../PaymentProcessorConfigurationService.php | 372 +++ .../lib/Service/PaymentProcessorService.php | 244 ++ .../lib/Service/PermissionService.php | 244 ++ .../wallee-sdk/lib/Service/RefundService.php | 778 ++++++ .../wallee-sdk/lib/Service/SpaceService.php | 631 +++++ .../lib/Service/StaticValueService.php | 244 ++ .../lib/Service/SubscriberService.php | 685 +++++ .../Service/SubscriptionAffiliateService.php | 685 +++++ .../lib/Service/SubscriptionChargeService.php | 576 +++++ .../SubscriptionLedgerEntryService.php | 475 ++++ .../lib/Service/SubscriptionMetricService.php | 685 +++++ .../SubscriptionMetricUsageService.php | 475 ++++ .../Service/SubscriptionPeriodBillService.php | 372 +++ ...bscriptionProductComponentGroupService.php | 685 +++++ .../SubscriptionProductComponentService.php | 685 +++++ .../SubscriptionProductFeeTierService.php | 685 +++++ .../SubscriptionProductMeteredFeeService.php | 685 +++++ .../SubscriptionProductPeriodFeeService.php | 685 +++++ .../SubscriptionProductRetirementService.php | 475 ++++ .../Service/SubscriptionProductService.php | 582 +++++ .../SubscriptionProductSetupFeeService.php | 685 +++++ ...riptionProductVersionRetirementService.php | 475 ++++ .../SubscriptionProductVersionService.php | 683 +++++ .../lib/Service/SubscriptionService.php | 1018 ++++++++ .../Service/SubscriptionSuspensionService.php | 576 +++++ .../Service/SubscriptionVersionService.php | 372 +++ .../wallee-sdk/lib/Service/TokenService.php | 685 +++++ .../lib/Service/TokenVersionService.php | 473 ++++ .../Service/TransactionCompletionService.php | 574 +++++ .../lib/Service/TransactionInvoiceService.php | 787 ++++++ .../lib/Service/TransactionService.php | 2285 +++++++++++++++++ .../lib/Service/TransactionVoidService.php | 574 +++++ .../lib/Service/UserAccountRoleService.php | 373 +++ .../lib/Service/UserSpaceRoleService.php | 372 +++ .../lib/Service/WebhookListenerService.php | 685 +++++ .../lib/Service/WebhookUrlService.php | 685 +++++ .../wallee-sdk/lib/ValidationException.php | 80 + .../wallee-sdk/lib/VersioningException.php | 36 + .../wallee-sdk/lib/ca-bundle.crt | 70 + .../wallee-sdk/test/ApiClientTest.php | 77 + .../webhook/abstract_order_related.php | 78 + .../webhook/abstract_webhook.php | 32 + .../webhook/delivery_indication.php | 46 + .../postfinancecheckout/webhook/entity.php | 38 + .../webhook/manual_task.php | 19 + .../webhook/method_configuration.php | 19 + .../postfinancecheckout/webhook/request.php | 94 + .../postfinancecheckout/webhook/token.php | 14 + .../webhook/token_version.php | 13 + .../webhook/transaction.php | 112 + .../webhook/transaction_completion.php | 85 + .../webhook/transaction_refund.php | 97 + .../webhook/transaction_void.php | 82 + 479 files changed, 125684 insertions(+), 1 deletion(-) create mode 100644 LICENSE create mode 100644 docs/en/assets/base.css create mode 100644 docs/en/assets/base.js create mode 100644 docs/en/assets/jquery.js create mode 100644 docs/en/assets/scrollspy.js create mode 100644 docs/en/assets/sticky-kit.js create mode 100644 docs/en/documentation.html create mode 100644 docs/en/resource/alert.png create mode 100644 docs/en/resource/refund.png create mode 100644 docs/en/resource/settings.png create mode 100644 upload/admin/controller/extension/payment/postfinancecheckout.php create mode 100644 upload/admin/controller/extension/postfinancecheckout/alert.php create mode 100644 upload/admin/controller/extension/postfinancecheckout/completion.php create mode 100644 upload/admin/controller/extension/postfinancecheckout/event.php create mode 100644 upload/admin/controller/extension/postfinancecheckout/pdf.php create mode 100644 upload/admin/controller/extension/postfinancecheckout/refund.php create mode 100644 upload/admin/controller/extension/postfinancecheckout/update.php create mode 100644 upload/admin/controller/extension/postfinancecheckout/void.php create mode 100644 upload/admin/language/en-gb/extension/payment/postfinancecheckout.php create mode 100644 upload/admin/model/extension/postfinancecheckout/alert.php create mode 100644 upload/admin/model/extension/postfinancecheckout/dynamic.php create mode 100644 upload/admin/model/extension/postfinancecheckout/migration.php create mode 100644 upload/admin/model/extension/postfinancecheckout/modification.php create mode 100644 upload/admin/model/extension/postfinancecheckout/order.php create mode 100644 upload/admin/model/extension/postfinancecheckout/setup.php create mode 100644 upload/admin/view/image/extension/payment/postfinancecheckout.png create mode 100644 upload/admin/view/javascript/postfinancecheckout/order.js create mode 100644 upload/admin/view/javascript/postfinancecheckout/refund.js create mode 100644 upload/admin/view/template/extension/payment/postfinancecheckout.tpl create mode 100644 upload/admin/view/template/extension/postfinancecheckout/error.tpl create mode 100644 upload/admin/view/template/extension/postfinancecheckout/labels.tpl create mode 100644 upload/admin/view/template/extension/postfinancecheckout/refund.tpl create mode 100644 upload/catalog/controller/extension/postfinancecheckout/cron.php create mode 100644 upload/catalog/controller/extension/postfinancecheckout/error.php create mode 100644 upload/catalog/controller/extension/postfinancecheckout/event.php create mode 100644 upload/catalog/controller/extension/postfinancecheckout/pdf.php create mode 100644 upload/catalog/controller/extension/postfinancecheckout/webhook.php create mode 100644 upload/catalog/language/en-gb/extension/payment/postfinancecheckout.php create mode 100644 upload/catalog/model/extension/payment/postfinancecheckout.php create mode 100644 upload/catalog/model/extension/postfinancecheckout/order.php create mode 100644 upload/catalog/view/javascript/postfinancecheckout.js create mode 100644 upload/catalog/view/theme/default/template/extension/payment/postfinancecheckout/iframe.tpl create mode 100644 upload/catalog/view/theme/default/template/extension/postfinancecheckout/error.tpl create mode 100644 upload/system/library/postfinancecheckout/autoload.php create mode 100644 upload/system/library/postfinancecheckout/controller/abstract_controller.php create mode 100644 upload/system/library/postfinancecheckout/controller/abstract_event.php create mode 100644 upload/system/library/postfinancecheckout/controller/abstract_pdf.php create mode 100644 upload/system/library/postfinancecheckout/dynamic/admin/controller.mock create mode 100644 upload/system/library/postfinancecheckout/dynamic/admin/controller.php create mode 100644 upload/system/library/postfinancecheckout/dynamic/admin/language.mock create mode 100644 upload/system/library/postfinancecheckout/dynamic/catalog/controller.mock create mode 100644 upload/system/library/postfinancecheckout/dynamic/catalog/controller.php create mode 100644 upload/system/library/postfinancecheckout/dynamic/catalog/language.mock create mode 100644 upload/system/library/postfinancecheckout/dynamic/catalog/model.mock create mode 100644 upload/system/library/postfinancecheckout/dynamic/catalog/model.php create mode 100644 upload/system/library/postfinancecheckout/entity/abstract_entity.php create mode 100644 upload/system/library/postfinancecheckout/entity/abstract_job.php create mode 100644 upload/system/library/postfinancecheckout/entity/alert.php create mode 100644 upload/system/library/postfinancecheckout/entity/completion_job.php create mode 100644 upload/system/library/postfinancecheckout/entity/cron.php create mode 100644 upload/system/library/postfinancecheckout/entity/method_configuration.php create mode 100644 upload/system/library/postfinancecheckout/entity/refund_job.php create mode 100644 upload/system/library/postfinancecheckout/entity/resource_type.php create mode 100644 upload/system/library/postfinancecheckout/entity/shipping_info.php create mode 100644 upload/system/library/postfinancecheckout/entity/token_info.php create mode 100644 upload/system/library/postfinancecheckout/entity/transaction_info.php create mode 100644 upload/system/library/postfinancecheckout/entity/void_job.php create mode 100644 upload/system/library/postfinancecheckout/helper.php create mode 100644 upload/system/library/postfinancecheckout/model/abstract_model.php create mode 100644 upload/system/library/postfinancecheckout/modification/WalleeAdministration.ocmod.xml create mode 100644 upload/system/library/postfinancecheckout/modification/WalleeAlerts.ocmod.xml create mode 100644 upload/system/library/postfinancecheckout/modification/WalleeCore.ocmod.xml create mode 100644 upload/system/library/postfinancecheckout/modification/WalleeEvents.ocmod.xml create mode 100644 upload/system/library/postfinancecheckout/modification/WalleeFrontendPdf.ocmod.xml create mode 100644 upload/system/library/postfinancecheckout/modification/WalleePreventConfirmationEmail.ocmod.xml create mode 100644 upload/system/library/postfinancecheckout/modification/WalleeQuickCheckoutCompatibility.ocmod.xml create mode 100644 upload/system/library/postfinancecheckout/provider/abstract_provider.php create mode 100644 upload/system/library/postfinancecheckout/provider/currency.php create mode 100644 upload/system/library/postfinancecheckout/provider/label_description_group.php create mode 100644 upload/system/library/postfinancecheckout/provider/label_descriptor.php create mode 100644 upload/system/library/postfinancecheckout/provider/language.php create mode 100644 upload/system/library/postfinancecheckout/provider/payment_connector.php create mode 100644 upload/system/library/postfinancecheckout/provider/payment_method.php create mode 100644 upload/system/library/postfinancecheckout/service/abstract_job.php create mode 100644 upload/system/library/postfinancecheckout/service/abstract_service.php create mode 100644 upload/system/library/postfinancecheckout/service/completion.php create mode 100644 upload/system/library/postfinancecheckout/service/line_item.php create mode 100644 upload/system/library/postfinancecheckout/service/manual_task.php create mode 100644 upload/system/library/postfinancecheckout/service/method_configuration.php create mode 100644 upload/system/library/postfinancecheckout/service/refund.php create mode 100644 upload/system/library/postfinancecheckout/service/token.php create mode 100644 upload/system/library/postfinancecheckout/service/transaction.php create mode 100644 upload/system/library/postfinancecheckout/service/void_job.php create mode 100644 upload/system/library/postfinancecheckout/service/webhook.php create mode 100644 upload/system/library/postfinancecheckout/version_helper.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/.travis.yml create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/LICENSE create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/README.md create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/autoload.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/composer.json create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/ApiClient.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/ApiException.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/ApiResponse.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/ConnectionException.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/CurlHttpClient.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/HttpClientFactory.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/HttpRequest.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/HttpResponse.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/IHttpClient.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/SocketHttpClient.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractAccountUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractApplicationUserUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractDebtCollectionCaseUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractHumanUserUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractPaymentLinkUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSpaceUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriberUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriptionAffiliateUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriptionMetricUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriptionProductActive.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractTokenUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractTransactionPending.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractWebhookListenerUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractWebhookUrlUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Account.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AccountCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AccountState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AccountType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AccountUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Address.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AddressCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUser.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUserCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUserCreateWithMacKey.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUserUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AttachmentResource.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Charge.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeAttempt.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeAttemptEnvironment.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeAttemptState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlow.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevel.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevelConfiguration.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevelConfigurationType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevelState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ClientError.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ClientErrorType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Condition.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ConditionType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ConnectorInvocation.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ConnectorInvocationStage.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/CreationEntityState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/CriteriaOperator.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/CustomersPresence.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DataCollectionType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DatabaseTranslatedString.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DatabaseTranslatedStringCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DatabaseTranslatedStringItem.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DatabaseTranslatedStringItemCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCase.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseDocument.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseSource.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionEnvironment.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionReceipt.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionReceiptSource.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollector.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectorCondition.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectorConditionType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectorConfiguration.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DeliveryIndication.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DeliveryIndicationDecisionReason.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DeliveryIndicationState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DocumentTemplate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DocumentTemplateType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailSender.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailSenderType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailTemplate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailTemplateType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityExportRequest.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQuery.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQueryFilter.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQueryFilterType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQueryOrderBy.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQueryOrderByType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityReference.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Environment.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/FailureCategory.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/FailureReason.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Feature.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Gender.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/HumanUser.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/HumanUserCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/HumanUserUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/IEnum.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentCalculatedPlan.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentCalculatedSlice.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPayment.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPaymentSlice.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPaymentSliceState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPaymentState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPlanConfiguration.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPlanSliceConfiguration.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Label.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LabelDescriptor.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LabelDescriptorCategory.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LabelDescriptorGroup.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LabelDescriptorType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LegalOrganizationForm.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItem.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemAttribute.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemAttributeCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemReduction.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemReductionCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LocalizedString.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ManualTask.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ManualTaskAction.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ManualTaskActionStyle.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ManualTaskState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ManualTaskType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/MetricUsage.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ModelResourcePath.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/OneClickPaymentMode.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentConnector.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentConnectorConfiguration.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentConnectorFeature.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentContract.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentContractState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentContractType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLink.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLinkActive.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLinkCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLinkProtectionMode.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLinkUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentMethod.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentMethodBrand.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentMethodConfiguration.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentPrimaryRiskTaker.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentProcessor.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentProcessorConfiguration.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Permission.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PersistableCurrencyAmount.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PersistableCurrencyAmountUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductFeeType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredFee.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredFeeUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredTierFee.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredTierFeeUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredTierPricing.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductPeriodFee.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductPeriodFeeUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductSetupFee.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductSetupFeeUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Refund.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RefundCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RefundState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RefundType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RenderedDocument.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ResourceState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestAddressFormat.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestAddressFormatField.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestCountry.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestCountryState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestCurrency.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestLanguage.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Role.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Scope.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ServerError.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Space.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceAddress.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceAddressCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceAddressSetter.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceReference.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceReferenceState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceView.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/StaticValue.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Subscriber.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriberActive.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriberCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriberUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Subscription.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateDeleted.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateDeleting.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateInactive.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionChangeRequest.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionCharge.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionChargeCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionChargeProcessingType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionChargeState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionChargeType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionCreateRequest.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionLedgerEntry.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionLedgerEntryCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionLedgerEntryState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetric.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricActive.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricUsageReport.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricUsageReportCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionPending.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionPeriodBill.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionPeriodBillState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProduct.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductActive.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponent.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentGroup.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentGroupUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentReference.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentReferenceState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductRetirement.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductRetirementCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersion.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionPending.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionRetirement.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionRetirementCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspension.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspensionAction.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspensionCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspensionReason.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspensionRunning.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspensionState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionVersion.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionVersionState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Tax.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TaxClass.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TaxCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TenantDatabase.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Token.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenVersion.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenVersionState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenVersionType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenizationnMode.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Transaction.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionAwareEntity.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionCompletion.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionCompletionMode.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionCompletionState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionEnvironmentSelectionStrategy.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionGroup.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionGroupState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionInvoice.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionInvoiceReplacement.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionInvoiceState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionLineItemUpdateRequest.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionLineItemVersion.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionPending.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionUserInterfaceType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionVoid.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionVoidMode.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionVoidState.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UnencryptedCardData.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UnencryptedCardDataCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/User.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UserAccountRole.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UserSpaceRole.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UserType.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookIdentity.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListener.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListenerCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListenerEntity.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListenerUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookUrl.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookUrlCreate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookUrlUpdate.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/ObjectSerializer.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/AccountService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ApplicationUserService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CardProcessingService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ChargeAttemptService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ChargeFlowLevelService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ChargeFlowService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ConditionTypeService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CountryService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CountryStateService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CurrencyService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DebtCollectionCaseService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DebtCollectorConfigurationService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DebtCollectorService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DeliveryIndicationService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DocumentTemplateService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DocumentTemplateTypeService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailSenderService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailSenderTypeService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailTemplateService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailTemplateTypeService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/HumanUserService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPaymentService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPaymentSliceService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPlanCalculationService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPlanConfigurationService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPlanSliceConfigurationService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LabelDescriptionGroupService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LabelDescriptionService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LanguageService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LegalOrganizationFormService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ManualTaskService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/MerticUsageService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentConnectorConfigurationService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentConnectorService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentLinkService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentMethodConfigurationService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentMethodService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentProcessorConfigurationService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentProcessorService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PermissionService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/RefundService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SpaceService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/StaticValueService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriberService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionAffiliateService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionChargeService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionLedgerEntryService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionMetricService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionMetricUsageService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionPeriodBillService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductComponentGroupService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductComponentService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductFeeTierService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductMeteredFeeService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductPeriodFeeService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductRetirementService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductSetupFeeService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductVersionRetirementService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductVersionService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionSuspensionService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionVersionService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TokenService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TokenVersionService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionCompletionService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionInvoiceService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionVoidService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/UserAccountRoleService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/UserSpaceRoleService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/WebhookListenerService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/WebhookUrlService.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/ValidationException.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/VersioningException.php create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/lib/ca-bundle.crt create mode 100644 upload/system/library/postfinancecheckout/wallee-sdk/test/ApiClientTest.php create mode 100644 upload/system/library/postfinancecheckout/webhook/abstract_order_related.php create mode 100644 upload/system/library/postfinancecheckout/webhook/abstract_webhook.php create mode 100644 upload/system/library/postfinancecheckout/webhook/delivery_indication.php create mode 100644 upload/system/library/postfinancecheckout/webhook/entity.php create mode 100644 upload/system/library/postfinancecheckout/webhook/manual_task.php create mode 100644 upload/system/library/postfinancecheckout/webhook/method_configuration.php create mode 100644 upload/system/library/postfinancecheckout/webhook/request.php create mode 100644 upload/system/library/postfinancecheckout/webhook/token.php create mode 100644 upload/system/library/postfinancecheckout/webhook/token_version.php create mode 100644 upload/system/library/postfinancecheckout/webhook/transaction.php create mode 100644 upload/system/library/postfinancecheckout/webhook/transaction_completion.php create mode 100644 upload/system/library/postfinancecheckout/webhook/transaction_refund.php create mode 100644 upload/system/library/postfinancecheckout/webhook/transaction_void.php diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index fbfb892..0518e6e 100644 --- a/README.md +++ b/README.md @@ -1 +1,18 @@ -# opencart-2.3 \ No newline at end of file +# OpenCart 2.3 + +This repository contains the OpenCart PostFinance Checkout payment module that enables the shop to process payments with [PostFinance Checkout](https://www.postfinance.ch). + +##### To use this extension, a [PostFinance Checkout](https://www.postfinance.ch) account is required. + +## Requirements + +* [Opencart](https://www.opencart.com/) 2.3 +* [PHP](http://php.net/) 5.6 or later + +## Documentation + +* [English](https://plugin-documentation.postfinance-checkout.ch/pfpayments/opencart-2.3/1.0.4/docs/en/documentation.html) + +## License + +Please see the [license file](https://github.com/pfpayments/opencart-2.3/blob/1.0.4/LICENSE) for more information. \ No newline at end of file diff --git a/docs/en/assets/base.css b/docs/en/assets/base.css new file mode 100644 index 0000000..ab080d1 --- /dev/null +++ b/docs/en/assets/base.css @@ -0,0 +1,646 @@ +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +*:before, *:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +html { + font-size: 100%; + font-family: sans-serif; + line-height: 1.15; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + -ms-overflow-style: scrollbar; + -webkit-tap-highlight-color: transparent; +} + +@-ms-viewport { + width: device-width; +} + +article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section { + display: block; +} + +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-size: 1rem; + font-weight: 300; + line-height: 1.5; + color: #212529; + text-align: left; + background-color: #fff; + padding-right: 0 !important; + position: relative; +} + +html,body { + width: 100%; + height: 100%; +} + +[tabindex="-1"]:focus { + outline: 0 !important; +} + +hr { + box-sizing: content-box; + height: 0; + overflow: visible; +} + +h1, h2, h3, h4, h5, h6 { + margin-top: 0; + margin-bottom: 0.5rem; +} + +h1 { + font-size: 2.5rem; + font-weight: 200; + margin-bottom: 1.875rem; +} + +h2 { + font-size: 1.625rem; + font-weight: 300; + margin-bottom: 1.875rem; +} + +h3 { + font-size: 1.3rem; + font-weight: 300; + margin-top: 1.875rem; +} + +h4 { + font-size: 1.125rem; + font-weight: 400; + margin-top: 1.875rem; + margin-bottom: 1.875rem; +} + +h5 { + font-size: 1rem; + font-weight: bold; + margin-top: 1.875rem; + margin-bottom: 1.875rem; +} + +p { + margin-top: 0; + margin-bottom: 1rem; +} + +abbr[title], abbr[data-original-title] { + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + cursor: help; + border-bottom: 0; +} + +address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} + +ol, ul, dl { + margin-top: 0; + margin-bottom: 1rem; +} + +ol ol, ul ul, ol ul, ul ol { + margin-bottom: 0; +} + +dt { + font-weight: 700; +} + +dd { + margin-bottom: .5rem; + margin-left: 0; +} + +blockquote { + margin: 0 0 1rem; +} + +dfn { + font-style: italic; +} + +b, strong { + font-weight: bolder; +} + +small { + font-size: 80%; +} + +sub, sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} + +sub { + bottom: -.25em; +} + +sup { + top: -.5em; +} + +a { + color: #007bff; + text-decoration: none; + background-color: transparent; + -webkit-text-decoration-skip: objects; +} + +a:hover { + color: #0056b3; + text-decoration: underline; +} + +a:not([href]):not([tabindex]) { + color: inherit; + text-decoration: none; +} + +a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus { + color: inherit; + text-decoration: none; +} + +a:not([href]):not([tabindex]):focus { + outline: 0; +} + +pre, code, kbd, samp { + font-family: monospace, monospace; + font-size: 1em; +} + +pre { + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + -ms-overflow-style: scrollbar; +} + +figure { + margin: 0 0 1rem; +} + +img { + vertical-align: middle; + border-style: none; +} + +svg:not(:root) { + overflow: hidden; +} + +table { + border-collapse: collapse; + background-color: transparent; +} + +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #a7a7a7; + text-align: left; +} + +th { + text-align: left; +} + +output { + display: inline-block; +} + +summary { + display: list-item; + cursor: pointer; +} + +template { + display: none; +} + +table col[class*="col-"] { + position: static; + float: none; + display: table-column; +} + +table td[class*="col-"],table th[class*="col-"] { + position: static; + float: none; + display: table-cell; +} + +.layout-wrapper { + position: relative; + width: 100%; + height: auto; + min-height: 100%; +} + +.layout-title { + padding: 1.875rem 0; + border-bottom: 1px solid #f0f0f0; +} + +.layout-title h1 { + font-size: 3rem; + font-weight: 200; + text-align: center; + margin: 0; +} + +.layout-title h2 { + font-size: 2rem; + font-weight: 200; + text-align: center; + color: #999; + margin-bottom: 0; +} + +.layout-navigation .nav { + padding: 1.875rem 0; + border-bottom: 1px solid #f0f0f0; + text-align: center; + background: #fff; + z-index: 1000; +} + +.layout-navigation .nav > li { + display: inline-block; +} + +.layout-navigation .nav > li > a { + border: 1px solid #007bff; + border-radius: 100px; + padding: 6px 12px; + margin: 0 8px; +} + +.layout-navigation .nav > li > a:hover, .layout-navigation .nav > li > a:active, .layout-navigation .nav > li > a:focus { + border: 1px solid #0056b3; + color: #0056b3; + text-decoration: none; +} + +.layout-content { + position: relative; +} + +.layout-content:before, .layout-content:after { + content: " "; + display: table; +} + +.layout-content:after { + clear: both; +} + +.layout-content .col-right { + width: 25%; + float: right; +} + +.layout-content .col-right-wrapper { + width: 100%; + position: relative; + overflow-x: hidden; + overflow-y: auto; + padding: 2.5rem 2rem 0; +} + +.layout-content .col-body { + width: 75%; + float: left; +} + +.layout-content .col-body:before, .layout-content .col-body:after { + content: " "; + display: table; +} + +.layout-content .col-body:after { + clear: both; +} + +.layout-content .col-body-wrapper { + position: relative; + width: 100%; + padding: 2.5rem 2rem 0; +} + +.nav { + padding-left: 0; + margin-bottom: 0; + list-style: none; + line-height: 2; +} + +.table-of-contents { + padding: 1.25rem 0; +} + +.table-of-contents .nav > li > a { + display: flex; +} + +.table-of-contents .nav > li > a .item-number { + display: none; +} + +.table-of-contents .nav > li > a .item-title { + color: #212529; + overflow: hidden; + text-overflow: ellipsis; + flex-grow: 1; + white-space: nowrap; +} + +.table-of-contents .nav > li > a .item-title:hover { + color: #0056b3; +} + +.table-of-contents .nav > li.extended > a .item-title, .table-of-contents .nav > li.active > a .item-title, .table-of-contents .nav > li.extended > a .item-title:hover, .table-of-contents .nav > li.active > a .item-title:hover { + color: #007bff; +} + +.table-of-contents > .nav > li > .nav { + display: none; + margin-bottom: 0.5rem; +} + +.table-of-contents > .nav > li > .nav > li > a { + padding-left: 1rem; +} + +.table-of-contents > .nav > li > .nav > li > a .item-title { + font-size: 0.875rem; +} + +.table-of-contents > .nav > li.active > .nav { + display: block; +} + +.chapter { + margin: 0 0 6rem; + font-weight: 300; +} + +.section { + margin-top: 3rem; +} + +.chapter > .chapter-title h1, .chapter > .chapter-title h2, .chapter > .chapter-title h3, .chapter > .chapter-title h4, .chapter > .chapter-title h5, .chapter > .chapter-title h6, .section > .section-title h1, .section > .section-title h2, .section > .section-title h3, .section > .section-title h4, .section > .section-title h5, .section > .section-title h6 { + margin-top: 0; +} + +.chapter-title .title-number, .section-title .title-number { + display: none; +} + +.paragraph { + line-height: 2em; +} + +.paragraph + .paragraph { + margin-top: 1em; +} + +.dlist { + margin-top: 30px; +} + +.dlist dl dt { + float: left; + width: 160px; + clear: left; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.dlist dl dd { + margin-left: 180px; +} + +.ulist { + margin-top: 30px; +} + +.imageblock { + margin: 30px auto; +} + +.imageblock .content img { + max-width: 100%; +} + +.imageblock .title { + padding: 10px 0 0; +} + +.exampleblock, .quoteblock, .literalblock { + background: #f5f4f4; + padding: 20px; + margin: 30px 0; +} + +.exampleblock .title, .quoteblock .title, .literalblock .title { + text-transform: uppercase; + font-size: 0.75em; + font-weight: 400; + color: #979797; + margin-bottom: 10px; +} + +.quoteblock blockquote { + margin: 0; + padding: 0; + border: 0; + font-size: inherit; +} + +.quoteblock blockquote p:last-child, .quoteblock blockquote ul:last-child, .quoteblock blockquote ol:last-child { + margin-bottom: 9px; +} + +.literalblock pre { + border: 0; + padding: 0; + margin: 0; +} + +.listingblock { + margin: 30px 0; +} + +.listingblock pre { + border: 0; + padding: 0; + margin: 0; +} + +.listingblock pre code { + padding: 20px; +} + +.admonitionblock { + line-height: 1.8em; + padding: 20px; + margin: 30px 0; +} + +.admonitionblock .icon { + display: none; +} + +.admonitionblock.important { + background: #fce1e1; +} + +.admonitionblock.note, .admonitionblock.tip { + background: #e0f2fc; +} + +.admonitionblock.caution, .admonitionblock.warning { + background: #fdf3d8; +} + +table.tableblock { + background-color: #fff; + width: 100%; + max-width: 100%; + margin-bottom: 18px; + margin: 30px 0; +} + +table.tableblock > thead > tr > th, table.tableblock > tbody > tr > th, table.tableblock > tfoot > tr > th, table.tableblock > thead > tr > td, table.tableblock > tbody > tr > td, table.tableblock > tfoot > tr > td { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #eee; +} + +table.tableblock > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #eee; +} + +table.tableblock > caption + thead > tr:first-child > th, table.tableblock > colgroup + thead > tr:first-child > th, table.tableblock > thead:first-child > tr:first-child > th, table.tableblock > caption + thead > tr:first-child > td, table.tableblock > colgroup + thead > tr:first-child > td, table.tableblock > thead:first-child > tr:first-child > td { + border-top: 0; +} + +table.tableblock > tbody + tbody { + border-top: 2px solid #eee; +} + +table.tableblock .table { + background-color: #fff; +} + +table.tableblock > tbody > tr:nth-of-type(odd) { + background-color: #f7f7f7; +} + +table.tableblock > thead > tr > th p:last-child, table.tableblock > tbody > tr > th p:last-child, table.tableblock > tfoot > tr > th p:last-child, table.tableblock > thead > tr > td p:last-child, table.tableblock > tbody > tr > td p:last-child, table.tableblock > tfoot > tr > td p:last-child { + margin-bottom: 0; +} + +.loaded .table-of-contents .nav .nav { + display: none; +} + +@media (min-width: 1200px) { + .layout-wrapper .layout-title, .layout-wrapper .layout-navigation, .layout-wrapper .layout-content { + max-width: 1200px; + margin-left: auto; + margin-right: auto; + } +} + +@media (max-width: 991px) { + html { + font-size: 90%; + } + + .layout-content .col-right { + display: none; + } + + .layout-content .col-body { + width: 100%; + } +} + +@media print { + body { + color: #000; + font-family: Georgia, "Times New Roman", Times, serif; + } + + a { + color: #000; + } + + h1 { + font-size: 1.6rem; + } + + h2 { + font-size: 1.4rem; + } + + h3 { + font-size: 1.2rem; + } + + h4 { + font-size: 1rem; + } + + h5 { + font-size: 0.9rem; + } + + .layout-title h1 { + font-size: 2rem; + } + + .layout-content .col-right { + display: none; + } + + .layout-content .col-body { + width: 100%; + } + + .chapter { + margin-bottom: 3rem; + } + + .section { + margin-top: 2rem; + } +} diff --git a/docs/en/assets/base.js b/docs/en/assets/base.js new file mode 100644 index 0000000..60cc968 --- /dev/null +++ b/docs/en/assets/base.js @@ -0,0 +1,12 @@ +(function($){ + + $(document).ready(function(){ + $('.col-right-wrapper').stick_in_parent({ + parent: '.layout-content' + }); + $('body').scrollspy({ + target: '.table-of-contents' + }); + }); + +})(jQuery); diff --git a/docs/en/assets/jquery.js b/docs/en/assets/jquery.js new file mode 100644 index 0000000..f4ca9b2 --- /dev/null +++ b/docs/en/assets/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v3.3.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,u=n.push,s=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,d=f.toString,p=d.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},v=function e(t){return null!=t&&t===t.window},y={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in y)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var x="3.3.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector",w=function(e,t){return new w.fn.init(e,t)},C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:x,constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,u,s,l,c,f,d,p,h,g,v,y,m,b,x="sizzle"+1*new Date,w=e.document,C=0,T=0,E=ae(),N=ae(),k=ae(),A=function(e,t){return e===t&&(f=!0),0},D={}.hasOwnProperty,S=[],L=S.pop,j=S.push,q=S.push,O=S.slice,P=function(e,t){for(var n=0,r=e.length;n+~]|"+I+")"+I+"*"),_=new RegExp("="+I+"*([^\\]'\"]*?)"+I+"*\\]","g"),U=new RegExp(M),V=new RegExp("^"+R+"$"),X={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+H+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,G=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){d()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{q.apply(S=O.call(w.childNodes),w.childNodes),S[w.childNodes.length].nodeType}catch(e){q={apply:S.length?function(e,t){j.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,u,l,c,f,h,y,m=t&&t.ownerDocument,C=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==C&&9!==C&&11!==C)return r;if(!i&&((t?t.ownerDocument||t:w)!==p&&d(t),t=t||p,g)){if(11!==C&&(f=K.exec(e)))if(o=f[1]){if(9===C){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&b(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return q.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return q.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!k[e+" "]&&(!v||!v.test(e))){if(1!==C)m=t,y=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=x),u=(h=a(e)).length;while(u--)h[u]="#"+c+" "+ye(h[u]);y=h.join(","),m=J.test(e)&&ge(t.parentNode)||t}if(y)try{return q.apply(r,m.querySelectorAll(y)),r}catch(e){}finally{c===x&&t.removeAttribute("id")}}}return s(e.replace($,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function ue(e){return e[x]=!0,e}function se(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function de(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return ue(function(t){return t=+t,ue(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},d=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==p&&9===a.nodeType&&a.documentElement?(p=a,h=p.documentElement,g=!o(p),w!==p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=se(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=se(function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=G.test(p.getElementsByClassName),n.getById=se(function(e){return h.appendChild(e).id=x,!p.getElementsByName||!p.getElementsByName(x).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},y=[],v=[],(n.qsa=G.test(p.querySelectorAll))&&(se(function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+H+")"),e.querySelectorAll("[id~="+x+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||v.push(".#.+[+~]")}),se(function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(n.matchesSelector=G.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&se(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),y.push("!=",M)}),v=v.length&&new RegExp(v.join("|")),y=y.length&&new RegExp(y.join("|")),t=G.test(h.compareDocumentPosition),b=t||G.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===p||e.ownerDocument===w&&b(w,e)?-1:t===p||t.ownerDocument===w&&b(w,t)?1:c?P(c,e)-P(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],u=[t];if(!i||!o)return e===p?-1:t===p?1:i?-1:o?1:c?P(c,e)-P(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)u.unshift(n);while(a[r]===u[r])r++;return r?ce(a[r],u[r]):a[r]===w?-1:u[r]===w?1:0},p):p},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&d(e),t=t.replace(_,"='$1']"),n.matchesSelector&&g&&!k[t+" "]&&(!y||!y.test(t))&&(!v||!v.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,p,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==p&&d(e),b(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==p&&d(e);var i=r.attrHandle[t.toLowerCase()],o=i&&D.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(A),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:ue,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return X.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(W," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,s){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,y=u&&t.nodeName.toLowerCase(),m=!s&&!u,b=!1;if(v){if(o){while(g){d=t;while(d=d[g])if(u?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&m){b=(p=(l=(c=(f=(d=v)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===C&&l[1])&&l[2],d=p&&v.childNodes[p];while(d=++p&&d&&d[g]||(b=p=0)||h.pop())if(1===d.nodeType&&++b&&d===t){c[e]=[C,p,b];break}}else if(m&&(b=p=(l=(c=(f=(d=t)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===C&&l[1]),!1===b)while(d=++p&&d&&d[g]||(b=p=0)||h.pop())if((u?d.nodeName.toLowerCase()===y:1===d.nodeType)&&++b&&(m&&((c=(f=d[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]=[C,b]),d===t))break;return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[x]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ue(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=P(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:ue(function(e){var t=[],n=[],r=u(e.replace($,"$1"));return r[x]?ue(function(e,t,n,i){var o,a=r(e,null,i,[]),u=e.length;while(u--)(o=a[u])&&(e[u]=!(t[u]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:ue(function(e){return function(t){return oe(e,t).length>0}}),contains:ue(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:ue(function(e){return V.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:pe(!1),disabled:pe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xe(e,t,n){for(var r=0,i=t.length;r-1&&(o[l]=!(a[l]=f))}}else y=we(y===a?y.splice(h,y.length):y),i?i(null,a,y,s):q.apply(a,y)})}function Te(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],u=a||r.relative[" "],s=a?1:0,c=me(function(e){return e===t},u,!0),f=me(function(e){return P(t,e)>-1},u,!0),d=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];s1&&be(d),s>1&&ye(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),n,s0,i=e.length>0,o=function(o,a,u,s,c){var f,h,v,y=0,m="0",b=o&&[],x=[],w=l,T=o||i&&r.find.TAG("*",c),E=C+=null==w?1:Math.random()||.1,N=T.length;for(c&&(l=a===p||a||c);m!==N&&null!=(f=T[m]);m++){if(i&&f){h=0,a||f.ownerDocument===p||(d(f),u=!g);while(v=e[h++])if(v(f,a||p,u)){s.push(f);break}c&&(C=E)}n&&((f=!v&&f)&&y--,o&&b.push(f))}if(y+=m,n&&m!==y){h=0;while(v=t[h++])v(b,x,a,u);if(o){if(y>0)while(m--)b[m]||x[m]||(x[m]=L.call(s));x=we(x)}q.apply(s,x),c&&!o&&x.length>0&&y+t.length>1&&oe.uniqueSort(s)}return c&&(C=E,l=w),b};return n?ue(o):o}return u=oe.compile=function(e,t){var n,r=[],i=[],o=k[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Te(t[n]))[x]?r.push(o):i.push(o);(o=k(e,Ee(i,r))).selector=e}return o},s=oe.select=function(e,t,n,i){var o,s,l,c,f,d="function"==typeof e&&e,p=!i&&a(e=d.selector||e);if(n=n||[],1===p.length){if((s=p[0]=p[0].slice(0)).length>2&&"ID"===(l=s[0]).type&&9===t.nodeType&&g&&r.relative[s[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(s.shift().value.length)}o=X.needsContext.test(e)?0:s.length;while(o--){if(l=s[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),J.test(s[0].type)&&ge(t.parentNode)||t))){if(s.splice(o,1),!(e=i.length&&ye(s)))return q.apply(n,i),n;break}}}return(d||u(e,p))(i,t,!g,n,!t||J.test(e)&&ge(t.parentNode)||t),n},n.sortStable=x.split("").sort(A).join("")===x,n.detectDuplicates=!!f,d(),n.sortDetached=se(function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))}),se(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&se(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),se(function(e){return null==e.getAttribute("disabled")})||le(H,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var N=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},k=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},A=w.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var S=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return s.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(L(this,e||[],!1))},not:function(e){return this.pushStack(L(this,e||[],!0))},is:function(e){return!!L(this,"string"==typeof e&&A.test(e)?w(e):e||[],!1).length}});var j,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:q.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),S.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,j=w(r);var O=/^(?:parents|prev(?:Until|All))/,P={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?s.call(w(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function H(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return N(e,"parentNode")},parentsUntil:function(e,t,n){return N(e,"parentNode",n)},next:function(e){return H(e,"nextSibling")},prev:function(e){return H(e,"previousSibling")},nextAll:function(e){return N(e,"nextSibling")},prevAll:function(e){return N(e,"previousSibling")},nextUntil:function(e,t,n){return N(e,"nextSibling",n)},prevUntil:function(e,t,n){return N(e,"previousSibling",n)},siblings:function(e){return k((e.parentNode||{}).firstChild,e)},children:function(e){return k(e.firstChild)},contents:function(e){return D(e,"iframe")?e.contentDocument:(D(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(P[e]||w.uniqueSort(i),O.test(e)&&i.reverse()),this.pushStack(i)}});var I=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(I)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],u=-1,s=function(){for(i=i||e.once,r=t=!0;a.length;u=-1){n=a.shift();while(++u-1)o.splice(n,1),n<=u&&u--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||s()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function B(e){return e}function M(e){throw e}function W(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var u=this,s=arguments,l=function(){var e,l;if(!(t=o&&(r!==M&&(u=void 0,s=[e]),n.rejectWith(u,s))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:B,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:B)),n[2][3].add(a(0,e,g(r)?r:M))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],u=t[5];i[t[1]]=a.add,u&&a.add(function(){r=u},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),u=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&(W(e,a.done(u(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)W(i[n],u(n),a.reject);return a.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&$.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function z(){r.removeEventListener("DOMContentLoaded",z),e.removeEventListener("load",z),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",z),e.addEventListener("load",z));var _=function(e,t,n,r,i,o,a){var u=0,s=e.length,l=null==n;if("object"===b(n)){i=!0;for(u in n)_(e,t,u,n[u],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;u1,null,!0)},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=K.get(e,t),n&&(!r||Array.isArray(n)?r=K.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return K.get(e,n)||K.access(e,n,{empty:w.Callbacks("once memory").add(function(){K.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?w.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var xe=r.documentElement,we=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function Ne(){return!1}function ke(){try{return r.activeElement}catch(e){}}function Ae(e,t,n,r,i,o){var a,u;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(u in t)Ae(e,u,n,r,t[u],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ne;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,u,s,l,c,f,d,p,h,g,v=K.get(e);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(xe,i),n.guid||(n.guid=w.guid++),(s=v.events)||(s=v.events={}),(a=v.handle)||(a=v.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(I)||[""]).length;while(l--)p=g=(u=Te.exec(t[l])||[])[1],h=(u[2]||"").split(".").sort(),p&&(f=w.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=w.event.special[p]||{},c=w.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=s[p])||((d=s[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),w.event.global[p]=!0)}},remove:function(e,t,n,r,i){var o,a,u,s,l,c,f,d,p,h,g,v=K.hasData(e)&&K.get(e);if(v&&(s=v.events)){l=(t=(t||"").match(I)||[""]).length;while(l--)if(u=Te.exec(t[l])||[],p=g=u[1],h=(u[2]||"").split(".").sort(),p){f=w.event.special[p]||{},d=s[p=(r?f.delegateType:f.bindType)||p]||[],u=u[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;while(o--)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||u&&!u.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||w.removeEvent(e,p,v.handle),delete s[p])}else for(p in s)w.event.remove(e,p+t[l],n,r,!0);w.isEmptyObject(s)&&K.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,u,s=new Array(arguments.length),l=(K.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(s[0]=t,n=1;n=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&u.push({elem:l,handlers:o})}return l=this,s\x20\t\r\n\f]*)[^>]*)\/>/gi,Se=/\s*$/g;function qe(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function Oe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function He(e,t){var n,r,i,o,a,u,s,l;if(1===t.nodeType){if(K.hasData(e)&&(o=K.access(e),a=K.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n1&&"string"==typeof v&&!h.checkClone&&Le.test(v))return e.each(function(i){var o=e.eq(i);y&&(t[0]=v.call(this,i,o.html())),Re(o,t,n,r)});if(d&&(i=be(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(u=w.map(ve(i,"script"),Oe)).length;f")},clone:function(e,t,n){var r,i,o,a,u=e.cloneNode(!0),s=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ve(u),r=0,i=(o=ve(e)).length;r0&&ye(a,!s&&ve(e,"script")),u},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[K.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[K.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return _(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return _(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Se.test(e)&&!ge[(pe.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n=0&&(s+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-s-u-.5))),s}function et(e,t,n){var r=We(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(Me.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,u=Q(t),s=Ue.test(t),l=e.style;if(s||(t=Ke(u)),a=w.cssHooks[t]||w.cssHooks[u],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[u]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(s?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,u=Q(t);return Ue.test(t)||(t=Ke(u)),(a=w.cssHooks[t]||w.cssHooks[u])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Xe&&(i=Xe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!_e.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):ue(e,Ve,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=We(e),a="border-box"===w.css(e,"boxSizing",!1,o),u=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),u&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Je(e,n,u)}}}),w.cssHooks.marginLeft=ze(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Je)}),w.fn.extend({css:function(e,t){return _(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=We(e),i=t.length;a1)}}),w.fn.delay=function(t,n){return t=w.fx?w.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=r.createElement("input"),t=r.createElement("select").appendChild(r.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=r.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var tt,nt=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return _(this,w.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?tt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(I);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),tt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=nt[t]||w.find.attr;nt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=nt[a],nt[a]=i,i=null!=n(e,t,r)?a:null,nt[a]=o),i}});var rt=/^(?:input|select|textarea|button)$/i,it=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return _(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):rt.test(e.nodeName)||it.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function ot(e){return(e.match(I)||[]).join(" ")}function at(e){return e.getAttribute&&e.getAttribute("class")||""}function ut(e){return Array.isArray(e)?e:"string"==typeof e?e.match(I)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,u,s=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,at(this)))});if((t=ut(e)).length)while(n=this[s++])if(i=at(n),r=1===n.nodeType&&" "+ot(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(u=ot(r))&&n.setAttribute("class",u)}return this},removeClass:function(e){var t,n,r,i,o,a,u,s=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,at(this)))});if(!arguments.length)return this.attr("class","");if((t=ut(e)).length)while(n=this[s++])if(i=at(n),r=1===n.nodeType&&" "+ot(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(u=ot(r))&&n.setAttribute("class",u)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,at(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=ut(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=at(this))&&K.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":K.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+ot(at(n))+" ").indexOf(t)>-1)return!0;return!1}});var st=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(st,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:ot(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,u=a?null:[],s=a?o+1:i.length;for(r=o<0?s:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var lt=/^(?:focusinfocus|focusoutblur)$/,ct=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,u,s,l,c,d,p,h,y=[i||r],m=f.call(t,"type")?t.type:t,b=f.call(t,"namespace")?t.namespace.split("."):[];if(u=h=s=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!lt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(b=m.split(".")).shift(),b.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=b.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),p=w.event.special[m]||{},o||!p.trigger||!1!==p.trigger.apply(i,n))){if(!o&&!p.noBubble&&!v(i)){for(l=p.delegateType||m,lt.test(l+m)||(u=u.parentNode);u;u=u.parentNode)y.push(u),s=u;s===(i.ownerDocument||r)&&y.push(s.defaultView||s.parentWindow||e)}a=0;while((u=y[a++])&&!t.isPropagationStopped())h=u,t.type=a>1?l:p.bindType||m,(d=(K.get(u,"events")||{})[t.type]&&K.get(u,"handle"))&&d.apply(u,n),(d=c&&u[c])&&d.apply&&Y(u)&&(t.result=d.apply(u,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(y.pop(),n)||!Y(i)||c&&g(i[m])&&!v(i)&&((s=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,ct),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,ct),w.event.triggered=void 0,s&&(i[c]=s)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=K.access(r,t);i||r.addEventListener(e,n,!0),K.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=K.access(r,t)-1;i?K.access(r,t,i):(r.removeEventListener(e,n,!0),K.remove(r,t))}}});var ft=/\[\]$/,dt=/\r?\n/g,pt=/^(?:submit|button|image|reset|file)$/i,ht=/^(?:input|select|textarea|keygen)/i;function gt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||ft.test(e)?r(e,i):gt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==b(t))r(e,t);else for(i in t)gt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)gt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&ht.test(this.nodeName)&&!pt.test(e)&&(this.checked||!de.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(dt,"\r\n")}}):{name:t.name,value:n.replace(dt,"\r\n")}}).get()}}),w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},h.createHTMLDocument=function(){var e=r.implementation.createHTMLDocument("").body;return e.innerHTML="
",2===e.childNodes.length}(),w.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,o,a;return t||(h.createHTMLDocument?((i=(t=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,t.head.appendChild(i)):t=r),o=S.exec(e),a=!n&&[],o?[t.createElement(o[1])]:(o=be([e],t,a),a&&a.length&&w(a).remove(),w.merge([],o.childNodes))},w.offset={setOffset:function(e,t,n){var r,i,o,a,u,s,l,c=w.css(e,"position"),f=w(e),d={};"static"===c&&(e.style.position="relative"),u=f.offset(),o=w.css(e,"top"),s=w.css(e,"left"),(l=("absolute"===c||"fixed"===c)&&(o+s).indexOf("auto")>-1)?(a=(r=f.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(s)||0),g(t)&&(t=t.call(e,n,w.extend({},u))),null!=t.top&&(d.top=t.top-u.top+a),null!=t.left&&(d.left=t.left-u.left+i),"using"in t?t.using.call(e,d):f.css(d)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){w.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(r,"marginTop",!0),left:t.left-i.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===w.css(e,"position"))e=e.offsetParent;return e||xe})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;w.fn[e]=function(r){return _(this,function(e,r,i){var o;if(v(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),w.each(["top","left"],function(e,t){w.cssHooks[t]=ze(h.pixelPosition,function(e,n){if(n)return n=Fe(e,t),Me.test(n)?w(e).position()[t]+"px":n})}),w.each({Height:"height",Width:"width"},function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){w.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),u=n||(!0===i||!0===o?"margin":"border");return _(this,function(t,n,i){var o;return v(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?w.css(t,n,u):w.style(t,n,i,u)},t,a?i:void 0,a)}})}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),w.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=o.call(arguments,2),i=function(){return e.apply(t||this,r.concat(o.call(arguments)))},i.guid=e.guid=e.guid||w.guid++,i},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=D,w.isFunction=g,w.isWindow=v,w.camelCase=Q,w.type=b,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return w});var vt=e.jQuery,yt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=yt),t&&e.jQuery===w&&(e.jQuery=vt),w},t||(e.jQuery=e.$=w),w}); diff --git a/docs/en/assets/scrollspy.js b/docs/en/assets/scrollspy.js new file mode 100644 index 0000000..623de88 --- /dev/null +++ b/docs/en/assets/scrollspy.js @@ -0,0 +1,9 @@ +/* ======================================================================== + * Bootstrap: scrollspy.js v3.3.7 + * http://getbootstrap.com/javascript/#scrollspy + * ======================================================================== + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + +!function(r){"use strict";function o(t,s){this.$body=r(document.body),this.$scrollElement=r(t).is(document.body)?r(window):r(t),this.options=r.extend({},o.DEFAULTS,s),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",r.proxy(this.process,this)),this.refresh(),this.process()}function s(i){return this.each(function(){var t=r(this),s=t.data("bs.scrollspy"),e="object"==typeof i&&i;s||t.data("bs.scrollspy",s=new o(this,e)),"string"==typeof i&&s[i]()})}o.VERSION="3.3.7",o.DEFAULTS={offset:10},o.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},o.prototype.refresh=function(){var t=this,i="offset",o=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),r.isWindow(this.$scrollElement[0])||(i="position",o=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=r(this),s=t.data("target")||t.attr("href"),e=/^#./.test(s)&&r(s);return e&&e.length&&e.is(":visible")&&[[e[i]().top+o,s]]||null}).sort(function(t,s){return t[0]-s[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},o.prototype.process=function(){var t,s=this.$scrollElement.scrollTop()+this.options.offset,e=this.getScrollHeight(),i=this.options.offset+e-this.$scrollElement.height(),o=this.offsets,r=this.targets,l=this.activeTarget;if(this.scrollHeight!=e&&this.refresh(),i<=s)return l!=(t=r[r.length-1])&&this.activate(t);if(l&&s=o[t]&&(void 0===o[t+1]||s'))&&w.css("position",n.css("position")),(v=function(){var t,o,i;if(!f)return k=x.height(),t=parseInt(b.css("border-top-width"),10),o=parseInt(b.css("padding-top"),10),l=parseInt(b.css("padding-bottom"),10),a=b.offset().top+t+o,c=b.height(),g&&(h=g=!1,null==V&&(n.insertAfter(w),w.detach()),n.css({position:"",top:"",width:"",bottom:""}).removeClass(j),i=!0),p=n.offset().top-(parseInt(n.css("margin-top"),10)||0)-F,d=n.outerHeight(!0),u=n.css("float"),w&&w.css({width:r(n),height:d,display:n.css("display"),"vertical-align":n.css("vertical-align"),float:u}),i?e():void 0})(),m=void 0,y=F,_=A,e=function(){var t,o,i,e,s,r;if(d!==c&&!f)return i=!1,null!=_&&(_-=1)<=0&&(_=A,v(),i=!0),i||x.height()===k||(v(),i=!0),e=Q.scrollTop(),null!=m&&(o=e-m),m=e,g?(C&&(s=c+a + + + + + + + PostFinance Checkout Opencart 2.3 + + + +
+
+

PostFinance Checkout Opencart 2.3

+

Documentation

+ +
+
+
+
+
+
+

+ 1Prerequisites

+
+
+
+

If you don’t already have one, create a PostFinance Checkout account.

+
+
+
+

+ 2Installation

+
+
+
+
+

+ 2.1Normal install

+
+
+
+
    +
  1. +

    Download the extension (wallee.zip).

    +
  2. +
  3. +

    Extract the files and upload the content of the 'upload' directory to your store’s root directory using FTP/SSH.

    +
  4. +
  5. +

    Navigate to Extensions → Payment to activate the plugin.

    +
  6. +
+
+
+
+

+ 2.2Extension installer

+
+
+
+
    +
  1. +

    Download the extension (wallee.ocmod.zip). TODO

    +
  2. +
  3. +

    Navigate to Extensions → Extension Installer, and upload the previously downloaded zip file.

    +
  4. +
  5. +

    Navigate to Extensions → Payment to activate the plugin.

    +
  6. +
+
+
+
+
+

+ 3Configuration

+
+
+
+
    +
  1. +

    Navigate to Extensions → Payment → PostFinance Checkout in your Opencart store’s backend and enter the PostFinance Checkout application user’s access information that you created before.

    +
    +
    +settings +
    +
    +
  2. +
  3. +

    On a per-store basis you must then add a Space ID, and a Space View ID if required.

    +
  4. +
  5. +

    You can configure if transaction documents should be available to download in the users frontend.

    +
  6. +
  7. +

    You can configure which Opencart status should be set depending on the PostFinance Checkout state. For more information check out the Processor Concept.

    +
  8. +
  9. +

    After saving the configuration, the payment methods are created in the Opencart store and the necessary webhooks are set up.

    +
  10. +
  11. +

    Refresh modifications so all files which are necessary to process payments are created.

    +
  12. +
+
+
+
+

+ 4Payment Method Configuration

+
+
+
+

Payment method configuration is done in PostFinance Checkout. After following the steps of the previous steps, the PostFinance Checkout payment method configurations will be synchronized automatically into the store.

+
+
+
+

+ 5Features

+
+
+
+
+

+ 5.1Payment methods & webhooks

+
+
+
+

The extension will pull any configured payment methods and webhooks from your wallee account. Note: The payment methods will not appear in the payment overview of your OpenCart backend.

+
+
+
+

+ 5.2Packing slips & invoices

+
+
+
+

You may allow customers to download their own packing slips and / or invoices. This can be configured in the extension settings page. The download buttons are available in the customers order view. The documents are made available in the PDF format.

+
+
+
+

+ 5.3Refunds

+
+
+
+

The extension allows transactions made with it to also be refunded directly from the opencart backend if the transaction is in the correct state.

+
+
+refund +
+
+
+
+

+ 5.4Completion

+
+
+
+

Orders can be processed in two steps depending on your wallee configurations. In the case of manual completions the order stays in a reserved state until the merchant confirms that the funds should be transferred. A completion can be initiated from the order view in your OpenCart backend if the transaction is in the correct state.

+
+
+
+

+ 5.5Void

+
+
+
+

Orders which are processed in two steps can be voided instead of completed. A void can be initiated from the order view in your OpenCart backend if the transaction is in the correct state.

+
+
+
+

+ 5.6Alerts

+
+
+
+

If there are open manual tasks in your wallee account, or if a non-synchronous task such as a void, completion or refund fails, this information is displayed in your OpenCart backend.

+
+
+alert +
+
+
+
+

+ 5.7Order confirmation

+
+
+
+

PostFinance Checkout can be configured to send transaction confirmations. In this case you may wish to suppress the order confirmation sent by Opencart. For this case we offer an additional modification which can be activated.

+
+
+
+
+

+ 6Third party support

+
+
+
+

These third party extensions are supported by the PostFinance Checkout Opencart extension:

+
+ +
+
+
+

+ 7FAQ

+
+
+
+
+

+ 7.1How can I make the payment methods appear in the checkout?

+
+
+
+

Make sure that you followed the Configuration section, including refreshing the modifications.

+
+
+
+

+ 7.2The order totals in Opencart and PostFinance Checkout don’t match?

+
+
+
+

If you have configured a separate currency to have a non-1.00 value please be aware that there may be rounding errors due to the way OpenCart handles currency totals and taxes. The discrepancies should in all cases be kept to an absolute minimum.

+
+
+
+

+ 7.3How can I change the look and feel, payment method name, emails etc.?

+
+
+
+

All those configurations are done directly in PostFinance Checkout. For more information have a look at the PostFinance Checkout documentation.

+
+
+
+
+

+ 8Support

+
+
+
+

If you need help, feel free to contact our support.

+
+
+
+
+ +
+
+ + + + + + + diff --git a/docs/en/resource/alert.png b/docs/en/resource/alert.png new file mode 100644 index 0000000000000000000000000000000000000000..cbd256fc317d82253c7103136f8e6a327d810605 GIT binary patch literal 134535 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 literal 0 HcmV?d00001 diff --git a/docs/en/resource/refund.png b/docs/en/resource/refund.png new file mode 100644 index 0000000000000000000000000000000000000000..f57517af1d872309913e90b1f179eeda489cd245 GIT binary patch literal 23306 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
' + json['error'] + '
'); + } else if (json['success']) { + $('#content > .container-fluid').prepend('
' + json['success'] + '
'); + setPostFinanceCheckoutButtons(json['buttons']); + } else if (json['redirect']) { + window.location = json['redirect'].replace(/&/g, '&'); + } else if (json['reload']) { + window.location.reload(); + } + }, + error: function (jqXHR, textStatus, errorThrown) { + $('#content > .container-fluid').prepend('
' + textStatus + ' ' + errorThrown + '
'); + } + }); +} +function setPostFinanceCheckoutButtons(buttons) { + $('.postfinancecheckout-btn').remove(); + for (var i = 0; i < buttons.length; i++) { + $('#content > .page-header > .container-fluid > .pull-right').prepend(' '); + $('').attr({ + 'id': 'postfinancecheckout-button-' + i, + 'data-toggle': 'tooltip', + 'title': buttons[i]['text'], + 'data-route': buttons[i]['route'], + 'class': 'postfinancecheckout-btn btn btn-info', + }).html( + $('').attr({ + 'class': 'fa fa-' + buttons[i]['icon'] + }) + ).prependTo('#content > .page-header > .container-fluid > .pull-right' + ).on('click', onPostFinanceCheckoutClick); + } +} +function addPostFinanceCheckoutError(message) { + $('#content > .container-fluid').prepend('
' + message + '
'); +} \ No newline at end of file diff --git a/upload/admin/view/javascript/postfinancecheckout/refund.js b/upload/admin/view/javascript/postfinancecheckout/refund.js new file mode 100644 index 0000000..edf0fa2 --- /dev/null +++ b/upload/admin/view/javascript/postfinancecheckout/refund.js @@ -0,0 +1,68 @@ +(function($) { + window.Refund = { + emptyRefundMessage: 'Empty refund', + + change: function(e) { + var num = $(this).attr('name').match(/\d+/)[0]; + + var price_element = $('#completion-form input[name="item[' + num + '][unit_price]"]'); + var quantity_element = $('#completion-form input[name="item[' + num + '][quantity]"]'); + + var quantity = quantity_element.val(); + var rest_quantity = quantity_element.attr('max') - quantity; + + var full_price = parseFloat(price_element.attr('max')) + parseFloat(price_element.attr('min')); + var reduction = parseFloat(price_element.val()); + + var total = (rest_quantity * reduction) + (quantity * full_price); + + $('#completion-form input[name="item[' + num + '][total]"]').val(total.toFixed(2)); + + Refund.calculateTotalTotal(); + }, + + setEmptyError: function(message) { + Refund.emptyRefundMessage = message; + }, + + fullRefund: function() { + $('#completion-form input[name$="[quantity]"]').each(function() { + $(this).val($(this).attr('max')); + $(this).change(); + }); + }, + + submit: function(e) { + if($('#line-item-total').html() == '0.00') { + alert(Refund.emptyRefundMessage); + e.preventDefault(); + } + }, + + calculateTotalTotal: function() { + $('#line-item-total').html(0); + var total = 0 + $('#completion-form input[type=text]').each(function() { + if($(this).attr('name').indexOf('total') !== -1) { + total += parseFloat($(this).val()); + } + }); + $('#line-item-total').html(total.toFixed(2)); + }, + + reset: function() { + $('#completion-form input[name$="[quantity]"]').each(function() { + $(this).val($(this).attr('min')); + $(this).change(); + }); + }, + + init: function() { + $("#completion-form input[type=number]").on("change", Refund.change); + $("#full-refund").on("click", Refund.fullRefund); + $("#completion-form").on("submit", Refund.submit); + $("#completion-form").on("reset", Refund.reset); + Refund.calculateTotalTotal(); + } + } +})(jQuery); \ No newline at end of file diff --git a/upload/admin/view/template/extension/payment/postfinancecheckout.tpl b/upload/admin/view/template/extension/payment/postfinancecheckout.tpl new file mode 100644 index 0000000..5d396c1 --- /dev/null +++ b/upload/admin/view/template/extension/payment/postfinancecheckout.tpl @@ -0,0 +1,318 @@ + + +
+ +
+ +
+ +
+
+

+

+
+
+
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+
+
+
+
+ + + +
+ + +
"> + + +
+ + + +
+ + +
+ + + +
+ + +
+
+

+

+
+
+
+ + +
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+
+
+ +
+ + +
+ + +
+ + checked value="1"/> +

+
+
+ +
+ + +
+ + checked value="1"/> +

+
+
+
+ +
+ + + + +
+ + +
+ +
+
+ + +
+ +
+ + +
+ + +
+ +
+
+
+
+
+
+ +
+
+
+

+

+
+
+
+ + +
+ + +
+

+
+
+ +
+ + +
+

+
+
+ +
+ + +
+

+
+
+ +
+ + +
+

+
+
+ +
+ + +
+

+
+
+ +
+ + +
+

+
+
+ +
+ + +
+

+
+
+
+ +
+ + +
+ +
+

+
+
+ +
+ +
+

+
+
+
+
+
+
+
+
+ diff --git a/upload/admin/view/template/extension/postfinancecheckout/error.tpl b/upload/admin/view/template/extension/postfinancecheckout/error.tpl new file mode 100644 index 0000000..eb340c3 --- /dev/null +++ b/upload/admin/view/template/extension/postfinancecheckout/error.tpl @@ -0,0 +1,24 @@ + +
+ +
+
+
+

+
+
+

+
+
+
+
+ \ No newline at end of file diff --git a/upload/admin/view/template/extension/postfinancecheckout/labels.tpl b/upload/admin/view/template/extension/postfinancecheckout/labels.tpl new file mode 100644 index 0000000..369e757 --- /dev/null +++ b/upload/admin/view/template/extension/postfinancecheckout/labels.tpl @@ -0,0 +1,39 @@ + + $job_group) : ?> + ' + > + +
+ +
+ +

+ + +
+ +
+ '> + + +
+
+ +
+
+ '> + + +
+
+ +
+
+ +
+ +
+ +
+
+ \ No newline at end of file diff --git a/upload/admin/view/template/extension/postfinancecheckout/refund.tpl b/upload/admin/view/template/extension/postfinancecheckout/refund.tpl new file mode 100644 index 0000000..7b12478 --- /dev/null +++ b/upload/admin/view/template/extension/postfinancecheckout/refund.tpl @@ -0,0 +1,188 @@ + + + +
+ +
+ +
+ +
+ + +
+ + +
+ +
+ + +
+ +
+
+

+

+
+
+ +

+

+
+ + + + + + + + + + + + + + + $line_item): ?> + + + + + + + + + + + + + + + + + + + +
+ getType()) { + case 'PRODUCT': + ?>getType(); + break; + } + ?> + + +
+
+
getName(); ?>
+ +
+
getSku(); ?>
+ +
+
getUniqueId(); ?>
+
+
+ getTaxes()) >= 1) : ?> +
+ getTaxes() as $tax_rate) :?> +
getTitle(); ?>
+
getRate()); ?>%
+ +
+ +
+ getQuantity(); ?> +
+ getAmountIncludingTax() / $line_item->getQuantity(), $currency_decimals); ?> +
+ getAmountIncludingTax(), $currency_decimals); ?> +
:
+ +
+
+ +
+
+
+ + + +
+
+
+
+
+
+ + diff --git a/upload/catalog/controller/extension/postfinancecheckout/cron.php b/upload/catalog/controller/extension/postfinancecheckout/cron.php new file mode 100644 index 0000000..f52a479 --- /dev/null +++ b/upload/catalog/controller/extension/postfinancecheckout/cron.php @@ -0,0 +1,100 @@ +endRequestPrematurely(); + + if (isset($this->request->get['security_token'])) { + $security_token = $this->request->get['security_token']; + } + else { + \PostFinanceCheckoutHelper::instance($this->registry)->log('Cron called without security token.', \PostFinanceCheckoutHelper::LOG_ERROR); + die(); + } + + try { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionStart(); + $result = \PostFinanceCheckout\Entity\Cron::setProcessing($this->registry, $security_token); + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionCommit(); + if (!$result) { + die(); + } + } + catch (Exception $e) { + // 1062 is mysql duplicate constraint error. This is expected and doesn't need to be logged. + if (strpos('1062', $e->getMessage()) === false && strpos('constraint_key', $e->getMessage()) === false) { + \PostFinanceCheckoutHelper::instance($this->registry)->log('Updating cron failed: ' . $e->getMessage(), \PostFinanceCheckoutHelper::LOG_ERROR); + } + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionRollback(); + die(); + } + + $errors = $this->runTasks(); + + try { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionStart(); + $result = \PostFinanceCheckout\Entity\Cron::setComplete($this->registry, $security_token, implode('. ', $errors)); + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionCommit(); + if (!$result) { + \PostFinanceCheckoutHelper::instance($this->registry)->log('Could not update finished cron job.', \PostFinanceCheckoutHelper::LOG_ERROR); + die(); + } + } + catch (Exception $e) { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionRollback(); + \PostFinanceCheckoutHelper::instance($this->registry)->log('Could not update finished cron job: ' . $e->getMessage(), \PostFinanceCheckoutHelper::LOG_ERROR); + die(); + } + die(); + } + + private function runTasks(){ + $errors = array(); + foreach (\PostFinanceCheckout\Entity\AbstractJob::loadNotSent($this->registry) as $job) { + try { + switch (get_class($job)) { + case \PostFinanceCheckout\Entity\CompletionJob::class: + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByTransaction($this->registry, $job->getSpaceId(), + $job->getTransactionId()); + \PostFinanceCheckout\Service\Transaction::instance($this->registry)->updateLineItemsFromOrder($transaction_info->getOrderId()); + \PostFinanceCheckout\Service\Completion::instance($this->registry)->send($job); + break; + case \PostFinanceCheckout\Entity\RefundJob::class: + \PostFinanceCheckout\Service\Refund::instance($this->registry)->send($job); + break; + case \PostFinanceCheckout\Entity\VoidJob::class: + \PostFinanceCheckout\Service\VoidJob::instance($this->registry)->send($job); + break; + default: + break; + } + } + catch (Exception $e) { + \PostFinanceCheckoutHelper::instance($this->registry)->log('Could not update job: ' . $e->getMessage(), \PostFinanceCheckoutHelper::LOG_ERROR); + $errors[] = $e->getMessage(); + } + } + return $errors; + } + + private function endRequestPrematurely(){ + ob_end_clean(); + // Return request but keep executing + set_time_limit(0); + ignore_user_abort(true); + ob_start(); + if (session_id()) { + session_write_close(); + } + header("Content-Encoding: none"); + header("Connection: close"); + header('Content-Type: text/javascript'); + ob_end_flush(); + flush(); + if (is_callable('fastcgi_finish_request')) { + fastcgi_finish_request(); + } + } +} \ No newline at end of file diff --git a/upload/catalog/controller/extension/postfinancecheckout/error.php b/upload/catalog/controller/extension/postfinancecheckout/error.php new file mode 100644 index 0000000..1340825 --- /dev/null +++ b/upload/catalog/controller/extension/postfinancecheckout/error.php @@ -0,0 +1,35 @@ +request->get['error_code'])) { + $error_code = $this->request->get['error_code']; + } + else { + $error_code = 'error_default'; + } + + $data = array(); + + $this->language->load('extension/payment/postfinancecheckout'); + + $data['text_message'] = $this->language->get($error_code); + $data['heading_title'] = $this->language->get('heading_error'); + + $data['column_left'] = $this->load->controller('common/column_left'); + $data['column_right'] = $this->load->controller('common/column_right'); + $data['content_top'] = $this->load->controller('common/content_top'); + $data['content_bottom'] = $this->load->controller('common/content_bottom'); + $data['footer'] = $this->load->controller('common/footer'); + $data['header'] = $this->load->controller('common/header'); + + $this->response->setOutput($this->loadView("extension/postfinancecheckout/error", $data)); + } + + protected function getRequiredPermission(){ + return ''; + } +} \ No newline at end of file diff --git a/upload/catalog/controller/extension/postfinancecheckout/event.php b/upload/catalog/controller/extension/postfinancecheckout/event.php new file mode 100644 index 0000000..9fd47f0 --- /dev/null +++ b/upload/catalog/controller/extension/postfinancecheckout/event.php @@ -0,0 +1,210 @@ +registry)->refreshWebhook(); + $this->includeCronScript(); + $this->includeDeviceIdentifier(); + } + catch (Exception $e) { + } + } + + /** + * Adds the postfinancecheckout device identifier script + * + * @param string $route + * @param array $parameters + * @param object $output + */ + private function includeCronScript(){ + \PostFinanceCheckout\Entity\Cron::cleanUpHangingCrons($this->registry); + \PostFinanceCheckout\Entity\Cron::insertNewPendingCron($this->registry); + + $security_token = \PostFinanceCheckout\Entity\Cron::getCurrentSecurityTokenForPendingCron($this->registry); + if ($security_token) { + $cronUrl = $this->createUrl('extension/postfinancecheckout/cron', array( + 'security_token' => $security_token + )); + $this->document->addScript($cronUrl . '" async="async'); + } + } + + /** + * Adds the postfinancecheckout device identifier script + * + * @param string $route + * @param array $parameters + * @param object $output + */ + private function includeDeviceIdentifier(){ + $script = \PostFinanceCheckoutHelper::instance($this->registry)->getBaseUrl(); + $script .= '/s/[spaceId]/payment/device.js?sessionIdentifier=[UniqueSessionIdentifier]'; + + $this->setDeviceCookie(); + + $script = str_replace(array( + '[spaceId]', + '[UniqueSessionIdentifier]' + ), array( + $this->config->get('postfinancecheckout_space_id'), + $this->request->cookie['postfinancecheckout_device_id'] + ), $script); + + // async hack + $script .= '" async="async'; + + $this->document->addScript($script); + } + + private function setDeviceCookie(){ + if (isset($this->request->cookie['postfinancecheckout_device_id'])) { + $value = $this->request->cookie['postfinancecheckout_device_id']; + } + else { + $this->request->cookie['postfinancecheckout_device_id'] = $value = \PostFinanceCheckoutHelper::generateUuid(); + } + setcookie('postfinancecheckout_device_id', $value, time() + 365 * 24 * 60 * 60, '/'); + } + + /** + * Prevent line item changes to authorized postfinancecheckout transactions. + * + * @param string $route + * @param array $parameters + * @param object $output + */ + public function canSaveOrder(){ + $order_id = $parameters[0]; + + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $order_id); + + if ($transaction_info->getId() === null) { + // not a postfinancecheckout transaction + return; + } + + if (\PostFinanceCheckoutHelper::isEditableState($transaction_info->getState())) { + // changing line items still permitted + return; + } + + $old_order = $this->getOldOrderLineItemData($order_id); + $new_order = $this->getNewOrderLineItemData($parameters[1]); + + foreach ($new_order as $key => $new_item) { + foreach ($old_order as $old_item) { + if ($old_item['id'] == $new_item['id'] && \PostFinanceCheckoutHelper::instance($this->registry)->areAmountsEqual($old_item['total'], + $new_item['total'], $transaction_info->getCurrency())) { + unset($new_order[$key]); + break; + } + } + } + + if (!empty($new_order)) { + \PostFinanceCheckoutHelper::instance($this->registry)->log($this->language->get('error_order_edit') . " ($order_id)", \PostFinanceCheckoutHelper::LOG_ERROR); + + $this->language->load('extension/payment/postfinancecheckout'); + $this->response->addHeader('Content-Type: application/json'); + $this->response->setOutput(json_encode([ + 'error' => $this->language->get('error_order_edit') + ])); + $this->response->output(); + die(); + } + } + + public function update(){ + try { + $this->validate(); + + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $this->request->get['order_id']); + + if ($transaction_info->getState() == \Wallee\Sdk\Model\TransactionState::AUTHORIZED) { + \PostFinanceCheckout\Service\Transaction::instance($this->registry)->updateLineItemsFromOrder($this->request->get['order_id']); + return; + } + } + catch (\Exception $e) { + } + } + + /** + * Return simple list of ids and total for the given new order information + * + * @param array $new_order + * @return array + */ + private function getNewOrderLineItemData(array $new_order){ + $line_items = array(); + + foreach ($new_order['products'] as $product) { + $line_items[] = [ + 'id' => $product['product_id'], + 'total' => $product['total'] + ]; + } + + foreach ($new_order['vouchers'] as $voucher) { + $line_items[] = [ + 'id' => $voucher['voucher_id'], + 'total' => $voucher['price'] + ]; + } + + foreach ($new_order['totals'] as $total) { + $line_items[] = [ + 'id' => $total['code'], + 'total' => $total['value'] + ]; + } + + return $line_items; + } + + /** + * Return a simple list of ids and total for the existing order identified by order_id + * + * @param int $order_id + * @return array + */ + private function getOldOrderLineItemData($order_id){ + $line_items = array(); + $model = \PostFinanceCheckoutHelper::instance($this->registry)->getOrderModel(); + + foreach ($model->getOrderProducts($order_id) as $product) { + $line_items[] = [ + 'id' => $product['product_id'], + 'total' => $product['total'] + ]; + } + + foreach ($model->getOrderVouchers($order_id) as $voucher) { + $line_items[] = [ + 'id' => $voucher['voucher_id'], + 'total' => $voucher['price'] + ]; + } + + foreach ($model->getOrderTotals($order_id) as $total) { + $line_items[] = [ + 'id' => $total['code'], + 'total' => $total['value'] + ]; + } + + return $line_items; + } + + protected function getRequiredPermission(){ + return ''; + } +} \ No newline at end of file diff --git a/upload/catalog/controller/extension/postfinancecheckout/pdf.php b/upload/catalog/controller/extension/postfinancecheckout/pdf.php new file mode 100644 index 0000000..075aa97 --- /dev/null +++ b/upload/catalog/controller/extension/postfinancecheckout/pdf.php @@ -0,0 +1,20 @@ +validate(); + $this->downloadPackingSlip($this->request->get['order_id']); + } + + public function invoice(){ + $this->validate(); + $this->downloadInvoice($this->request->get['order_id']); + } + + + protected function getRequiredPermission(){ + return ''; + } +} \ No newline at end of file diff --git a/upload/catalog/controller/extension/postfinancecheckout/webhook.php b/upload/catalog/controller/extension/postfinancecheckout/webhook.php new file mode 100644 index 0000000..4bad9de --- /dev/null +++ b/upload/catalog/controller/extension/postfinancecheckout/webhook.php @@ -0,0 +1,47 @@ +registry); + + $requestBody = trim(file_get_contents("php://input")); + set_error_handler(array( + __CLASS__, + 'handleWebhookErrors' + )); + try { + $request = new \PostFinanceCheckout\Webhook\Request(json_decode($requestBody)); + $webhook_model = $webhook_service->getWebhookEntityForId($request->getListenerEntityId()); + if ($webhook_model === null) { + \PostFinanceCheckoutHelper::instance($this->registry)->log(sprintf('Could not retrieve webhook model for listener entity id: %s', $request->getListenerEntityId()), \PostFinanceCheckoutHelper::LOG_ERROR); + header("HTTP/1.1 500 Internal Server Error"); + echo sprintf('Could not retrieve webhook model for listener entity id: %s', $request->getListenerEntityId()); + exit(); + } + $webhook_handler_class_name = $webhook_model->getHandlerClassName(); + $webhook_handler = $webhook_handler_class_name::instance($this->registry); + \PostFinanceCheckoutHelper::instance($this->registry)->log("Processing webhook with $webhook_handler_class_name", \PostFinanceCheckoutHelper::LOG_DEBUG); + $webhook_handler->process($request); + } + catch (Exception $e) { + header("HTTP/1.1 500 Internal Server Error"); + echo ($e->getMessage()); + exit(); + } + + exit(); + } + + public static function handleWebhookErrors($errno, $errstr, $errfile, $errline){ + $fatal = E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR; + if ($errno & $fatal) { + throw new ErrorException($errstr, $errno, E_ERROR, $errfile, $errline); + } + return false; + } +} \ No newline at end of file diff --git a/upload/catalog/language/en-gb/extension/payment/postfinancecheckout.php b/upload/catalog/language/en-gb/extension/payment/postfinancecheckout.php new file mode 100644 index 0000000..031fea5 --- /dev/null +++ b/upload/catalog/language/en-gb/extension/payment/postfinancecheckout.php @@ -0,0 +1,29 @@ +
Processing Order'; // is included as part of a html attribute ="", as such cannot contain double quotes +$_['text_further_details'] = 'Please enter any missing details so we can process your payment below.'; + +// Error +$_['heading_error'] = 'Error'; +$_['error_default'] = 'This action is not permitted.'; +$_['error_order_edit'] = 'The PostFinance Checkout transaction is in a state in which the line items may no longer be changed.'; +$_['error_not_pending'] = 'Transaction exists and is not in state pending.'; + +// Order overview / download buttons +$_['button_invoice'] = 'Invoice'; +$_['button_packing_slip'] = 'Packing slip'; + +// Webhook messages +$_['message_webhook_processing'] = 'Transaction is processing via webhook.'; +$_['message_webhook_connfirm'] = 'Transaction has been confirmed via webhook.'; +$_['message_webhook_authorize'] = 'Transaction has been authorized via webhook.'; +$_['message_webhook_waiting'] = 'Transaction is waiting via webhook.'; +$_['message_webhook_decline'] = 'Transaction has been declined via webhook.'; +$_['message_webhook_failed'] = 'Transaction has failed via webhook.'; +$_['message_webhook_fulfill'] = 'Transaction has been fulfilled via webhook.'; +$_['message_webhook_voided'] = 'Transaction has been voided via webhook.'; + +$_['message_webhook_manual'] = 'A manual decision about whether to accept the payment is required.'; +$_['message_refund_successful'] = 'The refund \'%s\' over amount %s was successful.'; \ No newline at end of file diff --git a/upload/catalog/model/extension/payment/postfinancecheckout.php b/upload/catalog/model/extension/payment/postfinancecheckout.php new file mode 100644 index 0000000..2db9f8f --- /dev/null +++ b/upload/catalog/model/extension/payment/postfinancecheckout.php @@ -0,0 +1,11 @@ +registry)->isValidOrder($order_id)) { + return array(); + } + + $this->language->load('extension/payment/postfinancecheckout'); + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $order_id); + + $buttons = array(); + + if ($this->config->get('postfinancecheckout_download_packaging') && $transaction_info->getState() == \Wallee\Sdk\Model\TransactionState::FULFILL) { + $buttons[] = $this->getPackagingButton(); + } + + if ($this->config->get('postfinancecheckout_download_invoice') && in_array($transaction_info->getState(), + array( + \Wallee\Sdk\Model\TransactionState::FULFILL, + \Wallee\Sdk\Model\TransactionState::COMPLETED, + \Wallee\Sdk\Model\TransactionState::DECLINE + ))) { + $buttons[] = $this->getInvoiceButton(); + } + + return $buttons; + } + + private function getInvoiceButton(){ + return array( + 'text' => $this->language->get('button_invoice'), + 'icon' => 'download', + 'url' => $this->createUrl('extension/postfinancecheckout/pdf/invoice', array( + 'order_id' => $this->request->get['order_id'] + )) + ); + } + + private function getPackagingButton(){ + return array( + 'text' => $this->language->get('button_packing_slip'), + 'icon' => 'download', + 'url' => $this->createUrl('extension/postfinancecheckout/pdf/packingSlip', array( + 'order_id' => $this->request->get['order_id'] + )) + ); + } +} \ No newline at end of file diff --git a/upload/catalog/view/javascript/postfinancecheckout.js b/upload/catalog/view/javascript/postfinancecheckout.js new file mode 100644 index 0000000..b523b73 --- /dev/null +++ b/upload/catalog/view/javascript/postfinancecheckout.js @@ -0,0 +1,57 @@ +(function($) { + window.PostFinanceCheckout = { + handler : null, + methodConfigurationId : null, + running : false, + + initialized : function() { + $('#button-confirm').removeAttr('disabled'); + $('#postfinancecheckout-iframe-spinner').hide(); + $('#postfinancecheckout-iframe-container').show(); + $('#button-confirm').click(function(event) { + PostFinanceCheckout.handler.validate(); + $('#button-confirm').attr('disabled', 'disabled'); + }); + }, + + submit : function() { + if(!PostFinanceCheckout.running) { + PostFinanceCheckout.running = true; + $.getJSON('index.php?route=extension/payment/postfinancecheckout_' + + PostFinanceCheckout.methodConfigurationId + '/confirm', '', function(data, + status, jqXHR) { + if (data.status) { + PostFinanceCheckout.handler.submit(); + } else { + alert(data.message); + $('#button-confirm').removeAttr('disabled'); + } + PostFinanceCheckout.running = false; + }); + } + }, + + validated : function(result) { + if (result.success) { + PostFinanceCheckout.submit(); + } else { + $('#button-confirm').removeAttr('disabled'); + } + }, + + init : function(methodConfigurationId) { + if (typeof window.IframeCheckoutHandler === 'undefined') { + setTimeout(function() { + PostFinanceCheckout.init(methodConfigurationId); + }, 500); + } else { + PostFinanceCheckout.methodConfigurationId = methodConfigurationId; + PostFinanceCheckout.handler = window + .IframeCheckoutHandler(methodConfigurationId); + PostFinanceCheckout.handler.setInitializeCallback(this.initialized); + PostFinanceCheckout.handler.setValidationCallback(this.validated); + PostFinanceCheckout.handler.create('postfinancecheckout-iframe-container'); + } + } + } +})(jQuery); \ No newline at end of file diff --git a/upload/catalog/view/theme/default/template/extension/payment/postfinancecheckout/iframe.tpl b/upload/catalog/view/theme/default/template/extension/payment/postfinancecheckout/iframe.tpl new file mode 100644 index 0000000..aee8804 --- /dev/null +++ b/upload/catalog/view/theme/default/template/extension/payment/postfinancecheckout/iframe.tpl @@ -0,0 +1,34 @@ +
+
+

+ +
+
+
+ +
+ + +
+
+ +
+
+
+ + + +
\ No newline at end of file diff --git a/upload/catalog/view/theme/default/template/extension/postfinancecheckout/error.tpl b/upload/catalog/view/theme/default/template/extension/postfinancecheckout/error.tpl new file mode 100644 index 0000000..daab444 --- /dev/null +++ b/upload/catalog/view/theme/default/template/extension/postfinancecheckout/error.tpl @@ -0,0 +1,24 @@ + +
+ +
+ + + + + + + +
+

+
+ +
+
+
+
+ \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/autoload.php b/upload/system/library/postfinancecheckout/autoload.php new file mode 100644 index 0000000..8ee1002 --- /dev/null +++ b/upload/system/library/postfinancecheckout/autoload.php @@ -0,0 +1,75 @@ +get[] array, + * If the order id is part of a postfinancecheckout transaction, + * If the user (non admin) is the owner of the given order. + */ +abstract class AbstractController extends \Controller { + + protected function loadView($template, $data = array()){ + $template = \PostFinanceCheckoutVersionHelper::getTemplate($template); + if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/' . $template)) { + return $this->load->view($this->config->get('config_template') . '/template/' . $template, $data); + } + else { + return $this->load->view($template, $data); + } + } + + protected function validate(){ + $this->language->load('extension/payment/postfinancecheckout'); + $this->validatePermission(); + $this->validateOrder(); + } + + protected function validatePermission(){ + if (\PostFinanceCheckoutHelper::instance($this->registry)->isAdmin()) { + if (!$this->user->hasPermission('access', $this->getRequiredPermission())) { + throw new \Exception($this->language->get('error_permission')); + } + } + } + + protected function displayError($message){ + $variables = $this->getAdminSurroundingTemplates(); + $variables['text_error'] = $message; + $this->response->setOutput($this->loadView("extension/postfinancecheckout/error", $variables)); + } + + protected function getAdminSurroundingTemplates(){ + return array( + 'header' => $this->load->controller("common/header"), + 'column_left' => $this->load->controller("common/column_left"), + 'footer' => $this->load->controller("common/footer") + ); + } + + protected function validateOrder(){ + if (!isset($this->request->get['order_id'])) { + throw new \Exception($this->language->get('error_order_id')); + } + if (!\PostFinanceCheckoutHelper::instance($this->registry)->isValidOrder($this->request->get['order_id'])) { + throw new \Exception($this->language->get('error_not_postfinancecheckout')); + } + } + + protected function createUrl($route, $query){ + return \PostFinanceCheckoutVersionHelper::createUrl($this->url, $route, $query, $this->config->get('config_secure')); + } + + protected abstract function getRequiredPermission(); +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/controller/abstract_event.php b/upload/system/library/postfinancecheckout/controller/abstract_event.php new file mode 100644 index 0000000..3b6e992 --- /dev/null +++ b/upload/system/library/postfinancecheckout/controller/abstract_event.php @@ -0,0 +1,10 @@ +registry, $order_id); + if ($transaction_info->getId() != null && $transaction_info->getState() == \Wallee\Sdk\Model\TransactionState::FULFILL) { + $service = new \Wallee\Sdk\Service\TransactionService(\PostFinanceCheckoutHelper::instance($this->registry)->getApiClient()); + $document = $service->getPackingSlip($transaction_info->getSpaceId(), $transaction_info->getTransactionId()); + $this->download($document); + } + } + + protected function downloadInvoice($order_id){ + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $order_id); + if ($transaction_info->getId() != null && in_array($transaction_info->getState(), + array( + \Wallee\Sdk\Model\TransactionState::COMPLETED, + \Wallee\Sdk\Model\TransactionState::FULFILL, + \Wallee\Sdk\Model\TransactionState::DECLINE + ))) { + $service = new \Wallee\Sdk\Service\TransactionService(\PostFinanceCheckoutHelper::instance($this->registry)->getApiClient()); + $document = $service->getInvoiceDocument($transaction_info->getSpaceId(), $transaction_info->getTransactionId()); + $this->download($document); + } + } + + /** + * Sends the data received by calling the given path to the browser and ends the execution of the script + * + * @param string $path + */ + private function download(\Wallee\Sdk\Model\RenderedDocument $document){ + header('Pragma: public'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Content-type: application/pdf'); + header('Content-Disposition: attachment; filename="' . $document->getTitle() . '.pdf"'); + header('Content-Description: ' . $document->getTitle()); + echo base64_decode($document->getData()); + exit(); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/dynamic/admin/controller.mock b/upload/system/library/postfinancecheckout/dynamic/admin/controller.mock new file mode 100644 index 0000000..4ce8e4c --- /dev/null +++ b/upload/system/library/postfinancecheckout/dynamic/admin/controller.mock @@ -0,0 +1,10 @@ +code; + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/dynamic/admin/controller.php b/upload/system/library/postfinancecheckout/dynamic/admin/controller.php new file mode 100644 index 0000000..3380310 --- /dev/null +++ b/upload/system/library/postfinancecheckout/dynamic/admin/controller.php @@ -0,0 +1,310 @@ +config->get('postfinancecheckout_status')) { + return ''; + } + + if (!isset($this->request->get['order_id'])) { + return ''; + } + $order_id = $this->request->get['order_id']; + + if (!\PostFinanceCheckoutHelper::instance($this->registry)->isValidOrder($order_id)) { + return ''; + } + + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $order_id); + + $refund_jobs = \PostFinanceCheckout\Entity\RefundJob::loadByOrder($this->registry, $order_id); + $completion_jobs = \PostFinanceCheckout\Entity\CompletionJob::loadByOrder($this->registry, $order_id); + $void_jobs = \PostFinanceCheckout\Entity\VoidJob::loadByOrder($this->registry, $order_id); + + $this->language->load('extension/payment/postfinancecheckout'); + + $job_groups = array( + array( + 'title' => $this->language->get('title_transaction_information'), + 'jobs' => array( + array( + 'label_groups' => $this->getLabelTemplateVariables($transaction_info->getLabels(), + $this->getTransactionDefaultLabels($transaction_info)) + ) + ) + ) + ); + + if ($completion_jobs) { + $jobs = array(); + foreach ($completion_jobs as $job) { + $jobs[] = array( + 'title' => sprintf($this->language->get('label_completion'), $job->getJobId()), + 'label_groups' => $this->getLabelTemplateVariables($job->getLabels(), $this->getCompletionDefaultLabels($job)) + ); + } + + $job_groups[] = array( + 'title' => $this->language->get('title_completion'), + 'jobs' => $jobs + ); + } + + if ($refund_jobs) { + $jobs = array(); + foreach ($refund_jobs as $job) { + $jobs[] = array( + 'title' => sprintf($this->language->get('label_refund'), $job->getJobId()), + 'label_groups' => $this->getLabelTemplateVariables($job->getLabels(), $this->getRefundDefaultLabels($job)) + ); + } + + $job_groups[] = array( + 'title' => $this->language->get('title_refund'), + 'jobs' => $jobs + ); + } + + if ($void_jobs) { + $jobs = array(); + foreach ($void_jobs as $job) { + $jobs[] = array( + 'title' => sprintf($this->language->get('label_void'), $job->getJobId()), + 'label_groups' => $this->getLabelTemplateVariables($job->getLabels(), $this->getVoidDefaultLabels($job)) + ); + } + + $job_groups[] = array( + 'title' => $this->language->get('title_void'), + 'jobs' => $jobs + ); + } + + return PostFinanceCheckoutVersionHelper::wrapJobLabels($this->registry, $this->loadView('extension/postfinancecheckout/labels', array( + 'job_groups' => $job_groups + ))); + } + + private function getLabelHeader($title){ + return "

$title


"; + } + + private function getPostFinanceCheckoutLink($type, $space, $id, $link_text){ + $base_url = \PostFinanceCheckoutHelper::getBaseUrl(); + $url = "$base_url/s/$space/payment/$type/view/$id"; + return "$link_text"; + } + + private function getDownloadLink($type){ + $link_text = $this->language->get('link_download'); + $url = $this->createUrl('extension/postfinancecheckout/pdf/' . $type, + array( + 'order_id' => $this->request->get['order_id'], + \PostFinanceCheckoutVersionHelper::TOKEN => $this->session->data[\PostFinanceCheckoutVersionHelper::TOKEN] + )); + return "$link_text"; + } + + private function getTransactionDefaultLabels(\PostFinanceCheckout\Entity\TransactionInfo $transaction_info){ + $labels = array( + 'default' => array( + 'name' => $this->language->get('label_default'), + 'description' => $this->language->get('description_default_transaction_information'), + 'labels' => array( + array( + 'name' => $this->language->get('label_postfinancecheckout_id'), + 'description' => $this->language->get('description_postfinancecheckout_id'), + 'value' => $transaction_info->getTransactionId() + ), + array( + 'name' => $this->language->get('label_postfinancecheckout_link'), + 'description' => $this->language->get('description_postfinancecheckout_link'), + 'value' => $this->getPostFinanceCheckoutLink('transaction', $transaction_info->getSpaceId(), $transaction_info->getTransactionId(), + $this->language->get('link_transaction')) + ), + array( + 'name' => $this->language->get('label_status'), + 'description' => $this->language->get('label_status'), + 'value' => $transaction_info->getState() + ) + ) + ) + ); + + $download_labels = array(); + if (in_array($transaction_info->getState(), + array( + \Wallee\Sdk\Model\TransactionState::COMPLETED, + \Wallee\Sdk\Model\TransactionState::FULFILL, + \Wallee\Sdk\Model\TransactionState::DECLINE + ))) { + $download_labels[] = array( + 'name' => $this->language->get('label_invoice'), + 'description' => $this->language->get('description_invoice'), + 'value' => $this->getDownloadLink('invoice') + ); + } + if ($transaction_info->getState() == \Wallee\Sdk\Model\TransactionState::FULFILL) { + $download_labels[] = array( + 'name' => $this->language->get('label_packing'), + 'description' => $this->language->get('description_packing'), + 'value' => $this->getDownloadLink('packingSlip') + ); + } + if ($download_labels) { + $labels['downloads'] = array( + 'name' => $this->language->get('title_downloads'), + 'description' => $this->language->get('description_downloads'), + 'labels' => $download_labels + ); + } + + if ($transaction_info->getFailureReason() != null) { + $labels['default']['labels'][] = array( + 'name' => $this->language->get('label_failure'), + 'description' => $this->language->get('description_failure'), + 'value' => $transaction_info->getFailureReason() + ); + } + + return $labels; + } + + private function getCompletionDefaultLabels(\PostFinanceCheckout\Entity\CompletionJob $job){ + $labels = array( + 'default' => array( + 'name' => $this->language->get('label_default'), + 'description' => $this->language->get('description_default_completion'), + 'labels' => array() + ) + ); + + $this->addDefaultJobInformation($labels, $job, 'completion'); + + return $labels; + } + + private function addDefaultJobInformation(array &$labels, \PostFinanceCheckout\Entity\AbstractJob $job, $link_type){ + $labels['default']['labels'][] = array( + 'name' => $this->language->get('label_status'), + 'description' => $this->language->get('label_status'), + 'value' => $job->getState() + ); + + if ($job->getJobId()) { + $labels['default']['labels'][] = array( + 'name' => $this->language->get('label_postfinancecheckout_id'), + 'description' => $this->language->get('description_postfinancecheckout_id'), + 'value' => $job->getJobId() + ); + $labels['default']['labels'][] = array( + 'name' => $this->language->get('label_postfinancecheckout_link'), + 'description' => $this->language->get('description_postfinancecheckout_link'), + 'value' => $this->getPostFinanceCheckoutLink($link_type, $job->getSpaceId(), $job->getJobId(), $this->language->get('link_' . $link_type)) + ); + } + + if ($job->getFailureReason() != null) { + $labels['default']['labels'][] = array( + 'name' => $this->language->get('label_failure'), + 'description' => $this->language->get('description_failure'), + 'value' => $job->getFailureReason() + ); + } + } + + private function getRefundDefaultLabels(\PostFinanceCheckout\Entity\RefundJob $job){ + $labels = array( + 'default' => array( + 'name' => $this->language->get('label_default'), + 'description' => $this->language->get('description_default_refund'), + 'labels' => array( + array( + 'name' => $this->language->get('label_external'), + 'description' => $this->language->get('description_external'), + 'value' => $job->getExternalId() + ), + array( + 'name' => $this->language->get('label_amount'), + 'description' => $this->language->get('description_refund_amount'), + 'value' => $job->getAmount() + ), + array( + 'name' => $this->language->get('label_restock'), + 'description' => $this->language->get('description_restock'), + 'value' => $job->getRestock() ? $this->language->get('yes') : $this->language->get('no') + ) + ) + ) + ); + + $this->addDefaultJobInformation($labels, $job, 'refund'); + + return $labels; + } + + private function getVoidDefaultLabels(\PostFinanceCheckout\Entity\VoidJob $job){ + $labels = array( + 'default' => array( + 'name' => $this->language->get('label_default'), + 'description' => $this->language->get('description_default_void'), + 'labels' => array() + ) + ); + $this->addDefaultJobInformation($labels, $job, 'void'); + + return $labels; + } + + + /** + * + * @param map[string, string] $labels Translateable labels, from entities + * @param array $display_labels Optional additional labels. + * @return string + */ + private function getLabelTemplateVariables($labels, $display_labels = array()){ + if ($labels) { + foreach ($labels as $label_id => $label_value) { + $label_decriptor = \PostFinanceCheckout\Provider\LabelDescriptor::instance($this->registry)->find($label_id); + if(!$label_decriptor) { + \PostFinanceCheckoutHelper::instance($this->registry)->log("Could not find label descriptor for id $label_id, skipping", \PostFinanceCheckoutHelper::LOG_ERROR); + continue; + } + $group_id = $label_decriptor->getGroup(); + if (!isset($display_labels[$group_id])) { + $label_group = \PostFinanceCheckout\Provider\LabelDescriptionGroup::instance($this->registry)->find($group_id); + if(!$label_group) { + \PostFinanceCheckoutHelper::instance($this->registry)->log("Could not find label group for id $group_id, skipping", \PostFinanceCheckoutHelper::LOG_ERROR); + continue; + } + $display_labels[$group_id] = array( + 'name' => htmlspecialchars(\PostFinanceCheckoutHelper::instance($this->registry)->translate($label_group->getName()), + ENT_HTML5 | ENT_QUOTES), + 'description' => htmlspecialchars(\PostFinanceCheckoutHelper::instance($this->registry)->translate($label_group->getDescription()), + ENT_HTML5 | ENT_QUOTES), + 'labels' => array() + ); + } + $display_labels[$group_id]['labels'][] = array( + 'name' => htmlspecialchars(\PostFinanceCheckoutHelper::instance($this->registry)->translate($label_decriptor->getName()), + ENT_HTML5 | ENT_QUOTES), + 'description' => htmlspecialchars(\PostFinanceCheckoutHelper::instance($this->registry)->translate($label_decriptor->getDescription()), + ENT_HTML5 | ENT_QUOTES), + 'value' => htmlspecialchars($label_value, ENT_HTML5 | ENT_QUOTES) + ); + } + } + + return $display_labels; + } + + protected function getRequiredPermission(){ + return ''; // see isValidOrder + } + + protected abstract function getCode(); +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/dynamic/admin/language.mock b/upload/system/library/postfinancecheckout/dynamic/admin/language.mock new file mode 100644 index 0000000..d625611 --- /dev/null +++ b/upload/system/library/postfinancecheckout/dynamic/admin/language.mock @@ -0,0 +1,3 @@ +code; + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/dynamic/catalog/controller.php b/upload/system/library/postfinancecheckout/dynamic/catalog/controller.php new file mode 100644 index 0000000..032d77a --- /dev/null +++ b/upload/system/library/postfinancecheckout/dynamic/catalog/controller.php @@ -0,0 +1,66 @@ +config->get('postfinancecheckout_status')) { + return ''; + } + $this->load->language('extension/payment/postfinancecheckout'); + + $data['configuration_id'] = substr($this->getCode(), strlen('postfinancecheckout_')); + + $data['button_confirm'] = $this->language->get('button_confirm'); + $data['text_loading'] = $this->language->get('text_loading'); + + $this->load->model('extension/payment/' . $this->getCode()); + $data['text_payment_title'] = $this->{"model_extension_payment_{$this->getCode()}"}->getTitle(); + $data['text_further_details'] = $this->language->get('text_further_details'); + + $data['opencart_js'] = 'catalog/view/javascript/postfinancecheckout.js'; + $data['external_js'] = PostFinanceCheckout\Service\Transaction::instance($this->registry)->getJavascriptUrl(); + + return $this->loadView('extension/payment/postfinancecheckout/iframe', $data); + } + + public function confirm(){ + if (!$this->config->get('postfinancecheckout_status')) { + return ''; + } + $result = array( + 'status' => false + ); + try { + $service = \PostFinanceCheckout\Service\Transaction::instance($this->registry); + + $transaction = $service->getTransaction(array(), false, array( + \Wallee\Sdk\Model\TransactionState::PENDING + )); + if ($transaction->getState() === \Wallee\Sdk\Model\TransactionState::PENDING) { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionStart(); + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionLock($transaction->getLinkedSpaceId(), $transaction->getId()); + $service->update($this->session->data, true); + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionCommit(); + $result['status'] = true; + } + else { + throw new Exception('Transaction is not pending.'); + } + } + catch (Exception $e) { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionRollback(); + $result['message'] = $e->getMessage(); + } + + $this->response->addHeader('Content-Type: application/json'); + $this->response->setOutput(json_encode($result)); + } + + protected function getRequiredPermission(){ + return ''; + } + + protected abstract function getCode(); +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/dynamic/catalog/language.mock b/upload/system/library/postfinancecheckout/dynamic/catalog/language.mock new file mode 100644 index 0000000..ecd3645 --- /dev/null +++ b/upload/system/library/postfinancecheckout/dynamic/catalog/language.mock @@ -0,0 +1,4 @@ +registry)->translate(unserialize(base64_decode($this->title))); + } + + protected function getCode() { + return $this->code; + } + + protected function getSortOrder() { + return $this->sort_order; + } + + protected function getTerms() { + return $this->terms; + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/dynamic/catalog/model.php b/upload/system/library/postfinancecheckout/dynamic/catalog/model.php new file mode 100644 index 0000000..7dd8fc0 --- /dev/null +++ b/upload/system/library/postfinancecheckout/dynamic/catalog/model.php @@ -0,0 +1,53 @@ +config->get('postfinancecheckout_status')) { + return array(); + } + + // check if transaction can be saved to the session. + if (\PostFinanceCheckoutHelper::instance($this->registry)->getCustomerSessionIdentifier() === null) { + return array(); + } + + $order_info = array( + 'payment_address' => $address + ); + $billing = \PostFinanceCheckoutHelper::instance($this->registry)->getAddress('billing'); + $shipping = \PostFinanceCheckoutHelper::instance($this->registry)->getAddress('payment', $order_info); + if (empty($billing) && empty($shipping)) { + return array(); + } + + try { + $available_methods = \PostFinanceCheckout\Service\Transaction::instance($this->registry)->getPaymentMethods($order_info); + $configuration_id = substr($this->getCode(), strlen('postfinancecheckout_')); + + foreach ($available_methods as $method) { + if ($method->getId() == $configuration_id) { + return [ + 'title' => $this->getTitle(), + 'code' => $this->getCode(), + 'terms' => $this->getTerms(), + 'sort_order' => $this->getSortOrder() + ]; + } + } + } + catch (Exception $e) { + } + return array(); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/entity/abstract_entity.php b/upload/system/library/postfinancecheckout/entity/abstract_entity.php new file mode 100644 index 0000000..80a09cc --- /dev/null +++ b/upload/system/library/postfinancecheckout/entity/abstract_entity.php @@ -0,0 +1,219 @@ + ResourceType::INTEGER, + 'created_at' => ResourceType::DATETIME, + 'updated_at' => ResourceType::DATETIME + ); + } + + protected static function getFieldDefinition() { + throw new \Exception("Mock abstract, must be overwritten."); + } + + protected static function getTableName() { + throw new \Exception("Mock abstract, must be overwritten."); + } + + protected function getValue($variable_name){ + return isset($this->data[$variable_name]) ? $this->data[$variable_name] : null; + } + + protected function setValue($variable_name, $value){ + $this->data[$variable_name] = $value; + } + + protected function hasValue($variable_name){ + return array_key_exists($variable_name, $this->data); + } + + public function __call($name, $arguments){ + $variable_name = substr($name, 3); + + $cleaned = ''; + // first character should be upper + for ($i = 0; $i < strlen($variable_name); $i++) { + if (ctype_upper($variable_name[$i])) { + $cleaned .= '_'; + } + $cleaned .= $variable_name[$i]; + } + $variable_name = substr(strtolower($cleaned), 1); + + if (0 === strpos($name, 'get')) { + return $this->getValue($variable_name); + } + elseif (0 === strpos($name, 'set')) { + $this->setValue($variable_name, $arguments[0]); + return $this; + } + elseif (0 === strpos($name, 'has')) { + return $this->hasValue($variable_name); + } + } + + public function __construct(){ + $args = func_get_args(); + if (!isset($args[0]) || !($args[0] instanceof \Registry)) { + throw new \Exception("Registry must be supplied to entity objects."); + } + $this->registry = $args[0]; + + if (!isset($args[1]) || empty($args[1])) { + return; + } + $this->fillValuesFromDb($args[1]); + } + + protected function fillValuesFromDb(array $db_values){ + $fields = array_merge($this->getBaseFields(), $this->getFieldDefinition()); + foreach ($fields as $key => $type) { + if (isset($db_values[$key])) { + $value = $db_values[$key]; + switch ($type) { + case ResourceType::STRING: + //Do nothing + break; + case ResourceType::BOOLEAN: + $value = $value === 'Y'; + break; + case ResourceType::INTEGER: + $value = intval($value); + break; + + case ResourceType::DECIMAL: + $value = (float) $value; + break; + + case ResourceType::DATETIME: + $value = new \DateTime($value); + break; + + case ResourceType::OBJECT: + $value = unserialize($value); + break; + default: + throw new \Exception('Unsupported variable type'); + } + $this->setValue($key, $value); + } + } + } + + public function save(){ + $db = $this->registry->get('db'); + $data_array = array(); + + foreach ($this->getFieldDefinition() as $key => $type) { + $value = $this->getValue($key); + switch ($type) { + case ResourceType::STRING: + break; + + case ResourceType::BOOLEAN: + $value = $value ? 'Y' : 'N'; + break; + + case ResourceType::INTEGER: + break; + + case ResourceType::DATETIME: + if ($value instanceof \DateTime) { + $value = $value->format('Y-m-d H:i:s'); + } + break; + + case ResourceType::OBJECT: + $value = serialize($value); + break; + + case ResourceType::DECIMAL: + $value = number_format($value, 8, '.', ''); + break; + + default: + throw new \Exception('Unsupported variable type'); + } + $data_array[$key] = $value; + } + $data_array['updated_at'] = date("Y-m-d H:i:s"); + if ($this->getId() == null) { + $data_array['created_at'] = $data_array['updated_at']; + } + + $valuesQuery = ''; + + foreach ($data_array as $key => $value) { + $valuesQuery .= "`" . $key . '`="' . $db->escape($value) . '",'; + } + + $valuesQuery = rtrim($valuesQuery, ','); + + $table = DB_PREFIX . $this->getTableName(); + + if ($this->getId() === null) { + $query = "INSERT INTO $table SET $valuesQuery;"; + $res = $db->query($query); + $this->setId($db->getLastId()); + } + else { + $query = "UPDATE $table SET $valuesQuery WHERE id = {$this->getId()};"; + $res = $db->query($query); + } + } + + /** + * + * @param int $id + * @return static + */ + public static function loadById(\Registry $registry, $id){ + $db = $registry->get('db'); + + $result = $db->query("SELECT * FROM " . DB_PREFIX . static::getTableName() . " WHERE id = '$id';"); + + if (isset($result->row) && !empty($result->row)) { + return new static($registry, $result->row); + } + + return new static($registry); + } + + public static function loadAll(\Registry $registry){ + $db = $registry->get('db'); + + $db_result = $db->query("SELECT * FROM " . DB_PREFIX . static::getTableName() . ";"); + + $result = array(); + foreach ($db_result->rows as $row) { + $result[] = new static($registry, $row); + } + return $result; + } + + public function delete(\Registry $registry){ + $db = $registry->get('db'); + + $query = "DELETE FROM " . DB_PREFIX . static::getTableName() . " WHERE id = {$this->getId};"; + $db->query($query); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/entity/abstract_job.php b/upload/system/library/postfinancecheckout/entity/abstract_job.php new file mode 100644 index 0000000..2d83a88 --- /dev/null +++ b/upload/system/library/postfinancecheckout/entity/abstract_job.php @@ -0,0 +1,286 @@ + ResourceType::INTEGER, + 'state' => ResourceType::STRING, + 'space_id' => ResourceType::INTEGER, + 'transaction_id' => ResourceType::INTEGER, + 'order_id' => ResourceType::INTEGER, + 'labels' => ResourceType::OBJECT, + 'failure_reason' => ResourceType::OBJECT + ); + } + + /** + * Returns the translated failure reason. + * + * @param string $locale + * @return string + */ + public function getFailureReason($language = null){ + $value = $this->getValue('failure_reason'); + if (empty($value)) { + return null; + } + + return \PostFinanceCheckoutHelper::instance($this->registry)->translate($value, $language); + } + + public static function loadByOrder(\Registry $registry, $order_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . static::getTableName(); + $order_id = $db->escape($order_id); + + $query = "SELECT * FROM $table WHERE order_id='$order_id';"; + + $db_result = $db->query($query); + + $result = array(); + if ($db_result->num_rows) { + foreach ($db_result->rows as $row) { + $result[] = new static($registry, $row); + } + } + return $result; + } + + public static function loadByJob(\Registry $registry, $space_id, $job_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . static::getTableName(); + $job_id = $db->escape($job_id); + $space_id = $db->escape($space_id); + + $query = "SELECT * FROM $table WHERE job_id='$job_id' AND space_id='$space_id';"; + + $db_result = $db->query($query); + + if (isset($db_result->row) && !empty($db_result->row)) { + return new static($registry, $db_result->row); + } + return new static($registry); + } + + public static function countRunningForOrder(\Registry $registry, $order_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . static::getTableName(); + $order_id = $db->escape($order_id); + $success = self::STATE_SUCCESS; + $failed_1 = self::STATE_FAILED_CHECK; + $failed_2 = self::STATE_FAILED_DONE; + + $query = "SELECT COUNT(id) FROM $table WHERE order_id='$order_id' AND state NOT IN ('$success', '$failed_1', '$failed_2');"; + + $db_result = $db->query($query); + + return $db_result->row['COUNT(id)']; + } + + /** + * Load not sent jobs. + * If called on abstract object will load all completions, refunds and voids. + * + * @param \Registry $registry + * @param string $period + * @return array|\PostFinanceCheckout\Entity\AbstractJob[] + */ + public static function loadNotSent(\Registry $registry, $period = 'PT10M'){ + if (get_called_class() == get_class()) { + return array_merge(CompletionJob::loadNotSent($registry, $period), VoidJob::loadNotSent($registry, $period), + RefundJob::loadNotSent($registry, $period)); + } + else { + $time = new \DateTime(); + $time->sub(new \DateInterval($period)); + $table = DB_PREFIX . static::getTableName(); + $created = self::STATE_CREATED; + $timestamp = $time->format('Y-m-dd h:i:s'); + + $query = "SELECT * FROM $table WHERE STATE='$created' AND updated_at<'$timestamp';"; + $db_result = $registry->get('db')->query($query); + $result = array(); + if ($db_result->num_rows) { + foreach ($result->rows as $row) { + $result[] = new static($registry, $row); + } + } + return $result; + } + } + + /** + * Checks if there is a not sent job. + * Always checks all job types, not specific. + * + * @param \Registry $registry + * @param string $period + * @return array|\PostFinanceCheckout\Entity\AbstractJob[] + */ + public static function hasNotSent(\Registry $registry, $period = 'PT10M'){ + $time = new \DateTime(); + $time->sub(new \DateInterval($period)); + $timestamp = $time->format('Y-m-dd h:i:s'); + $completions = DB_PREFIX . CompletionJob::getTableName(); + $voids = DB_PREFIX . VoidJob::getTableName(); + $refunds = DB_PREFIX . RefundJob::getTableName(); + $created = self::STATE_CREATED; + + //@formatter:off + $query = "SELECT ( " . + "EXISTS ( SELECT id FROM $completions WHERE STATE='$created' AND updated_at<'$timestamp' LIMIT 1) " . + "OR EXISTS ( SELECT id FROM $voids WHERE STATE='$created' AND updated_at<'$timestamp' LIMIT 1) " . + "OR EXISTS ( SELECT id FROM $refunds WHERE STATE='$created' AND updated_at<'$timestamp' LIMIT 1) " . + ") as pending_job"; + //@formatter:on + + $result = $registry->get('db')->query($query); + + if ($result->row) { + return true; + } + return false; + } + + public static function loadNotSentForOrder(\Registry $registry, $order_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . static::getTableName(); + $order_id = $db->escape($order_id); + $created = self::STATE_CREATED; + + $query = "SELECT * FROM $table WHERE order_id='$order_id' AND state='$created';"; + + $result = $db->query($query); + + if (isset($result->row) && !empty($result->row)) { + return new static($registry, $result->row); + } + return new static($registry); + } + + public static function loadRunningForOrder(\Registry $registry, $order_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . static::getTableName(); + $order_id = $db->escape($order_id); + $created = self::STATE_CREATED; + $success = self::STATE_SUCCESS; + $failed_1 = self::STATE_FAILED_CHECK; + $failed_2 = self::STATE_FAILED_DONE; + + $query = "SELECT * FROM $table WHERE order_id='$order_id' AND state NOT IN ('$created', '$success', '$failed_1', '$failed_2');"; + + $result = $db->query($query); + + if (isset($result->row) && !empty($result->row)) { + return new static($registry, $result->row); + } + return new static($registry); + } + + public static function loadOldestCheckable(\Registry $registry){ + $db = $registry->get('db'); + + $table = DB_PREFIX . static::getTableName(); + $state = self::STATE_FAILED_CHECK; + + $query = "SELECT * FROM $table WHERE state='$state' ORDER BY updated_at ASC LIMIT 1;"; + + $db_result = $db->query($query); + + if (isset($db_result->row) && !empty($db_result->row)) { + return new static($registry, $db_result->row); + } + return new static($registry); + } + + public static function countForOrder(\Registry $registry, $order_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . static::getTableName(); + $order_id = $db->escape($order_id); + + $query = "SELECT COUNT(id) FROM $table WHERE order_id='$order_id';"; + + $db_result = $db->query($query); + + return $db_result->row['COUNT(id)']; + } + + public static function loadFailedCheckedForOrder(\Registry $registry, $order_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . static::getTableName(); + $order_id = $db->escape($order_id); + $state = self::STATE_FAILED_CHECK; + + $query = "SELECT * FROM $table WHERE order_id='$order_id' AND state='$state';"; + + $db_result = $db->query($query); + + $result = array(); + if ($db_result->num_rows) { + foreach ($db_result->rows as $row) { + $result[] = new static($registry, $row); + } + } + return $result; + } + + /** + * Marks all failed_check jobs as failed_done. + * + * @param \Registry $registry + */ + public static function markFailedAsDone(\Registry $registry, $order_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . static::getTableName(); + $order_id = $db->escape($order_id); + $state = self::STATE_FAILED_CHECK; + + $query = "SELECT * FROM $table WHERE order_id='$order_id' AND state='$state';"; + + $db_result = $db->query($query); + + if ($db_result->num_rows) { + foreach ($db_result->rows as $row) { + $job = new static($registry, $row); + $job->setState(static::STATE_FAILED_DONE); + $job->save(); + } + \PostFinanceCheckout\Entity\Alert::loadFailedJobs($registry)->modifyCount(-($db_result->num_rows)); + } + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/entity/alert.php b/upload/system/library/postfinancecheckout/entity/alert.php new file mode 100644 index 0000000..582887a --- /dev/null +++ b/upload/system/library/postfinancecheckout/entity/alert.php @@ -0,0 +1,70 @@ + ResourceType::STRING, + 'route' => ResourceType::STRING, + 'level' => ResourceType::STRING, + 'count' => ResourceType::INTEGER + ); + } + + /** + * Modifies the entities count by the given parameter. + * The parameter may be negative or positive. + * + * @param int $count + */ + public function modifyCount($count){ + $new_count = $this->getCount() + $count; + if ($new_count < 0) { + $new_count = 0; + } + $this->setCount($new_count); + $this->save(); + } + + public static function loadManualTask(\Registry $registry){ + return self::loadByKey($registry, self::KEY_MANUAL_TASK); + } + + + public static function loadFailedJobs(\Registry $registry){ + return self::loadByKey($registry, self::KEY_FAILED_JOB); + } + + protected static function loadByKey(\Registry $registry, $key){ + $db = $registry->get('db'); + + $table = DB_PREFIX . self::getTableName(); + $key = $db->escape($key); + + $query = "SELECT * FROM $table WHERE `key`='$key';"; + + $db_result = $db->query($query); + + if (isset($db_result->row) && !empty($db_result->row)) { + return new self($registry, $db_result->row); + } + return new self($registry); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/entity/completion_job.php b/upload/system/library/postfinancecheckout/entity/completion_job.php new file mode 100644 index 0000000..69a1855 --- /dev/null +++ b/upload/system/library/postfinancecheckout/entity/completion_job.php @@ -0,0 +1,22 @@ + ResourceType::DECIMAL + ]); + } + + protected static function getTableName(){ + return 'postfinancecheckout_completion_job'; + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/entity/cron.php b/upload/system/library/postfinancecheckout/entity/cron.php new file mode 100644 index 0000000..e0d6a7b --- /dev/null +++ b/upload/system/library/postfinancecheckout/entity/cron.php @@ -0,0 +1,159 @@ + ResourceType::INTEGER + ); + } + + protected static function getTableName(){ + return 'postfinancecheckout_cron'; + } + + protected static function getFieldDefinition(){ + return array( + 'security_token' => ResourceType::STRING, + 'state' => ResourceType::STRING, + 'constraint_key' => ResourceType::INTEGER, + 'date_scheduled' => ResourceType::DATETIME, + 'date_started' => ResourceType::DATETIME, + 'date_completed' => ResourceType::DATETIME, + 'error_message' => ResourceType::STRING + ); + } + + public static function setProcessing(\Registry $registry, $security_token){ + $db = $registry->get('db'); + $table = DB_PREFIX . self::getTableName(); + $constraint = self::CONSTRAINT_PROCESSING; + $processing = self::STATE_PROCESSING; + $pending = self::STATE_PENDING; + $security_token = $db->escape($security_token); + $time = new \DateTime(); + $time = $time->format('Y-m-d H:i:s'); + + $query = "UPDATE $table SET constraint_key='$constraint', state='$processing', date_started='$time' WHERE security_token='$security_token' AND state='$pending';"; + $result = $db->query($query); + + return $db->countAffected() == 1; + } + + public static function setComplete(\Registry $registry, $security_token, $error = null){ + $db = $registry->get('db'); + $table = DB_PREFIX . self::getTableName(); + $processing = self::STATE_PROCESSING; + $status = self::STATE_SUCCESS; + if ($error) { + $error = $db->escape($error); + $status = self::STATE_ERROR; + } + $security_token = $db->escape($security_token); + $time = new \DateTime(); + $time = $time->format('Y-m-d H:i:s'); + + $query = "UPDATE $table SET `constraint_key`=id, `state`='$status', date_completed='$time', `error_message`='$error' WHERE `security_token`='$security_token' AND `state`='$processing';"; + $result = $db->query($query); + + return $db->countAffected() == 1; + } + + public static function cleanUpHangingCrons(\Registry $registry){ + $db = $registry->get('db'); + \PostFinanceCheckoutHelper::instance($registry)->dbTransactionStart(); + $time = new \DateTime(); + $time->add(new \DateInterval('PT1M')); + $processing = self::STATE_PROCESSING; + $error = self::STATE_ERROR; + $timeout_message = 'Cron did not terminate correctly, timeout exceeded.'; + $table = DB_PREFIX . self::getTableName(); + try { + $timeout = new \DateTime(); + $timeout->sub(new \DateInterval('PT' . self::TIMEOUT_MINUTES . 'M')); + $timeout = $timeout->format('Y-m-d H:i:s'); + $end_time = new \DateTime(); + $end_time = $end_time->format('Y-m-d H:i:s'); + $query = "UPDATE $table SET constraint_key=id, `state`='$error', date_completed='$end_time', error_message='$timeout_message' WHERE `state`='$processing' AND date_started<'$timeout';"; + $db->query($query); + \PostFinanceCheckoutHelper::instance($registry)->dbTransactionCommit(); + } + catch (\Exception $e) { + \PostFinanceCheckoutHelper::instance($registry)->dbTransactionRollback(); + \PostFinanceCheckoutHelper::instance($registry)->log('Error clean up hanging cron: ' . $e->getMessage()); + } + } + + public static function insertNewPendingCron(\Registry $registry){ + $db = $registry->get('db'); + \PostFinanceCheckoutHelper::instance($registry)->dbTransactionStart(); + $pending = self::STATE_PENDING; + $table = DB_PREFIX . self::getTableName(); + try { + $hasQuery = "SELECT security_token FROM $table WHERE `state`='$pending';"; + $result = $db->query($hasQuery); + if ($result->num_rows == 1) { + \PostFinanceCheckoutHelper::instance($registry)->dbTransactionCommit(); + return false; + } + $uuid = \PostFinanceCheckoutHelper::generateUuid(); + $constraint = self::CONSTRAINT_PENDING; + $time = new \DateTime(); + $time->add(new \DateInterval('PT1M')); + $time = $time->format('Y-m-d H:i:s'); + $insertQuery = "INSERT INTO $table (constraint_key, state, security_token, date_scheduled) VALUES ('$constraint', '$pending', '$uuid', '$time');"; + $db->query($insertQuery); + \PostFinanceCheckoutHelper::instance($registry)->dbTransactionCommit(); + return $db->countAffected() == 1; + } + catch (\Exception $e) { + \PostFinanceCheckoutHelper::instance($registry)->dbTransactionRollback(); + } + return false; + } + + /** + * Returns the current token or false if no pending job is scheduled to run + * + * @return string|false + */ + public static function getCurrentSecurityTokenForPendingCron(\Registry $registry){ + try { + $db = $registry->get('db'); + \PostFinanceCheckoutHelper::instance($registry)->dbTransactionStart(); + $time = new \DateTime(); + $time->add(new \DateInterval('PT1M')); + $pending = self::STATE_PENDING; + $table = DB_PREFIX . self::getTableName(); + $now = new \DateTime(); + $now = $now->format('Y-m-d H:i:s'); + $query = "SELECT security_token FROM $table WHERE `state`='$pending' AND date_scheduled<'$now';"; + + $result = $db->query($query); + \PostFinanceCheckoutHelper::instance($registry)->dbTransactionCommit(); + + if ($result->num_rows) { + return $result->row['security_token']; + } + return false; + } + catch (\Exception $e) { + \PostFinanceCheckoutHelper::instance($registry)->dbTransactionRollback(); + return false; + } + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/entity/method_configuration.php b/upload/system/library/postfinancecheckout/entity/method_configuration.php new file mode 100644 index 0000000..ecfbe91 --- /dev/null +++ b/upload/system/library/postfinancecheckout/entity/method_configuration.php @@ -0,0 +1,82 @@ + ResourceType::STRING, + 'space_id' => ResourceType::INTEGER, + 'configuration_id' => ResourceType::INTEGER, + 'configuration_name' => ResourceType::STRING, + 'sort_order' => ResourceType::INTEGER, + 'title' => ResourceType::OBJECT, + 'description' => ResourceType::OBJECT, + 'image' => ResourceType::STRING + ); + } + + protected static function getTableName(){ + return 'postfinancecheckout_method_configuration'; + } + + public static function loadByConfiguration(\Registry $registry, $space_id, $configuration_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . self::getTableName(); + $space_id = $db->escape($space_id); + $configuration_id = $db->escape($configuration_id); + $query = "SELECT * FROM $table WHERE space_id='$space_id' AND configuration_id='$configuration_id'"; + + $result = $db->query($query); + + if (isset($result->row) && !empty($result->row)) { + return new self($registry, $result->row); + } + return new self($registry); + } + + public static function loadBySpaceId(\Registry $registry, $space_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . self::getTableName(); + $space_id = $db->escape($space_id); + $query = "SELECT * FROM $table WHERE space_id='$space_id'"; + + $db_result = $db->query($query); + + $result = array(); + if ($db_result->num_rows) { + foreach ($db_result->rows as $row) { + $result[] = new static($registry, $row); + } + } + return $result; + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/entity/refund_job.php b/upload/system/library/postfinancecheckout/entity/refund_job.php new file mode 100644 index 0000000..7abce44 --- /dev/null +++ b/upload/system/library/postfinancecheckout/entity/refund_job.php @@ -0,0 +1,91 @@ + ResourceType::STRING, + 'restock' => ResourceType::BOOLEAN, + 'reduction_items' => ResourceType::OBJECT, + 'amount' => ResourceType::DECIMAL + ]); + } + + protected static function getTableName(){ + return 'postfinancecheckout_refund_job'; + } + + public static function sumRefundedAmount(\Registry $registry, $order_id) { + $db = $registry->get('db'); + + $table = DB_PREFIX . self::getTableName(); + $order_id = $db->escape($order_id); + $state = self::STATE_SUCCESS; + $query = "SELECT SUM(amount) FROM $table WHERE order_id='$order_id' AND state='$state';"; + + $db_result = $db->query($query); + + if (isset($db_result->row['SUM(amount)'])) { + return $db_result->row['SUM(amount)']; + } + return 0; + } + + /** + * Counts transactions with PENDING & MANUAL_CHECK status + * @param \Registry $registry + * @param unknown $space_id + * @return unknown|number + */ + public static function countPending(\Registry $registry, $space_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . self::getTableName(); + $space_id = $db->escape($space_id); + $state_pending = self::STATE_PENDING; + $state_manual = self::STATE_MANUAL_CHECK; + + $query = "SELECT COUNT(id) FROM $table WHERE space_id='$space_id' AND state IN ('$state_pending', '$state_manual');"; + + $db_result = $db->query($query); + + if (isset($db_result->row['COUNT(id)'])) { + return $db_result->row['COUNT(id)']; + } + return 0; + } + + public static function loadByExternalId(\Registry $registry, $space_id, $external_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . self::getTableName(); + $space_id = $db->escape($space_id); + $external_id = $db->escape($external_id); + $query = "SELECT * FROM $table WHERE space_id='$space_id' AND external_id='$external_id';"; + + $db_result = $db->query($query); + if (isset($db_result->row) && !empty($db_result->row)) { + return new static($registry, $db_result->row); + } + return new static($registry); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/entity/resource_type.php b/upload/system/library/postfinancecheckout/entity/resource_type.php new file mode 100644 index 0000000..f62eca2 --- /dev/null +++ b/upload/system/library/postfinancecheckout/entity/resource_type.php @@ -0,0 +1,14 @@ + ResourceType::INTEGER, + 'space_id' => ResourceType::INTEGER, + 'cost' => ResourceType::DECIMAL, + 'tax_class_id' => ResourceType::INTEGER + ); + } + + protected static function getTableName(){ + return 'postfinancecheckout_shipping_info'; + } + + /** + * + * @param \Registry $registry + * @param int $space_id + * @param int $transaction_id + * @return \PostFinanceCheckout\Entity\ShippingInfo + */ + public static function loadByTransaction(\Registry $registry, $space_id, $transaction_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . self::getTableName(); + $space_id = $db->escape($space_id); + $transaction_id = $db->escape($transaction_id); + $query = "SELECT * FROM $table WHERE space_id='$space_id' AND transaction_id='$transaction_id';"; + + $db_result = $db->query($query); + + if (isset($db_result->row) && !empty($db_result->row)) { + return new self($registry, $db_result->row); + } + return new self($registry); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/entity/token_info.php b/upload/system/library/postfinancecheckout/entity/token_info.php new file mode 100644 index 0000000..843edd7 --- /dev/null +++ b/upload/system/library/postfinancecheckout/entity/token_info.php @@ -0,0 +1,58 @@ + ResourceType::INTEGER, + 'state' => ResourceType::STRING, + 'space_id' => ResourceType::INTEGER, + 'name' => ResourceType::STRING, + 'customer_id' => ResourceType::INTEGER, + 'payment_method_id' => ResourceType::INTEGER, + 'connector_id' => ResourceType::INTEGER + ); + } + + protected static function getTableName(){ + return 'postfinancecheckout_token_info'; + } + + public static function loadByToken(\Registry $registry, $space_id, $token_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . self::getTableName(); + $space_id = $db->escape($space_id); + $token_id = $db->escape($token_id); + $query = "SELECT * FROM $table WHERE space_id = $space_id AND token_id = $token_id;"; + + $db_result = $db->query($query); + + if (isset($db_result->row) && !empty($db_result->row)) { + return new self($registry, $db_result->row); + } + return new self($registry); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/entity/transaction_info.php b/upload/system/library/postfinancecheckout/entity/transaction_info.php new file mode 100644 index 0000000..6246ff8 --- /dev/null +++ b/upload/system/library/postfinancecheckout/entity/transaction_info.php @@ -0,0 +1,110 @@ + ResourceType::INTEGER, + 'state' => ResourceType::STRING, + 'space_id' => ResourceType::INTEGER, + 'space_view_id' => ResourceType::INTEGER, + 'language' => ResourceType::STRING, + 'currency' => ResourceType::STRING, + 'authorization_amount' => ResourceType::DECIMAL, + 'image' => ResourceType::STRING, + 'labels' => ResourceType::OBJECT, + 'payment_method_id' => ResourceType::INTEGER, + 'connector_id' => ResourceType::INTEGER, + 'order_id' => ResourceType::INTEGER, + 'failure_reason' => ResourceType::OBJECT, + 'coupon_code' => ResourceType::STRING, + 'locked_at' => ResourceType::DATETIME + ); + } + + protected static function getTableName(){ + return 'postfinancecheckout_transaction_info'; + } + + /** + * Returns the translated failure reason. + * + * @param string $locale + * @return string + */ + public function getFailureReason($language = null){ + $value = $this->getValue('failure_reason'); + if (empty($value)) { + return null; + } + + return \PostFinanceCheckoutHelper::instance($this->registry)->translate($value, $language); + } + + public static function loadByOrderId(\Registry $registry, $order_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . self::getTableName(); + $order_id = $db->escape($order_id); + $query = "SELECT * FROM $table WHERE order_id='$order_id';"; + + $db_result = $db->query($query); + + if (isset($db_result->row) && !empty($db_result->row)) { + return new self($registry, $db_result->row); + } + return new self($registry); + } + + public static function loadByTransaction(\Registry $registry, $space_id, $transaction_id){ + $db = $registry->get('db'); + + $table = DB_PREFIX . self::getTableName(); + $space_id = $db->escape($space_id); + $transaction_id = $db->escape($transaction_id); + $query = "SELECT * FROM $table WHERE space_id='$space_id' AND transaction_id='$transaction_id';"; + + $db_result = $db->query($query); + + if (isset($db_result->row) && !empty($db_result->row)) { + return new self($registry, $db_result->row); + } + return new self($registry); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/entity/void_job.php b/upload/system/library/postfinancecheckout/entity/void_job.php new file mode 100644 index 0000000..9a2f453 --- /dev/null +++ b/upload/system/library/postfinancecheckout/entity/void_job.php @@ -0,0 +1,13 @@ +has('session') && $registry->has('config') && $registry->has('db')) { + $this->registry = $registry; + $this->loggers = array( + self::LOG_ERROR => $registry->get('log'), + self::LOG_DEBUG => new Log('postfinancecheckout_debug.log'), + self::LOG_INFO => new Log('postfinancecheckout_info.log') + ); + } + else { + throw new \Exception("Could not instatiate PostFinanceCheckoutHelper, invalid registry supplied."); + } + } + + /** + * Create a customer identifier to verify that the session. + * Either a concat of given values for guest or the user id (hashed). + * If not enough guest information exists to create an identifier null is returned. + * + * @return string | null + */ + public function getCustomerSessionIdentifier(){ + $customer = $this->getCustomer(); + if (isset($customer['customer_id']) && $this->registry->get('customer')->isLogged()) { + return $customer['customer_id']; + } + $id = ''; + if (isset($customer['firstname'])) { + $id .= $customer['firstname']; + } + if (isset($customer['lastname'])) { + $id .= $customer['lastname']; + } + if (isset($customer['email'])) { + $id .= $customer['email']; + } + if (isset($customer['telephone'])) { + $id .= $customer['telephone']; + } + return empty($id) ? null : hash('sha512', $id); + } + + /** + * Attempt to read the current active address from different sources. + * + * @param string $key 'payment' or 'shipping' depending on which address is desired. + * @param array $order_info Optional order_info as additional address source + * @return array + */ + public function getAddress($key, $order_info = array()){ + $customer = $this->registry->get('customer'); + $session = $this->registry->get('session')->data; + $address_model = $this->registry->get('model_account_address'); + $address = array(); + + if ($customer->isLogged() && isset($session[$key . '_address_id'])) { + $address = $address_model->getAddress($session[$key . '_address_id']); + } + if (isset($order_info[$key . '_address'])) { + $address = \PostFinanceCheckoutHelper::mergeArray($address, $order_info[$key . '_address']); + } + if (isset($order_info[$key . '_address_id'])) { + $address = \PostFinanceCheckoutHelper::mergeArray($address, $address_model->getAddress($$order_info[$key . '_address_id'])); + } + if (isset($session['guest'][$key]) && is_array($session['guest'][$key])) { // billing only + $address = \PostFinanceCheckoutHelper::mergeArray($address, $session['guest'][$key]); + } + if (isset($session[$key][$key . '_address'])) { // shipping only + $address = \PostFinanceCheckoutHelper::mergeArray($address, $session[$key][$key . '_address']); + } + if (isset($session[$key . '_address']) && is_array($session[$key . '_address'])) { + $address = \PostFinanceCheckoutHelper::mergeArray($address, $session[$key . '_address']); + } + return $address; + } + + public function refreshWebhook(){ + $db = $this->registry->get('db'); + $config = DB_PREFIX . 'setting'; + + $generated = $this->getWebhookUrl(); + $saved = $this->registry->get('config')->get('postfinancecheckout_notification_url'); + if ($generated == $saved) { + return; + } + $space_id = $this->registry->get('config')->get('postfinancecheckout_space_id'); + \PostFinanceCheckout\Service\Webhook::instance($this->registry)->uninstall($space_id, $saved); + \PostFinanceCheckout\Service\Webhook::instance($this->registry)->install($space_id, $generated); + + $store_id = $this->registry->get('config')->get('config_store_id'); + if ($store_id === null) { + $store_id = 0; + } + $store_id = $db->escape($store_id); + $query = "UPDATE `$config` SET `value`='$generated' WHERE `store_id`='$store_id' AND `key`='postfinancecheckout_notification_url';"; + $db->query($query); + $this->registry->get('config')->set('postfinancecheckout_notification_url', $generated); + } + + public function log($message, $level = self::LOG_DEBUG){ + if ($this->registry->get('config')->get('postfinancecheckout_log_level') >= $level) { + $this->loggers[$level]->write($message); + } + } + + public function getSpaceId($store_id){ + $store_id = (int) $store_id; + $table = DB_PREFIX . 'setting'; + $query = "SELECT value FROM $table WHERE `key`='postfinancecheckout_space_id' AND `store_id`='$store_id'"; + $result = $this->registry->get('db')->query($query); + if ($result->num_rows) { + return $result->row['value']; + } + throw new Exception('No space id found for store id ' . $store_id); + } + + public function areAmountsEqual($amount1, $amount2, $currency_code){ + $currency = $this->registry->get('currency'); + if (!$currency->has($currency_code)) { + throw new Exception("Unknown currency $currency_code"); + } + return $currency->format($amount1, $currency_code) == $currency->format($amount2, $currency_code); + } + + public function hasRunningJobs(\PostFinanceCheckout\Entity\TransactionInfo $transaction_info){ + return \PostFinanceCheckout\Entity\CompletionJob::countRunningForOrder($this->registry, $transaction_info->getOrderId()) + + \PostFinanceCheckout\Entity\VoidJob::countRunningForOrder($this->registry, $transaction_info->getOrderId()) + + \PostFinanceCheckout\Entity\RefundJob::countRunningForOrder($this->registry, $transaction_info->getOrderId()) > 0; + } + + public function isCompletionPossible(\PostFinanceCheckout\Entity\TransactionInfo $transaction_info){ + return $transaction_info->getState() == \Wallee\Sdk\Model\TransactionState::AUTHORIZED && + (\PostFinanceCheckout\Entity\CompletionJob::countRunningForOrder($this->registry, $transaction_info->getOrderId()) == 0) && + (\PostFinanceCheckout\Entity\VoidJob::countRunningForOrder($this->registry, $transaction_info->getOrderId()) == 0); + } + + public function isRefundPossible(\PostFinanceCheckout\Entity\TransactionInfo $transaction_info){ + if (!in_array($transaction_info->getState(), + array( + \Wallee\Sdk\Model\TransactionState::COMPLETED, + \Wallee\Sdk\Model\TransactionState::FULFILL, + \Wallee\Sdk\Model\TransactionState::DECLINE + ))) { + return false; + } + $refunded_amount = 0; + foreach (\PostFinanceCheckout\Entity\RefundJob::loadByOrder($this->registry, $transaction_info->getOrderId()) as $refund_job) { + switch ($refund_job->getState()) { + case \PostFinanceCheckout\Entity\RefundJob::STATE_SUCCESS: + $refunded_amount += $refund_job->getAmount(); + break; + case \PostFinanceCheckout\Entity\RefundJob::STATE_SENT: + case \PostFinanceCheckout\Entity\RefundJob::STATE_PENDING: + case \PostFinanceCheckout\Entity\RefundJob::STATE_MANUAL_CHECK: + return false; + } + } + return $transaction_info->getAuthorizationAmount() > $refunded_amount; + } + + /** + * Returns a single translated string from the localization file. + * + * @param string $key + * @return string + */ + public function getTranslation($key){ + if ($this->registry->get('language')->get($key) == $key) { + $this->registry->get('language')->load('extension/payment/postfinancecheckout'); + } + return $this->registry->get('language')->get($key); + } + + /** + * Retrieves order information from front and backend. + * + * @param int $order_id + * @return array + */ + public function getOrder($order_id){ + if ($this->isAdmin()) { + $this->registry->get('load')->model('sale/order'); + return $this->registry->get('model_sale_order')->getOrder($order_id); + } + $this->registry->get('load')->model('checkout/order'); + return $this->registry->get('model_checkout_order')->getOrder($order_id); + } + + /** + * Returns the order model which offers methods to retrieve order information - not to add or edit. + * + * @return Model + */ + public function getOrderModel(){ + if ($this->isAdmin()) { + $this->registry->get('load')->model('sale/order'); + return $this->registry->get('model_sale_order'); + } + else { + $this->registry->get('load')->model('account/order'); + return $this->registry->get('model_account_order'); + } + } + + public function getCustomer(){ + $data = $this->registry->get('session')->data; + if ($this->registry->get('customer')->isLogged()) { + $customer_id = $this->registry->get('session')->data['customer_id']; + $this->registry->get('load')->model('account/customer'); + $customer = $this->registry->get('model_account_customer')->getCustomer($customer_id); + return $customer; + } + else if (isset($data['guest'])) { + return $data['guest']; + } + $this->log($data); + throw new Exception('Could not extract customer data.'); + } + + /** + * Formats the given amount for the given currency. + * If no currency is given, the current session currency is used. If that is not set the shop configuration is used. + * + * @param float $amount + * @param string $currency + * @return string + */ + public function formatAmount($amount, $currency = null){ + if (!$currency) { + $currency = $this->getCurrency(); + } + return $this->registry->get('currency')->format($amount, $currency, false, false); + } + + public function getCurrency(){ + if (isset($this->registry->get('session')->data['currency'])) { + return $this->registry->get('session')->data['currency']; + } + return $this->registry->get('config')->get('config_currency'); + } + + public function dbTransactionStart(){ + $this->registry->get('db')->query('SET autocommit = 0;'); + $this->registry->get('db')->query('START TRANSACTION;'); + } + + public function dbTransactionCommit(){ + $this->registry->get('db')->query('COMMIT;'); + $this->registry->get('db')->query('SET autocommit = 1;'); + } + + public function dbTransactionRollback(){ + $this->registry->get('db')->query('ROLLBACK;'); + $this->registry->get('db')->query('SET autocommit = 1;'); + } + + /** + * Create a lock to prevent concurrency. + * + * @param int $lockType + */ + public function dbTransactionLock($space_id, $transaction_id){ + $db = $this->registry->get('db'); + + $table = DB_PREFIX . 'postfinancecheckout_transaction_info'; + $locked_at = date('Y-m-d H:i:s'); + $space_id = $db->escape($space_id); + $transaction_id = $db->escape($transaction_id); + + $db->query("SELECT locked_at FROM $table WHERE transaction_id = '$transaction_id' AND space_id = '$space_id' FOR UPDATE"); + + $db->query("UPDATE $table SET locked_at = '$locked_at' WHERE transaction_id = '$transaction_id' AND space_id = '$space_id'"); + } + + public function translate($strings, $language = null){ + $language = $this->getCleanLanguageCode($language); + if (isset($strings[$language])) { + return $strings[$language]; + } + + if ($language) { + try { + $language_provider = \PostFinanceCheckout\Provider\Language::instance($this->registry); + $primary_language = $language_provider->findPrimary($language); + if ($primary_language && isset($strings[$primary_language->getIetfCode()])) { + return $strings[$primary_language->getIetfCode()]; + } + } + catch (Exception $e) { + } + } + if (isset($strings[self::FALLBACK_LANGUAGE])) { + return $strings[self::FALLBACK_LANGUAGE]; + } + $this->log("Could not find translation for given string", self::LOG_ERROR); + $this->log($strings, self::LOG_ERROR); + $this->log($primary_language, self::LOG_ERROR); + return array_shift($strings); + } + + /** + * Returns the proper language code, [a-z]{2}-[A-Z]{2} + * + * @param string $language + * @return string + */ + public function getCleanLanguageCode($language = null){ + if ($language == null) { + $config = $this->registry->get('config'); + if (isset($this->registry->get('session')->data['language'])) { + $language = $this->registry->get('session')->data['language']; + } + else if ($config->has('language_code')) { + $language = $config->get('language_code'); + } + else if (!$this->isAdmin() && $config->has('config_language')) { + $language = $config->get('config_language'); + } + else if ($config->has('language_default')) { + $language = $config->get('language_default'); + } + else if ($this->isAdmin() && $config->has('config_admin_language')) { + $language = $config->get('config_admin_language'); + } + } + + $prefixWithDash = substr($language, 0, 3); + $postfix = strtoupper(substr($language, 3)); + + return $prefixWithDash . $postfix; + } + + /** + * + * @return Wallee\Sdk\ApiClient + */ + public function getApiClient(){ + if ($this->apiClient === null) { + $this->refreshApiClient(); + } + return $this->apiClient; + } + + public function refreshApiClient(){ + $this->apiClient = new Wallee\Sdk\ApiClient($this->registry->get('config')->get('postfinancecheckout_user_id'), + $this->registry->get('config')->get('postfinancecheckout_application_key')); + $this->apiClient->setBasePath(self::getBaseUrl() . "/api"); + if ($this->registry->get('config')->get('wallee_log_level') >= self::LOG_DEBUG) { + $this->apiClient->enableDebugging(); + $this->apiClient->setDebugFile(DIR_LOGS . "wallee_communication.log"); + } + } + + public function getCache(){ + return $this->registry->get('cache'); + } + + public function getSuccessUrl(){ + return PostFinanceCheckoutVersionHelper::createUrl($this->getCatalogUrl(), 'checkout/success', '', $this->registry->get('config')->get('config_secure')); + } + + public function getFailedUrl($order_id){ + return str_replace('&', '&', + PostFinanceCheckoutVersionHelper::createUrl($this->getCatalogUrl(), 'checkout/checkout', array( + 'order_id' => $order_id + ), $this->registry->get('config')->get('config_secure'))); + } + + public function getWebhookUrl(){ + return PostFinanceCheckoutVersionHelper::createUrl($this->getCatalogUrl(), 'extension/postfinancecheckout/webhook', '', $this->registry->get('config')->get('config_secure')); + } + + /** + * Checks if the given order_id exists, is associated with a postfinancecheckout transaction, and the permissions to access it are set. + * + * @param string $order_id + */ + public function isValidOrder($order_id){ + if (!$this->isAdmin()) { + $order_info = $this->getOrder($order_id); + if ($this->registry->get('customer')->isLogged() && isset($this->registry->get('session')->data['customer_id'])) { + if ($this->registry->get('session')->data['customer_id'] != $order_info['customer_id']) { + return false; + } + } + else { + return false; + } + } + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $order_id); + return $transaction_info->getId() != null; + } + + /** + * "postfinancecheckout_pending_status_id" + * "postfinancecheckout_processing_status_id" + * "postfinancecheckout_failed_status_id" + * "postfinancecheckout_voided_status_id" + * "postfinancecheckout_decline_status_id" + * "postfinancecheckout_fulfill_status_id" + * "postfinancecheckout_confirmed_status_id" + * "postfinancecheckout_authorized_status_id" + * "postfinancecheckout_completed_status_id" + * "postfinancecheckout_refund_status_id" + * + * @param string $order_id + * @param string|int $status Key for postfinancecheckout status mapping, e.g. postfinancecheckout_completed_status_id, or the order status id which should be applied. + * @param string $message + * @param boolean $notify + * @throws Exception + */ + public function addOrderHistory($order_id, $status, $message = '', $notify = false){ + $this->log(__METHOD__ . " (ID: $order_id, Status: $status, Message: $message, Notify: $notify"); + if ($this->isAdmin()) { + $this->log('Called addOrderHistory from admin context - unsupported.', self::LOG_ERROR); + throw new Exception("addOrderHistory from admin not supported"); // should never occur. always via webhook + } + if (!ctype_digit($status)) { + $status = $this->registry->get('config')->get($status); + } + $this->registry->get('load')->model('checkout/order'); + $this->registry->get('model_checkout_order')->addOrderHistory($order_id, $status, $message, $notify); + } + + /** + * + * @return Url + */ + private function getCatalogUrl(){ + if ($this->catalog_url === null) { + if ($this->isAdmin()) { + $config = $this->registry->get('config'); + $this->catalog_url = new Url($this->getStoreUrl(false), $this->getStoreUrl($config->get('config_secure'))); + $this->catalog_url->addRewrite($this); + } + else { + $this->catalog_url = $this->registry->get('url'); + } + } + return $this->catalog_url; + } + + private function getStoreUrl($ssl = true){ + $config = $this->registry->get('config'); + if ($config->get('config_store_id') == 0) { // zero and null! + if ($this->isAdmin()) { + if ($ssl) { + return HTTPS_CATALOG; + } + return HTTP_CATALOG; + } + if ($ssl) { + return HTTPS_SERVER; + } + return HTTP_SERVER; + } + if ($ssl) { + return $config->get('config_ssl'); + } + return $config->get('config_url'); + } + + public function rewrite($url){ + return str_replace(array( + HTTP_SERVER, + HTTPS_SERVER + ), array( + HTTP_CATALOG, + HTTPS_CATALOG + ), $url); + } + + public function isAdmin(){ + return defined('HTTPS_CATALOG') && defined('HTTP_CATALOG'); + } + + public static function instance(Registry $registry){ + if (self::$instance === null) { + self::$instance = new self($registry); + } + return self::$instance; + } + + public static function getBaseUrl(){ + return "https://app-postfinancecheckout.com:443"; + } + + public static function isEditableState($state){ + $completable_states = array( + \Wallee\Sdk\Model\TransactionState::AUTHORIZED, + \Wallee\Sdk\Model\TransactionState::CONFIRMED, + \Wallee\Sdk\Model\TransactionState::PROCESSING + ); + return in_array($state, $completable_states); + } + + public static function generateToken($tokenLength = 10){ + $token = ''; + static $characters; + if (!$characters) { + $characters = shuffle(array_merge(range('0', '9'), range('a', 'z'), range('A', 'Z'))); + } + static $max; + if (!$max) { + $max = count($characters); + } + for ($i = 0; $i < $tokenLength; $i++) { + $token .= $characters[mt_rand(0, $max)]; + } + return $token; + } + + public static function generateUuid(){ + return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000, + mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)); + } + + public static function mergeArray(array $first, array $second){ + $result = array(); + foreach ($first as $key => $value) { + if (is_array($value)) { + if (isset($second[$key]) && is_array($second[$key])) { + $result[$key] = self::mergeArray($value, $second[$key]); + } + else { + $result[$key] = $value; + } + } + elseif (!($value === null || $value === '')) { + $result[$key] = $value; + } + else { + if (isset($second[$key])) { + $secondValue = $second[$key]; + if (!($secondValue === null || $secondValue === '')) { + $result[$key] = $secondValue; + } + else { + $result[$key] = $value; + } + } + else { + $result[$key] = $value; + } + } + } + foreach ($second as $key => $value) { + if (!isset($result[$key])) { + $result[$key] = $value; + } + } + return $result; + } +} diff --git a/upload/system/library/postfinancecheckout/model/abstract_model.php b/upload/system/library/postfinancecheckout/model/abstract_model.php new file mode 100644 index 0000000..f9afd6f --- /dev/null +++ b/upload/system/library/postfinancecheckout/model/abstract_model.php @@ -0,0 +1,49 @@ +url, $route, $query, $ssl); + } + + protected function getEventModel(){ + if ($this->event_model == null) { + $this->loadEventModel(); + } + return $this->event_model; + } + + protected function getExtensionModel(){ + if ($this->extension_model == null) { + $this->loadExtensionModel(); + } + return $this->extension_model; + } + + protected function getModificationModel(){ + if ($this->modification_model == null) { + $this->loadModificationModel(); + } + return $this->modification_model; + } + + private function loadModificationModel(){ + $this->load->model('extension/modification'); + $this->modification_model = $this->model_extension_modification; + } + + private function loadExtensionModel(){ + $this->load->model('extension/extension'); + $this->extension_model = $this->model_extension_extension; + } + + private function loadEventModel(){ + $this->load->model('extension/event'); + $this->event_model = $this->model_extension_event; + } +} diff --git a/upload/system/library/postfinancecheckout/modification/WalleeAdministration.ocmod.xml b/upload/system/library/postfinancecheckout/modification/WalleeAdministration.ocmod.xml new file mode 100644 index 0000000..5508c1a --- /dev/null +++ b/upload/system/library/postfinancecheckout/modification/WalleeAdministration.ocmod.xml @@ -0,0 +1,42 @@ + + + PostFinanceCheckoutAdministration + postfinancecheckout administration: complete, refund and void from the OpenCart backend. + + 1.0.0 + Customweb GmbH + http://github.com/postfinancecheckout-payment/opencart + + + url->link('sale/order/shipping', 'token=' . $this->session->data['token'] . '&order_id=' . (int)$this->request->get['order_id'], true); + ]]> + document->addScript('view/javascript/postfinancecheckout/order.js'); + $this->load->model('extension/postfinancecheckout/order'); + $data['postfinancecheckout_buttons'] = $this->model_extension_postfinancecheckout_order->getButtons((int)$this->request->get['order_id']); + $data['postfinancecheckout_failed_jobs'] = $this->model_extension_postfinancecheckout_order->getFailedJobs((int)$this->request->get['order_id']); + ]]> + + + + + + + ]]> + '; +document.adminToken = ''; +setPostFinanceCheckoutButtons(); +var postfinancecheckout_failed_jobs = ; +window.setTimeout(function() { + for (var i = 0; i < postfinancecheckout_failed_jobs.length; i++) { + addPostFinanceCheckoutError(postfinancecheckout_failed_jobs[i]); + } +}, 500); +]]> + + + diff --git a/upload/system/library/postfinancecheckout/modification/WalleeAlerts.ocmod.xml b/upload/system/library/postfinancecheckout/modification/WalleeAlerts.ocmod.xml new file mode 100644 index 0000000..5b232ce --- /dev/null +++ b/upload/system/library/postfinancecheckout/modification/WalleeAlerts.ocmod.xml @@ -0,0 +1,43 @@ + + + PostFinanceCheckoutAlerts + postfinancecheckout alerts: show open manual tasks and failed jobs. + 1.0.0 + Customweb GmbH + http://github.com/postfinancecheckout-payment/opencart + + + + load->model("extension/postfinancecheckout/alert"); + $data['postfinancecheckout_alerts_title'] = $this->model_extension_postfinancecheckout_alert->getAlertsTitle(); + $data['postfinancecheckout_alerts'] = $this->model_extension_postfinancecheckout_alert->getAlerts(); + $postfinancecheckout_alert_count = $this->model_extension_postfinancecheckout_alert->getAlertCount(); + ]]> + + + + + + + + + + ]]> + + + +
  • + + ]]>
    +
    +
    +
    diff --git a/upload/system/library/postfinancecheckout/modification/WalleeCore.ocmod.xml b/upload/system/library/postfinancecheckout/modification/WalleeCore.ocmod.xml new file mode 100644 index 0000000..ec0db72 --- /dev/null +++ b/upload/system/library/postfinancecheckout/modification/WalleeCore.ocmod.xml @@ -0,0 +1,115 @@ + + + PostFinanceCheckoutCore + postfinancecheckout core: load payment methods. + + 1.0.0 + Customweb GmbH + http://github.com/postfinancecheckout-payment/opencart + + + session->data['error'])) { + ]]> + request->get['order_id'])) { + require_once modification(DIR_SYSTEM . 'library/postfinancecheckout/helper.php'); + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $this->request->get['order_id']); + if ($transaction_info->getId() != null) { + $data['error_warning'] = $transaction_info->getFailureReason(); + } + } else + ]]> + + + + + model_extension_extension->uninstall('payment', $value); + ]]> + model_extension_extension->uninstall('payment', $value); + } + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/upload/system/library/postfinancecheckout/modification/WalleeEvents.ocmod.xml b/upload/system/library/postfinancecheckout/modification/WalleeEvents.ocmod.xml new file mode 100644 index 0000000..ed380c9 --- /dev/null +++ b/upload/system/library/postfinancecheckout/modification/WalleeEvents.ocmod.xml @@ -0,0 +1,39 @@ + + + PostFinanceCheckoutEvents + postfinancecheckout events: handle events unavailable in Opencart 2.0.x and 2.1.x. + + 1.0.0 + Customweb GmbH + http://github.com/postfinancecheckout-payment/opencart + + + + load->controller('extension/postfinancecheckout/event/includeDeviceIdentifier'); + + \PostFinanceCheckoutHelper::instance($this->registry)->refreshWebhook(); + \PostFinanceCheckout\Entity\Cron::cleanUpHangingCrons($this->registry); + \PostFinanceCheckout\Entity\Cron::insertNewPendingCron($this->registry); + $postfinancecheckout_cron_token = \PostFinanceCheckout\Entity\Cron::getCurrentSecurityTokenForPendingCron($this->registry); + if($postfinancecheckout_cron_token) { + $data['postfinancecheckout_cron'] = \PostFinanceCheckoutVersionHelper::createUrl($this->url, 'extension/postfinancecheckout/cron', array('security_token' => $postfinancecheckout_cron_token), $this->config->get('config_secure')); + } + } catch (Exception $e) { \PostFinanceCheckoutHelper::instance($this->registry)->log($e->getMessage()); } + ]]> + + + + + + load->controller('extension/postfinancecheckout/event/createMethodConfigurationFiles'); + ]]> + + + diff --git a/upload/system/library/postfinancecheckout/modification/WalleeFrontendPdf.ocmod.xml b/upload/system/library/postfinancecheckout/modification/WalleeFrontendPdf.ocmod.xml new file mode 100644 index 0000000..f335ebf --- /dev/null +++ b/upload/system/library/postfinancecheckout/modification/WalleeFrontendPdf.ocmod.xml @@ -0,0 +1,36 @@ + + + PostFinanceCheckoutFrontendPdf + postfinancecheckout customer pdf: Allow customers to download invoices and packing slips. + + 1.0.0 + Customweb GmbH + http://github.com/postfinancecheckout-payment/opencart + + + response->setOutput($this->load->view('account/order_info', $data)); + ]]> + load->model('extension/postfinancecheckout/order'); + $data['postfinancecheckout_buttons'] = $this->model_extension_postfinancecheckout_order->getButtons($order_info['order_id']); + ]]> + + + + + + ]]> + +
    + + + +
    + + ]]>
    +
    +
    +
    diff --git a/upload/system/library/postfinancecheckout/modification/WalleePreventConfirmationEmail.ocmod.xml b/upload/system/library/postfinancecheckout/modification/WalleePreventConfirmationEmail.ocmod.xml new file mode 100644 index 0000000..3787bd6 --- /dev/null +++ b/upload/system/library/postfinancecheckout/modification/WalleePreventConfirmationEmail.ocmod.xml @@ -0,0 +1,18 @@ + + + PostFinanceCheckoutPreventConfirmationEmail + postfinancecheckout email: prevent confirmation email. + 1.0.0 + Customweb GmbH + http://github.com/postfinancecheckout-payment/opencart + + + + + + + diff --git a/upload/system/library/postfinancecheckout/modification/WalleeQuickCheckoutCompatibility.ocmod.xml b/upload/system/library/postfinancecheckout/modification/WalleeQuickCheckoutCompatibility.ocmod.xml new file mode 100644 index 0000000..caf9e15 --- /dev/null +++ b/upload/system/library/postfinancecheckout/modification/WalleeQuickCheckoutCompatibility.ocmod.xml @@ -0,0 +1,19 @@ + + + PostFinanceCheckoutQuickCheckoutCompatibility + postfinancecheckout compatibility: patch for Ajax Quick Checkout. + + 1.0.0 + Customweb GmbH + http://github.com/postfinancecheckout-payment/opencart + + + + + + + diff --git a/upload/system/library/postfinancecheckout/provider/abstract_provider.php b/upload/system/library/postfinancecheckout/provider/abstract_provider.php new file mode 100644 index 0000000..28f6925 --- /dev/null +++ b/upload/system/library/postfinancecheckout/provider/abstract_provider.php @@ -0,0 +1,102 @@ +registry = $registry; + $this->cache_key = $cache_key; + } + + /** + * Fetch the data from the remote server. + * + * @return array + */ + abstract protected function fetchData(); + + /** + * Returns the id of the given entry. + * + * @param mixed $entry + * @return string + */ + abstract protected function getId($entry); + + /** + * Returns a single entry by id. + * + * @param string $id + * @return mixed + */ + public function find($id){ + if ($this->data == null) { + $this->loadData(); + } + + if (isset($this->data[$id])) { + return $this->data[$id]; + } + else { + return false; + } + } + + /** + * Returns all entries. + * + * @return array + */ + public function getAll(){ + if ($this->data == null) { + $this->loadData(); + } + + return $this->data; + } + + public function clearCache() { + $this->registry->get('cache')->delete($this->cache_key); + } + + private function loadData(){ + $cached_data = $this->registry->get('cache')->get($this->cache_key); + if ($cached_data !== false) { + $this->data = unserialize($cached_data); + } + else { + $this->data = array(); + foreach ($this->fetchData() as $entry) { + $this->data[$this->getId($entry)] = $entry; + } + + $this->registry->get('cache')->set($this->cache_key, serialize($this->data)); + } + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/provider/currency.php b/upload/system/library/postfinancecheckout/provider/currency.php new file mode 100644 index 0000000..40f814c --- /dev/null +++ b/upload/system/library/postfinancecheckout/provider/currency.php @@ -0,0 +1,42 @@ +registry)->getApiClient()); + return $currency_service->all(); + } + + protected function getId($entry){ + /* @var \Wallee\Sdk\Model\RestCurrency $entry */ + return $entry->getCurrencyCode(); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/provider/label_description_group.php b/upload/system/library/postfinancecheckout/provider/label_description_group.php new file mode 100644 index 0000000..1e68191 --- /dev/null +++ b/upload/system/library/postfinancecheckout/provider/label_description_group.php @@ -0,0 +1,43 @@ +registry)->getApiClient()); + return $label_descriptor_group_service->all(); + } + + protected function getId($entry){ + /* @var \Wallee\Sdk\Model\LabelDescriptorGroup $entry */ + return $entry->getId(); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/provider/label_descriptor.php b/upload/system/library/postfinancecheckout/provider/label_descriptor.php new file mode 100644 index 0000000..0708247 --- /dev/null +++ b/upload/system/library/postfinancecheckout/provider/label_descriptor.php @@ -0,0 +1,42 @@ +registry)->getApiClient()); + return $label_descriptor_service->all(); + } + + protected function getId($entry){ + /* @var \Wallee\Sdk\Model\LabelDescriptor $entry */ + return $entry->getId(); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/provider/language.php b/upload/system/library/postfinancecheckout/provider/language.php new file mode 100644 index 0000000..162a6b8 --- /dev/null +++ b/upload/system/library/postfinancecheckout/provider/language.php @@ -0,0 +1,68 @@ +getAll() as $language) { + if ($language->getIso2Code() == $code && $language->getPrimaryOfGroup()) { + return $language; + } + } + + return false; + } + + public function findByIsoCode($iso){ + foreach ($this->getAll() as $language) { + if ($language->getIso2Code() == $iso || $language->getIso3Code() == $iso) { + return $language; + } + } + return false; + } + + /** + * Returns a list of language. + * + * @return \Wallee\Sdk\Model\RestLanguage[] + */ + public function getAll(){ + return parent::getAll(); + } + + protected function fetchData(){ + $language_service = new \Wallee\Sdk\Service\LanguageService(\PostFinanceCheckoutHelper::instance($this->registry)->getApiClient()); + return $language_service->all(); + } + + protected function getId($entry){ + /* @var \Wallee\Sdk\Model\RestLanguage $entry */ + return $entry->getIetfCode(); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/provider/payment_connector.php b/upload/system/library/postfinancecheckout/provider/payment_connector.php new file mode 100644 index 0000000..af38daa --- /dev/null +++ b/upload/system/library/postfinancecheckout/provider/payment_connector.php @@ -0,0 +1,42 @@ +registry)->getApiClient()); + return $connector_service->all(); + } + + protected function getId($entry){ + /* @var \Wallee\Sdk\Model\PaymentConnector $entry */ + return $entry->getId(); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/provider/payment_method.php b/upload/system/library/postfinancecheckout/provider/payment_method.php new file mode 100644 index 0000000..56a5171 --- /dev/null +++ b/upload/system/library/postfinancecheckout/provider/payment_method.php @@ -0,0 +1,42 @@ +registry)->getApiClient()); + return $method_service->all(); + } + + protected function getId($entry){ + /* @var \Wallee\Sdk\Model\PaymentMethod $entry */ + return $entry->getId(); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/service/abstract_job.php b/upload/system/library/postfinancecheckout/service/abstract_job.php new file mode 100644 index 0000000..3f83c53 --- /dev/null +++ b/upload/system/library/postfinancecheckout/service/abstract_job.php @@ -0,0 +1,43 @@ +setState(\PostFinanceCheckout\Entity\AbstractJob::STATE_FAILED_CHECK); + $job->setFailureReason([ + \PostFinanceCheckoutHelper::FALLBACK_LANGUAGE => $api_exception->getMessage() + ]); + $job->save(); + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionCommit(); + return $job; + } + catch (\Exception $e) { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionRollback(); + throw new \Exception($e->getMessage() . ' | ' . $api_exception->getMessage(), $e->getCode(), $api_exception); + } + } + + protected function createBase(\PostFinanceCheckout\Entity\TransactionInfo $transaction_info, \PostFinanceCheckout\Entity\AbstractJob $job){ + $job->setTransactionId($transaction_info->getTransactionId()); + $job->setOrderId($transaction_info->getOrderId()); + $job->setSpaceId($transaction_info->getSpaceId()); + $job->setState(\PostFinanceCheckout\Entity\AbstractJob::STATE_CREATED); + + return $job; + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/service/abstract_service.php b/upload/system/library/postfinancecheckout/service/abstract_service.php new file mode 100644 index 0000000..51c817c --- /dev/null +++ b/upload/system/library/postfinancecheckout/service/abstract_service.php @@ -0,0 +1,78 @@ +registry = $registry; + } + + /** + * + * @return static + */ + public static function instance(\Registry $registry){ + $class = get_called_class(); + if (!isset(self::$instances[$class])) { + self::$instances[$class] = new $class($registry); + } + return self::$instances[$class]; + } + + /** + * Creates and returns a new entity filter. + * + * @param string $field_name + * @param mixed $value + * @param string $operator + * @return \Wallee\Sdk\Model\EntityQueryFilter + */ + protected function createEntityFilter($field_name, $value, $operator = \Wallee\Sdk\Model\CriteriaOperator::EQUALS){ + $filter = new \Wallee\Sdk\Model\EntityQueryFilter(); + $filter->setType(\Wallee\Sdk\Model\EntityQueryFilterType::LEAF); + $filter->setOperator($operator); + $filter->setFieldName($field_name); + $filter->setValue($value); + return $filter; + } + + /** + * Creates and returns a new entity order by. + * + * @param string $field_name + * @param string $sort_order + * @return \Wallee\Sdk\Model\EntityQueryOrderBy + */ + protected function createEntityOrderBy($field_name, $sort_order = \Wallee\Sdk\Model\EntityQueryOrderByType::DESC){ + $order_by = new \Wallee\Sdk\Model\EntityQueryOrderBy(); + $order_by->setFieldName($field_name); + $order_by->setSorting($sort_order); + return $order_by; + } + + /** + * Changes the given string to have no more characters as specified. + * + * @param string $string + * @param int $max_length + * @return string + */ + protected function fixLength($string, $max_length){ + return mb_substr($string, 0, $max_length, 'UTF-8'); + } + + /** + * Removes all non printable ASCII chars + * + * @param string $string + * @return $string + */ + protected function removeNonAscii($string){ + return preg_replace('/[\x00-\x1F\x7F-\xFF]/', '', $string); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/service/completion.php b/upload/system/library/postfinancecheckout/service/completion.php new file mode 100644 index 0000000..9f6f3f3 --- /dev/null +++ b/upload/system/library/postfinancecheckout/service/completion.php @@ -0,0 +1,64 @@ +registry)->dbTransactionStart(); + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionLock($transaction_info->getSpaceId(), $transaction_info->getTransactionId()); + + $job = \PostFinanceCheckout\Entity\CompletionJob::loadNotSentForOrder($this->registry, $transaction_info->getOrderId()); + if (!$job->getId()) { + $job = $this->createBase($transaction_info, $job); + $job->save(); + } + + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionCommit(); + } + catch (\Exception $e) { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionRollback(); + throw $e; + } + + return $job; + } + + public function send(\PostFinanceCheckout\Entity\CompletionJob $job){ + try { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionStart(); + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionLock($job->getSpaceId(), $job->getTransactionId()); + + $service = new \Wallee\Sdk\Service\TransactionCompletionService(\PostFinanceCheckoutHelper::instance($this->registry)->getApiClient()); + $operation = $service->completeOnline($job->getSpaceId(), $job->getTransactionId()); + + if ($operation->getFailureReason() != null) { + $job->setFailureReason($operation->getFailureReason()->getDescription()); + } + + $labels = array(); + foreach ($operation->getLabels() as $label) { + $labels[$label->getDescriptor()->getId()] = $label->getContentAsString(); + } + $job->setLabels($labels); + + $job->setJobId($operation->getId()); + $job->setState(\PostFinanceCheckout\Entity\AbstractJob::STATE_SENT); + $job->save(); + + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionCommit(); + return $job; + } + catch (\Wallee\Sdk\ApiException $api_exception) { + return $this->handleApiException($job, $api_exception); + } + catch (\Exception $e) { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionRollback(); + throw $e; + } + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/service/line_item.php b/upload/system/library/postfinancecheckout/service/line_item.php new file mode 100644 index 0000000..b74fad9 --- /dev/null +++ b/upload/system/library/postfinancecheckout/service/line_item.php @@ -0,0 +1,579 @@ +setAmountIncludingTax($total); + $line_item->setQuantity(1); + $line_item->setType(\Wallee\Sdk\Model\LineItemType::PRODUCT); + $line_item->setName('temp'); + $line_item->setUniqueId('temp'); + return $line_item; + } + + /** + * Gets the current order items, with all succesfull refunds applied. + * + * @param array $order_info + * @param int $transaction_id + * @param int $space_id + * @return \Wallee\Sdk\Model\LineItemCreate[] + */ + public function getReducedItemsFromOrder(array $order_info, $transaction_id, $space_id){ + $this->tax = \PostFinanceCheckoutVersionHelper::newTax($this->registry); + $this->tax->setShippingAddress($order_info['shipping_country_id'], $order_info['shipping_zone_id']); + $this->tax->setPaymentAddress($order_info['payment_country_id'], $order_info['payment_zone_id']); + + $line_items = $this->getItemsFromOrder($order_info, $transaction_id, $space_id); + + // get all succesfully reduced items + $refund_jobs = \PostFinanceCheckout\Entity\RefundJob::loadByOrder($this->registry, $order_info['order_id']); + $reduction_items = array(); + foreach ($refund_jobs as $refund) { + if ($refund->getState() != \PostFinanceCheckout\Entity\RefundJob::STATE_FAILED_CHECK && + $refund->getState() != \PostFinanceCheckout\Entity\RefundJob::STATE_FAILED_DONE) { + foreach ($refund->getReductionItems() as $already_reduced) { + if (!isset($reduction_items[$already_reduced->getLineItemUniqueId()])) { + $reduction_items[$already_reduced->getLineItemUniqueId()] = array( + 'quantity' => 0, + 'unit_price' => 0 + ); + } + $reduction_items[$already_reduced->getLineItemUniqueId()]['quantity'] += $already_reduced->getQuantityReduction(); + $reduction_items[$already_reduced->getLineItemUniqueId()]['unit_price'] += $already_reduced->getUnitPriceReduction(); + } + } + } + + // remove them from available items + foreach ($line_items as $key => $line_item) { + if (isset($reduction_items[$line_item->getUniqueId()])) { + if ($reduction_items[$line_item->getUniqueId()]['quantity'] == $line_item->getQuantity()) { + unset($line_items[$key]); + } + else { + $unit_price = $line_item->getAmountIncludingTax() / $line_item->getQuantity(); + $unit_price -= $reduction_items[$line_item->getUniqueId()]['unit_price']; + $line_item->setQuantity($line_item->getQuantity() - $reduction_items[$line_item->getUniqueId()]['quantity']); + $line_item->setAmountIncludingTax($unit_price * $line_item->getQuantity()); + } + } + } + return $line_items; + } + + public function getItemsFromOrder(array $order_info){ + $this->tax = \PostFinanceCheckoutVersionHelper::newTax($this->registry); + $this->tax->setShippingAddress($order_info['shipping_country_id'], $order_info['shipping_zone_id']); + $this->tax->setPaymentAddress($order_info['payment_country_id'], $order_info['payment_zone_id']); + + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $order_info['order_id']); + $order_model = \PostFinanceCheckoutHelper::instance($this->registry)->getOrderModel(); + + $order_total = 0; + $items = array(); + + $this->fixed_taxes = array(); + $this->products = $order_model->getOrderProducts($order_info['order_id']); + $voucher = $order_model->getOrderVouchers($order_info['order_id']); + // only one voucher possible (see extension total voucher) + if (!empty($voucher)) { + $this->voucher = $voucher[0]; + } + else { + $this->voucher = false; + } + $shipping_info = \PostFinanceCheckout\Entity\ShippingInfo::loadByTransaction($this->registry, $transaction_info->getSpaceId(), + $transaction_info->getTransactionId()); + if ($shipping_info->getId()) { + $this->shipping = array( + 'title' => $order_info['shipping_method'], + 'code' => $order_info['shipping_code'], + 'cost' => $shipping_info->getCost(), + 'tax_class_id' => $shipping_info->getTaxClassId() + ); + } + else { + $this->shipping = false; + } + $this->total = $order_model->getOrderTotals($order_info['order_id']); + + $sub_total = 0; + foreach ($this->total as $total) { + if ($total['code'] == 'sub_total') { + $sub_total = $total['value']; + break; + } + } + + $this->coupon = $this->getCoupon($transaction_info->getCouponCode(), $sub_total, $order_info['customer_id']); + + return $this->createLineItems($order_info['currency_code']); + } + + public function getItemsFromSession(){ + $this->tax = $this->registry->get('tax'); + + $i = 0; + $items = array(); + $fees = array(); + + $this->products = $this->registry->get('cart')->getProducts(); + + if (!empty($this->registry->get('session')->data['vouchers'])) { + $voucher = current($this->registry->get('session')->data['vouchers']); + } + if (!empty($voucher)) { + $this->voucher = $voucher[0]; + } + else { + $this->voucher = false; + } + + if (!empty($this->registry->get('session')->data['shipping_method'])) { + $this->shipping = $this->registry->get('session')->data['shipping_method']; + } + else { + $this->shipping = false; + } + + $this->total = \PostFinanceCheckoutVersionHelper::getSessionTotals($this->registry); + + $sub_total = 0; + foreach ($this->total as $total) { + if ($total['code'] == 'sub_total') { + $sub_total = $total['value']; + break; + } + } + + if (isset($this->registry->get('session')->data['coupon']) && isset($this->registry->get('session')->data['customer_id'])) { + $this->coupon = $this->getCoupon($this->registry->get('session')->data['coupon'], $sub_total, + $this->registry->get('session')->data['customer_id']); + } + else { + $this->coupon = false; + } + + return $this->createLineItems(\PostFinanceCheckoutHelper::instance($this->registry)->getCurrency()); + } + + private function createLineItems($currency_code){ + $calculated_total = 0; + foreach ($this->products as $product) { + $items[] = $item = $this->createLineItemFromProduct($product); + $calculated_total += $item->getAmountIncludingTax(); + } + + if ($this->voucher) { + $items[] = $item = $this->createLineItemFromVoucher(); + $calculated_total += $item->getAmountIncludingTax(); + } + + if ($this->shipping) { + $items[] = $item = $this->createLineItemFromShipping(); + $calculated_total += $item->getAmountIncludingTax(); + } + + $expected_total = 0; + // attempt to add 3rd party totals + foreach ($this->total as $total) { + + if(strncmp($total['code'], 'xfee', strlen('xfee')) === 0){ + $items[] = $item = $this->createXFeeLineItem($total); + $calculated_total += $item->getAmountIncludingTax(); + } + else if (!in_array($total['code'], array( + 'total', + 'shipping', + 'sub_total', + 'coupon', + 'tax' + ))) { + if ($total['value'] != 0) { + $items[] = $item = $this->createLineItemFromTotal($total); + $calculated_total += $item->getAmountIncludingTax(); + } + } + else if ($total['code'] == 'total') { + $expected_total = $total['value']; + } + } + + foreach ($this->fixed_taxes as $key => $tax) { + $items[] = $item = $this->createLineItemFromFee($tax, $key); + $calculated_total += $item->getAmountIncludingTax(); + } + + // only check amount if currency is base currency. Otherwise, rounding errors are expected to occur due to Opencart standard + if ($this->registry->get('currency')->getValue($currency_code) == 1) { + $expected_total = \PostFinanceCheckoutHelper::instance($this->registry)->formatAmount($expected_total); + + if (!\PostFinanceCheckoutHelper::instance($this->registry)->areAmountsEqual($calculated_total, $expected_total, $currency_code)) { + \PostFinanceCheckoutHelper::instance($this->registry)->log( + "Invalid order total calculated. Calculated total: $calculated_total, Expected total: $expected_total.", \PostFinanceCheckoutHelper::LOG_ERROR); + \PostFinanceCheckoutHelper::instance($this->registry)->log(array( + 'Products' => $this->products + ), \PostFinanceCheckoutHelper::LOG_ERROR); + \PostFinanceCheckoutHelper::instance($this->registry)->log(array( + 'Voucher' => $this->voucher + ), \PostFinanceCheckoutHelper::LOG_ERROR); + \PostFinanceCheckoutHelper::instance($this->registry)->log(array( + 'Coupon' => $this->coupon + ), \PostFinanceCheckoutHelper::LOG_ERROR); + \PostFinanceCheckoutHelper::instance($this->registry)->log(array( + 'Totals' => $this->total + ), \PostFinanceCheckoutHelper::LOG_ERROR); + \PostFinanceCheckoutHelper::instance($this->registry)->log(array( + 'Fixed taxes' => $this->fixed_taxes + ), \PostFinanceCheckoutHelper::LOG_ERROR); + \PostFinanceCheckoutHelper::instance($this->registry)->log(array( + 'Shipping' => $this->shipping + ), \PostFinanceCheckoutHelper::LOG_ERROR); + \PostFinanceCheckoutHelper::instance($this->registry)->log(array( + 'postfinancecheckout Items' => $items + ), \PostFinanceCheckoutHelper::LOG_ERROR); + + throw new \Exception("Invalid order total."); + } + } + + return $items; + } + + private function createLineItemFromFee($fee, $id){ + $line_item = new LineItemCreate(); + + $line_item->setName($fee['name']); + $line_item->setSku($fee['code']); + $line_item->setUniqueId($id); + $line_item->setQuantity($fee['quantity']); + $line_item->setType(LineItemType::FEE); + $line_item->setAmountIncludingTax(\PostFinanceCheckoutHelper::instance($this->registry)->formatAmount($fee['amount'])); + + return $this->cleanLineItem($line_item); + } + + private function createLineItemFromTotal($total){ + $line_item = new LineItemCreate(); + + $line_item->setName($total['title']); + $line_item->setSku($total['code']); + $line_item->setUniqueId($total['code']); + $line_item->setQuantity(1); + $line_item->setType(LineItemType::FEE); + $line_item->setAmountIncludingTax(\PostFinanceCheckoutHelper::instance($this->registry)->formatAmount($total['value'])); + + return $this->cleanLineItem($line_item); + } + + private function createXFeeLineItem($total){ + $config = $this->registry->get('config'); + $line_item = new LineItemCreate(); + $line_item->setName($total['title']); + $line_item->setSku($total['code']); + $line_item->setUniqueId($total['code']); + $line_item->setQuantity(1); + $line_item->setType(LineItemType::FEE); + if($total['value'] < 0){ + $line_item->setType(LineItemType::DISCOUNT); + } + $line_item->setAmountIncludingTax(\WalleeHelper::instance($this->registry)->formatAmount($total['value'])); + $fee_id = substr($total['code'], 4); + if ($config->get ( 'xfee_tax_class_id' . $fee_id )) { + $tax_amount = $this->addTaxesToLineItem($line_item, $total['value'], $config->get( 'xfee_tax_class_id' . $fee_id )); + $line_item->setAmountIncludingTax(\WalleeHelper::instance($this->registry)->formatAmount($total['value'] + $tax_amount)); + } + return $this->cleanLineItem($line_item); + } + + private function createLineItemFromProduct($product){ + $line_item = new LineItemCreate(); + $amount_excluding_tax = $product['total']; + + $product['tax_class_id'] = $this->getTaxClassByProductId($product['product_id']); + + if ($this->coupon && (!$this->coupon['product'] || in_array($product['product_id'], $this->coupon['product']))) { + if ($this->coupon['type'] == 'F') { + $discount = $this->coupon['discount'] * ($product['total'] / $this->sub_total); + } + elseif ($this->coupon['type'] == 'P') { + $discount = $product['total'] / 100 * $this->coupon['discount']; + } + $amount_excluding_tax -= $discount; + } + + $line_item->setName($product['name']); + $line_item->setQuantity($product['quantity']); + $line_item->setShippingRequired(isset($product['shipping'])); + if (isset($product['sku'])) { + $line_item->setSku($product['sku']); + } + else { + $line_item->setSku($product['model']); + } + $line_item->setUniqueId($product['product_id']); + $line_item->setType(LineItemType::PRODUCT); + + $tax_amount = $this->addTaxesToLineItem($line_item, $amount_excluding_tax, $product['tax_class_id']); + $line_item->setAmountIncludingTax(\PostFinanceCheckoutHelper::instance($this->registry)->formatAmount($amount_excluding_tax + $tax_amount)); + + return $this->cleanLineItem($line_item); + } + + private function createLineItemFromVoucher($voucher, $id){ + $line_item = new LineItemCreate(); + + $line_item->setName($this->voucher['name']); + $line_item->setQuantity(1); + $line_item->setType(LineItemType::DISCOUNT); + $line_item->setSKU($this->voucher['code']); + $line_item->setUniqueId($this->voucher['code']); + $line_item->setAmountIncludingTax(\PostFinanceCheckoutHelper::instance($this->registry)->formatAmount($this->voucher['amount'])); + + return $this->cleanLineItem($line_item); + } + + private function createLineItemFromShipping(){ + $line_item = new LineItemCreate(); + + $amount_excluding_tax = $this->shipping['cost']; + + if ($this->coupon && $this->coupon['shipping']) { + $amount_excluding_tax = 0; + } + + $line_item->setName($this->shipping['title']); + $line_item->setSku($this->shipping['code']); + $line_item->setUniqueId($this->shipping['code']); + $line_item->setType(LineItemType::SHIPPING); + $line_item->setQuantity(1); + + $tax_amount = $this->addTaxesToLineItem($line_item, $amount_excluding_tax, $this->shipping['tax_class_id']); + $line_item->setAmountIncludingTax(\PostFinanceCheckoutHelper::instance($this->registry)->formatAmount($amount_excluding_tax + $tax_amount)); + + return $this->cleanLineItem($line_item); + } + + /** + * Adds taxes to the line item, while fixed taxes are added as attributes. + * Call after setting line item quantity. + * Returns the total tax amount for the given item. + * + * @param LineItemCreate $line_item + * @param float $total + * @param int $tax_class_id + * @return float + */ + private function addTaxesToLineItem(LineItemCreate $line_item, $total, $tax_class_id){ + $tax_amount = 0; + $rates = $this->tax->getRates($total, $tax_class_id); + $taxes = array(); + foreach ($rates as $rate) { + // P = percentage + if ($rate['type'] == 'P') { + $tax_amount += $rate['amount']; + $taxes[] = new TaxCreate(array( + 'rate' => $rate['rate'], + 'title' => $rate['name'] + )); + } + // F = fixed + else if ($rate['type'] == 'F') { + $key = preg_replace("/[^\w_]/", "", $rate['name']); + $amount = $rate['amount'] * $line_item->getQuantity(); + + if (isset($this->fixed_taxes[$key])) { + $this->fixed_taxes[$key]['amount'] += $amount; + $this->fixed_taxes[$key]['quantity'] += $line_item->getQuantity(); + } + else { + $this->fixed_taxes[$key] = array( + 'code' => $key, + 'name' => $rate['name'], + 'amount' => $amount, + 'quantity' => $line_item->getQuantity() + ); + } + } + } + $line_item->setTaxes($taxes); + return $tax_amount; + } + + /** + * Near-Duplicate code from model/extension/total/coupon/getCoupon + * Expects sub_total instead of calculating based on cart. + * Expects customer_id instead of retrieving from session. + * + * @param unknown $code + * @param unknown $sub_total + * @param unknown $customer_id + * @return NULL[]|unknown[][]|array + */ + private function getCoupon($code, $sub_total, $customer_id){ + $db = $this->registry->get('db'); + $status = true; + + $coupon_query = $db->query( + "SELECT * FROM `" . DB_PREFIX . "coupon` WHERE code = '" . $db->escape($code) . + "' AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) AND status = '1'"); + + if ($coupon_query->num_rows) { + if ($coupon_query->row['total'] > $sub_total) { + $status = false; + } + + $coupon_total = $this->getTotalCouponHistoriesByCoupon($code); + + if ($coupon_query->row['uses_total'] > 0 && ($coupon_total >= $coupon_query->row['uses_total'])) { + $status = false; + } + + if ($coupon_query->row['logged'] && !$customer_id) { + $status = false; + } + + if ($customer_id) { + $customer_total = $this->getTotalCouponHistoriesByCustomerId($code, $customer_id); + + if ($coupon_query->row['uses_customer'] > 0 && ($customer_total >= $coupon_query->row['uses_customer'])) { + $status = false; + } + } + + // Products + $coupon_product_data = array(); + + $coupon_product_query = $db->query( + "SELECT * FROM `" . DB_PREFIX . "coupon_product` WHERE coupon_id = '" . (int) $coupon_query->row['coupon_id'] . "'"); + + foreach ($coupon_product_query->rows as $product) { + $coupon_product_data[] = $product['product_id']; + } + + // Categories + $coupon_category_data = array(); + + $coupon_category_query = $db->query( + "SELECT * FROM `" . DB_PREFIX . "coupon_category` cc LEFT JOIN `" . DB_PREFIX . + "category_path` cp ON (cc.category_id = cp.path_id) WHERE cc.coupon_id = '" . (int) $coupon_query->row['coupon_id'] . "'"); + + foreach ($coupon_category_query->rows as $category) { + $coupon_category_data[] = $category['category_id']; + } + + $product_data = array(); + + if ($coupon_product_data || $coupon_category_data) { + foreach ($this->products as $product) { + if (in_array($product['product_id'], $coupon_product_data)) { + $product_data[] = $product['product_id']; + + continue; + } + + foreach ($coupon_category_data as $category_id) { + $coupon_category_query = $db->query( + "SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "product_to_category` WHERE `product_id` = '" . + (int) $product['product_id'] . "' AND category_id = '" . (int) $category_id . "'"); + + if ($coupon_category_query->row['total']) { + $product_data[] = $product['product_id']; + + continue; + } + } + } + + if (!$product_data) { + $status = false; + } + } + } + else { + $status = false; + } + + if ($status) { + return array( + 'coupon_id' => $coupon_query->row['coupon_id'], + 'code' => $coupon_query->row['code'], + 'name' => $coupon_query->row['name'], + 'type' => $coupon_query->row['type'], + 'discount' => $coupon_query->row['discount'], + 'shipping' => $coupon_query->row['shipping'], + 'total' => $coupon_query->row['total'], + 'product' => $product_data, + 'date_start' => $coupon_query->row['date_start'], + 'date_end' => $coupon_query->row['date_end'], + 'uses_total' => $coupon_query->row['uses_total'], + 'uses_customer' => $coupon_query->row['uses_customer'], + 'status' => $coupon_query->row['status'], + 'date_added' => $coupon_query->row['date_added'] + ); + } + else { + return array(); + } + } + + private function getTotalCouponHistoriesByCoupon($coupon){ + $query = $this->registry->get('db')->query( + "SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "coupon_history` ch LEFT JOIN `" . DB_PREFIX . + "coupon` c ON (ch.coupon_id = c.coupon_id) WHERE c.code = '" . $this->registry->get('db')->escape($coupon) . "'"); + + return $query->row['total']; + } + + private function getTotalCouponHistoriesByCustomerId($coupon, $customer_id){ + $query = $this->registry->get('db')->query( + "SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "coupon_history` ch LEFT JOIN `" . DB_PREFIX . + "coupon` c ON (ch.coupon_id = c.coupon_id) WHERE c.code = '" . $this->registry->get('db')->escape($coupon) . + "' AND ch.customer_id = '" . (int) $customer_id . "'"); + + return $query->row['total']; + } + + /** + * Cleans the given line item for it to meet the API's requirements. + * + * @param \Wallee\Sdk\Model\LineItemCreate $lineItem + * @return \Wallee\Sdk\Model\LineItemCreate + */ + private function cleanLineItem(LineItemCreate $line_item){ + $line_item->setSku($this->fixLength($line_item->getSku(), 200)); + $line_item->setName($this->fixLength($line_item->getName(), 40)); + return $line_item; + } + + private function getTaxClassByProductId($product_id){ + $table = DB_PREFIX . 'product'; + $product_id = $this->registry->get('db')->escape($product_id); + $query = "SELECT tax_class_id FROM $table WHERE product_id='$product_id';"; + $result = $this->registry->get('db')->query($query); + return $result->row['tax_class_id']; + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/service/manual_task.php b/upload/system/library/postfinancecheckout/service/manual_task.php new file mode 100644 index 0000000..f294b11 --- /dev/null +++ b/upload/system/library/postfinancecheckout/service/manual_task.php @@ -0,0 +1,51 @@ +registry->get('config')->get(self::CONFIG_KEY); + return $num === null ? 0 : $num; + } + + /** + * Updates the number of open manual tasks. + * + * @return int + */ + public function update(){ + $number_of_manual_tasks = 0; + $manual_task_service = new \Wallee\Sdk\Service\ManualTaskService(\PostFinanceCheckoutHelper::instance($this->registry)->getApiClient()); + + $space_id = $this->registry->get('config')->get('postfinancecheckout_space_id'); + if (!empty($space_id)) { + $number_of_manual_tasks = $manual_task_service->count($space_id, + $this->createEntityFilter('state', \Wallee\Sdk\Model\ManualTaskState::OPEN)); + + $table = DB_PREFIX . 'setting'; + $key = self::CONFIG_KEY; + $number_of_manual_tasks = (int) $number_of_manual_tasks; + $store_id = $this->registry->get('config')->get('config_store_id'); + if($store_id === null){ + $store_id = 0; + } + + \PostFinanceCheckout\Entity\Alert::loadManualTask($this->registry)->setCount($number_of_manual_tasks)->save(); + + $this->registry->get('db')->query( + "UPDATE $table SET `value`='$number_of_manual_tasks' WHERE `code`='postfinancecheckout' AND `key`='$key' AND `store_id`='$store_id';"); + } + + return $number_of_manual_tasks; + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/service/method_configuration.php b/upload/system/library/postfinancecheckout/service/method_configuration.php new file mode 100644 index 0000000..d20c7f1 --- /dev/null +++ b/upload/system/library/postfinancecheckout/service/method_configuration.php @@ -0,0 +1,113 @@ +registry, $configuration->getLinkedSpaceId(), $configuration->getId()); + if ($entity->getId() !== null && $this->hasChanged($configuration, $entity)) { + $entity->setConfigurationName($configuration->getName()); + $entity->setTitle($configuration->getResolvedTitle()); + $entity->setDescription($configuration->getResolvedDescription()); + $entity->setImage($configuration->getResolvedImageUrl()); + $entity->setSortOrder($configuration->getSortOrder()); + $entity->save(); + } + } + + private function hasChanged(\Wallee\Sdk\Model\PaymentMethodConfiguration $configuration, \PostFinanceCheckout\Entity\MethodConfiguration $entity){ + if ($configuration->getName() != $entity->getConfigurationName()) { + return true; + } + + if ($configuration->getResolvedTitle() != $entity->getTitle()) { + return true; + } + + if ($configuration->getResolvedDescription() != $entity->getDescription()) { + return true; + } + + if ($configuration->getResolvedImageUrl() != $entity->getImage()) { + return true; + } + + if ($configuration->getSortOrder() != $entity->getSortOrder()) { + return true; + } + + return false; + } + + /** + * Synchronizes the payment method configurations from PostFinanceCheckout. + */ + public function synchronize($space_id){ + $existing_found = array(); + $existing_configurations = \PostFinanceCheckout\Entity\MethodConfiguration::loadBySpaceId($this->registry, $space_id); + + $payment_method_configuration_service = new \Wallee\Sdk\Service\PaymentMethodConfigurationService( + \PostFinanceCheckoutHelper::instance($this->registry)->getApiClient()); + $configurations = $payment_method_configuration_service->search($space_id, new \Wallee\Sdk\Model\EntityQuery()); + + foreach ($configurations as $configuration) { + $method = \PostFinanceCheckout\Entity\MethodConfiguration::loadByConfiguration($this->registry, $space_id, $configuration->getId()); + if ($method->getId() !== null) { + $existing_found[] = $method->getId(); + } + + $method->setSpaceId($space_id); + $method->setConfigurationId($configuration->getId()); + $method->setConfigurationName($configuration->getName()); + $method->setState($this->getConfigurationState($configuration)); + $method->setTitle($configuration->getResolvedTitle()); + $method->setDescription($configuration->getResolvedDescription()); + $method->setImage($configuration->getResolvedImageUrl()); + $method->setSortOrder($configuration->getSortOrder()); + $method->save(); + } + + foreach ($existing_configurations as $existing_configuration) { + if (!in_array($existing_configuration->getId(), $existing_found)) { + $existing_configuration->setState(\PostFinanceCheckout\Entity\MethodConfiguration::STATE_HIDDEN); + $existing_configuration->save(); + } + } + + \PostFinanceCheckout\Provider\PaymentMethod::instance($this->registry)->clearCache(); + } + + /** + * Returns the payment method for the given id. + * + * @param int $id + * @return \Wallee\Sdk\Model\PaymentMethod + */ + protected function getPaymentMethod($id){ + return \PostFinanceCheckout\Provider\PaymentMethod::instance($this->registry)->find($id); + } + + /** + * Returns the state for the payment method configuration. + * + * @param \Wallee\Sdk\Model\PaymentMethodConfiguration $configuration + * @return string + */ + protected function getConfigurationState(\Wallee\Sdk\Model\PaymentMethodConfiguration $configuration){ + switch ($configuration->getState()) { + case \Wallee\Sdk\Model\CreationEntityState::ACTIVE: + return \PostFinanceCheckout\Entity\MethodConfiguration::STATE_ACTIVE; + case \Wallee\Sdk\Model\CreationEntityState::INACTIVE: + return \PostFinanceCheckout\Entity\MethodConfiguration::STATE_INACTIVE; + default: + return \PostFinanceCheckout\Entity\MethodConfiguration::STATE_HIDDEN; + } + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/service/refund.php b/upload/system/library/postfinancecheckout/service/refund.php new file mode 100644 index 0000000..e0a2d5d --- /dev/null +++ b/upload/system/library/postfinancecheckout/service/refund.php @@ -0,0 +1,102 @@ +registry, $transaction_info->getOrderId()); + return 'r-' . $transaction_info->getOrderId() . '-' . ($count + 1); + } + + public function create(\PostFinanceCheckout\Entity\TransactionInfo $transaction_info, array $reductions, $restock){ + try { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionStart(); + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionLock($transaction_info->getSpaceId(), $transaction_info->getTransactionId()); + + $job = \PostFinanceCheckout\Entity\RefundJob::loadNotSentForOrder($this->registry, $transaction_info->getOrderId()); + $reduction_line_items = $this->getLineItemReductions($reductions); + /* @var $job \PostFinanceCheckout\Entity\RefundJob */ + if (!$job->getId()) { + $job = $this->createBase($transaction_info, $job); + $job->setReductionItems($reduction_line_items); + $job->setRestock($restock); + $job->setExternalId($this->getExternalRefundId($transaction_info)); + $job->save(); + } + else if ($job->getReductionItems() != $reduction_line_items) { + throw new \Exception(\PostFinanceCheckoutHelper::instance($this->registry)->getTranslation('error_already_running')); + } + + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionCommit(); + } + catch (\Exception $e) { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionRollback(); + throw $e; + } + + return $job; + } + + public function send(\PostFinanceCheckout\Entity\RefundJob $job){ + try { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionStart(); + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionLock($job->getSpaceId(), $job->getTransactionId()); + + $service = new \Wallee\Sdk\Service\RefundService(\PostFinanceCheckoutHelper::instance($this->registry)->getApiClient()); + $operation = $service->refund($job->getSpaceId(), $this->createRefund($job)); + + if ($operation->getFailureReason() != null) { + $job->setFailureReason($operation->getFailureReason()->getDescription()); + } + + $labels = array(); + foreach ($operation->getLabels() as $label) { + $labels[$label->getDescriptor()->getId()] = $label->getContentAsString(); + } + $job->setLabels($labels); + + $job->setJobId($operation->getId()); + $job->setState(\PostFinanceCheckout\Entity\AbstractJob::STATE_SENT); + $job->setAmount($operation->getAmount()); + $job->save(); + + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionCommit(); + return $job; + } + catch (\Wallee\Sdk\ApiException $api_exception) { + } + catch (\Exception $e) { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionRollback(); + throw $e; + } + + return $this->handleApiException($job, $api_exception); + } + + private function createRefund(\PostFinanceCheckout\Entity\RefundJob $job){ + $refund_create = new \Wallee\Sdk\Model\RefundCreate(); + $refund_create->setReductions($job->getReductionItems()); + $refund_create->setExternalId($job->getExternalId()); + $refund_create->setTransaction($job->getTransactionId()); + $refund_create->setType(\Wallee\Sdk\Model\RefundType::MERCHANT_INITIATED_ONLINE); + return $refund_create; + } + + private function getLineItemReductions(array $reductions){ + $reduction_line_items = array(); + foreach ($reductions as $reduction) { + if ($reduction['quantity'] || $reduction['unit_price']) { + $line_item = new \Wallee\Sdk\Model\LineItemReductionCreate(); + $line_item->setLineItemUniqueId($reduction['id']); + $line_item->setQuantityReduction(floatval($reduction['quantity'])); + $line_item->setUnitPriceReduction(floatval($reduction['unit_price'])); + $reduction_line_items[] = $line_item; + } + } + return $reduction_line_items; + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/service/token.php b/upload/system/library/postfinancecheckout/service/token.php new file mode 100644 index 0000000..38173b5 --- /dev/null +++ b/upload/system/library/postfinancecheckout/service/token.php @@ -0,0 +1,110 @@ +getTokenVersionService()->read($space_id, $token_version_id); + $this->updateInfo($space_id, $token_version); + } + + public function updateToken($space_id, $token_id){ + $query = new \Wallee\Sdk\Model\EntityQuery(); + $filter = new \Wallee\Sdk\Model\EntityQueryFilter(); + $filter->setType(\Wallee\Sdk\Model\EntityQueryFilterType::_AND); + $filter->setChildren( + array( + $this->createEntityFilter('token.id', $token_id), + $this->createEntityFilter('state', \Wallee\Sdk\Model\TokenVersionState::ACTIVE) + )); + $query->setFilter($filter); + $query->setNumberOfEntities(1); + $token_versions = $this->getTokenVersionService()->search($space_id, $query); + if (!empty($token_versions)) { + $this->updateInfo($space_id, current($token_versions)); + } + else { + $info = \PostFinanceCheckout\Entity\TokenInfo::loadByToken($this->registry, $space_id, $token_id); + if ($info->getId()) { + $info->delete(); + } + } + } + + protected function updateInfo($space_id, \Wallee\Sdk\Model\TokenVersion $token_version){ + $info = \PostFinanceCheckout\Entity\TokenInfo::loadByToken($this->registry, $space_id, $token_version->getToken()->getId()); + if (!in_array($token_version->getToken()->getState(), + array( + \Wallee\Sdk\Model\TokenVersionState::ACTIVE, + \Wallee\Sdk\Model\TokenVersionState::UNINITIALIZED + ))) { + if ($info->getId()) { + $info->delete(); + } + return; + } + + $info->setCustomerId($token_version->getToken()->getCustomerId()); + $info->setName($token_version->getName()); + + /* @var PostFinanceCheckout_Payment_Model_Entity_PaymentMethodConfiguration $paymentMethod */ + + $payment_method = \PostFinanceCheckout\Entity\MethodConfiguration::loadByConfiguration($this->registry, $space_id, + $token_version->getPaymentConnectorConfiguration()->getPaymentMethodConfiguration()->getId()); + $info->setPaymentMethodId($payment_method->getId()); + $info->setConnectorId($token_version->getPaymentConnectorConfiguration()->getConnector()); + + $info->setSpaceId($space_id); + $info->setState($token_version->getToken()->getState()); + $info->setTokenId($token_version->getToken()->getId()); + $info->save(); + } + + public function deleteToken($space_id, $token_id){ + $this->getTokenService()->delete($space_id, $token_id); + } + + /** + * Returns the token API service. + * + * @return \Wallee\Sdk\Service\TokenService + */ + protected function getTokenService(){ + if ($this->token_service == null) { + $this->token_service = new \Wallee\Sdk\Service\TokenService(\PostFinanceCheckoutHelper::instance($this->registry)->getApiClient()); + } + + return $this->token_service; + } + + /** + * Returns the token version API service. + * + * @return \Wallee\Sdk\Service\TokenVersionService + */ + protected function getTokenVersionService(){ + if ($this->token_version_service == null) { + $this->token_version_service = new \Wallee\Sdk\Service\TokenVersionService(\PostFinanceCheckoutHelper::instance($this->registry)->getApiClient()); + } + + return $this->token_version_service; + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/service/transaction.php b/upload/system/library/postfinancecheckout/service/transaction.php new file mode 100644 index 0000000..cfccf1b --- /dev/null +++ b/upload/system/library/postfinancecheckout/service/transaction.php @@ -0,0 +1,470 @@ +registry); + if (!$cart_id || !isset(self::$possible_payment_method_cache[$cart_id])) { + $transaction = $this->update($order_info, false); + $payment_methods = $this->getTransactionService()->fetchPossiblePaymentMethods($transaction->getLinkedSpaceId(), $transaction->getId()); + + foreach ($payment_methods as $payment_method) { + MethodConfiguration::instance($this->registry)->updateData($payment_method); + } + + self::$possible_payment_method_cache[$cart_id] = $payment_methods; + } + return self::$possible_payment_method_cache[$cart_id]; + } + + public function getJavascriptUrl(){ + $transaction = $this->getTransaction(array(), false, array( + \Wallee\Sdk\Model\TransactionState::PENDING + )); + return $this->getTransactionService()->buildJavaScriptUrl($transaction->getLinkedSpaceId(), $transaction->getId()); + } + + public function update(array $order_info, $confirm = false){ + $last = null; + try { + for ($i = 0; $i < 5; $i++) { + $transaction = $this->getTransaction($order_info, false); + if ($transaction->getState() !== \Wallee\Sdk\Model\TransactionState::PENDING) { + if ($confirm) { + throw new \Exception('No pending transaction available to be confirmed.'); + } + return $this->create($order_info); + } + + $pending_transaction = new \Wallee\Sdk\Model\TransactionPending(); + $pending_transaction->setId($transaction->getId()); + $pending_transaction->setVersion($transaction->getVersion()); + $this->assembleTransaction($pending_transaction, $order_info); + + if ($confirm) { + $transaction = $this->getTransactionService()->confirm($transaction->getLinkedSpaceId(), $pending_transaction); + $this->clearTransactionInSession(); + } + else { + $transaction = $this->getTransactionService()->update($transaction->getLinkedSpaceId(), $pending_transaction); + } + + $this->persist($transaction, $order_info); + + return $transaction; + } + } + catch (\Wallee\Sdk\ApiException $e) { + $last = $e; + if ($e->getCode() != 409) { + throw $e; + } + } + + throw $last; + } + + /** + * Reads or creates a new transaction. + * + * @param array $order_info + * @return \Wallee\Sdk\Model\Transaction + */ + public function getTransaction($order_info = array(), $cache = true, $allowed_states = array()){ + $cart_id = \PostFinanceCheckoutVersionHelper::getCurrentCartId($this->registry); + + // guest has $cart_id = 0 + if ($cart_id && isset(self::$transaction_cache[$cart_id]) && $cache) { + return self::$transaction_cache[$cart_id]; + } + + $create = true; + + // attempt to load via session variables + if ($this->hasTransactionInSession()) { + self::$transaction_cache[$cart_id] = $this->getTransactionService()->read($this->getSessionSpaceId(), $this->getSessionTransactionId()); + // check if the status is expected + $create = empty($allowed_states) ? false : !in_array(self::$transaction_cache[$cart_id]->getState(), $allowed_states); + } + + // attempt to load via order id (existing transaction_info + if (isset($order_info['order_id']) && $create) { + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $order_info['order_id']); + if ($transaction_info->getId() && $transaction_info->getState() === 'PENDING') { + self::$transaction_cache[$cart_id] = $this->getTransactionService()->read($transaction_info->getSpaceId(), + $transaction_info->getTransactionId()); + $create = empty($allowed_states) ? false : !in_array(self::$transaction_cache[$cart_id]->getState(), $allowed_states); + } + if ($create) { + unset($order_info['order_id']); + } + } + + // no applicable transaction found, create new one. + if ($create) { + self::$transaction_cache[$cart_id] = $this->create($order_info); + } + + return self::$transaction_cache[$cart_id]; + } + + private function persist($transaction, array $order_info){ + if (isset($order_info['order_id'])) { + $this->updateTransactionInfo($transaction, $order_info['order_id']); + } + $this->storeTransactionIdsInSession($transaction); + $this->storeCoupon($transaction); + $this->storeShipping($transaction); + } + + private function create(array $order_info){ + $create_transaction = new \Wallee\Sdk\Model\TransactionCreate(); + + $create_transaction->setCustomersPresence(\Wallee\Sdk\Model\CustomersPresence::VIRTUAL_PRESENT); + if (isset($this->registry->get('request')->cookie['postfinancecheckout_device_id'])) { + $create_transaction->setDeviceSessionIdentifier($this->registry->get('request')->cookie['postfinancecheckout_device_id']); + } + + $create_transaction->setAutoConfirmationEnabled(false); + $this->assembleTransaction($create_transaction, $order_info); + $transaction = $this->getTransactionService()->create($this->registry->get('config')->get('postfinancecheckout_space_id'), $create_transaction); + + $this->persist($transaction, $order_info); + + return $transaction; + } + + private function assembleTransaction(\Wallee\Sdk\Model\AbstractTransactionPending $transaction, array $order_info){ + $order_id = isset($order_info['order_id']) ? $order_info['order_id'] : null; + $data = $this->registry->get('session')->data; + + if (isset($data['currency'])) { + $transaction->setCurrency($data['currency']); + } + else { + throw new \Exception('Session currency not set.'); + } + + $transaction->setBillingAddress($this->assembleAddress(\PostFinanceCheckoutHelper::instance($this->registry)->getAddress('payment', $order_info))); + $transaction->setShippingAddress($this->assembleAddress(\PostFinanceCheckoutHelper::instance($this->registry)->getAddress('shipping', $order_info))); + + $customer = \PostFinanceCheckoutHelper::instance($this->registry)->getCustomer(); + if (isset($customer['customer_id'])) { + $transaction->setCustomerId($customer['customer_id']); + } + if (isset($customer['customer_email'])) { + $transaction->setCustomerEmailAddress($this->getFixedSource($customer, 'customer_email', 150)); + } + + $transaction->setLanguage(\PostFinanceCheckoutHelper::instance($this->registry)->getCleanLanguageCode()); + if (isset($data['shipping_method'])) { + $transaction->setShippingMethod($this->fixLength($data['shipping_method']['title'], 200)); + } + + $transaction->setLineItems(LineItem::instance($this->registry)->getItemsFromSession()); + $transaction->setSuccessUrl(\PostFinanceCheckoutHelper::instance($this->registry)->getSuccessUrl()); + + if ($order_id) { + $transaction->setMerchantReference($order_id); + $transaction->setFailedUrl(\PostFinanceCheckoutHelper::instance($this->registry)->getFailedUrl($order_id)); + } + } + + /** + * Cache for cart transactions. + * + * @var \Wallee\Sdk\Model\Transaction[] + */ + private static $transaction_cache = array(); + + /** + * Cache for possible payment methods by cart. + * + * @var \Wallee\Sdk\Model\PaymentMethodConfiguration[] + */ + private static $possible_payment_method_cache = array(); + + /** + * The transaction API service. + * + * @var \Wallee\Sdk\Service\TransactionService + */ + private $transaction_service; + + /** + * The charge attempt API service. + * + * @var \Wallee\Sdk\Service\ChargeAttemptService + */ + private $charge_attempt_service; + + /** + * Returns the transaction API service. + * + * @return \Wallee\Sdk\Service\TransactionService + */ + private function getTransactionService(){ + if ($this->transaction_service === null) { + $this->transaction_service = new TransactionService(\PostFinanceCheckoutHelper::instance($this->registry)->getApiClient()); + } + return $this->transaction_service; + } + + /** + * Returns the charge attempt API service. + * + * @return \Wallee\Sdk\Service\ChargeAttemptService + */ + private function getChargeAttemptService(){ + if ($this->charge_attempt_service === null) { + $this->charge_attempt_service = new ChargeAttemptService(\PostFinanceCheckoutHelper::instance($this->registry)->getApiClient()); + } + return $this->charge_attempt_service; + } + + /** + * Updates the line items to be in line with the current order. + * + * @param string $order_id + * @return \Wallee\Sdk\Model\TransactionLineItemVersion + */ + public function updateLineItemsFromOrder($order_id){ + $order_info = \PostFinanceCheckoutHelper::instance($this->registry)->getOrder($order_id); + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $order_id); + + $line_items = \PostFinanceCheckout\Service\LineItem::instance($this->registry)->getItemsFromOrder($order_info, $transaction_info->getTransactionId(), + $transaction_info->getSpaceId()); + + $update_request = new \Wallee\Sdk\Model\TransactionLineItemUpdateRequest(); + $update_request->setTransactionId($transaction_info->getTransactionId()); + $update_request->setNewLineItems($line_items); + return $this->getTransactionService()->updateTransactionLineItems($transaction_info->getSpaceId(), $update_request); + } + + /** + * Stores the transaction data in the database. + * + * @param \Wallee\Sdk\Model\Transaction $transaction + * @param array $order_info + * @return \PostFinanceCheckout\Entity\TransactionInfo + */ + public function updateTransactionInfo(\Wallee\Sdk\Model\Transaction $transaction, $order_id){ + $info = \PostFinanceCheckout\Entity\TransactionInfo::loadByTransaction($this->registry, $transaction->getLinkedSpaceId(), $transaction->getId()); + $info->setTransactionId($transaction->getId()); + $info->setAuthorizationAmount($transaction->getAuthorizationAmount()); + $info->setOrderId($order_id); + $info->setState($transaction->getState()); + $info->setSpaceId($transaction->getLinkedSpaceId()); + $info->setSpaceViewId($transaction->getSpaceViewId()); + $info->setLanguage($transaction->getLanguage()); + $info->setCurrency($transaction->getCurrency()); + $info->setConnectorId( + $transaction->getPaymentConnectorConfiguration() != null ? $transaction->getPaymentConnectorConfiguration()->getConnector() : null); + $info->setPaymentMethodId( + $transaction->getPaymentConnectorConfiguration() != null && $transaction->getPaymentConnectorConfiguration()->getPaymentMethodConfiguration() != + null ? $transaction->getPaymentConnectorConfiguration()->getPaymentMethodConfiguration()->getPaymentMethod() : null); + $info->setImage($this->getPaymentMethodImage($transaction)); + $info->setLabels($this->getTransactionLabels($transaction)); + if ($transaction->getState() == \Wallee\Sdk\Model\TransactionState::FAILED || + $transaction->getState() == \Wallee\Sdk\Model\TransactionState::DECLINE) { + $failed_charge_attempt = $this->getFailedChargeAttempt($transaction->getLinkedSpaceId(), $transaction->getId()); + if ($failed_charge_attempt != null && $failed_charge_attempt->getFailureReason() != null) { + $info->setFailureReason($failed_charge_attempt->getFailureReason()->getDescription()); + } + } + $info->save(); + return $info; + } + + /** + * Returns the last failed charge attempt of the transaction. + * + * @param int $space_id + * @param int $transaction_id + * @return \Wallee\Sdk\Model\ChargeAttempt + */ + private function getFailedChargeAttempt($space_id, $transaction_id){ + $charge_attempt_service = $this->getChargeAttemptService(); + $query = new \Wallee\Sdk\Model\EntityQuery(); + $filter = new \Wallee\Sdk\Model\EntityQueryFilter(); + $filter->setType(\Wallee\Sdk\Model\EntityQueryFilterType::_AND); + $filter->setChildren( + array( + $this->createEntityFilter('charge.transaction.id', $transaction_id), + $this->createEntityFilter('state', \Wallee\Sdk\Model\ChargeAttemptState::FAILED) + )); + $query->setFilter($filter); + $query->setOrderBys(array( + $this->createEntityOrderBy('failedOn') + )); + $query->setNumberOfEntities(1); + $result = $charge_attempt_service->search($space_id, $query); + if ($result != null && !empty($result)) { + return current($result); + } + else { + return null; + } + } + + /** + * Returns an array of the transaction's labels. + * + * @param \Wallee\Sdk\Model\Transaction $transaction + * @return string[] + */ + private function getTransactionLabels(\Wallee\Sdk\Model\Transaction $transaction){ + $charge_attempt = $this->getChargeAttempt($transaction); + if ($charge_attempt != null) { + $labels = array(); + foreach ($charge_attempt->getLabels() as $label) { + $labels[$label->getDescriptor()->getId()] = $label->getContentAsString(); + } + return $labels; + } + else { + return array(); + } + } + + /** + * Returns the successful charge attempt of the transaction. + * + * @param \Wallee\Sdk\Model\Transaction $transaction + * @return \Wallee\Sdk\Model\ChargeAttempt + */ + private function getChargeAttempt(\Wallee\Sdk\Model\Transaction $transaction){ + $charge_attempt_service = $this->getChargeAttemptService(); + $query = new \Wallee\Sdk\Model\EntityQuery(); + $filter = new \Wallee\Sdk\Model\EntityQueryFilter(); + $filter->setType(\Wallee\Sdk\Model\EntityQueryFilterType::_AND); + $filter->setChildren( + array( + $this->createEntityFilter('charge.transaction.id', $transaction->getId()), + $this->createEntityFilter('state', \Wallee\Sdk\Model\ChargeAttemptState::SUCCESSFUL) + )); + $query->setFilter($filter); + $query->setNumberOfEntities(1); + $result = $charge_attempt_service->search($transaction->getLinkedSpaceId(), $query); + if ($result != null && !empty($result)) { + return current($result); + } + else { + return null; + } + } + + /** + * Returns the payment method's image. + * + * @param \Wallee\Sdk\Model\Transaction $transaction + * @return string + */ + private function getPaymentMethodImage(\Wallee\Sdk\Model\Transaction $transaction){ + if ($transaction->getPaymentConnectorConfiguration() == null || + $transaction->getPaymentConnectorConfiguration()->getPaymentMethodConfiguration() == null) { + return null; + } + return $transaction->getPaymentConnectorConfiguration()->getPaymentMethodConfiguration()->getResolvedImageUrl(); + } + + private function assembleAddress($source, $prefix = ''){ + $address = new \Wallee\Sdk\Model\AddressCreate(); + + $address->setCity($this->getFixedSource($source, $prefix . 'city', 100)); + $address->setCountry($source[$prefix . 'iso_code_2']); + $address->setFamilyName($this->getFixedSource($source, $prefix . 'lastname', 100)); + $address->setGivenName($this->getFixedSource($source, $prefix . 'firstname', 100)); + $address->setOrganizationName($this->getFixedSource($source, $prefix . 'company', 100)); + $address->setPostCode($this->getFixedSource($source, $prefix . 'postcode', 40)); + $address->setStreet($this->fixLength(trim($source[$prefix . 'address_1'] . "\n" . $source[$prefix . 'address_2']), 300)); + + // state is 2-part + if (isset($source[$prefix . 'zone_code']) && isset($source[$prefix . 'iso_code_2'])) { + $address->setPostalState($source[$prefix . 'iso_code_2'] . '_' . $source[$prefix . 'zone_code']); + } + + return $address; + } + + private function getFixedSource(array $source_array, $key, $max_length = null, $is_ascii = true, $new_lines = false){ + $value = null; + if (isset($source_array[$key])) { + $value = $source_array[$key]; + if ($max_length) { + $value = $this->fixLength($value, $max_length); + } + if ($is_ascii) { + $value = $this->removeNonAscii($value); + } + if (!$new_lines) { + $value = str_replace("\n", "", $value); + } + } + return $value; + } + + private function hasTransactionInSession(){ + $data = $this->registry->get('session')->data; + return isset($data['postfinancecheckout_transaction_id']) && isset($data['postfinancecheckout_space_id']) && $data['postfinancecheckout_space_id'] == $this->registry->get('config')->get('postfinancecheckout_space_id') && array_key_exists('postfinancecheckout_customer', $data) && + $data['postfinancecheckout_customer'] === \PostFinanceCheckoutHelper::instance($this->registry)->getCustomerSessionIdentifier() && $data['postfinancecheckout_customer']; + } + + private function clearTransactionInSession(){ + if ($this->hasTransactionInSession()) { + unset($this->registry->get('session')->data['postfinancecheckout_transaction_id']); + unset($this->registry->get('session')->data['postfinancecheckout_customer']); + unset($this->registry->get('session')->data['postfinancecheckout_space_id']); + } + } + + private function getSessionTransactionId(){ + return $this->registry->get('session')->data['postfinancecheckout_transaction_id']; + } + + private function getSessionSpaceId(){ + return $this->registry->get('session')->data['postfinancecheckout_space_id']; + } + + private function storeTransactionIdsInSession(\Wallee\Sdk\Model\Transaction $transaction){ + $this->registry->get('session')->data['postfinancecheckout_customer'] = \PostFinanceCheckoutHelper::instance($this->registry)->getCustomerSessionIdentifier(); + $this->registry->get('session')->data['postfinancecheckout_transaction_id'] = $transaction->getId(); + $this->registry->get('session')->data['postfinancecheckout_space_id'] = $transaction->getLinkedSpaceId(); + } + + private function storeShipping(\Wallee\Sdk\Model\Transaction $transaction){ + if (isset($this->registry->get('session')->data['shipping_method'])) { + $shipping_info = \PostFinanceCheckout\Entity\ShippingInfo::loadByTransaction($this->registry, $transaction->getLinkedSpaceId(), $transaction->getId()); + $shipping_info->setTransactionId($transaction->getId()); + $shipping_info->setSpaceId($transaction->getLinkedSpaceId()); + $shipping_info->setCost($this->registry->get('session')->data['shipping_method']['cost']); + $shipping_info->setTaxClassId($this->registry->get('session')->data['shipping_method']['tax_class_id']); + $shipping_info->save(); + } + } + + private function storeCoupon(\Wallee\Sdk\Model\Transaction $transaction){ + if (isset($this->registry->get('session')->data['coupon']) && isset($this->registry->get('session')->data['order_id'])) { + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByTransaction($this->registry, $this->registry->get('session')->data['order_id']); + $transaction_info->setTransactionId($transaction->getId()); + $transaction_info->setSpaceId($transaction->getLinkedSpaceId()); + $transaction_info->setOrderId($this->registry->get('session')->data['order_id']); + $transaction_info->setCouponCode($this->registry->get('session')->data['coupon']); + $transaction_info->setState(\Wallee\Sdk\Model\TransactionState::CREATE); + $transaction_info->save(); + } + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/service/void_job.php b/upload/system/library/postfinancecheckout/service/void_job.php new file mode 100644 index 0000000..9a8daa9 --- /dev/null +++ b/upload/system/library/postfinancecheckout/service/void_job.php @@ -0,0 +1,63 @@ +registry)->dbTransactionStart(); + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionLock($transaction_info->getSpaceId(), $transaction_info->getTransactionId()); + + $job = \PostFinanceCheckout\Entity\VoidJob::loadNotSentForOrder($this->registry, $transaction_info->getOrderId()); + if (!$job->getId()) { + $job = $this->createBase($transaction_info, $job); + $job->save(); + } + + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionCommit(); + return $job; + } + catch (\Exception $e) { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionRollback(); + throw $e; + } + } + + public function send(\PostFinanceCheckout\Entity\VoidJob $job){ + try { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionStart(); + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionLock($job->getSpaceId(), $job->getTransactionId()); + + $service = new \Wallee\Sdk\Service\TransactionVoidService(\PostFinanceCheckoutHelper::instance($this->registry)->getApiClient()); + $operation = $service->voidOnline($job->getSpaceId(), $job->getTransactionId()); + + if ($operation->getFailureReason() != null) { + $job->setFailureReason($operation->getFailureReason()->getDescription()); + } + + $labels = array(); + foreach ($operation->getLabels() as $label) { + $labels[$label->getDescriptor()->getId()] = $label->getContentAsString(); + } + $job->setLabels($labels); + + $job->setJobId($operation->getId()); + $job->setState(\PostFinanceCheckout\Entity\AbstractJob::STATE_SENT); + $job->save(); + + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionCommit(); + return $job; + } + catch (\Wallee\Sdk\ApiException $api_exception) { + } + catch (\Exception $e) { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionRollback(); + throw $e; + } + return $this->handleApiException($hob, $api_exception); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/service/webhook.php b/upload/system/library/postfinancecheckout/service/webhook.php new file mode 100644 index 0000000..970a691 --- /dev/null +++ b/upload/system/library/postfinancecheckout/service/webhook.php @@ -0,0 +1,255 @@ +webhook_entities[1487165678181] = new Entity(1487165678181, 'Manual Task', + array( + \Wallee\Sdk\Model\ManualTaskState::DONE, + \Wallee\Sdk\Model\ManualTaskState::EXPIRED, + \Wallee\Sdk\Model\ManualTaskState::OPEN + ), 'PostFinanceCheckout\Webhook\ManualTask'); + $this->webhook_entities[1472041857405] = new Entity(1472041857405, 'Payment Method Configuration', + array( + \Wallee\Sdk\Model\CreationEntityState::ACTIVE, + \Wallee\Sdk\Model\CreationEntityState::DELETED, + \Wallee\Sdk\Model\CreationEntityState::DELETING, + \Wallee\Sdk\Model\CreationEntityState::INACTIVE + ), 'PostFinanceCheckout\Webhook\MethodConfiguration', true); + $this->webhook_entities[1472041829003] = new Entity(1472041829003, 'Transaction', + array( + \Wallee\Sdk\Model\TransactionState::CONFIRMED, + \Wallee\Sdk\Model\TransactionState::AUTHORIZED, + \Wallee\Sdk\Model\TransactionState::DECLINE, + \Wallee\Sdk\Model\TransactionState::FAILED, + \Wallee\Sdk\Model\TransactionState::FULFILL, + \Wallee\Sdk\Model\TransactionState::VOIDED, + \Wallee\Sdk\Model\TransactionState::COMPLETED, + \Wallee\Sdk\Model\TransactionState::PROCESSING + ), 'PostFinanceCheckout\Webhook\Transaction'); + $this->webhook_entities[1472041819799] = new Entity(1472041819799, 'Delivery Indication', + array( + \Wallee\Sdk\Model\DeliveryIndicationState::MANUAL_CHECK_REQUIRED + ), 'PostFinanceCheckout\Webhook\DeliveryIndication'); + + $this->webhook_entities[1472041831364] = new Entity(1472041831364, 'Transaction Completion', + array( + \Wallee\Sdk\Model\TransactionCompletionState::FAILED, + \Wallee\Sdk\Model\TransactionCompletionState::SUCCESSFUL + ), 'PostFinanceCheckout\Webhook\TransactionCompletion'); + + $this->webhook_entities[1472041867364] = new Entity(1472041867364, 'Transaction Void', + array( + \Wallee\Sdk\Model\TransactionVoidState::FAILED, + \Wallee\Sdk\Model\TransactionVoidState::SUCCESSFUL + ), 'PostFinanceCheckout\Webhook\TransactionVoid'); + + $this->webhook_entities[1472041839405] = new Entity(1472041839405, 'Refund', + array( + \Wallee\Sdk\Model\RefundState::FAILED, + \Wallee\Sdk\Model\RefundState::SUCCESSFUL + ), 'PostFinanceCheckout\Webhook\TransactionRefund'); + $this->webhook_entities[1472041806455] = new Entity(1472041806455, 'Token', + array( + \Wallee\Sdk\Model\CreationEntityState::ACTIVE, + \Wallee\Sdk\Model\CreationEntityState::DELETED, + \Wallee\Sdk\Model\CreationEntityState::DELETING, + \Wallee\Sdk\Model\CreationEntityState::INACTIVE + ), 'PostFinanceCheckout\Webhook\Token'); + $this->webhook_entities[1472041811051] = new Entity(1472041811051, 'Token Version', + array( + \Wallee\Sdk\Model\TokenVersionState::ACTIVE, + \Wallee\Sdk\Model\TokenVersionState::OBSOLETE + ), 'PostFinanceCheckout\Webhook\TokenVersion'); + } + + /** + * Installs the necessary webhooks in PostFinanceCheckout. + */ + public function install($space_id, $url){ + if ($space_id !== null && !empty($url)) { + $webhook_url = $this->getWebhookUrl($space_id, $url); + if ($webhook_url == null) { + $webhook_url = $this->createWebhookUrl($space_id, $url); + } + $existing_listeners = $this->getWebhookListeners($space_id, $webhook_url); + foreach ($this->webhook_entities as $webhook_entity) { + /* @var WC_PostFinanceCheckout_Webhook_Entity $webhook_entity */ + $exists = false; + foreach ($existing_listeners as $existing_listener) { + if ($existing_listener->getEntity() == $webhook_entity->getId()) { + $exists = true; + } + } + if (!$exists) { + $this->createWebhookListener($webhook_entity, $space_id, $webhook_url); + } + } + } + } + + public function uninstall($space_id, $url) { + if($space_id !== null && !empty($url)) { + $webhook_url = $this->getWebhookUrl($space_id, $url); + if($webhook_url == null) { + \PostFinanceCheckoutHelper::instance($this->registry)->log("Attempted to uninstall webhooks with URL $url, but was not found"); + return; + } + foreach($this->getWebhookListeners($space_id, $webhook_url) as $listener) { + $this->getWebhookListenerService()->delete($space_id, $listener->getId()); + } + + $this->getWebhookUrlService()->delete($space_id, $webhook_url->getId()); + } + } + + /** + * + * @param int|string $id + * @return Entity + */ + public function getWebhookEntityForId($id){ + if (isset($this->webhook_entities[$id])) { + return $this->webhook_entities[$id]; + } + return null; + } + + /** + * Create a webhook listener. + * + * @param Entity $entity + * @param int $space_id + * @param \Wallee\Sdk\Model\WebhookUrl $webhook_url + * @return \Wallee\Sdk\Model\WebhookListenerCreate + */ + protected function createWebhookListener(Entity $entity, $space_id, \Wallee\Sdk\Model\WebhookUrl $webhook_url){ + $webhook_listener = new \Wallee\Sdk\Model\WebhookListenerCreate(); + $webhook_listener->setEntity($entity->getId()); + $webhook_listener->setEntityStates($entity->getStates()); + $webhook_listener->setName('Opencart ' . $entity->getName()); + $webhook_listener->setState(\Wallee\Sdk\Model\CreationEntityState::ACTIVE); + $webhook_listener->setUrl($webhook_url->getId()); + $webhook_listener->setNotifyEveryChange($entity->isNotifyEveryChange()); + return $this->getWebhookListenerService()->create($space_id, $webhook_listener); + } + + /** + * Returns the existing webhook listeners. + * + * @param int $space_id + * @param \Wallee\Sdk\Model\WebhookUrl $webhook_url + * @return \Wallee\Sdk\Model\WebhookListener[] + */ + protected function getWebhookListeners($space_id, \Wallee\Sdk\Model\WebhookUrl $webhook_url){ + $query = new \Wallee\Sdk\Model\EntityQuery(); + $filter = new \Wallee\Sdk\Model\EntityQueryFilter(); + $filter->setType(\Wallee\Sdk\Model\EntityQueryFilterType::_AND); + $filter->setChildren( + array( + $this->createEntityFilter('state', \Wallee\Sdk\Model\CreationEntityState::ACTIVE), + $this->createEntityFilter('url.id', $webhook_url->getId()) + )); + $query->setFilter($filter); + return $this->getWebhookListenerService()->search($space_id, $query); + } + + /** + * Creates a webhook url. + * + * @param int $space_id + * @return \Wallee\Sdk\Model\WebhookUrlCreate + */ + protected function createWebhookUrl($space_id){ + $webhook_url = new \Wallee\Sdk\Model\WebhookUrlCreate(); + $webhook_url->setUrl($this->getUrl()); + $webhook_url->setState(\Wallee\Sdk\Model\CreationEntityState::ACTIVE); + $webhook_url->setName('Opencart'); + return $this->getWebhookUrlService()->create($space_id, $webhook_url); + } + + /** + * Returns the existing webhook url if there is one. + * + * @param int $space_id + * @return \Wallee\Sdk\Model\WebhookUrl + */ + protected function getWebhookUrl($space_id, $url){ + $query = new \Wallee\Sdk\Model\EntityQuery(); + $query->setNumberOfEntities(1); + $filter = new \Wallee\Sdk\Model\EntityQueryFilter(); + $filter->setType(\Wallee\Sdk\Model\EntityQueryFilterType::_AND); + $filter->setChildren( + array( + $this->createEntityFilter('state', \Wallee\Sdk\Model\CreationEntityState::ACTIVE), + $this->createEntityFilter('url', $url) + )); + $query->setFilter($filter); + $result = $this->getWebhookUrlService()->search($space_id, $query); + if (!empty($result)) { + return $result[0]; + } + else { + return null; + } + } + + /** + * Returns the webhook endpoint URL. + * + * @return string + */ + protected function getUrl(){ + return \PostFinanceCheckoutHelper::instance($this->registry)->getWebhookUrl(); + } + + /** + * Returns the webhook listener API service. + * + * @return \Wallee\Sdk\Service\WebhookListenerService + */ + protected function getWebhookListenerService(){ + if ($this->webhook_listener_service == null) { + $this->webhook_listener_service = new \Wallee\Sdk\Service\WebhookListenerService(\PostFinanceCheckoutHelper::instance($this->registry)->getApiClient()); + } + return $this->webhook_listener_service; + } + + /** + * Returns the webhook url API service. + * + * @return \Wallee\Sdk\Service\WebhookUrlService + */ + protected function getWebhookUrlService(){ + if ($this->webhook_url_service == null) { + $this->webhook_url_service = new \Wallee\Sdk\Service\WebhookUrlService(\PostFinanceCheckoutHelper::instance($this->registry)->getApiClient()); + } + return $this->webhook_url_service; + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/version_helper.php b/upload/system/library/postfinancecheckout/version_helper.php new file mode 100644 index 0000000..658fd83 --- /dev/null +++ b/upload/system/library/postfinancecheckout/version_helper.php @@ -0,0 +1,149 @@ + array( + 'file' => 'PostFinanceCheckoutCore.ocmod.xml', + 'default_status' => 1 + ), + 'PostFinanceCheckoutAlerts' => array( + 'file' => 'PostFinanceCheckoutAlerts.ocmod.xml', + 'default_status' => 1 + ), + 'PostFinanceCheckoutAdministration' => array( + 'file' => 'PostFinanceCheckoutAdministration.ocmod.xml', + 'default_status' => 1 + ), + 'PostFinanceCheckoutQuickCheckoutCompatibility' => array( + 'file' => 'PostFinanceCheckoutQuickCheckoutCompatibility.ocmod.xml', + 'default_status' => 0 + ), + 'PostFinanceCheckoutPreventConfirmationEmail' => array( + 'file' => 'PostFinanceCheckoutPreventConfirmationEmail.ocmod.xml', + 'default_status' => 0 + ), + 'PostFinanceCheckoutFrontendPdf' => array( + 'file' => 'PostFinanceCheckoutFrontendPdf.ocmod.xml', + 'default_status' => 1 + ) + ); + } + + public static function wrapJobLabels(\Registry $registry, $content){ + return $content; + } + + public static function getPersistableSetting($value, $default){ + return $value; + } + + public static function getTemplate($template){ + return $template; + } + + public static function newTax(\Registry $registry){ + return new \Cart\Tax($registry); + } + + public static function getSessionTotals(\Registry $registry){ + // Totals + $registry->get('load')->model('extension/extension'); + + $totals = array(); + $taxes = $registry->get('cart')->getTaxes(); + $total = 0; + + // Because __call can not keep var references so we put them into an array. + $total_data = array( + 'totals' => &$totals, + 'taxes' => &$taxes, + 'total' => &$total + ); + + $sort_order = array(); + + $results = $registry->get('model_extension_extension')->getExtensions('total'); + + foreach ($results as $key => $value) { + $sort_order[$key] = $registry->get('config')->get($value['code'] . '_sort_order'); + } + + array_multisort($sort_order, SORT_ASC, $results); + + foreach ($results as $result) { + if ($registry->get('config')->get($result['code'] . '_status')) { + $registry->get('load')->model('extension/total/' . $result['code']); + + // We have to put the totals in an array so that they pass by reference. + $registry->get('model_extension_total_' . $result['code'])->getTotal($total_data); + } + + $sort_order = array(); + + foreach ($totals as $key => $value) { + $sort_order[$key] = $value['sort_order']; + } + + array_multisort($sort_order, SORT_ASC, $totals); + } + + return $total_data['totals']; + } + + public static function getCurrentCartId(\Registry $registry){ + if (isset($registry->get('session')->data['cart_id'])) { + return $registry->get('session')->data['cart_id']; + } + + $table = DB_PREFIX . 'cart'; + $api_id = (isset($registry->get('session')->data['api_id']) ? (int) $registry->get('session')->data['api_id'] : 0); + $customer_id = (int) $registry->get('customer')->getId(); + $session_id = $registry->get('session')->getId(); + $session_id = $registry->get('db')->escape($session_id); + $customer_id = $registry->get('db')->escape($customer_id); + $api_id = $registry->get('db')->escape($api_id); + + $query = "SELECT cart_id FROM $table WHERE api_id = '$api_id' AND customer_id = '$customer_id' AND session_id = '$session_id';"; + $result = $registry->get('db')->query($query); + if ($result->num_rows > 0) { + return $result->row['cart_id']; + } + return 0; + } + + public static function persistPluginStatus(\Registry $registry, array $post) { + } + + public static function extractPaymentSettingCode($code) { + return $code; + } + + public static function extractLanguageDirectory($language){ + return $language['code']; + } + + public static function createUrl(Url $url_provider, $route, $query, $ssl){ + if ($route === 'extension/payment') { + $route = 'extension/extension'; + // all calls with extension/payment createUrl use array + $query['type'] = 'payment'; + } + if (is_array($query)) { + $query = http_build_query($query); + } + else if (!is_string($query)) { + throw new Exception("Query must be of type string or array, " . get_class($query) . " given."); + } + return $url_provider->link($route, $query, $ssl); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/.travis.yml b/upload/system/library/postfinancecheckout/wallee-sdk/.travis.yml new file mode 100644 index 0000000..030ffa5 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/.travis.yml @@ -0,0 +1,9 @@ +language: php +sudo: false +php: + - 5.4 + - 5.6 + - 7.0 + - 7.1 +before_install: "composer install" +script: "phpunit --bootstrap autoload.php test/" \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/LICENSE b/upload/system/library/postfinancecheckout/wallee-sdk/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/README.md b/upload/system/library/postfinancecheckout/wallee-sdk/README.md new file mode 100644 index 0000000..1fe016f --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/README.md @@ -0,0 +1,75 @@ +[![Build Status](https://travis-ci.org/wallee-payment/php-sdk.svg?branch=master)](https://travis-ci.org/wallee-payment/php-sdk) + +# wallee SDK for PHP + +This repository contains the open source PHP SDK that allows you to access wallee from your PHP app. + +## Requirements + +* [PHP 5.6.0 and later](http://www.php.net/) + +## Documentation + +https://app-wallee.com/doc/api/web-service + +## Installation + +You can use **Composer** or **install manually** + +### Composer + +The preferred method is via [composer](https://getcomposer.org). Follow the +[installation instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have +composer installed. + +Once composer is installed, execute the following command in your project root to install this library: + +```sh +composer require wallee/sdk +``` + +### Manual Installation + +Alternatively you can download the package in its entirety. The [Releases](../../releases) page lists all stable versions. + +Uncompress the zip file you download, and include the autoloader in your project: + +```php +require_once '/path/to/php-sdk/autoload.php'; +``` + +## Usage + +### Basic Example + +```php +setType(\Wallee\Sdk\Model\EntityQueryFilterType::LEAF); +$filter->setOperator(\Wallee\Sdk\Model\CriteriaOperator::EQUALS); +$filter->setFieldName('state'); +$filter->setValue(\Wallee\Sdk\Model\CreationEntityState::ACTIVE); + +$query = new \Wallee\Sdk\Model\EntityQuery(); +$query->setFilter($filter); + +try { + $result = $service->search($query); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling SpaceService->search: ', $e->getMessage(), PHP_EOL; +} +``` + +## License + +Please see the [license file](LICENSE) for more information. \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/autoload.php b/upload/system/library/postfinancecheckout/wallee-sdk/autoload.php new file mode 100644 index 0000000..0784644 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/autoload.php @@ -0,0 +1,60 @@ +=5.4", + "ext-json": "*", + "ext-mbstring": "*" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "autoload": { + "psr-4": { "Wallee\\Sdk\\" : "lib/" } + }, + "autoload-dev": { + "psr-4": { "Wallee\\Sdk\\" : "test/" } + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/ApiClient.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/ApiClient.php new file mode 100644 index 0000000..e7374c1 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/ApiClient.php @@ -0,0 +1,537 @@ +certificateAuthority = dirname(__FILE__) . '/ca-bundle.crt'; + $this->serializer = new ObjectSerializer(); + $this->isDebuggingEnabled() ? $this->serializer->enableDebugging() : $this->serializer->disableDebugging(); + $this->serializer->setDebugFile($this->getDebugFile()); + + $this->userId = $userId; + $this->applicationKey = $applicationKey; + } + + /** + * Returns the base path of the API endpoint. + * + * @return string + */ + public function getBasePath() { + return $this->basePath; + } + + /** + * Sets the base path of the API endpoint. + * + * @param string $basePath the base path + * @return ApiClient + */ + public function setBasePath($basePath) { + $this->basePath = rtrim($basePath, '/'); + return $this; + } + + /** + * Returns the path to the certificate authority file. + * + * @return string + */ + public function getCertificateAuthority() { + return $this->certificateAuthority; + } + + /** + * Sets the path to the certificate authority file. The certificate authority is used to verify the identity of the + * remote server. By setting this option the default certificate authority file will be overridden. + * + * To deactivate the check please use disableCertificateAuthorityCheck() + * + * @param string $certificateAuthorityFile the path to the certificate authority file + * @return ApiClient + */ + public function setCertificateAuthority($certificateAuthorityFile) { + if (!file_exists($certificateAuthorityFile)) { + throw new \InvalidArgumentException('The certificate authority file does not exist.'); + } + + $this->certificateAuthority = $certificateAuthority; + return $this; + } + + /** + * Returns true, when the authority check is enabled. See enableCertificateAuthorityCheck() for more details about + * the authority check. + * + * @return boolean + */ + public function isCertificateAuthorityCheckEnabled() { + return $this->enableCertificateAuthorityCheck; + } + + /** + * Enables the check of the certificate authority. By checking the certificate authority the whole certificate + * chain is checked. the authority check prevents an attacker to use a man-in-the-middle attack. + * + * @return ApiClient + */ + public function enableCertificateAuthorityCheck() { + $this->enableCertificateAuthorityCheck = true; + return $this; + } + + /** + * Disables the check of the certificate authority. See enableCertificateAuthorityCheck() for more details. + * + * @return ApiClient + */ + public function disableCertificateAuthorityCheck() { + $this->enableCertificateAuthorityCheck = false; + return $this; + } + + /** + * Returns the connection timeout. + * + * @return int + */ + public function getConnectionTimeout() { + return $this->connectionTimeout; + } + + /** + * Sets the connection timeout in seconds. + * + * @param int $connectionTimeout the connection timeout in seconds + * @return ApiClient + */ + public function setConnectionTimeout($connectionTimeout) { + if (!is_numeric($connectionTimeout) || $connectionTimeout < 0) { + throw new \InvalidArgumentException('Timeout value must be numeric and a non-negative number.'); + } + + $this->connectionTimeout = $connectionTimeout; + return $this; + } + + /** + * Return the http client type to use for communication. + * + * @return string + * @see \Wallee\Sdk\Http\HttpClientFactory + */ + public function getHttpClientType() { + return $this->httpClientType; + } + + /** + * Set the http client type to use for communication. + * If this is null, all client are considered and the one working in the current environment is used. + * + * @param string $httpClientType the http client type + * @return ApiClient + * @see \Wallee\Sdk\Http\HttpClientFactory + */ + public function setHttpClientType($httpClientType) { + $this->httpClientType = $httpClientType; + return $this; + } + + /** + * Returns the user agent header's value. + * + * @return string + */ + public function getUserAgent() { + return $this->userAgent; + } + + /** + * Sets the user agent header's value. + * + * @param string $userAgent the HTTP request's user agent + * @return ApiClient + */ + public function setUserAgent($userAgent) { + if (!is_string($userAgent)) { + throw new \InvalidArgumentException('User-agent must be a string.'); + } + + $this->userAgent = $userAgent; + return $this; + } + + /** + * Adds a default header. + * + * @param string $key the header's key + * @param string $value the header's value + * @return ApiClient + */ + public function addDefaultHeader($key, $value) { + if (!is_string($key)) { + throw new \InvalidArgumentException('The header key must be a string.'); + } + + $defaultHeaders[$key] = $value; + return $this; + } + + /** + * Returns true, when debugging is enabled. + * + * @return boolean + */ + public function isDebuggingEnabled() { + return $this->enableDebugging; + } + + /** + * Enables debugging. + * + * @return ApiClient + */ + public function enableDebugging() { + $this->enableDebugging = true; + $this->serializer->enableDebugging(); + return $this; + } + + /** + * Disables debugging. + * + * @return ApiClient + */ + public function disableDebugging() { + $this->enableDebugging = false; + $this->serializer->disableDebugging(); + return $this; + } + + /** + * Returns the path to the debug file. + * + * @return string + */ + public function getDebugFile() { + return $this->debugFile; + } + + /** + * Sets the path to the debug file. + * + * @param string $debugFile the debug file + * @return ApiClient + */ + public function setDebugFile($debugFile) { + $this->debugFile = $debugFile; + $this->serializer->setDebugFile($debugFile); + return $this; + } + + /** + * Returns the serializer. + * + * @return ObjectSerializer + */ + public function getSerializer() { + return $this->serializer; + } + + /** + * Return the path of the temporary folder used to store downloaded files from endpoints with file response. By + * default the system's default temporary folder is used. + * + * @return string + */ + public function getTempFolderPath() { + return $this->serializer->getTempFolderPath(); + } + + /** + * Sets the path to the temporary folder (for downloading files). + * + * @param string $tempFolderPath the temporary folder path + * @return ApiClient + */ + public function setTempFolderPath($tempFolderPath) { + $this->serializer->setTempFolderPath($tempFolderPath); + return $this; + } + + /** + * Returns the 'Accept' header based on an array of accept values. + * + * @param string[] $accept the array of headers + * @return string + */ + public function selectHeaderAccept($accept) { + if (count($accept) === 0 or (count($accept) === 1 and $accept[0] === '')) { + return null; + } elseif (preg_grep("/application\/json/i", $accept)) { + return 'application/json'; + } else { + return implode(',', $accept); + } + } + + /** + * Returns the 'Content Type' based on an array of content types. + * + * @param string[] $contentType the array of content types + * @return string + */ + public function selectHeaderContentType($content_type) { + if (count($content_type) === 0 or (count($content_type) === 1 and $content_type[0] === '')) { + return 'application/json'; + } elseif (preg_grep("/application\/json/i", $content_type)) { + return 'application/json'; + } else { + return implode(',', $content_type); + } + } + + /** + * Make the HTTP call (synchronously). + * + * @param string $resourcePath the path to the endpoint resource + * @param string $method the method to call + * @param array $queryParams the query parameters + * @param array $postData the body parameters + * @param array $headerParams the header parameters + * @param string $responseType the expected response type + * @param string $endpointPath the path to the method endpoint before expanding parameters + * @throws ApiException on a non 2xx response + * @throws VersioningException on a versioning/locking problem + * @return mixed + */ + public function callApi($resourcePath, $method, $queryParams, $postData, $headerParams, $responseType = null, $endpointPath = null) { + $request = new HttpRequest($this->getSerializer(), $this->buildRequestUrl($resourcePath, $queryParams), $method, $this->generateUniqueToken()); + $request->setUserAgent($this->getUserAgent()); + $request->addHeaders(array_merge( + (array)$this->defaultHeaders, + (array)$headerParams, + (array)$this->getAuthenticationHeaders($request) + )); + $request->setBody($postData); + + $response = HttpClientFactory::getClient($this->httpClientType)->send($this, $request); + + if ($response->getStatusCode() >= 200 && $response->getStatusCode() <= 299) { + // return raw body if response is a file + if ($responseType === '\SplFileObject' || $responseType === 'string') { + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $response->getBody()); + } + + $data = json_decode($response->getBody()); + if (json_last_error() > 0) { // if response is a string + $data = $response->getBody(); + } + } else { + if ($response->getStatusCode() == 409) { + throw new VersioningException(); + } + + $data = json_decode($response->getBody()); + if (json_last_error() > 0) { // if response is a string + $data = $response->getBody(); + } + + throw new ApiException( + $request->getLogToken(), + 'Error ' . $response->getStatusCode() . ' connecting to the API (' . $request->getUrl() . ')', + $response->getStatusCode(), + $response->getHeaders(), + $data + ); + } + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $data); + } + + /** + * Returns the request url. + * + * @param string $path the request path + * @param array $queryParams an array of query parameters + * @return string + */ + private function buildRequestUrl($path, $queryParams) { + $url = $this->getBasePath() . $path; + if (!empty($queryParams)) { + $url = ($url . '?' . http_build_query($queryParams)); + } + return $url; + } + + /** + * Returns the headers used for authentication. + * + * @param HttpRequest $request + * @return array + */ + private function getAuthenticationHeaders(HttpRequest $request) { + $timestamp = time(); + $version = '1'; + $path = $request->getPath(); + $securedData = $version . '|' . $this->userId . '|' . $timestamp . '|' . $request->getMethod() . '|' . $path; + + $headers = array(); + $headers['x-mac-version'] = $version; + $headers['x-mac-userid'] = $this->userId; + $headers['x-mac-timestamp'] = $timestamp; + $headers['x-mac-value'] = $this->calculateHmac($securedData); + return $headers; + } + + /** + * Calculates the hmac of the given data. + * + * @param string $securedData the data to calculate the hmac for + * @return string + */ + private function calculateHmac($securedData) { + $decodedSecret = base64_decode($this->applicationKey); + return base64_encode(hash_hmac("sha512", $securedData, $decodedSecret, true)); + } + + /** + * Generates a unique token to assign to the request. + * + * @return string + */ + private function generateUniqueToken() { + $s = strtoupper(md5(uniqid(rand(),true))); + return substr($s,0,8) . '-' . + substr($s,8,4) . '-' . + substr($s,12,4). '-' . + substr($s,16,4). '-' . + substr($s,20); + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/ApiException.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/ApiException.php new file mode 100644 index 0000000..40af81d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/ApiException.php @@ -0,0 +1,117 @@ +responseHeaders = $responseHeaders; + $this->responseBody = $responseBody; + $this->responseObject = $responseObject; + $this->logToken = $logToken; + } + + /** + * Returns the HTTP response header. + * + * @return string + */ + public function getResponseHeaders() { + return $this->responseHeaders; + } + + /** + * Returns the HTTP body of the server response either as Json or string. + * + * @return string + */ + public function getResponseBody() { + return $this->responseBody; + } + + /** + * Returns the deseralized response object. + * + * @return mixed + */ + public function getResponseObject() { + return $this->responseObject; + } + + /** + * Return the log token. + * + * @return string + */ + public function getLogToken() { + return $this->logToken; + } + +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/ApiResponse.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/ApiResponse.php new file mode 100644 index 0000000..671e0f3 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/ApiResponse.php @@ -0,0 +1,95 @@ +statusCode = $statusCode; + $this->headers = $headers; + $this->data = $data; + } + + /** + * Returns the HTTP status code of the server response. + * + * @return int + */ + public function getStatusCode() { + return $this->statusCode; + } + + /** + * Returns the HTTP headers of the server response. + * + * @return string[] + */ + public function getHeaders() { + return $this->headers; + } + + /** + * Returns the HTTP body of the server response. + * + * @return string + */ + public function getData() { + return $this->data; + } + +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/ConnectionException.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/ConnectionException.php new file mode 100644 index 0000000..8d37d19 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/ConnectionException.php @@ -0,0 +1,99 @@ +url = $url; + $this->requestToken = $requestToken; + $this->errorMessage = $message; + } + + /** + * Returns the URL of the connection. + * + * @return string + */ + public function getUrl() { + return $this->url; + } + + /** + * Returns the log token of the request. + * + * @return string + */ + public function getRequestToken() { + return $this->requestToken; + } + + /** + * Returns the error message without prefixed log token. + * + * @return string + */ + public function getErrorMessage() { + return $this->errorMessage; + } + +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/CurlHttpClient.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/CurlHttpClient.php new file mode 100644 index 0000000..43e7340 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/CurlHttpClient.php @@ -0,0 +1,144 @@ +getConnectionTimeout() !== 0) { + curl_setopt($curl, CURLOPT_TIMEOUT, $apiClient->getConnectionTimeout()); + } + // return the result on success, rather than just true + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + + curl_setopt($curl, CURLOPT_HTTPHEADER, $request->getHeaders()); + + // disable SSL verification, if needed + if ($apiClient->isCertificateAuthorityCheckEnabled() === false) { + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); + } else { + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true); + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); + curl_setopt($curl, CURLOPT_CAINFO, $apiClient->getCertificateAuthority()); + } + + if ($request->getMethod() === HttpRequest::POST) { + curl_setopt($curl, CURLOPT_POST, true); + curl_setopt($curl, CURLOPT_POSTFIELDS, $request->getBody()); + } elseif ($request->getMethod() === HttpRequest::HEAD) { + curl_setopt($curl, CURLOPT_NOBODY, true); + } elseif ($request->getMethod() === HttpRequest::OPTIONS) { + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'OPTIONS'); + curl_setopt($curl, CURLOPT_POSTFIELDS, $request->getBody()); + } elseif ($request->getMethod() === HttpRequest::PATCH) { + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PATCH'); + curl_setopt($curl, CURLOPT_POSTFIELDS, $request->getBody()); + } elseif ($request->getMethod() === HttpRequest::PUT) { + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT'); + curl_setopt($curl, CURLOPT_POSTFIELDS, $request->getBody()); + } elseif ($request->getMethod() === HttpRequest::DELETE) { + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE'); + curl_setopt($curl, CURLOPT_POSTFIELDS, $request->getBody()); + } elseif ($request->getMethod() !== HttpRequest::GET) { + throw new ConnectionException($request->getUrl(), $request->getLogToken(), 'Method ' . $request->getMethod() . ' is not recognized.'); + } + curl_setopt($curl, CURLOPT_URL, $request->getUrl()); + + // Set user agent + curl_setopt($curl, CURLOPT_USERAGENT, $request->getUserAgent()); + + // debugging for curl + $debugFilePointer = fopen($apiClient->getDebugFile(), 'a'); + if ($apiClient->isDebuggingEnabled()) { + error_log("[DEBUG] HTTP Request body ~BEGIN~".PHP_EOL.print_r($request->getBody(), true).PHP_EOL."~END~".PHP_EOL, 3, $apiClient->getDebugFile()); + + curl_setopt($curl, CURLOPT_VERBOSE, 1); + curl_setopt($curl, CURLOPT_STDERR, $debugFilePointer); + } else { + curl_setopt($curl, CURLOPT_VERBOSE, 0); + } + + // obtain the HTTP response headers + curl_setopt($curl, CURLOPT_HEADER, 1); + + // Make the request + $response = curl_exec($curl); + $response = $this->handleResponse($apiClient, $request, $curl, $response, $request->getUrl()); + curl_close($curl); + fclose($debugFilePointer); + + return $response; + } + + /** + * Puts together the HTTP response. + * + * @param ApiClient $apiClient the API client instance + * @param HttpRequest $request the HTTP request + * @param resource $curl the cURL handler + * @param mixed $response the response the of HTTP request + * @param string $url the url of the HTTP request + * @return HttpResponse + */ + private function handleResponse(ApiClient $apiClient, HttpRequest $request, $curl, $response, $url) { + $http_header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE); + $http_header = substr($response, 0, $http_header_size); + $http_body = substr($response, $http_header_size); + $response_info = curl_getinfo($curl); + + // debug HTTP response body + if ($apiClient->isDebuggingEnabled()) { + error_log("[DEBUG] HTTP Response body ~BEGIN~".PHP_EOL.print_r($http_body, true).PHP_EOL."~END~".PHP_EOL, 3, $apiClient->getDebugFile()); + } + + if ($response_info['http_code'] === 0) { + $curl_error_message = curl_error($curl); + + // curl_exec can sometimes fail but still return a blank message from curl_error(). + if (!empty($curl_error_message)) { + throw new ConnectionException($url, $request->getLogToken(), $curl_error_message); + } else { + throw new ConnectionException($url, $request->getLogToken(), 'API call failed for an unknown reason. This could happen if you are disconnected from the network.'); + } + } else { + return new HttpResponse($response_info['http_code'], $http_header, $http_body); + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/HttpClientFactory.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/HttpClientFactory.php new file mode 100644 index 0000000..0746ec4 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/HttpClientFactory.php @@ -0,0 +1,102 @@ +getClientInternal($type); + } + + /** + * Constructor. + */ + private function __construct() { + $this->clients[self::TYPE_CURL] = new CurlHttpClient(); + $this->clients[self::TYPE_SOCKET] = new SocketHttpClient(); + } + + /** + * Returns an HTTP client instance. + * + * @return IHttpClient + */ + private function getClientInternal($type = null) { + if ($type != null) { + if (isset($this->clients[$type])) { + return $this->clients[$type]; + } else { + throw new \Exception("No http client with type '$type' found."); + } + } else { + foreach ($this->clients as $client) { + if ($client->isSupported()) { + return $client; + } + } + throw new \Exception('No supported http client found.'); + } + } + +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/HttpRequest.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/HttpRequest.php new file mode 100644 index 0000000..845ac70 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/HttpRequest.php @@ -0,0 +1,416 @@ +serializer = $serializer; + $this->url = $url; + $this->method = strtoupper($method); + $this->path = $this->getRequestPath($url); + $this->protocol = strtolower(parse_url($url, PHP_URL_SCHEME)); + $this->host = parse_url($url, PHP_URL_HOST); + $this->port = parse_url($url, PHP_URL_PORT); + $this->query = parse_url($url, PHP_URL_QUERY); + $this->logToken = $logToken; + + $this->addHeader(self::HEADER_KEY_HOST, $this->host); + $this->addHeader(self::HEADER_LOG_TOKEN, $this->logToken); + } + + /** + * Returns the full qualified URL on which the request is executed. + * + * @return string + */ + public function getUrl() { + return $this->url; + } + + /** + * Returns the request method (typically GET or POST). + * + * @return string + */ + public function getMethod() { + return $this->method; + } + + /** + * Returns the path part of the request including the query and fragment. + * + * @return string + */ + public function getPath() { + return $this->path; + } + + /** + * Returns true when the connection is secure. + * + * @return boolean + */ + public function isSecureConnection() { + return $this->protocol == 'https'; + } + + /** + * Returns the host on which the request was executed. + * + * @return string + */ + public function getHost() { + return $this->host; + } + + /** + * Returns the port number of the request. + * + * @return int + */ + public function getPort() { + return $this->port; + } + + /** + * Returns a list of strings which represent the HTTP headers. + * + * @return string[] + */ + public function getHeaders() { + $headers = array(); + foreach ($this->headers as $name => $values) { + foreach ($values as $value) { + $headers[] = strtolower($name) . ': ' . $value; + } + } + $headers[] = self::HEADER_KEY_CONTENT_LENGTH . ': ' . strlen($this->getBody()); + return $headers; + } + + /** + * Adds multiple HTTP headers to the request. + * + * @param array $headers an array of HTTP headers + * @return HttpRequest + */ + public function addHeaders($headers) { + foreach ($headers as $key => $value) { + $this->addHeader($key, $value); + } + return $this; + } + + /** + * Adds an HTTP header to the request. + * + * @param string $key the header's key + * @param string $value the header's value + * @return HttpRequest + */ + public function addHeader($key, $value) { + if (is_array($value)) { + foreach ($value as $v) { + $this->addHeader($key, $v); + } + } else { + $this->headers[$key][] = $value; + } + return $this; + } + + /** + * Removes all HTTP header with the given key from the request. + * + * @param string $key the header's key + * @return HttpRequest + */ + public function removeHeader($key) { + if (isset($this->headers[$key])) { + unset($this->headers[$key]); + } + return $this; + } + + /** + * Returns the user agent header. + * + * @return string + */ + public function getUserAgent(){ + return $this->userAgent; + } + + /** + * Sets the user agent header. + * + * @param string $userAgent the user agent header value + * @return HttpRequest + */ + public function setUserAgent($userAgent) { + $this->userAgent = $userAgent; + $this->removeHeader(self::HEADER_KEY_USER_AGENT); + $this->addHeader(self::HEADER_KEY_USER_AGENT, $userAgent); + return $this; + } + + /** + * Returns the log token. + * + * @return string + */ + public function getLogToken() { + return $this->logToken; + } + + /** + * Returns the query part of the request as string. + * + * @return string + */ + public function getQuery() { + return $this->query; + } + + /** + * Returns the HTTP body. + * + * @return string + */ + public function getBody() { + if ($this->body && isset($this->headers[self::HEADER_KEY_CONTENT_TYPE]) && $this->headers[self::HEADER_KEY_CONTENT_TYPE] == 'application/x-www-form-urlencoded') { + return http_build_query($this->body); + } elseif ((is_object($this->body) || is_array($this->body)) && + (!isset($this->headers[self::HEADER_KEY_CONTENT_TYPE]) || $this->headers[self::HEADER_KEY_CONTENT_TYPE] != 'multipart/form-data')) { + return json_encode($this->serializer->sanitizeForSerialization($this->body)); + } else { + return $this->body; + } + } + + /** + * Sets the HTTP body. + * + * @var mixed $body the HTTP body + * @return HttpRequest + */ + public function setBody($body) { + $this->body = $body; + return $this; + } + + /** + * Returns the message as a string. + * + * @return string + */ + public function toString() { + $output = $this->getStatusLine() . "\r\n"; + foreach ($this->getHeaders() as $header) { + $output .= $header . "\r\n"; + } + $output .= "\r\n"; + $output .= $this->getBody(); + return $output; + } + + /** + * Returns the HTTP request's status line. + * + * @return string + */ + private function getStatusLine() { + return $this->getMethod() . ' ' . $this->getPath() . ' ' . 'HTTP/1.1'; + } + + /** + * Returns the request path part of the given url, including query and fragment. + * + * @param string $url the url + * @return string + */ + private function getRequestPath($url) { + $urlParts = parse_url($url); + $path = $urlParts['path']; + if (isset($urlParts['query'])) { + $path .= '?' . $urlParts['query']; + } + if (isset($urlParts['fragment'])) { + $path .= '#' . $urlParts['fragment']; + } + return $path; + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/HttpResponse.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/HttpResponse.php new file mode 100644 index 0000000..cee9b76 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/HttpResponse.php @@ -0,0 +1,176 @@ +parseRawMessage($statusCode); + } else { + $this->statusCode = $statusCode; + $this->headers = is_string($headers) ? $this->parseHttpHeaders($headers) : $headers; + $this->body = $body; + } + } + + /** + * Returns the status code of the response. + * + * @return integer + */ + public function getStatusCode() { + return $this->statusCode; + } + + /** + * Returns a key/value map of the headers. + * + * @return array + */ + public function getHeaders() { + return $this->headers; + } + + /** + * Returns the HTTP body. + * + * @return string + */ + public function getBody() { + return $this->body; + } + + /** + * Returns an array of HTTP response headers. + * + * @param string $rawHeaders A string of raw HTTP response headers + * @return string[] + */ + private function parseHttpHeaders($rawHeaders) { + // ref/credit: http://php.net/manual/en/function.http-parse-headers.php#112986 + $headers = array(); + $key = ''; + + foreach (explode("\n", $rawHeaders) as $h) { + $h = explode(':', $h, 2); + + if (isset($h[1])) { + if (!isset($headers[$h[0]])) { + $headers[$h[0]] = trim($h[1]); + } elseif (is_array($headers[$h[0]])) { + $headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1]))); + } else { + $headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1]))); + } + + $key = $h[0]; + } else { + if (substr($h[0], 0, 1) === "\t") { + $headers[$key] .= "\r\n\t".trim($h[0]); + } elseif (!$key) { + $headers[0] = trim($h[0]); + } + trim($h[0]); + } + } + + return $headers; + } + + /** + * Parses the given HTTP message. + * + * @param string $message + * @return void + */ + private function parseRawMessage($message) { + $positionStartBody = strpos($message, "\r\n\r\n"); + + $startPositionOffset = 4; + if ($positionStartBody === false) { + $positionStartBody = strpos($message, "\n\n"); + $startPositionOffset = 2; + if ($positionStartBody === false) { + throw new \Exception("Invalid HTTP message provided. It does not contain a header part."); + } + } + + $headerString = str_replace("\r\n", "\n", trim(substr($message, 0, $positionStartBody), "\r\n")); + $content = substr($message, $positionStartBody + $startPositionOffset); + + $this->headers = $this->parseHttpHeaders($headerString); + $statusLine = current(explode("\n", $headerString)); + $this->parseStatusLine($statusLine); + $this->body = $content; + } + + /** + * Parses the given status line. + * + * @param string $line the request's status line + */ + private function parseStatusLine($line) { + if (empty($line)) { + throw new \Exception("Empty status line provided."); + } + preg_match('/HTTP\/([^[:space:]])+[[:space:]]+([0-9]*)(.*)/i', $line, $result); + $this->statusCode = (int)$result[2]; + } + +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/IHttpClient.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/IHttpClient.php new file mode 100644 index 0000000..88d391e --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Http/IHttpClient.php @@ -0,0 +1,66 @@ +resetStartTime(); + $socket = $this->startStreamSocket($apiClient, $request); + $responseMessage = $this->readFromSocket($apiClient, $request, $socket); + fclose($socket); + + // debug HTTP response + if ($apiClient->isDebuggingEnabled()) { + error_log("[DEBUG] HTTP Response ~BEGIN~".PHP_EOL.$responseMessage.PHP_EOL."~END~".PHP_EOL, 3, $apiClient->getDebugFile()); + } + + if (empty($responseMessage)) { + throw new ConnectionException($request->getUrl(), $request->getLogToken(), + 'The server responded with an empty response (no HTTP header and no HTTP body).'); + } + + return new HttpResponse($responseMessage); + } + + /** + * This method reads from the given socket. Depending on the given header the read process may be halted after + * reading the last chunk. This method is required, because some servers do not close the connection in chunked + * transfer. Hence the timeout of the connection must be reached, before the connection is closed. By tracking the + * chunks, the connection can be closed earlier after the last chunk. + * + * @param ApiClient $apiClient the API client instance + * @param HttpRequest $request the HTTP request + * @param resource $socket the socket + * @throws ConnectionException + * @return string + */ + private function readFromSocket(ApiClient $apiClient, HttpRequest $request, $socket) { + $inBody = false; + $responseMessage = ''; + $chunked = false; + $chunkLength = false; + $maxTime = $this->getStartTime() + $apiClient->getConnectionTimeout(); + $contentLength = -1; + $endReached = false; + while ($maxTime > time() && !feof($socket) && !$endReached) { + if ($inBody === false) { + $line = $this->readLineFromSocket($apiClient, $request, $socket, 2048); + if ($line == "\r\n") { + $inBody = true; + } + else { + $parts = explode(':', $line, 2); + if (count($parts) == 2) { + $headerName = trim(strtolower($parts[0])); + $headerValue = trim(strtolower($parts[1])); + if ($headerName === 'transfer-encoding' && $headerValue == 'chunked') { + $chunked = true; + } + if ($headerName === 'content-length') { + $contentLength = (int)$headerValue; + } + } + } + $responseMessage .= $line; + } + else { + // Check if we can read without chunks + if (!$chunked) { + $readBytes = 4096; + if ($contentLength > 0) { + $readBytes = $contentLength; + } + $tmp = $this->readContentFromSocket($apiClient, $request, $socket, $readBytes); + $responseMessage .= $tmp; + if (strlen($tmp) == $readBytes) { + $endReached = true; + break; + } + } + + // Since we have not set any content length we assume that we need to read in chunks. + else { + + // We have to read the next line to get the chunk length. + if ($chunkLength === false) { + $line = trim(fgets($socket, 128)); + $chunkLength = hexdec($line); + } + + // We have to read the chunk, when it is greater than zero. The last one is always 0. + else if ($chunkLength > 0) { + $responseMessage .= $this->readContentFromSocket($apiClient, $request, $socket, $chunkLength); + + // We skip the next line break. + fseek($socket, 2, SEEK_CUR); + $chunkLength = false; + } + + // The chunk length must be zero. Hence we are finished and we can stop. + else { + $endReached = true; + break; + } + } + } + } + + if (feof($socket) || $endReached) { + return $responseMessage; + } + else { + throw new ConnectionException(null, $request->getLogToken(), + 'The remote server did not respond within ' . $apiClient->getConnectionTimeout() . ' seconds.'); + } + } + + /** + * This method reads in blocking fashion from the socket. + * + * We need this method because neither fread nor stream_get_contents do respect timeouts. + * + * @param ApiClient $apiClient the API client instance + * @param HttpRequest $request the HTTP request + * @param resource $socket the socket from which should be read + * @param int $maxNumberOfBytes the number of bytes to read + * @throws ConnectionException + * @return string + */ + private function readContentFromSocket(ApiClient $apiClient, HttpRequest $request, $socket, $maxNumberOfBytes) { + stream_set_blocking($socket, false); + $maxTime = $this->getStartTime() + $apiClient->getConnectionTimeout(); + $numberOfBytesRead = 0; + $result = ''; + while ($maxTime >= time() && $numberOfBytesRead < $maxNumberOfBytes && !feof($socket)) { + $nextChunkSize = min(128, $maxNumberOfBytes - $numberOfBytesRead); + $tmp = stream_get_contents($socket, $nextChunkSize); + if ($tmp !== false && strlen($tmp) > 0) { + $result .= $tmp; + $numberOfBytesRead += strlen($tmp); + } + else { + // Wait 100 milliseconds + usleep(100 * 1000); + } + } + stream_set_blocking($socket, true); + + if (feof($socket) || $numberOfBytesRead >= $maxNumberOfBytes) { + return $result; + } + else { + throw new ConnectionException(null, $request->getLogToken(), + 'The remote server did not respond within ' . $apiClient->getConnectionTimeout() . ' seconds.'); + } + } + + /** + * This method reads a single line in blocking fashion from the socket. The method does respect the timeout + * configured. + * + * @param ApiClient $apiClient the API client instance + * @param HttpRequest $request the HTTP request + * @param resource $socket the socket from which should be read + * @param int $maxNumberOfBytes the number of bytes to read + * @throws ConnectionException + * @return string + */ + private function readLineFromSocket(ApiClient $apiClient, HttpRequest $request, $socket, $maxNumberOfBytes) { + stream_set_blocking($socket, false); + $maxTime = $this->getStartTime() + $apiClient->getConnectionTimeout(); + $result = false; + while ($maxTime >= time() && $result === false && !feof($socket)) { + $tmp = fgets($socket, $maxNumberOfBytes); + if ($tmp !== false && strlen($tmp) > 0) { + $result = $tmp; + } + else { + // Wait 100 milliseconds + usleep(100 * 1000); + } + } + stream_set_blocking($socket, true); + + if ($result !== false) { + return $result; + } + else { + throw new ConnectionException(null, $request->getLogToken(), + 'The remote server did not respond within ' . $apiClient->getConnectionTimeout() . ' seconds.'); + } + } + + /** + * Creates a socket and sends the request to the remote host. + * As result a stream socket is returned. Which can be used to read the response. + * + * @param ApiClient $apiClient the API client instance + * @param HttpRequest $request the HTTP request + * @throws ConnectionException + * @return resource + */ + private function startStreamSocket(ApiClient $apiClient, HttpRequest $request) { + $this->configureRequest($request); + + $socket = $this->createSocketStream($apiClient, $request); + $message = $request->toString(); + + if ($apiClient->isDebuggingEnabled()) { + error_log("[DEBUG] HTTP Request ~BEGIN~".PHP_EOL.$message.PHP_EOL."~END~".PHP_EOL, 3, $apiClient->getDebugFile()); + } + + $result = fwrite($socket, $message); + if ($result == false) { + throw new ConnectionException($request->getUrl(), $request->getLogToken(), 'Could not send the message to the server.'); + } + return $socket; + } + + /** + * This method modifies the request so it can be sent. + * Sub classes may + * override this method to apply further modifications. + * + * @param HttpRequest $request the HTTP request + */ + private function configureRequest(HttpRequest $request){ + $proxyUrl = $this->readEnvironmentVariable(self::ENVIRONMENT_VARIABLE_PROXY_URL); + if ($proxyUrl !== null) { + $proxyUser = parse_url($proxyUrl, PHP_URL_USER); + $proxyPass = parse_url($proxyUrl, PHP_URL_PASS); + if ($proxyUser !== NULL) { + $auth = $proxyUser; + if ($proxyPass !== NULL) { + $auth .= ':' . $proxyPass; + } + $auth = base64_encode($auth); + $request->addHeader('proxy-authorization', 'Basic ' . $auth); + } + } + } + + /** + * This method creates a stream socket to the server. + * + * @param ApiClient $apiClient the API client instance + * @param HttpRequest $request the HTTP request + * @throws ConnectionException + * @return resource + */ + private function createSocketStream(ApiClient $apiClient, HttpRequest $request) { + if ($request->isSecureConnection()) { + if (!extension_loaded('openssl')) { + throw new \Exception("You have to enable OpenSSL."); + } + } + + $proxyUrl = $this->readEnvironmentVariable(self::ENVIRONMENT_VARIABLE_PROXY_URL); + if ($proxyUrl !== null) { + $host = parse_url($proxyUrl, PHP_URL_HOST); + $port = parse_url($proxyUrl, PHP_URL_PORT); + if(empty($port)){ + throw new ConnectionException($request->getUrl(), $request->getLogToken(), "The Proxy URL must contain a port number."); + } + + } else { + $host = ($request->isSecureConnection() ? $this->getSslProtocol() . '://' : '') . $request->getHost(); + $port = $request->getPort(); + if(empty($port)){ + $port = $request->isSecureConnection() ? 443 : 80; + } + } + $socket = $host . ':' . $port; + + $filePointer = @stream_socket_client($socket, $errno, $errstr, $apiClient->getConnectionTimeout(), STREAM_CLIENT_CONNECT, + $this->createStreamContext($apiClient, $request)); + + if ($filePointer === false) { + throw new ConnectionException($request->getUrl(), $request->getLogToken(), $errstr); + } + + if (!(get_resource_type($filePointer) == 'stream')) { + $errorMessage = 'Could not connect to the server. The returned socket was not a stream.'; + throw new ConnectionException($request->getUrl(), $request->getLogToken(), $errorMessage); + } + + return $filePointer; + } + + /** + * Returns the protocol to use in case of an SSL connection. + * + * @return string + */ + private function getSslProtocol(){ + $version = $this->readEnvironmentVariable(self::ENVIRONMENT_VARIABLE_SSL_VERSION); + $rs = null; + switch ($version) { + case self::SSL_VERSION_SSLV2: + $rs = 'sslv2'; + break; + case self::SSL_VERSION_SSLV3: + $rs = 'sslv3'; + break; + case self::SSL_VERSION_TLSV1: + $rs = 'tls'; + break; + case self::SSL_VERSION_TLSV11: + $rs = 'tlsv1.1'; + break; + case self::SSL_VERSION_TLSV12: + $rs = 'tlsv1.2'; + break; + default: + $rs = 'ssl'; + } + if ($rs === null) { + throw new \Exception("Invalid state."); + } + + $possibleTransportProtocols = stream_get_transports(); + if (!in_array($rs, $possibleTransportProtocols)) { + throw new \Exception("The enforced SSL protocol is '" . $rs . "'. But this protocol is not supported by the web server. Supported stream protocols by the web server are " . implode(', ', $possibleTransportProtocols) . "."); + } + + return $rs; + } + + /** + * Creates and returns a new stream context. + * + * @param ApiClient $apiClient the API client instance + * @param HttpRequest $request the HTTP request + * @return resource + */ + private function createStreamContext(ApiClient $apiClient, HttpRequest $request) { + return stream_context_create($this->buildStreamContextOptions($apiClient, $request)); + } + + /** + * Generates an option array for creating the stream context. + * + * @param ApiClient $apiClient the API client instance + * @param HttpRequest $request the HTTP request + * @return array + */ + private function buildStreamContextOptions(ApiClient $apiClient, HttpRequest $request) { + $options = array( + 'http' => array(), + 'ssl' => array() + ); + if ($request->isSecureConnection()) { + $options['ssl']['verify_host'] = true; + $options['ssl']['allow_self_signed'] = false; + $options['ssl']['verify_peer'] = false; + + if ($apiClient->isCertificateAuthorityCheckEnabled()) { + $options['ssl']['verify_peer'] = true; + $options['ssl']['cafile'] = $apiClient->getCertificateAuthority(); + } + } + $ipVersion = $this->readEnvironmentVariable(self::ENVIRONMENT_VARIABLE_IP_ADDRESS_VERSION); + if ($ipVersion !== null) { + if ($ipVersion == self::IP_ADDRESS_VERSION_V4) { + $options['socket'] = array( + 'bindto' => '0.0.0.0:0' + ); + } + elseif ($ipVersion == self::IP_ADDRESS_VERSION_V6) { + $options['socket'] = array( + 'bindto' => '[::]:0' + ); + } + } + return $options; + } + + /** + * Resets the start time to the currency time. + */ + private function resetStartTime() { + $this->startTime = time(); + } + + /** + * Returns the start time. + * + * @return integer + */ + private function getStartTime() { + return $this->startTime; + } + + /** + * Reads the environment variable indicated by the name. + * Returns null + * when the variable is not defined. + * + * @param string $name + * @return string + */ + private function readEnvironmentVariable($name){ + if (isset($_SERVER[$name])) { + return $_SERVER[$name]; + } + else if (isset($_SERVER[strtolower($name)])) { + return $_SERVER[strtolower($name)]; + } + else { + return null; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractAccountUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractAccountUpdate.php new file mode 100644 index 0000000..46687a8 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractAccountUpdate.php @@ -0,0 +1,176 @@ + 'string', + 'subaccountLimit' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The name of the account identifies the account within the administrative interface. + * + * @var string + */ + private $name; + + /** + * This property restricts the number of subaccounts which can be created within this account. + * + * @var int + */ + private $subaccountLimit; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['subaccountLimit'])) { + $this->setSubaccountLimit($data['subaccountLimit']); + } + } + + + /** + * Returns name. + * + * The name of the account identifies the account within the administrative interface. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return AbstractAccountUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns subaccountLimit. + * + * This property restricts the number of subaccounts which can be created within this account. + * + * @return int + */ + public function getSubaccountLimit() { + return $this->subaccountLimit; + } + + /** + * Sets subaccountLimit. + * + * @param int $subaccountLimit + * @return AbstractAccountUpdate + */ + public function setSubaccountLimit($subaccountLimit) { + $this->subaccountLimit = $subaccountLimit; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractApplicationUserUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractApplicationUserUpdate.php new file mode 100644 index 0000000..c3e9ef4 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractApplicationUserUpdate.php @@ -0,0 +1,176 @@ + 'string', + 'state' => '\Wallee\Sdk\Model\CreationEntityState' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The user name is used to identify the application user in administrative interfaces. + * + * @var string + */ + private $name; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + } + + + /** + * Returns name. + * + * The user name is used to identify the application user in administrative interfaces. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return AbstractApplicationUserUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return AbstractApplicationUserUpdate + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractDebtCollectionCaseUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractDebtCollectionCaseUpdate.php new file mode 100644 index 0000000..7ae1d36 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractDebtCollectionCaseUpdate.php @@ -0,0 +1,380 @@ + '\Wallee\Sdk\Model\AddressCreate', + 'contractDate' => '\DateTime', + 'currency' => 'string', + 'dueDate' => '\DateTime', + 'environment' => '\Wallee\Sdk\Model\DebtCollectionEnvironment', + 'language' => 'string', + 'lineItems' => '\Wallee\Sdk\Model\LineItemCreate[]', + 'spaceViewId' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The billing address of the case identifies the debtor. + * + * @var \Wallee\Sdk\Model\AddressCreate + */ + private $billingAddress; + + /** + * The contract date is the date on which the contract with the debtor was signed on. + * + * @var \DateTime + */ + private $contractDate; + + /** + * The currency defines the billing currency of the debt collection case. + * + * @var string + */ + private $currency; + + /** + * The due date indicates the date on which the amount receivable was due. This date has to be always in the past. + * + * @var \DateTime + */ + private $dueDate; + + /** + * The environment in which this case will be processed. There must be a debt collector configuration present which supports the chosen environment. + * + * @var \Wallee\Sdk\Model\DebtCollectionEnvironment + */ + private $environment; + + /** + * The language indicates the language to be used in the communication with the debtor. + * + * @var string + */ + private $language; + + /** + * The line items of the debt collection case will be shown on documents sent to the debtor and the total of them makes up total amount to collect. + * + * @var \Wallee\Sdk\Model\LineItemCreate[] + */ + private $lineItems; + + /** + * + * + * @var int + */ + private $spaceViewId; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['billingAddress'])) { + $this->setBillingAddress($data['billingAddress']); + } + if (isset($data['contractDate'])) { + $this->setContractDate($data['contractDate']); + } + if (isset($data['currency'])) { + $this->setCurrency($data['currency']); + } + if (isset($data['dueDate'])) { + $this->setDueDate($data['dueDate']); + } + if (isset($data['environment'])) { + $this->setEnvironment($data['environment']); + } + if (isset($data['language'])) { + $this->setLanguage($data['language']); + } + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + if (isset($data['spaceViewId'])) { + $this->setSpaceViewId($data['spaceViewId']); + } + } + + + /** + * Returns billingAddress. + * + * The billing address of the case identifies the debtor. + * + * @return \Wallee\Sdk\Model\AddressCreate + */ + public function getBillingAddress() { + return $this->billingAddress; + } + + /** + * Sets billingAddress. + * + * @param \Wallee\Sdk\Model\AddressCreate $billingAddress + * @return AbstractDebtCollectionCaseUpdate + */ + public function setBillingAddress($billingAddress) { + $this->billingAddress = $billingAddress; + + return $this; + } + + /** + * Returns contractDate. + * + * The contract date is the date on which the contract with the debtor was signed on. + * + * @return \DateTime + */ + public function getContractDate() { + return $this->contractDate; + } + + /** + * Sets contractDate. + * + * @param \DateTime $contractDate + * @return AbstractDebtCollectionCaseUpdate + */ + public function setContractDate($contractDate) { + $this->contractDate = $contractDate; + + return $this; + } + + /** + * Returns currency. + * + * The currency defines the billing currency of the debt collection case. + * + * @return string + */ + public function getCurrency() { + return $this->currency; + } + + /** + * Sets currency. + * + * @param string $currency + * @return AbstractDebtCollectionCaseUpdate + */ + public function setCurrency($currency) { + $this->currency = $currency; + + return $this; + } + + /** + * Returns dueDate. + * + * The due date indicates the date on which the amount receivable was due. This date has to be always in the past. + * + * @return \DateTime + */ + public function getDueDate() { + return $this->dueDate; + } + + /** + * Sets dueDate. + * + * @param \DateTime $dueDate + * @return AbstractDebtCollectionCaseUpdate + */ + public function setDueDate($dueDate) { + $this->dueDate = $dueDate; + + return $this; + } + + /** + * Returns environment. + * + * The environment in which this case will be processed. There must be a debt collector configuration present which supports the chosen environment. + * + * @return \Wallee\Sdk\Model\DebtCollectionEnvironment + */ + public function getEnvironment() { + return $this->environment; + } + + /** + * Sets environment. + * + * @param \Wallee\Sdk\Model\DebtCollectionEnvironment $environment + * @return AbstractDebtCollectionCaseUpdate + */ + public function setEnvironment($environment) { + $this->environment = $environment; + + return $this; + } + + /** + * Returns language. + * + * The language indicates the language to be used in the communication with the debtor. + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return AbstractDebtCollectionCaseUpdate + */ + public function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns lineItems. + * + * The line items of the debt collection case will be shown on documents sent to the debtor and the total of them makes up total amount to collect. + * + * @return \Wallee\Sdk\Model\LineItemCreate[] + */ + public function getLineItems() { + return $this->lineItems; + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItemCreate[] $lineItems + * @return AbstractDebtCollectionCaseUpdate + */ + public function setLineItems($lineItems) { + $this->lineItems = $lineItems; + + return $this; + } + + /** + * Returns spaceViewId. + * + * + * + * @return int + */ + public function getSpaceViewId() { + return $this->spaceViewId; + } + + /** + * Sets spaceViewId. + * + * @param int $spaceViewId + * @return AbstractDebtCollectionCaseUpdate + */ + public function setSpaceViewId($spaceViewId) { + $this->spaceViewId = $spaceViewId; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractHumanUserUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractHumanUserUpdate.php new file mode 100644 index 0000000..ea0d9f6 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractHumanUserUpdate.php @@ -0,0 +1,312 @@ + 'string', + 'firstname' => 'string', + 'language' => 'string', + 'lastname' => 'string', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'timeZone' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The email address of the user. + * + * @var string + */ + private $emailAddress; + + /** + * The first name of the user. + * + * @var string + */ + private $firstname; + + /** + * The preferred language of the user. + * + * @var string + */ + private $language; + + /** + * The last name of the user. + * + * @var string + */ + private $lastname; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The time zone which is applied for the user. If no timezone is specified the browser is used to determine an appropriate time zone. + * + * @var string + */ + private $timeZone; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['emailAddress'])) { + $this->setEmailAddress($data['emailAddress']); + } + if (isset($data['firstname'])) { + $this->setFirstname($data['firstname']); + } + if (isset($data['language'])) { + $this->setLanguage($data['language']); + } + if (isset($data['lastname'])) { + $this->setLastname($data['lastname']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['timeZone'])) { + $this->setTimeZone($data['timeZone']); + } + } + + + /** + * Returns emailAddress. + * + * The email address of the user. + * + * @return string + */ + public function getEmailAddress() { + return $this->emailAddress; + } + + /** + * Sets emailAddress. + * + * @param string $emailAddress + * @return AbstractHumanUserUpdate + */ + public function setEmailAddress($emailAddress) { + $this->emailAddress = $emailAddress; + + return $this; + } + + /** + * Returns firstname. + * + * The first name of the user. + * + * @return string + */ + public function getFirstname() { + return $this->firstname; + } + + /** + * Sets firstname. + * + * @param string $firstname + * @return AbstractHumanUserUpdate + */ + public function setFirstname($firstname) { + $this->firstname = $firstname; + + return $this; + } + + /** + * Returns language. + * + * The preferred language of the user. + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return AbstractHumanUserUpdate + */ + public function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns lastname. + * + * The last name of the user. + * + * @return string + */ + public function getLastname() { + return $this->lastname; + } + + /** + * Sets lastname. + * + * @param string $lastname + * @return AbstractHumanUserUpdate + */ + public function setLastname($lastname) { + $this->lastname = $lastname; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return AbstractHumanUserUpdate + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns timeZone. + * + * The time zone which is applied for the user. If no timezone is specified the browser is used to determine an appropriate time zone. + * + * @return string + */ + public function getTimeZone() { + return $this->timeZone; + } + + /** + * Sets timeZone. + * + * @param string $timeZone + * @return AbstractHumanUserUpdate + */ + public function setTimeZone($timeZone) { + $this->timeZone = $timeZone; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractPaymentLinkUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractPaymentLinkUpdate.php new file mode 100644 index 0000000..07e85a7 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractPaymentLinkUpdate.php @@ -0,0 +1,482 @@ + '\Wallee\Sdk\Model\PaymentMethodConfiguration[]', + 'appliedSpaceView' => 'int', + 'availableFrom' => '\DateTime', + 'availableUntil' => '\DateTime', + 'billingAddressRequired' => 'bool', + 'currency' => 'string', + 'language' => 'string', + 'lineItems' => '\Wallee\Sdk\Model\LineItemCreate[]', + 'maximalNumberOfTransactions' => 'int', + 'name' => 'string', + 'shippingAddressRequired' => 'bool' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The allowed payment method configurations restrict the payment methods which can be used with this payment link. + * + * @var \Wallee\Sdk\Model\PaymentMethodConfiguration[] + */ + private $allowedPaymentMethodConfigurations; + + /** + * The payment link can be conducted in a specific space view. The space view may apply a specific design to the payment page. + * + * @var int + */ + private $appliedSpaceView; + + /** + * The available from date defines the earliest date on which the payment link can be used. When no date is specified there will be no restriction. + * + * @var \DateTime + */ + private $availableFrom; + + /** + * The available from date defines the latest date on which the payment link can be used to initialize a transaction. When no date is specified there will be no restriction. + * + * @var \DateTime + */ + private $availableUntil; + + /** + * By making the billing address required the transaction can only be created when a billing address is provided within the request. + * + * @var bool + */ + private $billingAddressRequired; + + /** + * The currency defines in which currency the payment is executed in. If no currency is defined it has to be specified within the request parameter 'currency'. + * + * @var string + */ + private $currency; + + /** + * The language defines the language of the payment page. If no language is provided it can be provided through the request parameter. + * + * @var string + */ + private $language; + + /** + * The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters. + * + * @var \Wallee\Sdk\Model\LineItemCreate[] + */ + private $lineItems; + + /** + * The maximal number of transactions limits the number of transactions which can be created with this payment link. + * + * @var int + */ + private $maximalNumberOfTransactions; + + /** + * The payment link name is used internally to identify the payment link. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * By making the shipping address required the transaction can only be created when a shipping address is provided within the request. + * + * @var bool + */ + private $shippingAddressRequired; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['allowedPaymentMethodConfigurations'])) { + $this->setAllowedPaymentMethodConfigurations($data['allowedPaymentMethodConfigurations']); + } + if (isset($data['appliedSpaceView'])) { + $this->setAppliedSpaceView($data['appliedSpaceView']); + } + if (isset($data['availableFrom'])) { + $this->setAvailableFrom($data['availableFrom']); + } + if (isset($data['availableUntil'])) { + $this->setAvailableUntil($data['availableUntil']); + } + if (isset($data['billingAddressRequired'])) { + $this->setBillingAddressRequired($data['billingAddressRequired']); + } + if (isset($data['currency'])) { + $this->setCurrency($data['currency']); + } + if (isset($data['language'])) { + $this->setLanguage($data['language']); + } + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + if (isset($data['maximalNumberOfTransactions'])) { + $this->setMaximalNumberOfTransactions($data['maximalNumberOfTransactions']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['shippingAddressRequired'])) { + $this->setShippingAddressRequired($data['shippingAddressRequired']); + } + } + + + /** + * Returns allowedPaymentMethodConfigurations. + * + * The allowed payment method configurations restrict the payment methods which can be used with this payment link. + * + * @return \Wallee\Sdk\Model\PaymentMethodConfiguration[] + */ + public function getAllowedPaymentMethodConfigurations() { + return $this->allowedPaymentMethodConfigurations; + } + + /** + * Sets allowedPaymentMethodConfigurations. + * + * @param \Wallee\Sdk\Model\PaymentMethodConfiguration[] $allowedPaymentMethodConfigurations + * @return AbstractPaymentLinkUpdate + */ + public function setAllowedPaymentMethodConfigurations($allowedPaymentMethodConfigurations) { + $this->allowedPaymentMethodConfigurations = $allowedPaymentMethodConfigurations; + + return $this; + } + + /** + * Returns appliedSpaceView. + * + * The payment link can be conducted in a specific space view. The space view may apply a specific design to the payment page. + * + * @return int + */ + public function getAppliedSpaceView() { + return $this->appliedSpaceView; + } + + /** + * Sets appliedSpaceView. + * + * @param int $appliedSpaceView + * @return AbstractPaymentLinkUpdate + */ + public function setAppliedSpaceView($appliedSpaceView) { + $this->appliedSpaceView = $appliedSpaceView; + + return $this; + } + + /** + * Returns availableFrom. + * + * The available from date defines the earliest date on which the payment link can be used. When no date is specified there will be no restriction. + * + * @return \DateTime + */ + public function getAvailableFrom() { + return $this->availableFrom; + } + + /** + * Sets availableFrom. + * + * @param \DateTime $availableFrom + * @return AbstractPaymentLinkUpdate + */ + public function setAvailableFrom($availableFrom) { + $this->availableFrom = $availableFrom; + + return $this; + } + + /** + * Returns availableUntil. + * + * The available from date defines the latest date on which the payment link can be used to initialize a transaction. When no date is specified there will be no restriction. + * + * @return \DateTime + */ + public function getAvailableUntil() { + return $this->availableUntil; + } + + /** + * Sets availableUntil. + * + * @param \DateTime $availableUntil + * @return AbstractPaymentLinkUpdate + */ + public function setAvailableUntil($availableUntil) { + $this->availableUntil = $availableUntil; + + return $this; + } + + /** + * Returns billingAddressRequired. + * + * By making the billing address required the transaction can only be created when a billing address is provided within the request. + * + * @return bool + */ + public function getBillingAddressRequired() { + return $this->billingAddressRequired; + } + + /** + * Sets billingAddressRequired. + * + * @param bool $billingAddressRequired + * @return AbstractPaymentLinkUpdate + */ + public function setBillingAddressRequired($billingAddressRequired) { + $this->billingAddressRequired = $billingAddressRequired; + + return $this; + } + + /** + * Returns currency. + * + * The currency defines in which currency the payment is executed in. If no currency is defined it has to be specified within the request parameter 'currency'. + * + * @return string + */ + public function getCurrency() { + return $this->currency; + } + + /** + * Sets currency. + * + * @param string $currency + * @return AbstractPaymentLinkUpdate + */ + public function setCurrency($currency) { + $this->currency = $currency; + + return $this; + } + + /** + * Returns language. + * + * The language defines the language of the payment page. If no language is provided it can be provided through the request parameter. + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return AbstractPaymentLinkUpdate + */ + public function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns lineItems. + * + * The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters. + * + * @return \Wallee\Sdk\Model\LineItemCreate[] + */ + public function getLineItems() { + return $this->lineItems; + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItemCreate[] $lineItems + * @return AbstractPaymentLinkUpdate + */ + public function setLineItems($lineItems) { + $this->lineItems = $lineItems; + + return $this; + } + + /** + * Returns maximalNumberOfTransactions. + * + * The maximal number of transactions limits the number of transactions which can be created with this payment link. + * + * @return int + */ + public function getMaximalNumberOfTransactions() { + return $this->maximalNumberOfTransactions; + } + + /** + * Sets maximalNumberOfTransactions. + * + * @param int $maximalNumberOfTransactions + * @return AbstractPaymentLinkUpdate + */ + public function setMaximalNumberOfTransactions($maximalNumberOfTransactions) { + $this->maximalNumberOfTransactions = $maximalNumberOfTransactions; + + return $this; + } + + /** + * Returns name. + * + * The payment link name is used internally to identify the payment link. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return AbstractPaymentLinkUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns shippingAddressRequired. + * + * By making the shipping address required the transaction can only be created when a shipping address is provided within the request. + * + * @return bool + */ + public function getShippingAddressRequired() { + return $this->shippingAddressRequired; + } + + /** + * Sets shippingAddressRequired. + * + * @param bool $shippingAddressRequired + * @return AbstractPaymentLinkUpdate + */ + public function setShippingAddressRequired($shippingAddressRequired) { + $this->shippingAddressRequired = $shippingAddressRequired; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSpaceUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSpaceUpdate.php new file mode 100644 index 0000000..d824491 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSpaceUpdate.php @@ -0,0 +1,312 @@ + 'string', + 'postalAddress' => '\Wallee\Sdk\Model\SpaceAddressCreate', + 'requestLimit' => 'int', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'technicalContactAddresses' => 'string[]', + 'timeZone' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The space name is used internally to identify the space in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The address to use in communication with clients for example in email, documents etc. + * + * @var \Wallee\Sdk\Model\SpaceAddressCreate + */ + private $postalAddress; + + /** + * The request limit defines the maximum number of API request accepted within 2 minutes per cluster node. This limit can only be changed with special privileges. + * + * @var int + */ + private $requestLimit; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The email address provided as contact addresses will be informed about technical issues or errors triggered by the space. + * + * @var string[] + */ + private $technicalContactAddresses; + + /** + * The time zone assigned to the space determines the time offset for calculating dates within the space. This is typically used for background processed which needs to be triggered on a specific hour within the day. Changing the space time zone will not change the display of dates. + * + * @var string + */ + private $timeZone; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['postalAddress'])) { + $this->setPostalAddress($data['postalAddress']); + } + if (isset($data['requestLimit'])) { + $this->setRequestLimit($data['requestLimit']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['technicalContactAddresses'])) { + $this->setTechnicalContactAddresses($data['technicalContactAddresses']); + } + if (isset($data['timeZone'])) { + $this->setTimeZone($data['timeZone']); + } + } + + + /** + * Returns name. + * + * The space name is used internally to identify the space in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return AbstractSpaceUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns postalAddress. + * + * The address to use in communication with clients for example in email, documents etc. + * + * @return \Wallee\Sdk\Model\SpaceAddressCreate + */ + public function getPostalAddress() { + return $this->postalAddress; + } + + /** + * Sets postalAddress. + * + * @param \Wallee\Sdk\Model\SpaceAddressCreate $postalAddress + * @return AbstractSpaceUpdate + */ + public function setPostalAddress($postalAddress) { + $this->postalAddress = $postalAddress; + + return $this; + } + + /** + * Returns requestLimit. + * + * The request limit defines the maximum number of API request accepted within 2 minutes per cluster node. This limit can only be changed with special privileges. + * + * @return int + */ + public function getRequestLimit() { + return $this->requestLimit; + } + + /** + * Sets requestLimit. + * + * @param int $requestLimit + * @return AbstractSpaceUpdate + */ + public function setRequestLimit($requestLimit) { + $this->requestLimit = $requestLimit; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return AbstractSpaceUpdate + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns technicalContactAddresses. + * + * The email address provided as contact addresses will be informed about technical issues or errors triggered by the space. + * + * @return string[] + */ + public function getTechnicalContactAddresses() { + return $this->technicalContactAddresses; + } + + /** + * Sets technicalContactAddresses. + * + * @param string[] $technicalContactAddresses + * @return AbstractSpaceUpdate + */ + public function setTechnicalContactAddresses($technicalContactAddresses) { + $this->technicalContactAddresses = $technicalContactAddresses; + + return $this; + } + + /** + * Returns timeZone. + * + * The time zone assigned to the space determines the time offset for calculating dates within the space. This is typically used for background processed which needs to be triggered on a specific hour within the day. Changing the space time zone will not change the display of dates. + * + * @return string + */ + public function getTimeZone() { + return $this->timeZone; + } + + /** + * Sets timeZone. + * + * @param string $timeZone + * @return AbstractSpaceUpdate + */ + public function setTimeZone($timeZone) { + $this->timeZone = $timeZone; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriberUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriberUpdate.php new file mode 100644 index 0000000..0270687 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriberUpdate.php @@ -0,0 +1,414 @@ + 'int[]', + 'billingAddress' => '\Wallee\Sdk\Model\AddressCreate', + 'description' => 'string', + 'disallowedPaymentMethodConfigurations' => 'int[]', + 'emailAddress' => 'string', + 'language' => 'string', + 'metaData' => 'map[string,string]', + 'reference' => 'string', + 'shippingAddress' => '\Wallee\Sdk\Model\AddressCreate' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * Those payment methods which are allowed additionally will be available even when the product does not allow those methods. + * + * @var int[] + */ + private $additionalAllowedPaymentMethodConfigurations; + + /** + * + * + * @var \Wallee\Sdk\Model\AddressCreate + */ + private $billingAddress; + + /** + * The subscriber description can be used to add a description to the subscriber. This is used in the back office to identify the subscriber. + * + * @var string + */ + private $description; + + /** + * Those payment methods which are disallowed will not be available to the subscriber even if the product allows those methods. + * + * @var int[] + */ + private $disallowedPaymentMethodConfigurations; + + /** + * The email address is used to communicate with the subscriber. There can be only one subscriber per space with the same email address. + * + * @var string + */ + private $emailAddress; + + /** + * The subscriber language determines the language which is used to communicate with the subscriber in emails and documents (e.g. invoices). + * + * @var string + */ + private $language; + + /** + * Meta data allow to store additional data along the object. + * + * @var map[string,string] + */ + private $metaData; + + /** + * The subscriber reference identifies the subscriber in administrative interfaces (e.g. customer id). + * + * @var string + */ + private $reference; + + /** + * + * + * @var \Wallee\Sdk\Model\AddressCreate + */ + private $shippingAddress; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['additionalAllowedPaymentMethodConfigurations'])) { + $this->setAdditionalAllowedPaymentMethodConfigurations($data['additionalAllowedPaymentMethodConfigurations']); + } + if (isset($data['billingAddress'])) { + $this->setBillingAddress($data['billingAddress']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['disallowedPaymentMethodConfigurations'])) { + $this->setDisallowedPaymentMethodConfigurations($data['disallowedPaymentMethodConfigurations']); + } + if (isset($data['emailAddress'])) { + $this->setEmailAddress($data['emailAddress']); + } + if (isset($data['language'])) { + $this->setLanguage($data['language']); + } + if (isset($data['metaData'])) { + $this->setMetaData($data['metaData']); + } + if (isset($data['reference'])) { + $this->setReference($data['reference']); + } + if (isset($data['shippingAddress'])) { + $this->setShippingAddress($data['shippingAddress']); + } + } + + + /** + * Returns additionalAllowedPaymentMethodConfigurations. + * + * Those payment methods which are allowed additionally will be available even when the product does not allow those methods. + * + * @return int[] + */ + public function getAdditionalAllowedPaymentMethodConfigurations() { + return $this->additionalAllowedPaymentMethodConfigurations; + } + + /** + * Sets additionalAllowedPaymentMethodConfigurations. + * + * @param int[] $additionalAllowedPaymentMethodConfigurations + * @return AbstractSubscriberUpdate + */ + public function setAdditionalAllowedPaymentMethodConfigurations($additionalAllowedPaymentMethodConfigurations) { + $this->additionalAllowedPaymentMethodConfigurations = $additionalAllowedPaymentMethodConfigurations; + + return $this; + } + + /** + * Returns billingAddress. + * + * + * + * @return \Wallee\Sdk\Model\AddressCreate + */ + public function getBillingAddress() { + return $this->billingAddress; + } + + /** + * Sets billingAddress. + * + * @param \Wallee\Sdk\Model\AddressCreate $billingAddress + * @return AbstractSubscriberUpdate + */ + public function setBillingAddress($billingAddress) { + $this->billingAddress = $billingAddress; + + return $this; + } + + /** + * Returns description. + * + * The subscriber description can be used to add a description to the subscriber. This is used in the back office to identify the subscriber. + * + * @return string + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param string $description + * @return AbstractSubscriberUpdate + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns disallowedPaymentMethodConfigurations. + * + * Those payment methods which are disallowed will not be available to the subscriber even if the product allows those methods. + * + * @return int[] + */ + public function getDisallowedPaymentMethodConfigurations() { + return $this->disallowedPaymentMethodConfigurations; + } + + /** + * Sets disallowedPaymentMethodConfigurations. + * + * @param int[] $disallowedPaymentMethodConfigurations + * @return AbstractSubscriberUpdate + */ + public function setDisallowedPaymentMethodConfigurations($disallowedPaymentMethodConfigurations) { + $this->disallowedPaymentMethodConfigurations = $disallowedPaymentMethodConfigurations; + + return $this; + } + + /** + * Returns emailAddress. + * + * The email address is used to communicate with the subscriber. There can be only one subscriber per space with the same email address. + * + * @return string + */ + public function getEmailAddress() { + return $this->emailAddress; + } + + /** + * Sets emailAddress. + * + * @param string $emailAddress + * @return AbstractSubscriberUpdate + */ + public function setEmailAddress($emailAddress) { + $this->emailAddress = $emailAddress; + + return $this; + } + + /** + * Returns language. + * + * The subscriber language determines the language which is used to communicate with the subscriber in emails and documents (e.g. invoices). + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return AbstractSubscriberUpdate + */ + public function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns metaData. + * + * Meta data allow to store additional data along the object. + * + * @return map[string,string] + */ + public function getMetaData() { + return $this->metaData; + } + + /** + * Sets metaData. + * + * @param map[string,string] $metaData + * @return AbstractSubscriberUpdate + */ + public function setMetaData($metaData) { + $this->metaData = $metaData; + + return $this; + } + + /** + * Returns reference. + * + * The subscriber reference identifies the subscriber in administrative interfaces (e.g. customer id). + * + * @return string + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param string $reference + * @return AbstractSubscriberUpdate + */ + public function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Returns shippingAddress. + * + * + * + * @return \Wallee\Sdk\Model\AddressCreate + */ + public function getShippingAddress() { + return $this->shippingAddress; + } + + /** + * Sets shippingAddress. + * + * @param \Wallee\Sdk\Model\AddressCreate $shippingAddress + * @return AbstractSubscriberUpdate + */ + public function setShippingAddress($shippingAddress) { + $this->shippingAddress = $shippingAddress; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriptionAffiliateUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriptionAffiliateUpdate.php new file mode 100644 index 0000000..910a528 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriptionAffiliateUpdate.php @@ -0,0 +1,244 @@ + 'string', + 'metaData' => 'map[string,string]', + 'name' => 'string', + 'state' => '\Wallee\Sdk\Model\CreationEntityState' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $language; + + /** + * Meta data allow to store additional data along the object. + * + * @var map[string,string] + */ + private $metaData; + + /** + * + * + * @var string + */ + private $name; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['language'])) { + $this->setLanguage($data['language']); + } + if (isset($data['metaData'])) { + $this->setMetaData($data['metaData']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + } + + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return AbstractSubscriptionAffiliateUpdate + */ + public function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns metaData. + * + * Meta data allow to store additional data along the object. + * + * @return map[string,string] + */ + public function getMetaData() { + return $this->metaData; + } + + /** + * Sets metaData. + * + * @param map[string,string] $metaData + * @return AbstractSubscriptionAffiliateUpdate + */ + public function setMetaData($metaData) { + $this->metaData = $metaData; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return AbstractSubscriptionAffiliateUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return AbstractSubscriptionAffiliateUpdate + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriptionMetricUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriptionMetricUpdate.php new file mode 100644 index 0000000..e6ed80b --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriptionMetricUpdate.php @@ -0,0 +1,176 @@ + '\Wallee\Sdk\Model\DatabaseTranslatedStringCreate', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedStringCreate' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + private $description; + + /** + * + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $description + * @return AbstractSubscriptionMetricUpdate + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $name + * @return AbstractSubscriptionMetricUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriptionProductActive.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriptionProductActive.php new file mode 100644 index 0000000..c435cc1 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractSubscriptionProductActive.php @@ -0,0 +1,278 @@ + 'int[]', + 'failedPaymentSuspensionPeriod' => 'string', + 'name' => 'string', + 'sortOrder' => 'int', + 'state' => '\Wallee\Sdk\Model\SubscriptionProductState' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The allowed payment method configurations control which payment methods can be used with this product. When none is selected all methods will be allowed. + * + * @var int[] + */ + private $allowedPaymentMethodConfigurations; + + /** + * When a payment fails, the subscription to which the payment belongs to will be suspended. When the suspension is not removed within the specified period the subscription will be terminated. A payment is considered as failed when the subscriber issues a refund or when a subscription charge fails. + * + * @var string + */ + private $failedPaymentSuspensionPeriod; + + /** + * The product name is used internally to identify the configuration in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The sort order controls in which order the product is listed. The sort order is used to order the products in ascending order. + * + * @var int + */ + private $sortOrder; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductState + */ + private $state; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['allowedPaymentMethodConfigurations'])) { + $this->setAllowedPaymentMethodConfigurations($data['allowedPaymentMethodConfigurations']); + } + if (isset($data['failedPaymentSuspensionPeriod'])) { + $this->setFailedPaymentSuspensionPeriod($data['failedPaymentSuspensionPeriod']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['sortOrder'])) { + $this->setSortOrder($data['sortOrder']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + } + + + /** + * Returns allowedPaymentMethodConfigurations. + * + * The allowed payment method configurations control which payment methods can be used with this product. When none is selected all methods will be allowed. + * + * @return int[] + */ + public function getAllowedPaymentMethodConfigurations() { + return $this->allowedPaymentMethodConfigurations; + } + + /** + * Sets allowedPaymentMethodConfigurations. + * + * @param int[] $allowedPaymentMethodConfigurations + * @return AbstractSubscriptionProductActive + */ + public function setAllowedPaymentMethodConfigurations($allowedPaymentMethodConfigurations) { + $this->allowedPaymentMethodConfigurations = $allowedPaymentMethodConfigurations; + + return $this; + } + + /** + * Returns failedPaymentSuspensionPeriod. + * + * When a payment fails, the subscription to which the payment belongs to will be suspended. When the suspension is not removed within the specified period the subscription will be terminated. A payment is considered as failed when the subscriber issues a refund or when a subscription charge fails. + * + * @return string + */ + public function getFailedPaymentSuspensionPeriod() { + return $this->failedPaymentSuspensionPeriod; + } + + /** + * Sets failedPaymentSuspensionPeriod. + * + * @param string $failedPaymentSuspensionPeriod + * @return AbstractSubscriptionProductActive + */ + public function setFailedPaymentSuspensionPeriod($failedPaymentSuspensionPeriod) { + $this->failedPaymentSuspensionPeriod = $failedPaymentSuspensionPeriod; + + return $this; + } + + /** + * Returns name. + * + * The product name is used internally to identify the configuration in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return AbstractSubscriptionProductActive + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns sortOrder. + * + * The sort order controls in which order the product is listed. The sort order is used to order the products in ascending order. + * + * @return int + */ + public function getSortOrder() { + return $this->sortOrder; + } + + /** + * Sets sortOrder. + * + * @param int $sortOrder + * @return AbstractSubscriptionProductActive + */ + public function setSortOrder($sortOrder) { + $this->sortOrder = $sortOrder; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\SubscriptionProductState $state + * @return AbstractSubscriptionProductActive + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractTokenUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractTokenUpdate.php new file mode 100644 index 0000000..b1d385b --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractTokenUpdate.php @@ -0,0 +1,312 @@ + 'string', + 'customerId' => 'string', + 'enabledForOneClickPayment' => 'bool', + 'language' => 'string', + 'timeZone' => 'string', + 'tokenReference' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The customer email address is the email address of the customer. + * + * @var string + */ + private $customerEmailAddress; + + /** + * The customer ID identifies the customer in the merchant system. In case the customer ID has been provided it has to correspond with the customer ID provided on the transaction. The customer ID will not be changed automatically. The merchant system has to provide it. + * + * @var string + */ + private $customerId; + + /** + * When a token is enabled for one-click payments the buyer will be able to select the token within the iFrame or on the payment page to pay with the token. The usage of the token will reduce the number of steps the buyer has to go through. The buyer is linked via the customer ID on the transaction with the token. Means the token will be visible for buyers with the same customer ID. Additionally the payment method has to be configured to allow the one-click payments. + * + * @var bool + */ + private $enabledForOneClickPayment; + + /** + * + * + * @var string + */ + private $language; + + /** + * The time zone defines in which time zone the customer is located in. The time zone may affects how dates are formatted when interacting with the customer. + * + * @var string + */ + private $timeZone; + + /** + * Use something that it is easy to identify and may help you find the token (e.g. customer id, email address). + * + * @var string + */ + private $tokenReference; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['customerEmailAddress'])) { + $this->setCustomerEmailAddress($data['customerEmailAddress']); + } + if (isset($data['customerId'])) { + $this->setCustomerId($data['customerId']); + } + if (isset($data['enabledForOneClickPayment'])) { + $this->setEnabledForOneClickPayment($data['enabledForOneClickPayment']); + } + if (isset($data['language'])) { + $this->setLanguage($data['language']); + } + if (isset($data['timeZone'])) { + $this->setTimeZone($data['timeZone']); + } + if (isset($data['tokenReference'])) { + $this->setTokenReference($data['tokenReference']); + } + } + + + /** + * Returns customerEmailAddress. + * + * The customer email address is the email address of the customer. + * + * @return string + */ + public function getCustomerEmailAddress() { + return $this->customerEmailAddress; + } + + /** + * Sets customerEmailAddress. + * + * @param string $customerEmailAddress + * @return AbstractTokenUpdate + */ + public function setCustomerEmailAddress($customerEmailAddress) { + $this->customerEmailAddress = $customerEmailAddress; + + return $this; + } + + /** + * Returns customerId. + * + * The customer ID identifies the customer in the merchant system. In case the customer ID has been provided it has to correspond with the customer ID provided on the transaction. The customer ID will not be changed automatically. The merchant system has to provide it. + * + * @return string + */ + public function getCustomerId() { + return $this->customerId; + } + + /** + * Sets customerId. + * + * @param string $customerId + * @return AbstractTokenUpdate + */ + public function setCustomerId($customerId) { + $this->customerId = $customerId; + + return $this; + } + + /** + * Returns enabledForOneClickPayment. + * + * When a token is enabled for one-click payments the buyer will be able to select the token within the iFrame or on the payment page to pay with the token. The usage of the token will reduce the number of steps the buyer has to go through. The buyer is linked via the customer ID on the transaction with the token. Means the token will be visible for buyers with the same customer ID. Additionally the payment method has to be configured to allow the one-click payments. + * + * @return bool + */ + public function getEnabledForOneClickPayment() { + return $this->enabledForOneClickPayment; + } + + /** + * Sets enabledForOneClickPayment. + * + * @param bool $enabledForOneClickPayment + * @return AbstractTokenUpdate + */ + public function setEnabledForOneClickPayment($enabledForOneClickPayment) { + $this->enabledForOneClickPayment = $enabledForOneClickPayment; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return AbstractTokenUpdate + */ + public function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns timeZone. + * + * The time zone defines in which time zone the customer is located in. The time zone may affects how dates are formatted when interacting with the customer. + * + * @return string + */ + public function getTimeZone() { + return $this->timeZone; + } + + /** + * Sets timeZone. + * + * @param string $timeZone + * @return AbstractTokenUpdate + */ + public function setTimeZone($timeZone) { + $this->timeZone = $timeZone; + + return $this; + } + + /** + * Returns tokenReference. + * + * Use something that it is easy to identify and may help you find the token (e.g. customer id, email address). + * + * @return string + */ + public function getTokenReference() { + return $this->tokenReference; + } + + /** + * Sets tokenReference. + * + * @param string $tokenReference + * @return AbstractTokenUpdate + */ + public function setTokenReference($tokenReference) { + $this->tokenReference = $tokenReference; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractTransactionPending.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractTransactionPending.php new file mode 100644 index 0000000..a934d50 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractTransactionPending.php @@ -0,0 +1,720 @@ + '\Wallee\Sdk\Model\PaymentMethodBrand[]', + 'allowedPaymentMethodConfigurations' => 'int[]', + 'billingAddress' => '\Wallee\Sdk\Model\AddressCreate', + 'currency' => 'string', + 'customerEmailAddress' => 'string', + 'customerId' => 'string', + 'failedUrl' => 'string', + 'invoiceMerchantReference' => 'string', + 'language' => 'string', + 'lineItems' => '\Wallee\Sdk\Model\LineItemCreate[]', + 'merchantReference' => 'string', + 'metaData' => 'map[string,string]', + 'shippingAddress' => '\Wallee\Sdk\Model\AddressCreate', + 'shippingMethod' => 'string', + 'successUrl' => 'string', + 'timeZone' => 'string', + 'token' => 'int', + 'tokenizationMode' => '\Wallee\Sdk\Model\TokenizationnMode' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\PaymentMethodBrand[] + */ + private $allowedPaymentMethodBrands; + + /** + * + * + * @var int[] + */ + private $allowedPaymentMethodConfigurations; + + /** + * + * + * @var \Wallee\Sdk\Model\AddressCreate + */ + private $billingAddress; + + /** + * + * + * @var string + */ + private $currency; + + /** + * The customer email address is the email address of the customer. If no email address is provided on the shipping or billing address this address is used. + * + * @var string + */ + private $customerEmailAddress; + + /** + * + * + * @var string + */ + private $customerId; + + /** + * The user will be redirected to failed URL when the transaction could not be authorized or completed. In case no failed URL is specified a default failed page will be displayed. + * + * @var string + */ + private $failedUrl; + + /** + * + * + * @var string + */ + private $invoiceMerchantReference; + + /** + * + * + * @var string + */ + private $language; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItemCreate[] + */ + private $lineItems; + + /** + * + * + * @var string + */ + private $merchantReference; + + /** + * Meta data allow to store additional data along the object. + * + * @var map[string,string] + */ + private $metaData; + + /** + * + * + * @var \Wallee\Sdk\Model\AddressCreate + */ + private $shippingAddress; + + /** + * + * + * @var string + */ + private $shippingMethod; + + /** + * The user will be redirected to success URL when the transaction could be authorized or completed. In case no success URL is specified a default success page will be displayed. + * + * @var string + */ + private $successUrl; + + /** + * The time zone defines in which time zone the customer is located in. The time zone may affects how dates are formatted when interacting with the customer. + * + * @var string + */ + private $timeZone; + + /** + * + * + * @var int + */ + private $token; + + /** + * The tokenization mode controls if and how a token is automatically applied to the transaction. When a token is directly assigned to the transaction the mode will have no effect at all. Obmitting the mode will disable the automatic application of a token. + * + * @var \Wallee\Sdk\Model\TokenizationnMode + */ + private $tokenizationMode; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['allowedPaymentMethodBrands'])) { + $this->setAllowedPaymentMethodBrands($data['allowedPaymentMethodBrands']); + } + if (isset($data['allowedPaymentMethodConfigurations'])) { + $this->setAllowedPaymentMethodConfigurations($data['allowedPaymentMethodConfigurations']); + } + if (isset($data['billingAddress'])) { + $this->setBillingAddress($data['billingAddress']); + } + if (isset($data['currency'])) { + $this->setCurrency($data['currency']); + } + if (isset($data['customerEmailAddress'])) { + $this->setCustomerEmailAddress($data['customerEmailAddress']); + } + if (isset($data['customerId'])) { + $this->setCustomerId($data['customerId']); + } + if (isset($data['failedUrl'])) { + $this->setFailedUrl($data['failedUrl']); + } + if (isset($data['invoiceMerchantReference'])) { + $this->setInvoiceMerchantReference($data['invoiceMerchantReference']); + } + if (isset($data['language'])) { + $this->setLanguage($data['language']); + } + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + if (isset($data['merchantReference'])) { + $this->setMerchantReference($data['merchantReference']); + } + if (isset($data['metaData'])) { + $this->setMetaData($data['metaData']); + } + if (isset($data['shippingAddress'])) { + $this->setShippingAddress($data['shippingAddress']); + } + if (isset($data['shippingMethod'])) { + $this->setShippingMethod($data['shippingMethod']); + } + if (isset($data['successUrl'])) { + $this->setSuccessUrl($data['successUrl']); + } + if (isset($data['timeZone'])) { + $this->setTimeZone($data['timeZone']); + } + if (isset($data['token'])) { + $this->setToken($data['token']); + } + if (isset($data['tokenizationMode'])) { + $this->setTokenizationMode($data['tokenizationMode']); + } + } + + + /** + * Returns allowedPaymentMethodBrands. + * + * + * + * @return \Wallee\Sdk\Model\PaymentMethodBrand[] + */ + public function getAllowedPaymentMethodBrands() { + return $this->allowedPaymentMethodBrands; + } + + /** + * Sets allowedPaymentMethodBrands. + * + * @param \Wallee\Sdk\Model\PaymentMethodBrand[] $allowedPaymentMethodBrands + * @return AbstractTransactionPending + */ + public function setAllowedPaymentMethodBrands($allowedPaymentMethodBrands) { + $this->allowedPaymentMethodBrands = $allowedPaymentMethodBrands; + + return $this; + } + + /** + * Returns allowedPaymentMethodConfigurations. + * + * + * + * @return int[] + */ + public function getAllowedPaymentMethodConfigurations() { + return $this->allowedPaymentMethodConfigurations; + } + + /** + * Sets allowedPaymentMethodConfigurations. + * + * @param int[] $allowedPaymentMethodConfigurations + * @return AbstractTransactionPending + */ + public function setAllowedPaymentMethodConfigurations($allowedPaymentMethodConfigurations) { + $this->allowedPaymentMethodConfigurations = $allowedPaymentMethodConfigurations; + + return $this; + } + + /** + * Returns billingAddress. + * + * + * + * @return \Wallee\Sdk\Model\AddressCreate + */ + public function getBillingAddress() { + return $this->billingAddress; + } + + /** + * Sets billingAddress. + * + * @param \Wallee\Sdk\Model\AddressCreate $billingAddress + * @return AbstractTransactionPending + */ + public function setBillingAddress($billingAddress) { + $this->billingAddress = $billingAddress; + + return $this; + } + + /** + * Returns currency. + * + * + * + * @return string + */ + public function getCurrency() { + return $this->currency; + } + + /** + * Sets currency. + * + * @param string $currency + * @return AbstractTransactionPending + */ + public function setCurrency($currency) { + $this->currency = $currency; + + return $this; + } + + /** + * Returns customerEmailAddress. + * + * The customer email address is the email address of the customer. If no email address is provided on the shipping or billing address this address is used. + * + * @return string + */ + public function getCustomerEmailAddress() { + return $this->customerEmailAddress; + } + + /** + * Sets customerEmailAddress. + * + * @param string $customerEmailAddress + * @return AbstractTransactionPending + */ + public function setCustomerEmailAddress($customerEmailAddress) { + $this->customerEmailAddress = $customerEmailAddress; + + return $this; + } + + /** + * Returns customerId. + * + * + * + * @return string + */ + public function getCustomerId() { + return $this->customerId; + } + + /** + * Sets customerId. + * + * @param string $customerId + * @return AbstractTransactionPending + */ + public function setCustomerId($customerId) { + $this->customerId = $customerId; + + return $this; + } + + /** + * Returns failedUrl. + * + * The user will be redirected to failed URL when the transaction could not be authorized or completed. In case no failed URL is specified a default failed page will be displayed. + * + * @return string + */ + public function getFailedUrl() { + return $this->failedUrl; + } + + /** + * Sets failedUrl. + * + * @param string $failedUrl + * @return AbstractTransactionPending + */ + public function setFailedUrl($failedUrl) { + $this->failedUrl = $failedUrl; + + return $this; + } + + /** + * Returns invoiceMerchantReference. + * + * + * + * @return string + */ + public function getInvoiceMerchantReference() { + return $this->invoiceMerchantReference; + } + + /** + * Sets invoiceMerchantReference. + * + * @param string $invoiceMerchantReference + * @return AbstractTransactionPending + */ + public function setInvoiceMerchantReference($invoiceMerchantReference) { + $this->invoiceMerchantReference = $invoiceMerchantReference; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return AbstractTransactionPending + */ + public function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns lineItems. + * + * + * + * @return \Wallee\Sdk\Model\LineItemCreate[] + */ + public function getLineItems() { + return $this->lineItems; + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItemCreate[] $lineItems + * @return AbstractTransactionPending + */ + public function setLineItems($lineItems) { + $this->lineItems = $lineItems; + + return $this; + } + + /** + * Returns merchantReference. + * + * + * + * @return string + */ + public function getMerchantReference() { + return $this->merchantReference; + } + + /** + * Sets merchantReference. + * + * @param string $merchantReference + * @return AbstractTransactionPending + */ + public function setMerchantReference($merchantReference) { + $this->merchantReference = $merchantReference; + + return $this; + } + + /** + * Returns metaData. + * + * Meta data allow to store additional data along the object. + * + * @return map[string,string] + */ + public function getMetaData() { + return $this->metaData; + } + + /** + * Sets metaData. + * + * @param map[string,string] $metaData + * @return AbstractTransactionPending + */ + public function setMetaData($metaData) { + $this->metaData = $metaData; + + return $this; + } + + /** + * Returns shippingAddress. + * + * + * + * @return \Wallee\Sdk\Model\AddressCreate + */ + public function getShippingAddress() { + return $this->shippingAddress; + } + + /** + * Sets shippingAddress. + * + * @param \Wallee\Sdk\Model\AddressCreate $shippingAddress + * @return AbstractTransactionPending + */ + public function setShippingAddress($shippingAddress) { + $this->shippingAddress = $shippingAddress; + + return $this; + } + + /** + * Returns shippingMethod. + * + * + * + * @return string + */ + public function getShippingMethod() { + return $this->shippingMethod; + } + + /** + * Sets shippingMethod. + * + * @param string $shippingMethod + * @return AbstractTransactionPending + */ + public function setShippingMethod($shippingMethod) { + $this->shippingMethod = $shippingMethod; + + return $this; + } + + /** + * Returns successUrl. + * + * The user will be redirected to success URL when the transaction could be authorized or completed. In case no success URL is specified a default success page will be displayed. + * + * @return string + */ + public function getSuccessUrl() { + return $this->successUrl; + } + + /** + * Sets successUrl. + * + * @param string $successUrl + * @return AbstractTransactionPending + */ + public function setSuccessUrl($successUrl) { + $this->successUrl = $successUrl; + + return $this; + } + + /** + * Returns timeZone. + * + * The time zone defines in which time zone the customer is located in. The time zone may affects how dates are formatted when interacting with the customer. + * + * @return string + */ + public function getTimeZone() { + return $this->timeZone; + } + + /** + * Sets timeZone. + * + * @param string $timeZone + * @return AbstractTransactionPending + */ + public function setTimeZone($timeZone) { + $this->timeZone = $timeZone; + + return $this; + } + + /** + * Returns token. + * + * + * + * @return int + */ + public function getToken() { + return $this->token; + } + + /** + * Sets token. + * + * @param int $token + * @return AbstractTransactionPending + */ + public function setToken($token) { + $this->token = $token; + + return $this; + } + + /** + * Returns tokenizationMode. + * + * The tokenization mode controls if and how a token is automatically applied to the transaction. When a token is directly assigned to the transaction the mode will have no effect at all. Obmitting the mode will disable the automatic application of a token. + * + * @return \Wallee\Sdk\Model\TokenizationnMode + */ + public function getTokenizationMode() { + return $this->tokenizationMode; + } + + /** + * Sets tokenizationMode. + * + * @param \Wallee\Sdk\Model\TokenizationnMode $tokenizationMode + * @return AbstractTransactionPending + */ + public function setTokenizationMode($tokenizationMode) { + $this->tokenizationMode = $tokenizationMode; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractWebhookListenerUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractWebhookListenerUpdate.php new file mode 100644 index 0000000..a7ede08 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractWebhookListenerUpdate.php @@ -0,0 +1,176 @@ + 'string', + 'state' => '\Wallee\Sdk\Model\CreationEntityState' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The webhook listener name is used internally to identify the webhook listener in administrative interfaces.For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + } + + + /** + * Returns name. + * + * The webhook listener name is used internally to identify the webhook listener in administrative interfaces.For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return AbstractWebhookListenerUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return AbstractWebhookListenerUpdate + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractWebhookUrlUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractWebhookUrlUpdate.php new file mode 100644 index 0000000..818dbc6 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AbstractWebhookUrlUpdate.php @@ -0,0 +1,210 @@ + 'string', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'url' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The URL name is used internally to identify the URL in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The URL to which the HTTP requests are sent to. An example URL could look like https://www.example.com/some/path?some-query-parameter=value. + * + * @var string + */ + private $url; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['url'])) { + $this->setUrl($data['url']); + } + } + + + /** + * Returns name. + * + * The URL name is used internally to identify the URL in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return AbstractWebhookUrlUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return AbstractWebhookUrlUpdate + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns url. + * + * The URL to which the HTTP requests are sent to. An example URL could look like https://www.example.com/some/path?some-query-parameter=value. + * + * @return string + */ + public function getUrl() { + return $this->url; + } + + /** + * Sets url. + * + * @param string $url + * @return AbstractWebhookUrlUpdate + */ + public function setUrl($url) { + $this->url = $url; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Account.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Account.php new file mode 100644 index 0000000..11e8ab0 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Account.php @@ -0,0 +1,465 @@ + 'bool', + 'activeOrRestrictedActive' => 'bool', + 'id' => 'int', + 'name' => 'string', + 'parentAccount' => '\Wallee\Sdk\Model\Account', + 'plannedPurgeDate' => '\DateTime', + 'restrictedActive' => 'bool', + 'state' => '\Wallee\Sdk\Model\AccountState', + 'subaccountLimit' => 'int', + 'type' => '\Wallee\Sdk\Model\AccountType', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * Active means that this account and all accounts in the hierarchy are active. + * + * @var bool + */ + private $active; + + /** + * This property is true when all accounts in the hierarchy are active or restricted active. + * + * @var bool + */ + private $activeOrRestrictedActive; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The name of the account identifies the account within the administrative interface. + * + * @var string + */ + private $name; + + /** + * The account which is responsible for administering the account. + * + * @var \Wallee\Sdk\Model\Account + */ + private $parentAccount; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * Restricted active means that at least one account in the hierarchy is only restricted active, but all are either restricted active or active. + * + * @var bool + */ + private $restrictedActive; + + /** + * + * + * @var \Wallee\Sdk\Model\AccountState + */ + private $state; + + /** + * This property restricts the number of subaccounts which can be created within this account. + * + * @var int + */ + private $subaccountLimit; + + /** + * The account type defines which role and capabilities it has. + * + * @var \Wallee\Sdk\Model\AccountType + */ + private $type; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['parentAccount'])) { + $this->setParentAccount($data['parentAccount']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['type'])) { + $this->setType($data['type']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns active. + * + * Active means that this account and all accounts in the hierarchy are active. + * + * @return bool + */ + public function getActive() { + return $this->active; + } + + /** + * Sets active. + * + * @param bool $active + * @return Account + */ + protected function setActive($active) { + $this->active = $active; + + return $this; + } + + /** + * Returns activeOrRestrictedActive. + * + * This property is true when all accounts in the hierarchy are active or restricted active. + * + * @return bool + */ + public function getActiveOrRestrictedActive() { + return $this->activeOrRestrictedActive; + } + + /** + * Sets activeOrRestrictedActive. + * + * @param bool $activeOrRestrictedActive + * @return Account + */ + protected function setActiveOrRestrictedActive($activeOrRestrictedActive) { + $this->activeOrRestrictedActive = $activeOrRestrictedActive; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return Account + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * The name of the account identifies the account within the administrative interface. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return Account + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns parentAccount. + * + * The account which is responsible for administering the account. + * + * @return \Wallee\Sdk\Model\Account + */ + public function getParentAccount() { + return $this->parentAccount; + } + + /** + * Sets parentAccount. + * + * @param \Wallee\Sdk\Model\Account $parentAccount + * @return Account + */ + public function setParentAccount($parentAccount) { + $this->parentAccount = $parentAccount; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return Account + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns restrictedActive. + * + * Restricted active means that at least one account in the hierarchy is only restricted active, but all are either restricted active or active. + * + * @return bool + */ + public function getRestrictedActive() { + return $this->restrictedActive; + } + + /** + * Sets restrictedActive. + * + * @param bool $restrictedActive + * @return Account + */ + protected function setRestrictedActive($restrictedActive) { + $this->restrictedActive = $restrictedActive; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\AccountState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\AccountState $state + * @return Account + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns subaccountLimit. + * + * This property restricts the number of subaccounts which can be created within this account. + * + * @return int + */ + public function getSubaccountLimit() { + return $this->subaccountLimit; + } + + /** + * Sets subaccountLimit. + * + * @param int $subaccountLimit + * @return Account + */ + protected function setSubaccountLimit($subaccountLimit) { + $this->subaccountLimit = $subaccountLimit; + + return $this; + } + + /** + * Returns type. + * + * The account type defines which role and capabilities it has. + * + * @return \Wallee\Sdk\Model\AccountType + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param \Wallee\Sdk\Model\AccountType $type + * @return Account + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return Account + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AccountCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AccountCreate.php new file mode 100644 index 0000000..fa94e56 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AccountCreate.php @@ -0,0 +1,146 @@ + 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The account which is responsible for administering the account. + * + * @var int + */ + private $parentAccount; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['parentAccount'])) { + $this->setParentAccount($data['parentAccount']); + } + } + + + /** + * Returns parentAccount. + * + * The account which is responsible for administering the account. + * + * @return int + */ + public function getParentAccount() { + return $this->parentAccount; + } + + /** + * Sets parentAccount. + * + * @param int $parentAccount + * @return AccountCreate + */ + public function setParentAccount($parentAccount) { + $this->parentAccount = $parentAccount; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AccountState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AccountState.php new file mode 100644 index 0000000..e3277a6 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AccountState.php @@ -0,0 +1,47 @@ + 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return AccountUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return AccountUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Address.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Address.php new file mode 100644 index 0000000..b996bd9 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Address.php @@ -0,0 +1,735 @@ + 'string', + 'commercialRegisterNumber' => 'string', + 'country' => 'string', + 'dateOfBirth' => '\DateTime', + 'dependentLocality' => 'string', + 'emailAddress' => 'string', + 'familyName' => 'string', + 'gender' => '\Wallee\Sdk\Model\Gender', + 'givenName' => 'string', + 'legalOrganizationForm' => '\Wallee\Sdk\Model\LegalOrganizationForm', + 'mobilePhoneNumber' => 'string', + 'organizationName' => 'string', + 'phoneNumber' => 'string', + 'postCode' => 'string', + 'postalState' => 'string', + 'salesTaxNumber' => 'string', + 'salutation' => 'string', + 'socialSecurityNumber' => 'string', + 'sortingCode' => 'string', + 'street' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $city; + + /** + * + * + * @var string + */ + private $commercialRegisterNumber; + + /** + * + * + * @var string + */ + private $country; + + /** + * + * + * @var \DateTime + */ + private $dateOfBirth; + + /** + * + * + * @var string + */ + private $dependentLocality; + + /** + * + * + * @var string + */ + private $emailAddress; + + /** + * + * + * @var string + */ + private $familyName; + + /** + * + * + * @var \Wallee\Sdk\Model\Gender + */ + private $gender; + + /** + * + * + * @var string + */ + private $givenName; + + /** + * + * + * @var \Wallee\Sdk\Model\LegalOrganizationForm + */ + private $legalOrganizationForm; + + /** + * + * + * @var string + */ + private $mobilePhoneNumber; + + /** + * + * + * @var string + */ + private $organizationName; + + /** + * + * + * @var string + */ + private $phoneNumber; + + /** + * + * + * @var string + */ + private $postCode; + + /** + * + * + * @var string + */ + private $postalState; + + /** + * + * + * @var string + */ + private $salesTaxNumber; + + /** + * + * + * @var string + */ + private $salutation; + + /** + * + * + * @var string + */ + private $socialSecurityNumber; + + /** + * The sorting code identifies the post office at which the post box is located in. + * + * @var string + */ + private $sortingCode; + + /** + * + * + * @var string + */ + private $street; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['gender'])) { + $this->setGender($data['gender']); + } + if (isset($data['legalOrganizationForm'])) { + $this->setLegalOrganizationForm($data['legalOrganizationForm']); + } + } + + + /** + * Returns city. + * + * + * + * @return string + */ + public function getCity() { + return $this->city; + } + + /** + * Sets city. + * + * @param string $city + * @return Address + */ + protected function setCity($city) { + $this->city = $city; + + return $this; + } + + /** + * Returns commercialRegisterNumber. + * + * + * + * @return string + */ + public function getCommercialRegisterNumber() { + return $this->commercialRegisterNumber; + } + + /** + * Sets commercialRegisterNumber. + * + * @param string $commercialRegisterNumber + * @return Address + */ + protected function setCommercialRegisterNumber($commercialRegisterNumber) { + $this->commercialRegisterNumber = $commercialRegisterNumber; + + return $this; + } + + /** + * Returns country. + * + * + * + * @return string + */ + public function getCountry() { + return $this->country; + } + + /** + * Sets country. + * + * @param string $country + * @return Address + */ + protected function setCountry($country) { + $this->country = $country; + + return $this; + } + + /** + * Returns dateOfBirth. + * + * + * + * @return \DateTime + */ + public function getDateOfBirth() { + return $this->dateOfBirth; + } + + /** + * Sets dateOfBirth. + * + * @param \DateTime $dateOfBirth + * @return Address + */ + protected function setDateOfBirth($dateOfBirth) { + $this->dateOfBirth = $dateOfBirth; + + return $this; + } + + /** + * Returns dependentLocality. + * + * + * + * @return string + */ + public function getDependentLocality() { + return $this->dependentLocality; + } + + /** + * Sets dependentLocality. + * + * @param string $dependentLocality + * @return Address + */ + protected function setDependentLocality($dependentLocality) { + $this->dependentLocality = $dependentLocality; + + return $this; + } + + /** + * Returns emailAddress. + * + * + * + * @return string + */ + public function getEmailAddress() { + return $this->emailAddress; + } + + /** + * Sets emailAddress. + * + * @param string $emailAddress + * @return Address + */ + protected function setEmailAddress($emailAddress) { + $this->emailAddress = $emailAddress; + + return $this; + } + + /** + * Returns familyName. + * + * + * + * @return string + */ + public function getFamilyName() { + return $this->familyName; + } + + /** + * Sets familyName. + * + * @param string $familyName + * @return Address + */ + protected function setFamilyName($familyName) { + $this->familyName = $familyName; + + return $this; + } + + /** + * Returns gender. + * + * + * + * @return \Wallee\Sdk\Model\Gender + */ + public function getGender() { + return $this->gender; + } + + /** + * Sets gender. + * + * @param \Wallee\Sdk\Model\Gender $gender + * @return Address + */ + public function setGender($gender) { + $this->gender = $gender; + + return $this; + } + + /** + * Returns givenName. + * + * + * + * @return string + */ + public function getGivenName() { + return $this->givenName; + } + + /** + * Sets givenName. + * + * @param string $givenName + * @return Address + */ + protected function setGivenName($givenName) { + $this->givenName = $givenName; + + return $this; + } + + /** + * Returns legalOrganizationForm. + * + * + * + * @return \Wallee\Sdk\Model\LegalOrganizationForm + */ + public function getLegalOrganizationForm() { + return $this->legalOrganizationForm; + } + + /** + * Sets legalOrganizationForm. + * + * @param \Wallee\Sdk\Model\LegalOrganizationForm $legalOrganizationForm + * @return Address + */ + public function setLegalOrganizationForm($legalOrganizationForm) { + $this->legalOrganizationForm = $legalOrganizationForm; + + return $this; + } + + /** + * Returns mobilePhoneNumber. + * + * + * + * @return string + */ + public function getMobilePhoneNumber() { + return $this->mobilePhoneNumber; + } + + /** + * Sets mobilePhoneNumber. + * + * @param string $mobilePhoneNumber + * @return Address + */ + protected function setMobilePhoneNumber($mobilePhoneNumber) { + $this->mobilePhoneNumber = $mobilePhoneNumber; + + return $this; + } + + /** + * Returns organizationName. + * + * + * + * @return string + */ + public function getOrganizationName() { + return $this->organizationName; + } + + /** + * Sets organizationName. + * + * @param string $organizationName + * @return Address + */ + protected function setOrganizationName($organizationName) { + $this->organizationName = $organizationName; + + return $this; + } + + /** + * Returns phoneNumber. + * + * + * + * @return string + */ + public function getPhoneNumber() { + return $this->phoneNumber; + } + + /** + * Sets phoneNumber. + * + * @param string $phoneNumber + * @return Address + */ + protected function setPhoneNumber($phoneNumber) { + $this->phoneNumber = $phoneNumber; + + return $this; + } + + /** + * Returns postCode. + * + * + * + * @return string + */ + public function getPostCode() { + return $this->postCode; + } + + /** + * Sets postCode. + * + * @param string $postCode + * @return Address + */ + protected function setPostCode($postCode) { + $this->postCode = $postCode; + + return $this; + } + + /** + * Returns postalState. + * + * + * + * @return string + */ + public function getPostalState() { + return $this->postalState; + } + + /** + * Sets postalState. + * + * @param string $postalState + * @return Address + */ + protected function setPostalState($postalState) { + $this->postalState = $postalState; + + return $this; + } + + /** + * Returns salesTaxNumber. + * + * + * + * @return string + */ + public function getSalesTaxNumber() { + return $this->salesTaxNumber; + } + + /** + * Sets salesTaxNumber. + * + * @param string $salesTaxNumber + * @return Address + */ + protected function setSalesTaxNumber($salesTaxNumber) { + $this->salesTaxNumber = $salesTaxNumber; + + return $this; + } + + /** + * Returns salutation. + * + * + * + * @return string + */ + public function getSalutation() { + return $this->salutation; + } + + /** + * Sets salutation. + * + * @param string $salutation + * @return Address + */ + protected function setSalutation($salutation) { + $this->salutation = $salutation; + + return $this; + } + + /** + * Returns socialSecurityNumber. + * + * + * + * @return string + */ + public function getSocialSecurityNumber() { + return $this->socialSecurityNumber; + } + + /** + * Sets socialSecurityNumber. + * + * @param string $socialSecurityNumber + * @return Address + */ + protected function setSocialSecurityNumber($socialSecurityNumber) { + $this->socialSecurityNumber = $socialSecurityNumber; + + return $this; + } + + /** + * Returns sortingCode. + * + * The sorting code identifies the post office at which the post box is located in. + * + * @return string + */ + public function getSortingCode() { + return $this->sortingCode; + } + + /** + * Sets sortingCode. + * + * @param string $sortingCode + * @return Address + */ + protected function setSortingCode($sortingCode) { + $this->sortingCode = $sortingCode; + + return $this; + } + + /** + * Returns street. + * + * + * + * @return string + */ + public function getStreet() { + return $this->street; + } + + /** + * Sets street. + * + * @param string $street + * @return Address + */ + protected function setStreet($street) { + $this->street = $street; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AddressCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AddressCreate.php new file mode 100644 index 0000000..eae11b2 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AddressCreate.php @@ -0,0 +1,789 @@ + 'string', + 'commercialRegisterNumber' => 'string', + 'country' => 'string', + 'dateOfBirth' => '\DateTime', + 'dependentLocality' => 'string', + 'emailAddress' => 'string', + 'familyName' => 'string', + 'gender' => '\Wallee\Sdk\Model\Gender', + 'givenName' => 'string', + 'legalOrganizationForm' => 'int', + 'mobilePhoneNumber' => 'string', + 'organizationName' => 'string', + 'phoneNumber' => 'string', + 'postCode' => 'string', + 'postalState' => 'string', + 'salesTaxNumber' => 'string', + 'salutation' => 'string', + 'socialSecurityNumber' => 'string', + 'sortingCode' => 'string', + 'street' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $city; + + /** + * + * + * @var string + */ + private $commercialRegisterNumber; + + /** + * + * + * @var string + */ + private $country; + + /** + * + * + * @var \DateTime + */ + private $dateOfBirth; + + /** + * + * + * @var string + */ + private $dependentLocality; + + /** + * + * + * @var string + */ + private $emailAddress; + + /** + * + * + * @var string + */ + private $familyName; + + /** + * + * + * @var \Wallee\Sdk\Model\Gender + */ + private $gender; + + /** + * + * + * @var string + */ + private $givenName; + + /** + * + * + * @var int + */ + private $legalOrganizationForm; + + /** + * + * + * @var string + */ + private $mobilePhoneNumber; + + /** + * + * + * @var string + */ + private $organizationName; + + /** + * + * + * @var string + */ + private $phoneNumber; + + /** + * + * + * @var string + */ + private $postCode; + + /** + * + * + * @var string + */ + private $postalState; + + /** + * + * + * @var string + */ + private $salesTaxNumber; + + /** + * + * + * @var string + */ + private $salutation; + + /** + * + * + * @var string + */ + private $socialSecurityNumber; + + /** + * The sorting code identifies the post office at which the post box is located in. + * + * @var string + */ + private $sortingCode; + + /** + * + * + * @var string + */ + private $street; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['city'])) { + $this->setCity($data['city']); + } + if (isset($data['commercialRegisterNumber'])) { + $this->setCommercialRegisterNumber($data['commercialRegisterNumber']); + } + if (isset($data['country'])) { + $this->setCountry($data['country']); + } + if (isset($data['dateOfBirth'])) { + $this->setDateOfBirth($data['dateOfBirth']); + } + if (isset($data['dependentLocality'])) { + $this->setDependentLocality($data['dependentLocality']); + } + if (isset($data['emailAddress'])) { + $this->setEmailAddress($data['emailAddress']); + } + if (isset($data['familyName'])) { + $this->setFamilyName($data['familyName']); + } + if (isset($data['gender'])) { + $this->setGender($data['gender']); + } + if (isset($data['givenName'])) { + $this->setGivenName($data['givenName']); + } + if (isset($data['legalOrganizationForm'])) { + $this->setLegalOrganizationForm($data['legalOrganizationForm']); + } + if (isset($data['mobilePhoneNumber'])) { + $this->setMobilePhoneNumber($data['mobilePhoneNumber']); + } + if (isset($data['organizationName'])) { + $this->setOrganizationName($data['organizationName']); + } + if (isset($data['phoneNumber'])) { + $this->setPhoneNumber($data['phoneNumber']); + } + if (isset($data['postCode'])) { + $this->setPostCode($data['postCode']); + } + if (isset($data['postalState'])) { + $this->setPostalState($data['postalState']); + } + if (isset($data['salesTaxNumber'])) { + $this->setSalesTaxNumber($data['salesTaxNumber']); + } + if (isset($data['salutation'])) { + $this->setSalutation($data['salutation']); + } + if (isset($data['socialSecurityNumber'])) { + $this->setSocialSecurityNumber($data['socialSecurityNumber']); + } + if (isset($data['sortingCode'])) { + $this->setSortingCode($data['sortingCode']); + } + if (isset($data['street'])) { + $this->setStreet($data['street']); + } + } + + + /** + * Returns city. + * + * + * + * @return string + */ + public function getCity() { + return $this->city; + } + + /** + * Sets city. + * + * @param string $city + * @return AddressCreate + */ + public function setCity($city) { + $this->city = $city; + + return $this; + } + + /** + * Returns commercialRegisterNumber. + * + * + * + * @return string + */ + public function getCommercialRegisterNumber() { + return $this->commercialRegisterNumber; + } + + /** + * Sets commercialRegisterNumber. + * + * @param string $commercialRegisterNumber + * @return AddressCreate + */ + public function setCommercialRegisterNumber($commercialRegisterNumber) { + $this->commercialRegisterNumber = $commercialRegisterNumber; + + return $this; + } + + /** + * Returns country. + * + * + * + * @return string + */ + public function getCountry() { + return $this->country; + } + + /** + * Sets country. + * + * @param string $country + * @return AddressCreate + */ + public function setCountry($country) { + $this->country = $country; + + return $this; + } + + /** + * Returns dateOfBirth. + * + * + * + * @return \DateTime + */ + public function getDateOfBirth() { + return $this->dateOfBirth; + } + + /** + * Sets dateOfBirth. + * + * @param \DateTime $dateOfBirth + * @return AddressCreate + */ + public function setDateOfBirth($dateOfBirth) { + $this->dateOfBirth = $dateOfBirth; + + return $this; + } + + /** + * Returns dependentLocality. + * + * + * + * @return string + */ + public function getDependentLocality() { + return $this->dependentLocality; + } + + /** + * Sets dependentLocality. + * + * @param string $dependentLocality + * @return AddressCreate + */ + public function setDependentLocality($dependentLocality) { + $this->dependentLocality = $dependentLocality; + + return $this; + } + + /** + * Returns emailAddress. + * + * + * + * @return string + */ + public function getEmailAddress() { + return $this->emailAddress; + } + + /** + * Sets emailAddress. + * + * @param string $emailAddress + * @return AddressCreate + */ + public function setEmailAddress($emailAddress) { + $this->emailAddress = $emailAddress; + + return $this; + } + + /** + * Returns familyName. + * + * + * + * @return string + */ + public function getFamilyName() { + return $this->familyName; + } + + /** + * Sets familyName. + * + * @param string $familyName + * @return AddressCreate + */ + public function setFamilyName($familyName) { + $this->familyName = $familyName; + + return $this; + } + + /** + * Returns gender. + * + * + * + * @return \Wallee\Sdk\Model\Gender + */ + public function getGender() { + return $this->gender; + } + + /** + * Sets gender. + * + * @param \Wallee\Sdk\Model\Gender $gender + * @return AddressCreate + */ + public function setGender($gender) { + $this->gender = $gender; + + return $this; + } + + /** + * Returns givenName. + * + * + * + * @return string + */ + public function getGivenName() { + return $this->givenName; + } + + /** + * Sets givenName. + * + * @param string $givenName + * @return AddressCreate + */ + public function setGivenName($givenName) { + $this->givenName = $givenName; + + return $this; + } + + /** + * Returns legalOrganizationForm. + * + * + * + * @return int + */ + public function getLegalOrganizationForm() { + return $this->legalOrganizationForm; + } + + /** + * Sets legalOrganizationForm. + * + * @param int $legalOrganizationForm + * @return AddressCreate + */ + public function setLegalOrganizationForm($legalOrganizationForm) { + $this->legalOrganizationForm = $legalOrganizationForm; + + return $this; + } + + /** + * Returns mobilePhoneNumber. + * + * + * + * @return string + */ + public function getMobilePhoneNumber() { + return $this->mobilePhoneNumber; + } + + /** + * Sets mobilePhoneNumber. + * + * @param string $mobilePhoneNumber + * @return AddressCreate + */ + public function setMobilePhoneNumber($mobilePhoneNumber) { + $this->mobilePhoneNumber = $mobilePhoneNumber; + + return $this; + } + + /** + * Returns organizationName. + * + * + * + * @return string + */ + public function getOrganizationName() { + return $this->organizationName; + } + + /** + * Sets organizationName. + * + * @param string $organizationName + * @return AddressCreate + */ + public function setOrganizationName($organizationName) { + $this->organizationName = $organizationName; + + return $this; + } + + /** + * Returns phoneNumber. + * + * + * + * @return string + */ + public function getPhoneNumber() { + return $this->phoneNumber; + } + + /** + * Sets phoneNumber. + * + * @param string $phoneNumber + * @return AddressCreate + */ + public function setPhoneNumber($phoneNumber) { + $this->phoneNumber = $phoneNumber; + + return $this; + } + + /** + * Returns postCode. + * + * + * + * @return string + */ + public function getPostCode() { + return $this->postCode; + } + + /** + * Sets postCode. + * + * @param string $postCode + * @return AddressCreate + */ + public function setPostCode($postCode) { + $this->postCode = $postCode; + + return $this; + } + + /** + * Returns postalState. + * + * + * + * @return string + */ + public function getPostalState() { + return $this->postalState; + } + + /** + * Sets postalState. + * + * @param string $postalState + * @return AddressCreate + */ + public function setPostalState($postalState) { + $this->postalState = $postalState; + + return $this; + } + + /** + * Returns salesTaxNumber. + * + * + * + * @return string + */ + public function getSalesTaxNumber() { + return $this->salesTaxNumber; + } + + /** + * Sets salesTaxNumber. + * + * @param string $salesTaxNumber + * @return AddressCreate + */ + public function setSalesTaxNumber($salesTaxNumber) { + $this->salesTaxNumber = $salesTaxNumber; + + return $this; + } + + /** + * Returns salutation. + * + * + * + * @return string + */ + public function getSalutation() { + return $this->salutation; + } + + /** + * Sets salutation. + * + * @param string $salutation + * @return AddressCreate + */ + public function setSalutation($salutation) { + $this->salutation = $salutation; + + return $this; + } + + /** + * Returns socialSecurityNumber. + * + * + * + * @return string + */ + public function getSocialSecurityNumber() { + return $this->socialSecurityNumber; + } + + /** + * Sets socialSecurityNumber. + * + * @param string $socialSecurityNumber + * @return AddressCreate + */ + public function setSocialSecurityNumber($socialSecurityNumber) { + $this->socialSecurityNumber = $socialSecurityNumber; + + return $this; + } + + /** + * Returns sortingCode. + * + * The sorting code identifies the post office at which the post box is located in. + * + * @return string + */ + public function getSortingCode() { + return $this->sortingCode; + } + + /** + * Sets sortingCode. + * + * @param string $sortingCode + * @return AddressCreate + */ + public function setSortingCode($sortingCode) { + $this->sortingCode = $sortingCode; + + return $this; + } + + /** + * Returns street. + * + * + * + * @return string + */ + public function getStreet() { + return $this->street; + } + + /** + * Sets street. + * + * @param string $street + * @return AddressCreate + */ + public function setStreet($street) { + $this->street = $street; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUser.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUser.php new file mode 100644 index 0000000..bc3d5d7 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUser.php @@ -0,0 +1,202 @@ + 'string', + 'primaryAccount' => '\Wallee\Sdk\Model\Account', + ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The user name is used to identify the application user in administrative interfaces. + * + * @var string + */ + private $name; + + /** + * The account that this user is associated with. The account owner will be able to manage this user. + * + * @var \Wallee\Sdk\Model\Account + */ + private $primaryAccount; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['primaryAccount'])) { + $this->setPrimaryAccount($data['primaryAccount']); + } + if (isset($data['scope'])) { + $this->setScope($data['scope']); + } + } + + + /** + * Returns name. + * + * The user name is used to identify the application user in administrative interfaces. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return ApplicationUser + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns primaryAccount. + * + * The account that this user is associated with. The account owner will be able to manage this user. + * + * @return \Wallee\Sdk\Model\Account + */ + public function getPrimaryAccount() { + return $this->primaryAccount; + } + + /** + * Sets primaryAccount. + * + * @param \Wallee\Sdk\Model\Account $primaryAccount + * @return ApplicationUser + */ + public function setPrimaryAccount($primaryAccount) { + $this->primaryAccount = $primaryAccount; + + return $this; + } + + /** + * Returns scope. + * + * The scope to which the user belongs to. + * + * @return \Wallee\Sdk\Model\Scope + */ + public function getScope() { + return parent::getScope(); + } + + /** + * Sets scope. + * + * @param \Wallee\Sdk\Model\Scope $scope + * @return ApplicationUser + */ + public function setScope($scope) { + return parent::setScope($scope); + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUserCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUserCreate.php new file mode 100644 index 0000000..bf233e8 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUserCreate.php @@ -0,0 +1,149 @@ + 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The account that this user is associated with. The account owner will be able to manage this user. + * + * @var int + */ + private $primaryAccount; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['primaryAccount'])) { + $this->setPrimaryAccount($data['primaryAccount']); + } + } + + + /** + * Returns primaryAccount. + * + * The account that this user is associated with. The account owner will be able to manage this user. + * + * @return int + */ + public function getPrimaryAccount() { + return $this->primaryAccount; + } + + /** + * Sets primaryAccount. + * + * @param int $primaryAccount + * @return ApplicationUserCreate + */ + public function setPrimaryAccount($primaryAccount) { + $this->primaryAccount = $primaryAccount; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getPrimaryAccount() === null) { + throw new ValidationException("'primaryAccount' can't be null", 'primaryAccount', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUserCreateWithMacKey.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUserCreateWithMacKey.php new file mode 100644 index 0000000..97ca9ec --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUserCreateWithMacKey.php @@ -0,0 +1,143 @@ + 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var string + */ + private $macKey; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + } + + + /** + * Returns macKey. + * + * + * + * @return string + */ + public function getMacKey() { + return $this->macKey; + } + + /** + * Sets macKey. + * + * @param string $macKey + * @return ApplicationUserCreateWithMacKey + */ + protected function setMacKey($macKey) { + $this->macKey = $macKey; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUserUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUserUpdate.php new file mode 100644 index 0000000..1c78d1c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ApplicationUserUpdate.php @@ -0,0 +1,186 @@ + 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ApplicationUserUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ApplicationUserUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AttachmentResource.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AttachmentResource.php new file mode 100644 index 0000000..2cc47e2 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/AttachmentResource.php @@ -0,0 +1,178 @@ + 'map[string,string]', + 'resourcePath' => '\Wallee\Sdk\Model\ModelResourcePath' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The name of the attachment which is shown to the user within the email client. + * + * @var map[string,string] + */ + private $attachmentName; + + /** + * The path to the resource which should be attached to the email. + * + * @var \Wallee\Sdk\Model\ModelResourcePath + */ + private $resourcePath; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['attachmentName']) && $data['attachmentName'] != null) { + $this->setAttachmentName($data['attachmentName']); + } + if (isset($data['resourcePath']) && $data['resourcePath'] != null) { + $this->setResourcePath($data['resourcePath']); + } + } + + + /** + * Returns attachmentName. + * + * The name of the attachment which is shown to the user within the email client. + * + * @return map[string,string] + */ + public function getAttachmentName() { + return $this->attachmentName; + } + + /** + * Sets attachmentName. + * + * @param map[string,string] $attachmentName + * @return AttachmentResource + */ + public function setAttachmentName($attachmentName) { + $this->attachmentName = $attachmentName; + + return $this; + } + + /** + * Returns resourcePath. + * + * The path to the resource which should be attached to the email. + * + * @return \Wallee\Sdk\Model\ModelResourcePath + */ + public function getResourcePath() { + return $this->resourcePath; + } + + /** + * Sets resourcePath. + * + * @param \Wallee\Sdk\Model\ModelResourcePath $resourcePath + * @return AttachmentResource + */ + public function setResourcePath($resourcePath) { + $this->resourcePath = $resourcePath; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Charge.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Charge.php new file mode 100644 index 0000000..42b66de --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Charge.php @@ -0,0 +1,465 @@ + '\DateTime', + 'failureReason' => '\Wallee\Sdk\Model\FailureReason', + 'language' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'spaceViewId' => 'int', + 'state' => '\Wallee\Sdk\Model\ChargeState', + 'timeoutOn' => '\DateTime', + 'transaction' => '\Wallee\Sdk\Model\Transaction', + 'type' => '\Wallee\Sdk\Model\ChargeType', + 'userFailureMessage' => 'string', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The date on which the charge was created on. + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var \Wallee\Sdk\Model\FailureReason + */ + private $failureReason; + + /** + * + * + * @var string + */ + private $language; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var int + */ + private $spaceViewId; + + /** + * + * + * @var \Wallee\Sdk\Model\ChargeState + */ + private $state; + + /** + * + * + * @var \DateTime + */ + private $timeoutOn; + + /** + * + * + * @var \Wallee\Sdk\Model\Transaction + */ + private $transaction; + + /** + * + * + * @var \Wallee\Sdk\Model\ChargeType + */ + private $type; + + /** + * The failure message describes for an end user why the charge is failed in the language of the user. This is only provided when the charge is marked as failed. + * + * @var string + */ + private $userFailureMessage; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['failureReason'])) { + $this->setFailureReason($data['failureReason']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['transaction'])) { + $this->setTransaction($data['transaction']); + } + if (isset($data['type'])) { + $this->setType($data['type']); + } + } + + + /** + * Returns createdOn. + * + * The date on which the charge was created on. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return Charge + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns failureReason. + * + * + * + * @return \Wallee\Sdk\Model\FailureReason + */ + public function getFailureReason() { + return $this->failureReason; + } + + /** + * Sets failureReason. + * + * @param \Wallee\Sdk\Model\FailureReason $failureReason + * @return Charge + */ + public function setFailureReason($failureReason) { + $this->failureReason = $failureReason; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return Charge + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return Charge + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns spaceViewId. + * + * + * + * @return int + */ + public function getSpaceViewId() { + return $this->spaceViewId; + } + + /** + * Sets spaceViewId. + * + * @param int $spaceViewId + * @return Charge + */ + protected function setSpaceViewId($spaceViewId) { + $this->spaceViewId = $spaceViewId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\ChargeState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\ChargeState $state + * @return Charge + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns timeoutOn. + * + * + * + * @return \DateTime + */ + public function getTimeoutOn() { + return $this->timeoutOn; + } + + /** + * Sets timeoutOn. + * + * @param \DateTime $timeoutOn + * @return Charge + */ + protected function setTimeoutOn($timeoutOn) { + $this->timeoutOn = $timeoutOn; + + return $this; + } + + /** + * Returns transaction. + * + * + * + * @return \Wallee\Sdk\Model\Transaction + */ + public function getTransaction() { + return $this->transaction; + } + + /** + * Sets transaction. + * + * @param \Wallee\Sdk\Model\Transaction $transaction + * @return Charge + */ + public function setTransaction($transaction) { + $this->transaction = $transaction; + + return $this; + } + + /** + * Returns type. + * + * + * + * @return \Wallee\Sdk\Model\ChargeType + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param \Wallee\Sdk\Model\ChargeType $type + * @return Charge + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns userFailureMessage. + * + * The failure message describes for an end user why the charge is failed in the language of the user. This is only provided when the charge is marked as failed. + * + * @return string + */ + public function getUserFailureMessage() { + return $this->userFailureMessage; + } + + /** + * Sets userFailureMessage. + * + * @param string $userFailureMessage + * @return Charge + */ + protected function setUserFailureMessage($userFailureMessage) { + $this->userFailureMessage = $userFailureMessage; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return Charge + */ + protected function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeAttempt.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeAttempt.php new file mode 100644 index 0000000..155bb9c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeAttempt.php @@ -0,0 +1,756 @@ + '\Wallee\Sdk\Model\Charge', + 'connectorConfiguration' => '\Wallee\Sdk\Model\PaymentConnectorConfiguration', + 'createdOn' => '\DateTime', + 'environment' => '\Wallee\Sdk\Model\ChargeAttemptEnvironment', + 'failedOn' => '\DateTime', + 'failureReason' => '\Wallee\Sdk\Model\FailureReason', + 'initializingTokenVersion' => 'bool', + 'invocation' => '\Wallee\Sdk\Model\ConnectorInvocation', + 'labels' => '\Wallee\Sdk\Model\Label[]', + 'language' => 'string', + 'nextUpdateOn' => '\DateTime', + 'plannedPurgeDate' => '\DateTime', + 'redirectionUrl' => 'string', + 'spaceViewId' => 'int', + 'state' => '\Wallee\Sdk\Model\ChargeAttemptState', + 'succeededOn' => '\DateTime', + 'timeoutOn' => '\DateTime', + 'tokenVersion' => '\Wallee\Sdk\Model\TokenVersion', + 'userFailureMessage' => 'string', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\Charge + */ + private $charge; + + /** + * + * + * @var \Wallee\Sdk\Model\PaymentConnectorConfiguration + */ + private $connectorConfiguration; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var \Wallee\Sdk\Model\ChargeAttemptEnvironment + */ + private $environment; + + /** + * + * + * @var \DateTime + */ + private $failedOn; + + /** + * + * + * @var \Wallee\Sdk\Model\FailureReason + */ + private $failureReason; + + /** + * + * + * @var bool + */ + private $initializingTokenVersion; + + /** + * + * + * @var \Wallee\Sdk\Model\ConnectorInvocation + */ + private $invocation; + + /** + * + * + * @var \Wallee\Sdk\Model\Label[] + */ + private $labels; + + /** + * + * + * @var string + */ + private $language; + + /** + * + * + * @var \DateTime + */ + private $nextUpdateOn; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var string + */ + private $redirectionUrl; + + /** + * + * + * @var int + */ + private $spaceViewId; + + /** + * + * + * @var \Wallee\Sdk\Model\ChargeAttemptState + */ + private $state; + + /** + * + * + * @var \DateTime + */ + private $succeededOn; + + /** + * + * + * @var \DateTime + */ + private $timeoutOn; + + /** + * + * + * @var \Wallee\Sdk\Model\TokenVersion + */ + private $tokenVersion; + + /** + * The user failure message contains the message for the user in case the attempt failed. The message is localized into the language specified on the transaction. + * + * @var string + */ + private $userFailureMessage; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['charge'])) { + $this->setCharge($data['charge']); + } + if (isset($data['connectorConfiguration'])) { + $this->setConnectorConfiguration($data['connectorConfiguration']); + } + if (isset($data['environment'])) { + $this->setEnvironment($data['environment']); + } + if (isset($data['failureReason'])) { + $this->setFailureReason($data['failureReason']); + } + if (isset($data['invocation'])) { + $this->setInvocation($data['invocation']); + } + if (isset($data['labels'])) { + $this->setLabels($data['labels']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['tokenVersion'])) { + $this->setTokenVersion($data['tokenVersion']); + } + } + + + /** + * Returns charge. + * + * + * + * @return \Wallee\Sdk\Model\Charge + */ + public function getCharge() { + return $this->charge; + } + + /** + * Sets charge. + * + * @param \Wallee\Sdk\Model\Charge $charge + * @return ChargeAttempt + */ + public function setCharge($charge) { + $this->charge = $charge; + + return $this; + } + + /** + * Returns connectorConfiguration. + * + * + * + * @return \Wallee\Sdk\Model\PaymentConnectorConfiguration + */ + public function getConnectorConfiguration() { + return $this->connectorConfiguration; + } + + /** + * Sets connectorConfiguration. + * + * @param \Wallee\Sdk\Model\PaymentConnectorConfiguration $connectorConfiguration + * @return ChargeAttempt + */ + public function setConnectorConfiguration($connectorConfiguration) { + $this->connectorConfiguration = $connectorConfiguration; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return ChargeAttempt + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns environment. + * + * + * + * @return \Wallee\Sdk\Model\ChargeAttemptEnvironment + */ + public function getEnvironment() { + return $this->environment; + } + + /** + * Sets environment. + * + * @param \Wallee\Sdk\Model\ChargeAttemptEnvironment $environment + * @return ChargeAttempt + */ + public function setEnvironment($environment) { + $this->environment = $environment; + + return $this; + } + + /** + * Returns failedOn. + * + * + * + * @return \DateTime + */ + public function getFailedOn() { + return $this->failedOn; + } + + /** + * Sets failedOn. + * + * @param \DateTime $failedOn + * @return ChargeAttempt + */ + protected function setFailedOn($failedOn) { + $this->failedOn = $failedOn; + + return $this; + } + + /** + * Returns failureReason. + * + * + * + * @return \Wallee\Sdk\Model\FailureReason + */ + public function getFailureReason() { + return $this->failureReason; + } + + /** + * Sets failureReason. + * + * @param \Wallee\Sdk\Model\FailureReason $failureReason + * @return ChargeAttempt + */ + public function setFailureReason($failureReason) { + $this->failureReason = $failureReason; + + return $this; + } + + /** + * Returns initializingTokenVersion. + * + * + * + * @return bool + */ + public function getInitializingTokenVersion() { + return $this->initializingTokenVersion; + } + + /** + * Sets initializingTokenVersion. + * + * @param bool $initializingTokenVersion + * @return ChargeAttempt + */ + protected function setInitializingTokenVersion($initializingTokenVersion) { + $this->initializingTokenVersion = $initializingTokenVersion; + + return $this; + } + + /** + * Returns invocation. + * + * + * + * @return \Wallee\Sdk\Model\ConnectorInvocation + */ + public function getInvocation() { + return $this->invocation; + } + + /** + * Sets invocation. + * + * @param \Wallee\Sdk\Model\ConnectorInvocation $invocation + * @return ChargeAttempt + */ + public function setInvocation($invocation) { + $this->invocation = $invocation; + + return $this; + } + + /** + * Returns labels. + * + * + * + * @return \Wallee\Sdk\Model\Label[] + */ + public function getLabels() { + return $this->labels; + } + + /** + * Sets labels. + * + * @param \Wallee\Sdk\Model\Label[] $labels + * @return ChargeAttempt + */ + public function setLabels($labels) { + $this->labels = $labels; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return ChargeAttempt + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns nextUpdateOn. + * + * + * + * @return \DateTime + */ + public function getNextUpdateOn() { + return $this->nextUpdateOn; + } + + /** + * Sets nextUpdateOn. + * + * @param \DateTime $nextUpdateOn + * @return ChargeAttempt + */ + protected function setNextUpdateOn($nextUpdateOn) { + $this->nextUpdateOn = $nextUpdateOn; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return ChargeAttempt + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns redirectionUrl. + * + * + * + * @return string + */ + public function getRedirectionUrl() { + return $this->redirectionUrl; + } + + /** + * Sets redirectionUrl. + * + * @param string $redirectionUrl + * @return ChargeAttempt + */ + protected function setRedirectionUrl($redirectionUrl) { + $this->redirectionUrl = $redirectionUrl; + + return $this; + } + + /** + * Returns spaceViewId. + * + * + * + * @return int + */ + public function getSpaceViewId() { + return $this->spaceViewId; + } + + /** + * Sets spaceViewId. + * + * @param int $spaceViewId + * @return ChargeAttempt + */ + protected function setSpaceViewId($spaceViewId) { + $this->spaceViewId = $spaceViewId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\ChargeAttemptState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\ChargeAttemptState $state + * @return ChargeAttempt + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns succeededOn. + * + * + * + * @return \DateTime + */ + public function getSucceededOn() { + return $this->succeededOn; + } + + /** + * Sets succeededOn. + * + * @param \DateTime $succeededOn + * @return ChargeAttempt + */ + protected function setSucceededOn($succeededOn) { + $this->succeededOn = $succeededOn; + + return $this; + } + + /** + * Returns timeoutOn. + * + * + * + * @return \DateTime + */ + public function getTimeoutOn() { + return $this->timeoutOn; + } + + /** + * Sets timeoutOn. + * + * @param \DateTime $timeoutOn + * @return ChargeAttempt + */ + protected function setTimeoutOn($timeoutOn) { + $this->timeoutOn = $timeoutOn; + + return $this; + } + + /** + * Returns tokenVersion. + * + * + * + * @return \Wallee\Sdk\Model\TokenVersion + */ + public function getTokenVersion() { + return $this->tokenVersion; + } + + /** + * Sets tokenVersion. + * + * @param \Wallee\Sdk\Model\TokenVersion $tokenVersion + * @return ChargeAttempt + */ + public function setTokenVersion($tokenVersion) { + $this->tokenVersion = $tokenVersion; + + return $this; + } + + /** + * Returns userFailureMessage. + * + * The user failure message contains the message for the user in case the attempt failed. The message is localized into the language specified on the transaction. + * + * @return string + */ + public function getUserFailureMessage() { + return $this->userFailureMessage; + } + + /** + * Sets userFailureMessage. + * + * @param string $userFailureMessage + * @return ChargeAttempt + */ + protected function setUserFailureMessage($userFailureMessage) { + $this->userFailureMessage = $userFailureMessage; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ChargeAttempt + */ + protected function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeAttemptEnvironment.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeAttemptEnvironment.php new file mode 100644 index 0000000..b102204 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeAttemptEnvironment.php @@ -0,0 +1,43 @@ + 'int[]', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'priority' => 'int', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * If a transaction meets all selected conditions, the charge flow will be used to process the transaction. If the conditions are not met the next charge flow in line will be chosen according to the priorities. + * + * @var int[] + */ + private $conditions; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The charge flow name is used internally to identify the configuration in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The priority orders the charge flows. As such the priority determines together with the conditions the charge flow the selection mechanism for a particular transaction. A change of the priority affects all future selections. + * + * @var int + */ + private $priority; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['conditions'])) { + $this->setConditions($data['conditions']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns conditions. + * + * If a transaction meets all selected conditions, the charge flow will be used to process the transaction. If the conditions are not met the next charge flow in line will be chosen according to the priorities. + * + * @return int[] + */ + public function getConditions() { + return $this->conditions; + } + + /** + * Sets conditions. + * + * @param int[] $conditions + * @return ChargeFlow + */ + public function setConditions($conditions) { + $this->conditions = $conditions; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ChargeFlow + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return ChargeFlow + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The charge flow name is used internally to identify the configuration in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return ChargeFlow + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return ChargeFlow + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns priority. + * + * The priority orders the charge flows. As such the priority determines together with the conditions the charge flow the selection mechanism for a particular transaction. A change of the priority affects all future selections. + * + * @return int + */ + public function getPriority() { + return $this->priority; + } + + /** + * Sets priority. + * + * @param int $priority + * @return ChargeFlow + */ + protected function setPriority($priority) { + $this->priority = $priority; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return ChargeFlow + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ChargeFlow + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevel.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevel.php new file mode 100644 index 0000000..e569f2c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevel.php @@ -0,0 +1,431 @@ + 'int', + 'configuration' => '\Wallee\Sdk\Model\ChargeFlowLevelConfiguration', + 'createdOn' => '\DateTime', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\ChargeFlowLevelState', + 'synchronousCharge' => 'int', + 'timeoutOn' => '\DateTime', + 'tokenCharge' => 'int', + 'transaction' => '\Wallee\Sdk\Model\Transaction', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var int + */ + private $asynchronousCharge; + + /** + * + * + * @var \Wallee\Sdk\Model\ChargeFlowLevelConfiguration + */ + private $configuration; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\ChargeFlowLevelState + */ + private $state; + + /** + * + * + * @var int + */ + private $synchronousCharge; + + /** + * + * + * @var \DateTime + */ + private $timeoutOn; + + /** + * + * + * @var int + */ + private $tokenCharge; + + /** + * + * + * @var \Wallee\Sdk\Model\Transaction + */ + private $transaction; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['configuration'])) { + $this->setConfiguration($data['configuration']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['transaction'])) { + $this->setTransaction($data['transaction']); + } + } + + + /** + * Returns asynchronousCharge. + * + * + * + * @return int + */ + public function getAsynchronousCharge() { + return $this->asynchronousCharge; + } + + /** + * Sets asynchronousCharge. + * + * @param int $asynchronousCharge + * @return ChargeFlowLevel + */ + protected function setAsynchronousCharge($asynchronousCharge) { + $this->asynchronousCharge = $asynchronousCharge; + + return $this; + } + + /** + * Returns configuration. + * + * + * + * @return \Wallee\Sdk\Model\ChargeFlowLevelConfiguration + */ + public function getConfiguration() { + return $this->configuration; + } + + /** + * Sets configuration. + * + * @param \Wallee\Sdk\Model\ChargeFlowLevelConfiguration $configuration + * @return ChargeFlowLevel + */ + public function setConfiguration($configuration) { + $this->configuration = $configuration; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return ChargeFlowLevel + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return ChargeFlowLevel + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\ChargeFlowLevelState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\ChargeFlowLevelState $state + * @return ChargeFlowLevel + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns synchronousCharge. + * + * + * + * @return int + */ + public function getSynchronousCharge() { + return $this->synchronousCharge; + } + + /** + * Sets synchronousCharge. + * + * @param int $synchronousCharge + * @return ChargeFlowLevel + */ + protected function setSynchronousCharge($synchronousCharge) { + $this->synchronousCharge = $synchronousCharge; + + return $this; + } + + /** + * Returns timeoutOn. + * + * + * + * @return \DateTime + */ + public function getTimeoutOn() { + return $this->timeoutOn; + } + + /** + * Sets timeoutOn. + * + * @param \DateTime $timeoutOn + * @return ChargeFlowLevel + */ + protected function setTimeoutOn($timeoutOn) { + $this->timeoutOn = $timeoutOn; + + return $this; + } + + /** + * Returns tokenCharge. + * + * + * + * @return int + */ + public function getTokenCharge() { + return $this->tokenCharge; + } + + /** + * Sets tokenCharge. + * + * @param int $tokenCharge + * @return ChargeFlowLevel + */ + protected function setTokenCharge($tokenCharge) { + $this->tokenCharge = $tokenCharge; + + return $this; + } + + /** + * Returns transaction. + * + * + * + * @return \Wallee\Sdk\Model\Transaction + */ + public function getTransaction() { + return $this->transaction; + } + + /** + * Sets transaction. + * + * @param \Wallee\Sdk\Model\Transaction $transaction + * @return ChargeFlowLevel + */ + public function setTransaction($transaction) { + $this->transaction = $transaction; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ChargeFlowLevel + */ + protected function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevelConfiguration.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevelConfiguration.php new file mode 100644 index 0000000..daef1f8 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevelConfiguration.php @@ -0,0 +1,431 @@ + '\Wallee\Sdk\Model\ChargeFlow', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'period' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'priority' => 'int', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'type' => 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The charge flow level configuration to which the flow is associated. + * + * @var \Wallee\Sdk\Model\ChargeFlow + */ + private $flow; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The charge flow level configuration name is used internally to identify the charge flow level configuration. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The duration of the level before switching to the next one. + * + * @var string + */ + private $period; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The priority indicates the sort order of the level configurations. A low value indicates that the level configuration is executed before any level with a higher value. Any change to this value affects future level configuration selections. + * + * @var int + */ + private $priority; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The type determines how the payment link is delivered to the customer. Once the type is defined it cannot be changed anymore. + * + * @var int + */ + private $type; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['flow'])) { + $this->setFlow($data['flow']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns flow. + * + * The charge flow level configuration to which the flow is associated. + * + * @return \Wallee\Sdk\Model\ChargeFlow + */ + public function getFlow() { + return $this->flow; + } + + /** + * Sets flow. + * + * @param \Wallee\Sdk\Model\ChargeFlow $flow + * @return ChargeFlowLevelConfiguration + */ + public function setFlow($flow) { + $this->flow = $flow; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ChargeFlowLevelConfiguration + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return ChargeFlowLevelConfiguration + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The charge flow level configuration name is used internally to identify the charge flow level configuration. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return ChargeFlowLevelConfiguration + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns period. + * + * The duration of the level before switching to the next one. + * + * @return string + */ + public function getPeriod() { + return $this->period; + } + + /** + * Sets period. + * + * @param string $period + * @return ChargeFlowLevelConfiguration + */ + protected function setPeriod($period) { + $this->period = $period; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return ChargeFlowLevelConfiguration + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns priority. + * + * The priority indicates the sort order of the level configurations. A low value indicates that the level configuration is executed before any level with a higher value. Any change to this value affects future level configuration selections. + * + * @return int + */ + public function getPriority() { + return $this->priority; + } + + /** + * Sets priority. + * + * @param int $priority + * @return ChargeFlowLevelConfiguration + */ + protected function setPriority($priority) { + $this->priority = $priority; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return ChargeFlowLevelConfiguration + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns type. + * + * The type determines how the payment link is delivered to the customer. Once the type is defined it cannot be changed anymore. + * + * @return int + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param int $type + * @return ChargeFlowLevelConfiguration + */ + protected function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ChargeFlowLevelConfiguration + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevelConfigurationType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevelConfigurationType.php new file mode 100644 index 0000000..83f64d0 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevelConfigurationType.php @@ -0,0 +1,208 @@ + 'map[string,string]', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return ChargeFlowLevelConfigurationType + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ChargeFlowLevelConfigurationType + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return ChargeFlowLevelConfigurationType + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevelState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevelState.php new file mode 100644 index 0000000..28dcc16 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ChargeFlowLevelState.php @@ -0,0 +1,44 @@ + 'string', + 'defaultMessage' => 'string', + 'id' => 'string', + 'message' => 'string', + 'type' => '\Wallee\Sdk\Model\ClientErrorType' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * Date when an error has occurred. + * + * @var string + */ + private $date; + + /** + * The error message which is translated into the default language (i.e. English). + * + * @var string + */ + private $defaultMessage; + + /** + * Unique identifier of an error. + * + * @var string + */ + private $id; + + /** + * The error message which is translated in into the language of the client. + * + * @var string + */ + private $message; + + /** + * The type of the client error. + * + * @var \Wallee\Sdk\Model\ClientErrorType + */ + private $type; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['type'])) { + $this->setType($data['type']); + } + } + + + /** + * Returns date. + * + * Date when an error has occurred. + * + * @return string + */ + public function getDate() { + return $this->date; + } + + /** + * Sets date. + * + * @param string $date + * @return ClientError + */ + protected function setDate($date) { + $this->date = $date; + + return $this; + } + + /** + * Returns defaultMessage. + * + * The error message which is translated into the default language (i.e. English). + * + * @return string + */ + public function getDefaultMessage() { + return $this->defaultMessage; + } + + /** + * Sets defaultMessage. + * + * @param string $defaultMessage + * @return ClientError + */ + protected function setDefaultMessage($defaultMessage) { + $this->defaultMessage = $defaultMessage; + + return $this; + } + + /** + * Returns id. + * + * Unique identifier of an error. + * + * @return string + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param string $id + * @return ClientError + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns message. + * + * The error message which is translated in into the language of the client. + * + * @return string + */ + public function getMessage() { + return $this->message; + } + + /** + * Sets message. + * + * @param string $message + * @return ClientError + */ + protected function setMessage($message) { + $this->message = $message; + + return $this; + } + + /** + * Returns type. + * + * The type of the client error. + * + * @return \Wallee\Sdk\Model\ClientErrorType + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param \Wallee\Sdk\Model\ClientErrorType $type + * @return ClientError + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ClientErrorType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ClientErrorType.php new file mode 100644 index 0000000..2183180 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ClientErrorType.php @@ -0,0 +1,44 @@ + 'int', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The selected condition type defines how the configuration is applied to the transactions. + * + * @var int + */ + private $conditionType; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The condition name is used internally to identify the condition. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns conditionType. + * + * The selected condition type defines how the configuration is applied to the transactions. + * + * @return int + */ + public function getConditionType() { + return $this->conditionType; + } + + /** + * Sets conditionType. + * + * @param int $conditionType + * @return Condition + */ + protected function setConditionType($conditionType) { + $this->conditionType = $conditionType; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return Condition + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return Condition + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The condition name is used internally to identify the condition. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return Condition + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return Condition + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return Condition + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return Condition + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ConditionType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ConditionType.php new file mode 100644 index 0000000..ac9109d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ConditionType.php @@ -0,0 +1,208 @@ + 'map[string,string]', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return ConditionType + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ConditionType + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return ConditionType + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ConnectorInvocation.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ConnectorInvocation.php new file mode 100644 index 0000000..217df17 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ConnectorInvocation.php @@ -0,0 +1,301 @@ + '\DateTime', + 'plannedPurgeDate' => '\DateTime', + 'stage' => '\Wallee\Sdk\Model\ConnectorInvocationStage', + 'timeTookInMilliseconds' => 'int', + 'transaction' => 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\ConnectorInvocationStage + */ + private $stage; + + /** + * + * + * @var int + */ + private $timeTookInMilliseconds; + + /** + * + * + * @var int + */ + private $transaction; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['stage'])) { + $this->setStage($data['stage']); + } + } + + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return ConnectorInvocation + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return ConnectorInvocation + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns stage. + * + * + * + * @return \Wallee\Sdk\Model\ConnectorInvocationStage + */ + public function getStage() { + return $this->stage; + } + + /** + * Sets stage. + * + * @param \Wallee\Sdk\Model\ConnectorInvocationStage $stage + * @return ConnectorInvocation + */ + public function setStage($stage) { + $this->stage = $stage; + + return $this; + } + + /** + * Returns timeTookInMilliseconds. + * + * + * + * @return int + */ + public function getTimeTookInMilliseconds() { + return $this->timeTookInMilliseconds; + } + + /** + * Sets timeTookInMilliseconds. + * + * @param int $timeTookInMilliseconds + * @return ConnectorInvocation + */ + protected function setTimeTookInMilliseconds($timeTookInMilliseconds) { + $this->timeTookInMilliseconds = $timeTookInMilliseconds; + + return $this; + } + + /** + * Returns transaction. + * + * + * + * @return int + */ + public function getTransaction() { + return $this->transaction; + } + + /** + * Sets transaction. + * + * @param int $transaction + * @return ConnectorInvocation + */ + protected function setTransaction($transaction) { + $this->transaction = $transaction; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ConnectorInvocation + */ + protected function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ConnectorInvocationStage.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ConnectorInvocationStage.php new file mode 100644 index 0000000..15efa84 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ConnectorInvocationStage.php @@ -0,0 +1,45 @@ + 'string[]', + 'displayName' => 'string', + 'items' => '\Wallee\Sdk\Model\DatabaseTranslatedStringItem[]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string[] + */ + private $availableLanguages; + + /** + * + * + * @var string + */ + private $displayName; + + /** + * + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringItem[] + */ + private $items; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['availableLanguages'])) { + $this->setAvailableLanguages($data['availableLanguages']); + } + if (isset($data['items'])) { + $this->setItems($data['items']); + } + } + + + /** + * Returns availableLanguages. + * + * + * + * @return string[] + */ + public function getAvailableLanguages() { + return $this->availableLanguages; + } + + /** + * Sets availableLanguages. + * + * @param string[] $availableLanguages + * @return DatabaseTranslatedString + */ + public function setAvailableLanguages($availableLanguages) { + $this->availableLanguages = $availableLanguages; + + return $this; + } + + /** + * Returns displayName. + * + * + * + * @return string + */ + public function getDisplayName() { + return $this->displayName; + } + + /** + * Sets displayName. + * + * @param string $displayName + * @return DatabaseTranslatedString + */ + protected function setDisplayName($displayName) { + $this->displayName = $displayName; + + return $this; + } + + /** + * Returns items. + * + * + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringItem[] + */ + public function getItems() { + return $this->items; + } + + /** + * Sets items. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringItem[] $items + * @return DatabaseTranslatedString + */ + public function setItems($items) { + $this->items = $items; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DatabaseTranslatedStringCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DatabaseTranslatedStringCreate.php new file mode 100644 index 0000000..5faa1b6 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DatabaseTranslatedStringCreate.php @@ -0,0 +1,143 @@ + '\Wallee\Sdk\Model\DatabaseTranslatedStringItemCreate[]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringItemCreate[] + */ + private $items; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['items'])) { + $this->setItems($data['items']); + } + } + + + /** + * Returns items. + * + * + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringItemCreate[] + */ + public function getItems() { + return $this->items; + } + + /** + * Sets items. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringItemCreate[] $items + * @return DatabaseTranslatedStringCreate + */ + public function setItems($items) { + $this->items = $items; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DatabaseTranslatedStringItem.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DatabaseTranslatedStringItem.php new file mode 100644 index 0000000..05618de --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DatabaseTranslatedStringItem.php @@ -0,0 +1,202 @@ + 'string', + 'languageCode' => 'string', + 'translation' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $language; + + /** + * + * + * @var string + */ + private $languageCode; + + /** + * + * + * @var string + */ + private $translation; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + } + + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return DatabaseTranslatedStringItem + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns languageCode. + * + * + * + * @return string + */ + public function getLanguageCode() { + return $this->languageCode; + } + + /** + * Sets languageCode. + * + * @param string $languageCode + * @return DatabaseTranslatedStringItem + */ + protected function setLanguageCode($languageCode) { + $this->languageCode = $languageCode; + + return $this; + } + + /** + * Returns translation. + * + * + * + * @return string + */ + public function getTranslation() { + return $this->translation; + } + + /** + * Sets translation. + * + * @param string $translation + * @return DatabaseTranslatedStringItem + */ + protected function setTranslation($translation) { + $this->translation = $translation; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DatabaseTranslatedStringItemCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DatabaseTranslatedStringItemCreate.php new file mode 100644 index 0000000..709abe9 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DatabaseTranslatedStringItemCreate.php @@ -0,0 +1,180 @@ + 'string', + 'translation' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $language; + + /** + * + * + * @var string + */ + private $translation; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['language'])) { + $this->setLanguage($data['language']); + } + if (isset($data['translation'])) { + $this->setTranslation($data['translation']); + } + } + + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return DatabaseTranslatedStringItemCreate + */ + public function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns translation. + * + * + * + * @return string + */ + public function getTranslation() { + return $this->translation; + } + + /** + * Sets translation. + * + * @param string $translation + * @return DatabaseTranslatedStringItemCreate + */ + public function setTranslation($translation) { + $this->translation = $translation; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getLanguage() === null) { + throw new ValidationException("'language' can't be null", 'language', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCase.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCase.php new file mode 100644 index 0000000..94eaace --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCase.php @@ -0,0 +1,1100 @@ + 'float', + 'billingAddress' => '\Wallee\Sdk\Model\Address', + 'closedOn' => '\DateTime', + 'collectorConfiguration' => '\Wallee\Sdk\Model\DebtCollectorConfiguration', + 'contractDate' => '\DateTime', + 'createdOn' => '\DateTime', + 'creator' => 'int', + 'currency' => 'string', + 'dueDate' => '\DateTime', + 'environment' => '\Wallee\Sdk\Model\DebtCollectionEnvironment', + 'externalId' => 'string', + 'failedOn' => '\DateTime', + 'failureReason' => '\Wallee\Sdk\Model\FailureReason', + 'id' => 'int', + 'labels' => '\Wallee\Sdk\Model\Label[]', + 'language' => 'string', + 'lineItems' => '\Wallee\Sdk\Model\LineItem[]', + 'linkedSpaceId' => 'int', + 'nextAttemptOn' => '\DateTime', + 'plannedPurgeDate' => '\DateTime', + 'processingStartedOn' => '\DateTime', + 'processingTimeoutOn' => '\DateTime', + 'reference' => 'string', + 'reviewStartedOn' => '\DateTime', + 'reviewedOn' => '\DateTime', + 'reviewer' => 'int', + 'source' => '\Wallee\Sdk\Model\DebtCollectionCaseSource', + 'sourceEntityId' => 'int', + 'spaceViewId' => 'int', + 'state' => '\Wallee\Sdk\Model\DebtCollectionCaseState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The amount is the total amount of the not paid items. The amount cannot be change once the case is reviewed. + * + * @var float + */ + private $amount; + + /** + * The billing address of the case identifies the debtor. + * + * @var \Wallee\Sdk\Model\Address + */ + private $billingAddress; + + /** + * The closed on date indicates when the case is closed on. + * + * @var \DateTime + */ + private $closedOn; + + /** + * The collector configuration determines how the debt collection case is processed. + * + * @var \Wallee\Sdk\Model\DebtCollectorConfiguration + */ + private $collectorConfiguration; + + /** + * The contract date is the date on which the contract with the debtor was signed on. + * + * @var \DateTime + */ + private $contractDate; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * The creator references the user which has created the debt collection case. + * + * @var int + */ + private $creator; + + /** + * The currency defines the billing currency of the debt collection case. + * + * @var string + */ + private $currency; + + /** + * The due date indicates the date on which the amount receivable was due. This date has to be always in the past. + * + * @var \DateTime + */ + private $dueDate; + + /** + * The environment in which this case will be processed. There must be a debt collector configuration present which supports the chosen environment. + * + * @var \Wallee\Sdk\Model\DebtCollectionEnvironment + */ + private $environment; + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * The failed on date indicates when the case is failed on. + * + * @var \DateTime + */ + private $failedOn; + + /** + * + * + * @var \Wallee\Sdk\Model\FailureReason + */ + private $failureReason; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var \Wallee\Sdk\Model\Label[] + */ + private $labels; + + /** + * The language indicates the language to be used in the communication with the debtor. + * + * @var string + */ + private $language; + + /** + * The line items of the debt collection case will be shown on documents sent to the debtor and the total of them makes up total amount to collect. + * + * @var \Wallee\Sdk\Model\LineItem[] + */ + private $lineItems; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var \DateTime + */ + private $nextAttemptOn; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The processing started on date indicates the date on which the processing of the case started on. + * + * @var \DateTime + */ + private $processingStartedOn; + + /** + * + * + * @var \DateTime + */ + private $processingTimeoutOn; + + /** + * The case reference is used in the communication with the debtor. It should be unique and it should be linkable with the source of the debt collection case. + * + * @var string + */ + private $reference; + + /** + * + * + * @var \DateTime + */ + private $reviewStartedOn; + + /** + * The reviewed on date indicates when the review of the case was conducted on. + * + * @var \DateTime + */ + private $reviewedOn; + + /** + * The reviewer references the user which has reviewed the case. + * + * @var int + */ + private $reviewer; + + /** + * The source of the debt collection case indicates the origin of the amount receivable. + * + * @var \Wallee\Sdk\Model\DebtCollectionCaseSource + */ + private $source; + + /** + * The source entity ID points to the object which is the origin of the debt collection case. This ID is only set when the case was triggered by an internal process. + * + * @var int + */ + private $sourceEntityId; + + /** + * + * + * @var int + */ + private $spaceViewId; + + /** + * + * + * @var \Wallee\Sdk\Model\DebtCollectionCaseState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['billingAddress'])) { + $this->setBillingAddress($data['billingAddress']); + } + if (isset($data['collectorConfiguration'])) { + $this->setCollectorConfiguration($data['collectorConfiguration']); + } + if (isset($data['environment'])) { + $this->setEnvironment($data['environment']); + } + if (isset($data['failureReason'])) { + $this->setFailureReason($data['failureReason']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['labels'])) { + $this->setLabels($data['labels']); + } + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + if (isset($data['source'])) { + $this->setSource($data['source']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns amount. + * + * The amount is the total amount of the not paid items. The amount cannot be change once the case is reviewed. + * + * @return float + */ + public function getAmount() { + return $this->amount; + } + + /** + * Sets amount. + * + * @param float $amount + * @return DebtCollectionCase + */ + protected function setAmount($amount) { + $this->amount = $amount; + + return $this; + } + + /** + * Returns billingAddress. + * + * The billing address of the case identifies the debtor. + * + * @return \Wallee\Sdk\Model\Address + */ + public function getBillingAddress() { + return $this->billingAddress; + } + + /** + * Sets billingAddress. + * + * @param \Wallee\Sdk\Model\Address $billingAddress + * @return DebtCollectionCase + */ + public function setBillingAddress($billingAddress) { + $this->billingAddress = $billingAddress; + + return $this; + } + + /** + * Returns closedOn. + * + * The closed on date indicates when the case is closed on. + * + * @return \DateTime + */ + public function getClosedOn() { + return $this->closedOn; + } + + /** + * Sets closedOn. + * + * @param \DateTime $closedOn + * @return DebtCollectionCase + */ + protected function setClosedOn($closedOn) { + $this->closedOn = $closedOn; + + return $this; + } + + /** + * Returns collectorConfiguration. + * + * The collector configuration determines how the debt collection case is processed. + * + * @return \Wallee\Sdk\Model\DebtCollectorConfiguration + */ + public function getCollectorConfiguration() { + return $this->collectorConfiguration; + } + + /** + * Sets collectorConfiguration. + * + * @param \Wallee\Sdk\Model\DebtCollectorConfiguration $collectorConfiguration + * @return DebtCollectionCase + */ + public function setCollectorConfiguration($collectorConfiguration) { + $this->collectorConfiguration = $collectorConfiguration; + + return $this; + } + + /** + * Returns contractDate. + * + * The contract date is the date on which the contract with the debtor was signed on. + * + * @return \DateTime + */ + public function getContractDate() { + return $this->contractDate; + } + + /** + * Sets contractDate. + * + * @param \DateTime $contractDate + * @return DebtCollectionCase + */ + protected function setContractDate($contractDate) { + $this->contractDate = $contractDate; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return DebtCollectionCase + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns creator. + * + * The creator references the user which has created the debt collection case. + * + * @return int + */ + public function getCreator() { + return $this->creator; + } + + /** + * Sets creator. + * + * @param int $creator + * @return DebtCollectionCase + */ + protected function setCreator($creator) { + $this->creator = $creator; + + return $this; + } + + /** + * Returns currency. + * + * The currency defines the billing currency of the debt collection case. + * + * @return string + */ + public function getCurrency() { + return $this->currency; + } + + /** + * Sets currency. + * + * @param string $currency + * @return DebtCollectionCase + */ + protected function setCurrency($currency) { + $this->currency = $currency; + + return $this; + } + + /** + * Returns dueDate. + * + * The due date indicates the date on which the amount receivable was due. This date has to be always in the past. + * + * @return \DateTime + */ + public function getDueDate() { + return $this->dueDate; + } + + /** + * Sets dueDate. + * + * @param \DateTime $dueDate + * @return DebtCollectionCase + */ + protected function setDueDate($dueDate) { + $this->dueDate = $dueDate; + + return $this; + } + + /** + * Returns environment. + * + * The environment in which this case will be processed. There must be a debt collector configuration present which supports the chosen environment. + * + * @return \Wallee\Sdk\Model\DebtCollectionEnvironment + */ + public function getEnvironment() { + return $this->environment; + } + + /** + * Sets environment. + * + * @param \Wallee\Sdk\Model\DebtCollectionEnvironment $environment + * @return DebtCollectionCase + */ + public function setEnvironment($environment) { + $this->environment = $environment; + + return $this; + } + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return DebtCollectionCase + */ + protected function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns failedOn. + * + * The failed on date indicates when the case is failed on. + * + * @return \DateTime + */ + public function getFailedOn() { + return $this->failedOn; + } + + /** + * Sets failedOn. + * + * @param \DateTime $failedOn + * @return DebtCollectionCase + */ + protected function setFailedOn($failedOn) { + $this->failedOn = $failedOn; + + return $this; + } + + /** + * Returns failureReason. + * + * + * + * @return \Wallee\Sdk\Model\FailureReason + */ + public function getFailureReason() { + return $this->failureReason; + } + + /** + * Sets failureReason. + * + * @param \Wallee\Sdk\Model\FailureReason $failureReason + * @return DebtCollectionCase + */ + public function setFailureReason($failureReason) { + $this->failureReason = $failureReason; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return DebtCollectionCase + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns labels. + * + * + * + * @return \Wallee\Sdk\Model\Label[] + */ + public function getLabels() { + return $this->labels; + } + + /** + * Sets labels. + * + * @param \Wallee\Sdk\Model\Label[] $labels + * @return DebtCollectionCase + */ + public function setLabels($labels) { + $this->labels = $labels; + + return $this; + } + + /** + * Returns language. + * + * The language indicates the language to be used in the communication with the debtor. + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return DebtCollectionCase + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns lineItems. + * + * The line items of the debt collection case will be shown on documents sent to the debtor and the total of them makes up total amount to collect. + * + * @return \Wallee\Sdk\Model\LineItem[] + */ + public function getLineItems() { + return $this->lineItems; + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItem[] $lineItems + * @return DebtCollectionCase + */ + public function setLineItems($lineItems) { + $this->lineItems = $lineItems; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return DebtCollectionCase + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns nextAttemptOn. + * + * + * + * @return \DateTime + */ + public function getNextAttemptOn() { + return $this->nextAttemptOn; + } + + /** + * Sets nextAttemptOn. + * + * @param \DateTime $nextAttemptOn + * @return DebtCollectionCase + */ + protected function setNextAttemptOn($nextAttemptOn) { + $this->nextAttemptOn = $nextAttemptOn; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return DebtCollectionCase + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns processingStartedOn. + * + * The processing started on date indicates the date on which the processing of the case started on. + * + * @return \DateTime + */ + public function getProcessingStartedOn() { + return $this->processingStartedOn; + } + + /** + * Sets processingStartedOn. + * + * @param \DateTime $processingStartedOn + * @return DebtCollectionCase + */ + protected function setProcessingStartedOn($processingStartedOn) { + $this->processingStartedOn = $processingStartedOn; + + return $this; + } + + /** + * Returns processingTimeoutOn. + * + * + * + * @return \DateTime + */ + public function getProcessingTimeoutOn() { + return $this->processingTimeoutOn; + } + + /** + * Sets processingTimeoutOn. + * + * @param \DateTime $processingTimeoutOn + * @return DebtCollectionCase + */ + protected function setProcessingTimeoutOn($processingTimeoutOn) { + $this->processingTimeoutOn = $processingTimeoutOn; + + return $this; + } + + /** + * Returns reference. + * + * The case reference is used in the communication with the debtor. It should be unique and it should be linkable with the source of the debt collection case. + * + * @return string + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param string $reference + * @return DebtCollectionCase + */ + protected function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Returns reviewStartedOn. + * + * + * + * @return \DateTime + */ + public function getReviewStartedOn() { + return $this->reviewStartedOn; + } + + /** + * Sets reviewStartedOn. + * + * @param \DateTime $reviewStartedOn + * @return DebtCollectionCase + */ + protected function setReviewStartedOn($reviewStartedOn) { + $this->reviewStartedOn = $reviewStartedOn; + + return $this; + } + + /** + * Returns reviewedOn. + * + * The reviewed on date indicates when the review of the case was conducted on. + * + * @return \DateTime + */ + public function getReviewedOn() { + return $this->reviewedOn; + } + + /** + * Sets reviewedOn. + * + * @param \DateTime $reviewedOn + * @return DebtCollectionCase + */ + protected function setReviewedOn($reviewedOn) { + $this->reviewedOn = $reviewedOn; + + return $this; + } + + /** + * Returns reviewer. + * + * The reviewer references the user which has reviewed the case. + * + * @return int + */ + public function getReviewer() { + return $this->reviewer; + } + + /** + * Sets reviewer. + * + * @param int $reviewer + * @return DebtCollectionCase + */ + protected function setReviewer($reviewer) { + $this->reviewer = $reviewer; + + return $this; + } + + /** + * Returns source. + * + * The source of the debt collection case indicates the origin of the amount receivable. + * + * @return \Wallee\Sdk\Model\DebtCollectionCaseSource + */ + public function getSource() { + return $this->source; + } + + /** + * Sets source. + * + * @param \Wallee\Sdk\Model\DebtCollectionCaseSource $source + * @return DebtCollectionCase + */ + public function setSource($source) { + $this->source = $source; + + return $this; + } + + /** + * Returns sourceEntityId. + * + * The source entity ID points to the object which is the origin of the debt collection case. This ID is only set when the case was triggered by an internal process. + * + * @return int + */ + public function getSourceEntityId() { + return $this->sourceEntityId; + } + + /** + * Sets sourceEntityId. + * + * @param int $sourceEntityId + * @return DebtCollectionCase + */ + protected function setSourceEntityId($sourceEntityId) { + $this->sourceEntityId = $sourceEntityId; + + return $this; + } + + /** + * Returns spaceViewId. + * + * + * + * @return int + */ + public function getSpaceViewId() { + return $this->spaceViewId; + } + + /** + * Sets spaceViewId. + * + * @param int $spaceViewId + * @return DebtCollectionCase + */ + protected function setSpaceViewId($spaceViewId) { + $this->spaceViewId = $spaceViewId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\DebtCollectionCaseState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\DebtCollectionCaseState $state + * @return DebtCollectionCase + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return DebtCollectionCase + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseCreate.php new file mode 100644 index 0000000..634a6bc --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseCreate.php @@ -0,0 +1,220 @@ + 'int', + 'externalId' => 'string', + 'reference' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The collector configuration determines how the debt collection case is processed. + * + * @var int + */ + private $collectorConfiguration; + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * The case reference is used in the communication with the debtor. It should be unique and it should be linkable with the source of the debt collection case. + * + * @var string + */ + private $reference; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['collectorConfiguration'])) { + $this->setCollectorConfiguration($data['collectorConfiguration']); + } + if (isset($data['externalId'])) { + $this->setExternalId($data['externalId']); + } + if (isset($data['reference'])) { + $this->setReference($data['reference']); + } + } + + + /** + * Returns collectorConfiguration. + * + * The collector configuration determines how the debt collection case is processed. + * + * @return int + */ + public function getCollectorConfiguration() { + return $this->collectorConfiguration; + } + + /** + * Sets collectorConfiguration. + * + * @param int $collectorConfiguration + * @return DebtCollectionCaseCreate + */ + public function setCollectorConfiguration($collectorConfiguration) { + $this->collectorConfiguration = $collectorConfiguration; + + return $this; + } + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return DebtCollectionCaseCreate + */ + public function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns reference. + * + * The case reference is used in the communication with the debtor. It should be unique and it should be linkable with the source of the debt collection case. + * + * @return string + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param string $reference + * @return DebtCollectionCaseCreate + */ + public function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getExternalId() === null) { + throw new ValidationException("'externalId' can't be null", 'externalId', $this); + } + if ($this->getReference() === null) { + throw new ValidationException("'reference' can't be null", 'reference', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseDocument.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseDocument.php new file mode 100644 index 0000000..f04c523 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseDocument.php @@ -0,0 +1,459 @@ + '\DateTime', + 'debtCollectionCase' => 'int', + 'fileName' => 'string', + 'id' => 'int', + 'labels' => '\Wallee\Sdk\Model\Label[]', + 'linkedSpaceId' => 'int', + 'mimeType' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'storageId' => 'string', + 'uniqueId' => 'string', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var int + */ + private $debtCollectionCase; + + /** + * + * + * @var string + */ + private $fileName; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var \Wallee\Sdk\Model\Label[] + */ + private $labels; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var string + */ + private $mimeType; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var string + */ + private $storageId; + + /** + * + * + * @var string + */ + private $uniqueId; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['labels'])) { + $this->setLabels($data['labels']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return DebtCollectionCaseDocument + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns debtCollectionCase. + * + * + * + * @return int + */ + public function getDebtCollectionCase() { + return $this->debtCollectionCase; + } + + /** + * Sets debtCollectionCase. + * + * @param int $debtCollectionCase + * @return DebtCollectionCaseDocument + */ + protected function setDebtCollectionCase($debtCollectionCase) { + $this->debtCollectionCase = $debtCollectionCase; + + return $this; + } + + /** + * Returns fileName. + * + * + * + * @return string + */ + public function getFileName() { + return $this->fileName; + } + + /** + * Sets fileName. + * + * @param string $fileName + * @return DebtCollectionCaseDocument + */ + protected function setFileName($fileName) { + $this->fileName = $fileName; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return DebtCollectionCaseDocument + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns labels. + * + * + * + * @return \Wallee\Sdk\Model\Label[] + */ + public function getLabels() { + return $this->labels; + } + + /** + * Sets labels. + * + * @param \Wallee\Sdk\Model\Label[] $labels + * @return DebtCollectionCaseDocument + */ + public function setLabels($labels) { + $this->labels = $labels; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return DebtCollectionCaseDocument + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns mimeType. + * + * + * + * @return string + */ + public function getMimeType() { + return $this->mimeType; + } + + /** + * Sets mimeType. + * + * @param string $mimeType + * @return DebtCollectionCaseDocument + */ + protected function setMimeType($mimeType) { + $this->mimeType = $mimeType; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return DebtCollectionCaseDocument + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns storageId. + * + * + * + * @return string + */ + public function getStorageId() { + return $this->storageId; + } + + /** + * Sets storageId. + * + * @param string $storageId + * @return DebtCollectionCaseDocument + */ + protected function setStorageId($storageId) { + $this->storageId = $storageId; + + return $this; + } + + /** + * Returns uniqueId. + * + * + * + * @return string + */ + public function getUniqueId() { + return $this->uniqueId; + } + + /** + * Sets uniqueId. + * + * @param string $uniqueId + * @return DebtCollectionCaseDocument + */ + protected function setUniqueId($uniqueId) { + $this->uniqueId = $uniqueId; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return DebtCollectionCaseDocument + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseSource.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseSource.php new file mode 100644 index 0000000..9bd220f --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseSource.php @@ -0,0 +1,239 @@ + 'map[string,string]', + 'forcedPreparingState' => 'bool', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var bool + */ + private $forcedPreparingState; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return DebtCollectionCaseSource + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns forcedPreparingState. + * + * + * + * @return bool + */ + public function getForcedPreparingState() { + return $this->forcedPreparingState; + } + + /** + * Sets forcedPreparingState. + * + * @param bool $forcedPreparingState + * @return DebtCollectionCaseSource + */ + protected function setForcedPreparingState($forcedPreparingState) { + $this->forcedPreparingState = $forcedPreparingState; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return DebtCollectionCaseSource + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return DebtCollectionCaseSource + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseState.php new file mode 100644 index 0000000..98e5267 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionCaseState.php @@ -0,0 +1,48 @@ + 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return DebtCollectionCaseUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return DebtCollectionCaseUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionEnvironment.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionEnvironment.php new file mode 100644 index 0000000..1f2a6dc --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionEnvironment.php @@ -0,0 +1,43 @@ + 'float', + 'createdBy' => 'int', + 'createdOn' => '\DateTime', + 'debtCollectionCase' => 'int', + 'externalId' => 'string', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'plannedPurgeDate' => '\DateTime', + 'source' => 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var float + */ + private $amount; + + /** + * The created by field indicates the user which has created the receipt. + * + * @var int + */ + private $createdBy; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var int + */ + private $debtCollectionCase; + + /** + * The external id is a unique identifier for the receipt. The external id has to be unique in combination with the debt collection case. When a receipt is sent with an existing external id the existing one is returned rather than a new one is created. + * + * @var string + */ + private $externalId; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var int + */ + private $source; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns amount. + * + * + * + * @return float + */ + public function getAmount() { + return $this->amount; + } + + /** + * Sets amount. + * + * @param float $amount + * @return DebtCollectionReceipt + */ + protected function setAmount($amount) { + $this->amount = $amount; + + return $this; + } + + /** + * Returns createdBy. + * + * The created by field indicates the user which has created the receipt. + * + * @return int + */ + public function getCreatedBy() { + return $this->createdBy; + } + + /** + * Sets createdBy. + * + * @param int $createdBy + * @return DebtCollectionReceipt + */ + protected function setCreatedBy($createdBy) { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return DebtCollectionReceipt + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns debtCollectionCase. + * + * + * + * @return int + */ + public function getDebtCollectionCase() { + return $this->debtCollectionCase; + } + + /** + * Sets debtCollectionCase. + * + * @param int $debtCollectionCase + * @return DebtCollectionReceipt + */ + protected function setDebtCollectionCase($debtCollectionCase) { + $this->debtCollectionCase = $debtCollectionCase; + + return $this; + } + + /** + * Returns externalId. + * + * The external id is a unique identifier for the receipt. The external id has to be unique in combination with the debt collection case. When a receipt is sent with an existing external id the existing one is returned rather than a new one is created. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return DebtCollectionReceipt + */ + protected function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return DebtCollectionReceipt + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return DebtCollectionReceipt + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return DebtCollectionReceipt + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns source. + * + * + * + * @return int + */ + public function getSource() { + return $this->source; + } + + /** + * Sets source. + * + * @param int $source + * @return DebtCollectionReceipt + */ + protected function setSource($source) { + $this->source = $source; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return DebtCollectionReceipt + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionReceiptSource.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionReceiptSource.php new file mode 100644 index 0000000..d6b83a9 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectionReceiptSource.php @@ -0,0 +1,208 @@ + 'map[string,string]', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return DebtCollectionReceiptSource + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return DebtCollectionReceiptSource + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return DebtCollectionReceiptSource + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollector.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollector.php new file mode 100644 index 0000000..b070db9 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollector.php @@ -0,0 +1,208 @@ + 'map[string,string]', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return DebtCollector + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return DebtCollector + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return DebtCollector + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectorCondition.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectorCondition.php new file mode 100644 index 0000000..b7a54c3 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectorCondition.php @@ -0,0 +1,335 @@ + 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'type' => 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The condition name is used internally to identify the condition. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The condition type determines the condition realization. + * + * @var int + */ + private $type; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return DebtCollectorCondition + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return DebtCollectorCondition + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The condition name is used internally to identify the condition. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return DebtCollectorCondition + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return DebtCollectorCondition + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return DebtCollectorCondition + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns type. + * + * The condition type determines the condition realization. + * + * @return int + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param int $type + * @return DebtCollectorCondition + */ + protected function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return DebtCollectorCondition + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectorConditionType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectorConditionType.php new file mode 100644 index 0000000..3675983 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectorConditionType.php @@ -0,0 +1,208 @@ + 'map[string,string]', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return DebtCollectorConditionType + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return DebtCollectorConditionType + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return DebtCollectorConditionType + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectorConfiguration.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectorConfiguration.php new file mode 100644 index 0000000..0698408 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DebtCollectorConfiguration.php @@ -0,0 +1,465 @@ + 'int', + 'conditions' => 'int[]', + 'enabledSpaceViews' => 'int[]', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'priority' => 'int', + 'skipReviewEnabled' => 'bool', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The collector handles the debt collection case based on the settings of this configuration. + * + * @var int + */ + private $collector; + + /** + * The conditions applied to the collector configuration restricts the application of this configuration onto a particular debt collection case. + * + * @var int[] + */ + private $conditions; + + /** + * The collector configuration is only enabled for the selected space views. In case the set is empty the collector configuration is enabled for all space views. + * + * @var int[] + */ + private $enabledSpaceViews; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The collector configuration name is used internally to identify a specific collector configuration. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The priority defines the order in which the collector configuration is tried to be applied onto a debt collection case. The higher the value the less likely the configuration is applied on a case. + * + * @var int + */ + private $priority; + + /** + * When the review is skipped there will be no review for cases which use this configuration. + * + * @var bool + */ + private $skipReviewEnabled; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['conditions'])) { + $this->setConditions($data['conditions']); + } + if (isset($data['enabledSpaceViews'])) { + $this->setEnabledSpaceViews($data['enabledSpaceViews']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns collector. + * + * The collector handles the debt collection case based on the settings of this configuration. + * + * @return int + */ + public function getCollector() { + return $this->collector; + } + + /** + * Sets collector. + * + * @param int $collector + * @return DebtCollectorConfiguration + */ + protected function setCollector($collector) { + $this->collector = $collector; + + return $this; + } + + /** + * Returns conditions. + * + * The conditions applied to the collector configuration restricts the application of this configuration onto a particular debt collection case. + * + * @return int[] + */ + public function getConditions() { + return $this->conditions; + } + + /** + * Sets conditions. + * + * @param int[] $conditions + * @return DebtCollectorConfiguration + */ + public function setConditions($conditions) { + $this->conditions = $conditions; + + return $this; + } + + /** + * Returns enabledSpaceViews. + * + * The collector configuration is only enabled for the selected space views. In case the set is empty the collector configuration is enabled for all space views. + * + * @return int[] + */ + public function getEnabledSpaceViews() { + return $this->enabledSpaceViews; + } + + /** + * Sets enabledSpaceViews. + * + * @param int[] $enabledSpaceViews + * @return DebtCollectorConfiguration + */ + public function setEnabledSpaceViews($enabledSpaceViews) { + $this->enabledSpaceViews = $enabledSpaceViews; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return DebtCollectorConfiguration + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return DebtCollectorConfiguration + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The collector configuration name is used internally to identify a specific collector configuration. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return DebtCollectorConfiguration + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return DebtCollectorConfiguration + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns priority. + * + * The priority defines the order in which the collector configuration is tried to be applied onto a debt collection case. The higher the value the less likely the configuration is applied on a case. + * + * @return int + */ + public function getPriority() { + return $this->priority; + } + + /** + * Sets priority. + * + * @param int $priority + * @return DebtCollectorConfiguration + */ + protected function setPriority($priority) { + $this->priority = $priority; + + return $this; + } + + /** + * Returns skipReviewEnabled. + * + * When the review is skipped there will be no review for cases which use this configuration. + * + * @return bool + */ + public function getSkipReviewEnabled() { + return $this->skipReviewEnabled; + } + + /** + * Sets skipReviewEnabled. + * + * @param bool $skipReviewEnabled + * @return DebtCollectorConfiguration + */ + protected function setSkipReviewEnabled($skipReviewEnabled) { + $this->skipReviewEnabled = $skipReviewEnabled; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return DebtCollectorConfiguration + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return DebtCollectorConfiguration + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DeliveryIndication.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DeliveryIndication.php new file mode 100644 index 0000000..d614774 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DeliveryIndication.php @@ -0,0 +1,431 @@ + '\Wallee\Sdk\Model\DeliveryIndicationDecisionReason', + 'automaticallyDecidedOn' => '\DateTime', + 'createdOn' => '\DateTime', + 'manualDecisionTimeoutOn' => '\DateTime', + 'manuallyDecidedBy' => 'int', + 'manuallyDecidedOn' => '\DateTime', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\DeliveryIndicationState', + 'timeoutOn' => '\DateTime', + 'transaction' => '\Wallee\Sdk\Model\Transaction' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\DeliveryIndicationDecisionReason + */ + private $automaticDecisionReason; + + /** + * + * + * @var \DateTime + */ + private $automaticallyDecidedOn; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var \DateTime + */ + private $manualDecisionTimeoutOn; + + /** + * + * + * @var int + */ + private $manuallyDecidedBy; + + /** + * + * + * @var \DateTime + */ + private $manuallyDecidedOn; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\DeliveryIndicationState + */ + private $state; + + /** + * + * + * @var \DateTime + */ + private $timeoutOn; + + /** + * + * + * @var \Wallee\Sdk\Model\Transaction + */ + private $transaction; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['automaticDecisionReason'])) { + $this->setAutomaticDecisionReason($data['automaticDecisionReason']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['transaction'])) { + $this->setTransaction($data['transaction']); + } + } + + + /** + * Returns automaticDecisionReason. + * + * + * + * @return \Wallee\Sdk\Model\DeliveryIndicationDecisionReason + */ + public function getAutomaticDecisionReason() { + return $this->automaticDecisionReason; + } + + /** + * Sets automaticDecisionReason. + * + * @param \Wallee\Sdk\Model\DeliveryIndicationDecisionReason $automaticDecisionReason + * @return DeliveryIndication + */ + public function setAutomaticDecisionReason($automaticDecisionReason) { + $this->automaticDecisionReason = $automaticDecisionReason; + + return $this; + } + + /** + * Returns automaticallyDecidedOn. + * + * + * + * @return \DateTime + */ + public function getAutomaticallyDecidedOn() { + return $this->automaticallyDecidedOn; + } + + /** + * Sets automaticallyDecidedOn. + * + * @param \DateTime $automaticallyDecidedOn + * @return DeliveryIndication + */ + protected function setAutomaticallyDecidedOn($automaticallyDecidedOn) { + $this->automaticallyDecidedOn = $automaticallyDecidedOn; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return DeliveryIndication + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns manualDecisionTimeoutOn. + * + * + * + * @return \DateTime + */ + public function getManualDecisionTimeoutOn() { + return $this->manualDecisionTimeoutOn; + } + + /** + * Sets manualDecisionTimeoutOn. + * + * @param \DateTime $manualDecisionTimeoutOn + * @return DeliveryIndication + */ + protected function setManualDecisionTimeoutOn($manualDecisionTimeoutOn) { + $this->manualDecisionTimeoutOn = $manualDecisionTimeoutOn; + + return $this; + } + + /** + * Returns manuallyDecidedBy. + * + * + * + * @return int + */ + public function getManuallyDecidedBy() { + return $this->manuallyDecidedBy; + } + + /** + * Sets manuallyDecidedBy. + * + * @param int $manuallyDecidedBy + * @return DeliveryIndication + */ + protected function setManuallyDecidedBy($manuallyDecidedBy) { + $this->manuallyDecidedBy = $manuallyDecidedBy; + + return $this; + } + + /** + * Returns manuallyDecidedOn. + * + * + * + * @return \DateTime + */ + public function getManuallyDecidedOn() { + return $this->manuallyDecidedOn; + } + + /** + * Sets manuallyDecidedOn. + * + * @param \DateTime $manuallyDecidedOn + * @return DeliveryIndication + */ + protected function setManuallyDecidedOn($manuallyDecidedOn) { + $this->manuallyDecidedOn = $manuallyDecidedOn; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return DeliveryIndication + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\DeliveryIndicationState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\DeliveryIndicationState $state + * @return DeliveryIndication + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns timeoutOn. + * + * + * + * @return \DateTime + */ + public function getTimeoutOn() { + return $this->timeoutOn; + } + + /** + * Sets timeoutOn. + * + * @param \DateTime $timeoutOn + * @return DeliveryIndication + */ + protected function setTimeoutOn($timeoutOn) { + $this->timeoutOn = $timeoutOn; + + return $this; + } + + /** + * Returns transaction. + * + * + * + * @return \Wallee\Sdk\Model\Transaction + */ + public function getTransaction() { + return $this->transaction; + } + + /** + * Sets transaction. + * + * @param \Wallee\Sdk\Model\Transaction $transaction + * @return DeliveryIndication + */ + public function setTransaction($transaction) { + $this->transaction = $transaction; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DeliveryIndicationDecisionReason.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DeliveryIndicationDecisionReason.php new file mode 100644 index 0000000..a5d6663 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DeliveryIndicationDecisionReason.php @@ -0,0 +1,208 @@ + 'map[string,string]', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return DeliveryIndicationDecisionReason + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return DeliveryIndicationDecisionReason + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return DeliveryIndicationDecisionReason + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DeliveryIndicationState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DeliveryIndicationState.php new file mode 100644 index 0000000..a44fa15 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DeliveryIndicationState.php @@ -0,0 +1,45 @@ + 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'spaceId' => 'int', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'templateResource' => '\Wallee\Sdk\Model\ModelResourcePath', + 'type' => 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var int + */ + private $spaceId; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * + * + * @var \Wallee\Sdk\Model\ModelResourcePath + */ + private $templateResource; + + /** + * + * + * @var int + */ + private $type; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['templateResource'])) { + $this->setTemplateResource($data['templateResource']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return DocumentTemplate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return DocumentTemplate + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return DocumentTemplate + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return DocumentTemplate + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns spaceId. + * + * + * + * @return int + */ + public function getSpaceId() { + return $this->spaceId; + } + + /** + * Sets spaceId. + * + * @param int $spaceId + * @return DocumentTemplate + */ + protected function setSpaceId($spaceId) { + $this->spaceId = $spaceId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return DocumentTemplate + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns templateResource. + * + * + * + * @return \Wallee\Sdk\Model\ModelResourcePath + */ + public function getTemplateResource() { + return $this->templateResource; + } + + /** + * Sets templateResource. + * + * @param \Wallee\Sdk\Model\ModelResourcePath $templateResource + * @return DocumentTemplate + */ + public function setTemplateResource($templateResource) { + $this->templateResource = $templateResource; + + return $this; + } + + /** + * Returns type. + * + * + * + * @return int + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param int $type + * @return DocumentTemplate + */ + protected function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return DocumentTemplate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DocumentTemplateType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DocumentTemplateType.php new file mode 100644 index 0000000..dbed847 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/DocumentTemplateType.php @@ -0,0 +1,239 @@ + 'map[string,string]', + 'feature' => 'int', + 'id' => 'int', + 'title' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var int + */ + private $feature; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $title; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['title'])) { + $this->setTitle($data['title']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return DocumentTemplateType + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns feature. + * + * + * + * @return int + */ + public function getFeature() { + return $this->feature; + } + + /** + * Sets feature. + * + * @param int $feature + * @return DocumentTemplateType + */ + protected function setFeature($feature) { + $this->feature = $feature; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return DocumentTemplateType + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns title. + * + * + * + * @return map[string,string] + */ + public function getTitle() { + return $this->title; + } + + /** + * Sets title. + * + * @param map[string,string] $title + * @return DocumentTemplateType + */ + public function setTitle($title) { + $this->title = $title; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailSender.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailSender.php new file mode 100644 index 0000000..77e663b --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailSender.php @@ -0,0 +1,401 @@ + 'bool', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'plannedPurgeDate' => '\DateTime', + 'senderAddress' => 'string', + 'senderName' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'type' => 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The default email sender is used whenever not different sender is specified in the space. + * + * @var bool + */ + private $defaultSender; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The sender address is the email address from which you want to send the email to the customer. + * + * @var string + */ + private $senderAddress; + + /** + * The sender name is shown in the email. Choose an appropriate name as it will be displayed to your customer. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $senderName; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * + * + * @var int + */ + private $type; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id']) && $data['id'] != null) { + $this->setId($data['id']); + } + if (isset($data['senderName']) && $data['senderName'] != null) { + $this->setSenderName($data['senderName']); + } + if (isset($data['state']) && $data['state'] != null) { + $this->setState($data['state']); + } + if (isset($data['version']) && $data['version'] != null) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns defaultSender. + * + * The default email sender is used whenever not different sender is specified in the space. + * + * @return bool + */ + public function getDefaultSender() { + return $this->defaultSender; + } + + /** + * Sets defaultSender. + * + * @param bool $defaultSender + * @return EmailSender + */ + protected function setDefaultSender($defaultSender) { + $this->defaultSender = $defaultSender; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return EmailSender + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return EmailSender + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return EmailSender + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns senderAddress. + * + * The sender address is the email address from which you want to send the email to the customer. + * + * @return string + */ + public function getSenderAddress() { + return $this->senderAddress; + } + + /** + * Sets senderAddress. + * + * @param string $senderAddress + * @return EmailSender + */ + protected function setSenderAddress($senderAddress) { + $this->senderAddress = $senderAddress; + + return $this; + } + + /** + * Returns senderName. + * + * The sender name is shown in the email. Choose an appropriate name as it will be displayed to your customer. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getSenderName() { + return $this->senderName; + } + + /** + * Sets senderName. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $senderName + * @return EmailSender + */ + public function setSenderName($senderName) { + $this->senderName = $senderName; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return EmailSender + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns type. + * + * + * + * @return int + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param int $type + * @return EmailSender + */ + protected function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return EmailSender + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailSenderType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailSenderType.php new file mode 100644 index 0000000..f9272b0 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailSenderType.php @@ -0,0 +1,240 @@ + 'map[string,string]', + 'feature' => 'int', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var int + */ + private $feature; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description']) && $data['description'] != null) { + $this->setDescription($data['description']); + } + if (isset($data['name']) && $data['name'] != null) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return EmailSenderType + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns feature. + * + * + * + * @return int + */ + public function getFeature() { + return $this->feature; + } + + /** + * Sets feature. + * + * @param int $feature + * @return EmailSenderType + */ + protected function setFeature($feature) { + $this->feature = $feature; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return EmailSenderType + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return EmailSenderType + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailTemplate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailTemplate.php new file mode 100644 index 0000000..eaf867c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailTemplate.php @@ -0,0 +1,540 @@ + '\Wallee\Sdk\Model\DocumentTemplateType[]', + 'blindCarbonCopyRecipients' => 'string[]', + 'carbonCopyRecipients' => 'string[]', + 'htmlBodyTemplateResource' => '\Wallee\Sdk\Model\ModelResourcePath', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'subject' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'textBodyTemplateResource' => '\Wallee\Sdk\Model\ModelResourcePath', + 'type' => 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\DocumentTemplateType[] + */ + private $attachedDocumentTemplateTypes; + + /** + * + * + * @var string[] + */ + private $blindCarbonCopyRecipients; + + /** + * + * + * @var string[] + */ + private $carbonCopyRecipients; + + /** + * The HTML body resource is used to produce the actual HTML message of the email. + * + * @var \Wallee\Sdk\Model\ModelResourcePath + */ + private $htmlBodyTemplateResource; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The template name is used internally to identify the template in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The subject is going to be shown to the customer as a title. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $subject; + + /** + * The HTML body resource is used to produce the actual text message of the email. In case no resource is selected the HTML message is translated into the text format. + * + * @var \Wallee\Sdk\Model\ModelResourcePath + */ + private $textBodyTemplateResource; + + /** + * + * + * @var int + */ + private $type; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['attachedDocumentTemplateTypes']) && $data['attachedDocumentTemplateTypes'] != null) { + $this->setAttachedDocumentTemplateTypes($data['attachedDocumentTemplateTypes']); + } + if (isset($data['blindCarbonCopyRecipients']) && $data['blindCarbonCopyRecipients'] != null) { + $this->setBlindCarbonCopyRecipients($data['blindCarbonCopyRecipients']); + } + if (isset($data['carbonCopyRecipients']) && $data['carbonCopyRecipients'] != null) { + $this->setCarbonCopyRecipients($data['carbonCopyRecipients']); + } + if (isset($data['htmlBodyTemplateResource']) && $data['htmlBodyTemplateResource'] != null) { + $this->setHtmlBodyTemplateResource($data['htmlBodyTemplateResource']); + } + if (isset($data['id']) && $data['id'] != null) { + $this->setId($data['id']); + } + if (isset($data['state']) && $data['state'] != null) { + $this->setState($data['state']); + } + if (isset($data['subject']) && $data['subject'] != null) { + $this->setSubject($data['subject']); + } + if (isset($data['textBodyTemplateResource']) && $data['textBodyTemplateResource'] != null) { + $this->setTextBodyTemplateResource($data['textBodyTemplateResource']); + } + if (isset($data['version']) && $data['version'] != null) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns attachedDocumentTemplateTypes. + * + * + * + * @return \Wallee\Sdk\Model\DocumentTemplateType[] + */ + public function getAttachedDocumentTemplateTypes() { + return $this->attachedDocumentTemplateTypes; + } + + /** + * Sets attachedDocumentTemplateTypes. + * + * @param \Wallee\Sdk\Model\DocumentTemplateType[] $attachedDocumentTemplateTypes + * @return EmailTemplate + */ + public function setAttachedDocumentTemplateTypes($attachedDocumentTemplateTypes) { + $this->attachedDocumentTemplateTypes = $attachedDocumentTemplateTypes; + + return $this; + } + + /** + * Returns blindCarbonCopyRecipients. + * + * + * + * @return string[] + */ + public function getBlindCarbonCopyRecipients() { + return $this->blindCarbonCopyRecipients; + } + + /** + * Sets blindCarbonCopyRecipients. + * + * @param string[] $blindCarbonCopyRecipients + * @return EmailTemplate + */ + public function setBlindCarbonCopyRecipients($blindCarbonCopyRecipients) { + $this->blindCarbonCopyRecipients = $blindCarbonCopyRecipients; + + return $this; + } + + /** + * Returns carbonCopyRecipients. + * + * + * + * @return string[] + */ + public function getCarbonCopyRecipients() { + return $this->carbonCopyRecipients; + } + + /** + * Sets carbonCopyRecipients. + * + * @param string[] $carbonCopyRecipients + * @return EmailTemplate + */ + public function setCarbonCopyRecipients($carbonCopyRecipients) { + $this->carbonCopyRecipients = $carbonCopyRecipients; + + return $this; + } + + /** + * Returns htmlBodyTemplateResource. + * + * The HTML body resource is used to produce the actual HTML message of the email. + * + * @return \Wallee\Sdk\Model\ModelResourcePath + */ + public function getHtmlBodyTemplateResource() { + return $this->htmlBodyTemplateResource; + } + + /** + * Sets htmlBodyTemplateResource. + * + * @param \Wallee\Sdk\Model\ModelResourcePath $htmlBodyTemplateResource + * @return EmailTemplate + */ + public function setHtmlBodyTemplateResource($htmlBodyTemplateResource) { + $this->htmlBodyTemplateResource = $htmlBodyTemplateResource; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return EmailTemplate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return EmailTemplate + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The template name is used internally to identify the template in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return EmailTemplate + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return EmailTemplate + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return EmailTemplate + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns subject. + * + * The subject is going to be shown to the customer as a title. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getSubject() { + return $this->subject; + } + + /** + * Sets subject. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $subject + * @return EmailTemplate + */ + public function setSubject($subject) { + $this->subject = $subject; + + return $this; + } + + /** + * Returns textBodyTemplateResource. + * + * The HTML body resource is used to produce the actual text message of the email. In case no resource is selected the HTML message is translated into the text format. + * + * @return \Wallee\Sdk\Model\ModelResourcePath + */ + public function getTextBodyTemplateResource() { + return $this->textBodyTemplateResource; + } + + /** + * Sets textBodyTemplateResource. + * + * @param \Wallee\Sdk\Model\ModelResourcePath $textBodyTemplateResource + * @return EmailTemplate + */ + public function setTextBodyTemplateResource($textBodyTemplateResource) { + $this->textBodyTemplateResource = $textBodyTemplateResource; + + return $this; + } + + /** + * Returns type. + * + * + * + * @return int + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param int $type + * @return EmailTemplate + */ + protected function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return EmailTemplate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailTemplateType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailTemplateType.php new file mode 100644 index 0000000..3f1bd0b --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EmailTemplateType.php @@ -0,0 +1,404 @@ + '\Wallee\Sdk\Model\AttachmentResource[]', + 'description' => 'map[string,string]', + 'documentAttachments' => '\Wallee\Sdk\Model\DocumentTemplateType[]', + 'feature' => 'int', + 'htmlBodyTemplateResource' => 'string', + 'id' => 'int', + 'name' => 'map[string,string]', + 'subject' => 'map[string,string]', + 'textBodyTemplateResource' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\AttachmentResource[] + */ + private $attachmentResources; + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var \Wallee\Sdk\Model\DocumentTemplateType[] + */ + private $documentAttachments; + + /** + * + * + * @var int + */ + private $feature; + + /** + * + * + * @var string + */ + private $htmlBodyTemplateResource; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + /** + * + * + * @var map[string,string] + */ + private $subject; + + /** + * + * + * @var string + */ + private $textBodyTemplateResource; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['attachmentResources']) && $data['attachmentResources'] != null) { + $this->setAttachmentResources($data['attachmentResources']); + } + if (isset($data['description']) && $data['description'] != null) { + $this->setDescription($data['description']); + } + if (isset($data['documentAttachments']) && $data['documentAttachments'] != null) { + $this->setDocumentAttachments($data['documentAttachments']); + } + if (isset($data['name']) && $data['name'] != null) { + $this->setName($data['name']); + } + if (isset($data['subject']) && $data['subject'] != null) { + $this->setSubject($data['subject']); + } + } + + + /** + * Returns attachmentResources. + * + * + * + * @return \Wallee\Sdk\Model\AttachmentResource[] + */ + public function getAttachmentResources() { + return $this->attachmentResources; + } + + /** + * Sets attachmentResources. + * + * @param \Wallee\Sdk\Model\AttachmentResource[] $attachmentResources + * @return EmailTemplateType + */ + public function setAttachmentResources($attachmentResources) { + $this->attachmentResources = $attachmentResources; + + return $this; + } + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return EmailTemplateType + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns documentAttachments. + * + * + * + * @return \Wallee\Sdk\Model\DocumentTemplateType[] + */ + public function getDocumentAttachments() { + return $this->documentAttachments; + } + + /** + * Sets documentAttachments. + * + * @param \Wallee\Sdk\Model\DocumentTemplateType[] $documentAttachments + * @return EmailTemplateType + */ + public function setDocumentAttachments($documentAttachments) { + $this->documentAttachments = $documentAttachments; + + return $this; + } + + /** + * Returns feature. + * + * + * + * @return int + */ + public function getFeature() { + return $this->feature; + } + + /** + * Sets feature. + * + * @param int $feature + * @return EmailTemplateType + */ + protected function setFeature($feature) { + $this->feature = $feature; + + return $this; + } + + /** + * Returns htmlBodyTemplateResource. + * + * + * + * @return string + */ + public function getHtmlBodyTemplateResource() { + return $this->htmlBodyTemplateResource; + } + + /** + * Sets htmlBodyTemplateResource. + * + * @param string $htmlBodyTemplateResource + * @return EmailTemplateType + */ + protected function setHtmlBodyTemplateResource($htmlBodyTemplateResource) { + $this->htmlBodyTemplateResource = $htmlBodyTemplateResource; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return EmailTemplateType + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return EmailTemplateType + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns subject. + * + * + * + * @return map[string,string] + */ + public function getSubject() { + return $this->subject; + } + + /** + * Sets subject. + * + * @param map[string,string] $subject + * @return EmailTemplateType + */ + public function setSubject($subject) { + $this->subject = $subject; + + return $this; + } + + /** + * Returns textBodyTemplateResource. + * + * + * + * @return string + */ + public function getTextBodyTemplateResource() { + return $this->textBodyTemplateResource; + } + + /** + * Sets textBodyTemplateResource. + * + * @param string $textBodyTemplateResource + * @return EmailTemplateType + */ + protected function setTextBodyTemplateResource($textBodyTemplateResource) { + $this->textBodyTemplateResource = $textBodyTemplateResource; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityExportRequest.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityExportRequest.php new file mode 100644 index 0000000..145a0dd --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityExportRequest.php @@ -0,0 +1,180 @@ + 'string[]', + 'query' => '\Wallee\Sdk\Model\EntityQuery' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The properties is a list of property paths which should be exported. + * + * @var string[] + */ + private $properties; + + /** + * The query limits the returned entries. The query allows to restrict the entries to return and it allows to control the order of them. + * + * @var \Wallee\Sdk\Model\EntityQuery + */ + private $query; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['properties'])) { + $this->setProperties($data['properties']); + } + if (isset($data['query'])) { + $this->setQuery($data['query']); + } + } + + + /** + * Returns properties. + * + * The properties is a list of property paths which should be exported. + * + * @return string[] + */ + public function getProperties() { + return $this->properties; + } + + /** + * Sets properties. + * + * @param string[] $properties + * @return EntityExportRequest + */ + public function setProperties($properties) { + $this->properties = $properties; + + return $this; + } + + /** + * Returns query. + * + * The query limits the returned entries. The query allows to restrict the entries to return and it allows to control the order of them. + * + * @return \Wallee\Sdk\Model\EntityQuery + */ + public function getQuery() { + return $this->query; + } + + /** + * Sets query. + * + * @param \Wallee\Sdk\Model\EntityQuery $query + * @return EntityExportRequest + */ + public function setQuery($query) { + $this->query = $query; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getProperties() === null) { + throw new ValidationException("'properties' can't be null", 'properties', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQuery.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQuery.php new file mode 100644 index 0000000..4970e03 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQuery.php @@ -0,0 +1,279 @@ + '\Wallee\Sdk\Model\EntityQueryFilter', + 'language' => 'string', + 'numberOfEntities' => 'int', + 'orderBys' => '\Wallee\Sdk\Model\EntityQueryOrderBy[]', + 'startingEntity' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The filter node defines the root filter node of the query. The root node may contain multiple sub nodes with different filters in it. + * + * @var \Wallee\Sdk\Model\EntityQueryFilter + */ + private $filter; + + /** + * The language is applied to the ordering of the entities returned. Some entity fields are language dependent and hence the language is required to order them. + * + * @var string + */ + private $language; + + /** + * The number of entities defines how many entities should be returned. There is a maximum of 100 entities. + * + * @var int + */ + private $numberOfEntities; + + /** + * The order bys allows to define the ordering of the entities returned by the search. + * + * @var \Wallee\Sdk\Model\EntityQueryOrderBy[] + */ + private $orderBys; + + /** + * The 'starting entity' defines the entity number at which the returned result should start. The entity number is the consecutive number of the entity as returned and it is not the entity id. + * + * @var int + */ + private $startingEntity; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['filter'])) { + $this->setFilter($data['filter']); + } + if (isset($data['language'])) { + $this->setLanguage($data['language']); + } + if (isset($data['numberOfEntities'])) { + $this->setNumberOfEntities($data['numberOfEntities']); + } + if (isset($data['orderBys'])) { + $this->setOrderBys($data['orderBys']); + } + if (isset($data['startingEntity'])) { + $this->setStartingEntity($data['startingEntity']); + } + } + + + /** + * Returns filter. + * + * The filter node defines the root filter node of the query. The root node may contain multiple sub nodes with different filters in it. + * + * @return \Wallee\Sdk\Model\EntityQueryFilter + */ + public function getFilter() { + return $this->filter; + } + + /** + * Sets filter. + * + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter + * @return EntityQuery + */ + public function setFilter($filter) { + $this->filter = $filter; + + return $this; + } + + /** + * Returns language. + * + * The language is applied to the ordering of the entities returned. Some entity fields are language dependent and hence the language is required to order them. + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return EntityQuery + */ + public function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns numberOfEntities. + * + * The number of entities defines how many entities should be returned. There is a maximum of 100 entities. + * + * @return int + */ + public function getNumberOfEntities() { + return $this->numberOfEntities; + } + + /** + * Sets numberOfEntities. + * + * @param int $numberOfEntities + * @return EntityQuery + */ + public function setNumberOfEntities($numberOfEntities) { + $this->numberOfEntities = $numberOfEntities; + + return $this; + } + + /** + * Returns orderBys. + * + * The order bys allows to define the ordering of the entities returned by the search. + * + * @return \Wallee\Sdk\Model\EntityQueryOrderBy[] + */ + public function getOrderBys() { + return $this->orderBys; + } + + /** + * Sets orderBys. + * + * @param \Wallee\Sdk\Model\EntityQueryOrderBy[] $orderBys + * @return EntityQuery + */ + public function setOrderBys($orderBys) { + $this->orderBys = $orderBys; + + return $this; + } + + /** + * Returns startingEntity. + * + * The 'starting entity' defines the entity number at which the returned result should start. The entity number is the consecutive number of the entity as returned and it is not the entity id. + * + * @return int + */ + public function getStartingEntity() { + return $this->startingEntity; + } + + /** + * Sets startingEntity. + * + * @param int $startingEntity + * @return EntityQuery + */ + public function setStartingEntity($startingEntity) { + $this->startingEntity = $startingEntity; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQueryFilter.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQueryFilter.php new file mode 100644 index 0000000..ce7eb73 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQueryFilter.php @@ -0,0 +1,282 @@ + '\Wallee\Sdk\Model\EntityQueryFilter[]', + 'fieldName' => 'string', + 'operator' => '\Wallee\Sdk\Model\CriteriaOperator', + 'type' => '\Wallee\Sdk\Model\EntityQueryFilterType', + 'value' => 'object' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The 'children' can contain other filter nodes which are applied to the query. This property is only applicable on filter types 'OR' and 'AND'. + * + * @var \Wallee\Sdk\Model\EntityQueryFilter[] + */ + private $children; + + /** + * The 'fieldName' indicates the property on the entity which should be filtered. This property is only applicable on filter type 'LEAF'. + * + * @var string + */ + private $fieldName; + + /** + * The 'operator' indicates what kind of filtering on the 'fieldName' is executed on. This property is only applicable on filter type 'LEAF'. + * + * @var \Wallee\Sdk\Model\CriteriaOperator + */ + private $operator; + + /** + * The filter type controls how the query node is interpreted. I.e. if the node acts as leaf node or as a filter group. + * + * @var \Wallee\Sdk\Model\EntityQueryFilterType + */ + private $type; + + /** + * The 'value' is used to compare with the 'fieldName' as defined by the 'operator'. This property is only applicable on filter type 'LEAF'. + * + * @var object + */ + private $value; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['children'])) { + $this->setChildren($data['children']); + } + if (isset($data['fieldName'])) { + $this->setFieldName($data['fieldName']); + } + if (isset($data['operator'])) { + $this->setOperator($data['operator']); + } + if (isset($data['type'])) { + $this->setType($data['type']); + } + if (isset($data['value'])) { + $this->setValue($data['value']); + } + } + + + /** + * Returns children. + * + * The 'children' can contain other filter nodes which are applied to the query. This property is only applicable on filter types 'OR' and 'AND'. + * + * @return \Wallee\Sdk\Model\EntityQueryFilter[] + */ + public function getChildren() { + return $this->children; + } + + /** + * Sets children. + * + * @param \Wallee\Sdk\Model\EntityQueryFilter[] $children + * @return EntityQueryFilter + */ + public function setChildren($children) { + $this->children = $children; + + return $this; + } + + /** + * Returns fieldName. + * + * The 'fieldName' indicates the property on the entity which should be filtered. This property is only applicable on filter type 'LEAF'. + * + * @return string + */ + public function getFieldName() { + return $this->fieldName; + } + + /** + * Sets fieldName. + * + * @param string $fieldName + * @return EntityQueryFilter + */ + public function setFieldName($fieldName) { + $this->fieldName = $fieldName; + + return $this; + } + + /** + * Returns operator. + * + * The 'operator' indicates what kind of filtering on the 'fieldName' is executed on. This property is only applicable on filter type 'LEAF'. + * + * @return \Wallee\Sdk\Model\CriteriaOperator + */ + public function getOperator() { + return $this->operator; + } + + /** + * Sets operator. + * + * @param \Wallee\Sdk\Model\CriteriaOperator $operator + * @return EntityQueryFilter + */ + public function setOperator($operator) { + $this->operator = $operator; + + return $this; + } + + /** + * Returns type. + * + * The filter type controls how the query node is interpreted. I.e. if the node acts as leaf node or as a filter group. + * + * @return \Wallee\Sdk\Model\EntityQueryFilterType + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param \Wallee\Sdk\Model\EntityQueryFilterType $type + * @return EntityQueryFilter + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns value. + * + * The 'value' is used to compare with the 'fieldName' as defined by the 'operator'. This property is only applicable on filter type 'LEAF'. + * + * @return object + */ + public function getValue() { + return $this->value; + } + + /** + * Sets value. + * + * @param object $value + * @return EntityQueryFilter + */ + public function setValue($value) { + $this->value = $value; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getType() === null) { + throw new ValidationException("'type' can't be null", 'type', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQueryFilterType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQueryFilterType.php new file mode 100644 index 0000000..6b8fbd9 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQueryFilterType.php @@ -0,0 +1,44 @@ + 'string', + 'sorting' => '\Wallee\Sdk\Model\EntityQueryOrderByType' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $fieldName; + + /** + * + * + * @var \Wallee\Sdk\Model\EntityQueryOrderByType + */ + private $sorting; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['fieldName'])) { + $this->setFieldName($data['fieldName']); + } + if (isset($data['sorting'])) { + $this->setSorting($data['sorting']); + } + } + + + /** + * Returns fieldName. + * + * + * + * @return string + */ + public function getFieldName() { + return $this->fieldName; + } + + /** + * Sets fieldName. + * + * @param string $fieldName + * @return EntityQueryOrderBy + */ + public function setFieldName($fieldName) { + $this->fieldName = $fieldName; + + return $this; + } + + /** + * Returns sorting. + * + * + * + * @return \Wallee\Sdk\Model\EntityQueryOrderByType + */ + public function getSorting() { + return $this->sorting; + } + + /** + * Sets sorting. + * + * @param \Wallee\Sdk\Model\EntityQueryOrderByType $sorting + * @return EntityQueryOrderBy + */ + public function setSorting($sorting) { + $this->sorting = $sorting; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getFieldName() === null) { + throw new ValidationException("'fieldName' can't be null", 'fieldName', $this); + } + if ($this->getSorting() === null) { + throw new ValidationException("'sorting' can't be null", 'sorting', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQueryOrderByType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQueryOrderByType.php new file mode 100644 index 0000000..de5af3a --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/EntityQueryOrderByType.php @@ -0,0 +1,43 @@ +validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Environment.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Environment.php new file mode 100644 index 0000000..d1c20d4 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Environment.php @@ -0,0 +1,43 @@ + '\Wallee\Sdk\Model\FailureCategory', + 'description' => 'map[string,string]', + 'features' => 'int[]', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\FailureCategory + */ + private $category; + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var int[] + */ + private $features; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['category'])) { + $this->setCategory($data['category']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['features'])) { + $this->setFeatures($data['features']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns category. + * + * + * + * @return \Wallee\Sdk\Model\FailureCategory + */ + public function getCategory() { + return $this->category; + } + + /** + * Sets category. + * + * @param \Wallee\Sdk\Model\FailureCategory $category + * @return FailureReason + */ + public function setCategory($category) { + $this->category = $category; + + return $this; + } + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return FailureReason + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns features. + * + * + * + * @return int[] + */ + public function getFeatures() { + return $this->features; + } + + /** + * Sets features. + * + * @param int[] $features + * @return FailureReason + */ + public function setFeatures($features) { + $this->features = $features; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return FailureReason + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return FailureReason + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Feature.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Feature.php new file mode 100644 index 0000000..5749576 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Feature.php @@ -0,0 +1,366 @@ + 'bool', + 'description' => 'map[string,string]', + 'id' => 'int', + 'logoPath' => 'string', + 'name' => 'map[string,string]', + 'requiredFeatures' => 'int[]', + 'sortOrder' => 'int', + 'visible' => 'bool' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var bool + */ + private $beta; + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var string + */ + private $logoPath; + + /** + * + * + * @var map[string,string] + */ + private $name; + + /** + * + * + * @var int[] + */ + private $requiredFeatures; + + /** + * + * + * @var int + */ + private $sortOrder; + + /** + * + * + * @var bool + */ + private $visible; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['requiredFeatures'])) { + $this->setRequiredFeatures($data['requiredFeatures']); + } + } + + + /** + * Returns beta. + * + * + * + * @return bool + */ + public function getBeta() { + return $this->beta; + } + + /** + * Sets beta. + * + * @param bool $beta + * @return Feature + */ + protected function setBeta($beta) { + $this->beta = $beta; + + return $this; + } + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return Feature + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return Feature + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns logoPath. + * + * + * + * @return string + */ + public function getLogoPath() { + return $this->logoPath; + } + + /** + * Sets logoPath. + * + * @param string $logoPath + * @return Feature + */ + protected function setLogoPath($logoPath) { + $this->logoPath = $logoPath; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return Feature + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns requiredFeatures. + * + * + * + * @return int[] + */ + public function getRequiredFeatures() { + return $this->requiredFeatures; + } + + /** + * Sets requiredFeatures. + * + * @param int[] $requiredFeatures + * @return Feature + */ + public function setRequiredFeatures($requiredFeatures) { + $this->requiredFeatures = $requiredFeatures; + + return $this; + } + + /** + * Returns sortOrder. + * + * + * + * @return int + */ + public function getSortOrder() { + return $this->sortOrder; + } + + /** + * Sets sortOrder. + * + * @param int $sortOrder + * @return Feature + */ + protected function setSortOrder($sortOrder) { + $this->sortOrder = $sortOrder; + + return $this; + } + + /** + * Returns visible. + * + * + * + * @return bool + */ + public function getVisible() { + return $this->visible; + } + + /** + * Sets visible. + * + * @param bool $visible + * @return Feature + */ + protected function setVisible($visible) { + $this->visible = $visible; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Gender.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Gender.php new file mode 100644 index 0000000..2beec19 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Gender.php @@ -0,0 +1,43 @@ + 'string', + 'emailAddressVerified' => 'bool', + 'firstname' => 'string', + 'language' => 'string', + 'lastname' => 'string', + 'primaryAccount' => '\Wallee\Sdk\Model\Account', + 'scope' => '\Wallee\Sdk\Model\Scope', + 'timeZone' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The email address of the user. + * + * @var string + */ + private $emailAddress; + + /** + * Defines whether a user is verified or not. + * + * @var bool + */ + private $emailAddressVerified; + + /** + * The first name of the user. + * + * @var string + */ + private $firstname; + + /** + * The preferred language of the user. + * + * @var string + */ + private $language; + + /** + * The last name of the user. + * + * @var string + */ + private $lastname; + + /** + * The primary account links the user to a specific account. + * + * @var \Wallee\Sdk\Model\Account + */ + private $primaryAccount; + + /** + * The scope to which the user belongs to. + * + * @var \Wallee\Sdk\Model\Scope + */ + private $scope; + + /** + * The time zone which is applied for the user. If no timezone is specified the browser is used to determine an appropriate time zone. + * + * @var string + */ + private $timeZone; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['primaryAccount'])) { + $this->setPrimaryAccount($data['primaryAccount']); + } + if (isset($data['scope'])) { + $this->setScope($data['scope']); + } + } + + + /** + * Returns emailAddress. + * + * The email address of the user. + * + * @return string + */ + public function getEmailAddress() { + return $this->emailAddress; + } + + /** + * Sets emailAddress. + * + * @param string $emailAddress + * @return HumanUser + */ + protected function setEmailAddress($emailAddress) { + $this->emailAddress = $emailAddress; + + return $this; + } + + /** + * Returns emailAddressVerified. + * + * Defines whether a user is verified or not. + * + * @return bool + */ + public function getEmailAddressVerified() { + return $this->emailAddressVerified; + } + + /** + * Sets emailAddressVerified. + * + * @param bool $emailAddressVerified + * @return HumanUser + */ + protected function setEmailAddressVerified($emailAddressVerified) { + $this->emailAddressVerified = $emailAddressVerified; + + return $this; + } + + /** + * Returns firstname. + * + * The first name of the user. + * + * @return string + */ + public function getFirstname() { + return $this->firstname; + } + + /** + * Sets firstname. + * + * @param string $firstname + * @return HumanUser + */ + protected function setFirstname($firstname) { + $this->firstname = $firstname; + + return $this; + } + + /** + * Returns language. + * + * The preferred language of the user. + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return HumanUser + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns lastname. + * + * The last name of the user. + * + * @return string + */ + public function getLastname() { + return $this->lastname; + } + + /** + * Sets lastname. + * + * @param string $lastname + * @return HumanUser + */ + protected function setLastname($lastname) { + $this->lastname = $lastname; + + return $this; + } + + /** + * Returns primaryAccount. + * + * The primary account links the user to a specific account. + * + * @return \Wallee\Sdk\Model\Account + */ + public function getPrimaryAccount() { + return $this->primaryAccount; + } + + /** + * Sets primaryAccount. + * + * @param \Wallee\Sdk\Model\Account $primaryAccount + * @return HumanUser + */ + public function setPrimaryAccount($primaryAccount) { + $this->primaryAccount = $primaryAccount; + + return $this; + } + + /** + * Returns scope. + * + * The scope to which the user belongs to. + * + * @return \Wallee\Sdk\Model\Scope + */ + public function getScope() { + return $this->scope; + } + + /** + * Sets scope. + * + * @param \Wallee\Sdk\Model\Scope $scope + * @return HumanUser + */ + public function setScope($scope) { + $this->scope = $scope; + + return $this; + } + + /** + * Returns timeZone. + * + * The time zone which is applied for the user. If no timezone is specified the browser is used to determine an appropriate time zone. + * + * @return string + */ + public function getTimeZone() { + return $this->timeZone; + } + + /** + * Sets timeZone. + * + * @param string $timeZone + * @return HumanUser + */ + protected function setTimeZone($timeZone) { + $this->timeZone = $timeZone; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/HumanUserCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/HumanUserCreate.php new file mode 100644 index 0000000..edea178 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/HumanUserCreate.php @@ -0,0 +1,146 @@ + 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The primary account links the user to a specific account. + * + * @var int + */ + private $primaryAccount; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['primaryAccount'])) { + $this->setPrimaryAccount($data['primaryAccount']); + } + } + + + /** + * Returns primaryAccount. + * + * The primary account links the user to a specific account. + * + * @return int + */ + public function getPrimaryAccount() { + return $this->primaryAccount; + } + + /** + * Sets primaryAccount. + * + * @param int $primaryAccount + * @return HumanUserCreate + */ + public function setPrimaryAccount($primaryAccount) { + $this->primaryAccount = $primaryAccount; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/HumanUserUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/HumanUserUpdate.php new file mode 100644 index 0000000..a5bd338 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/HumanUserUpdate.php @@ -0,0 +1,186 @@ + 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return HumanUserUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return HumanUserUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/IEnum.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/IEnum.php new file mode 100644 index 0000000..d16c161 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/IEnum.php @@ -0,0 +1,34 @@ + '\Wallee\Sdk\Model\InstallmentPlanConfiguration', + 'paymentMethodConfigurations' => '\Wallee\Sdk\Model\PaymentMethodConfiguration[]', + 'slices' => '\Wallee\Sdk\Model\InstallmentCalculatedSlice[]', + 'totalAmount' => 'float', + 'transaction' => '\Wallee\Sdk\Model\Transaction' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\InstallmentPlanConfiguration + */ + private $configuration; + + /** + * + * + * @var \Wallee\Sdk\Model\PaymentMethodConfiguration[] + */ + private $paymentMethodConfigurations; + + /** + * + * + * @var \Wallee\Sdk\Model\InstallmentCalculatedSlice[] + */ + private $slices; + + /** + * + * + * @var float + */ + private $totalAmount; + + /** + * + * + * @var \Wallee\Sdk\Model\Transaction + */ + private $transaction; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['configuration'])) { + $this->setConfiguration($data['configuration']); + } + if (isset($data['paymentMethodConfigurations'])) { + $this->setPaymentMethodConfigurations($data['paymentMethodConfigurations']); + } + if (isset($data['slices'])) { + $this->setSlices($data['slices']); + } + if (isset($data['transaction'])) { + $this->setTransaction($data['transaction']); + } + } + + + /** + * Returns configuration. + * + * + * + * @return \Wallee\Sdk\Model\InstallmentPlanConfiguration + */ + public function getConfiguration() { + return $this->configuration; + } + + /** + * Sets configuration. + * + * @param \Wallee\Sdk\Model\InstallmentPlanConfiguration $configuration + * @return InstallmentCalculatedPlan + */ + public function setConfiguration($configuration) { + $this->configuration = $configuration; + + return $this; + } + + /** + * Returns paymentMethodConfigurations. + * + * + * + * @return \Wallee\Sdk\Model\PaymentMethodConfiguration[] + */ + public function getPaymentMethodConfigurations() { + return $this->paymentMethodConfigurations; + } + + /** + * Sets paymentMethodConfigurations. + * + * @param \Wallee\Sdk\Model\PaymentMethodConfiguration[] $paymentMethodConfigurations + * @return InstallmentCalculatedPlan + */ + public function setPaymentMethodConfigurations($paymentMethodConfigurations) { + $this->paymentMethodConfigurations = $paymentMethodConfigurations; + + return $this; + } + + /** + * Returns slices. + * + * + * + * @return \Wallee\Sdk\Model\InstallmentCalculatedSlice[] + */ + public function getSlices() { + return $this->slices; + } + + /** + * Sets slices. + * + * @param \Wallee\Sdk\Model\InstallmentCalculatedSlice[] $slices + * @return InstallmentCalculatedPlan + */ + public function setSlices($slices) { + $this->slices = $slices; + + return $this; + } + + /** + * Returns totalAmount. + * + * + * + * @return float + */ + public function getTotalAmount() { + return $this->totalAmount; + } + + /** + * Sets totalAmount. + * + * @param float $totalAmount + * @return InstallmentCalculatedPlan + */ + protected function setTotalAmount($totalAmount) { + $this->totalAmount = $totalAmount; + + return $this; + } + + /** + * Returns transaction. + * + * + * + * @return \Wallee\Sdk\Model\Transaction + */ + public function getTransaction() { + return $this->transaction; + } + + /** + * Sets transaction. + * + * @param \Wallee\Sdk\Model\Transaction $transaction + * @return InstallmentCalculatedPlan + */ + public function setTransaction($transaction) { + $this->transaction = $transaction; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentCalculatedSlice.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentCalculatedSlice.php new file mode 100644 index 0000000..1fbda5e --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentCalculatedSlice.php @@ -0,0 +1,205 @@ + 'float', + 'dueOn' => '\DateTime', + 'lineItems' => '\Wallee\Sdk\Model\LineItem[]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var float + */ + private $amountIncludingTax; + + /** + * + * + * @var \DateTime + */ + private $dueOn; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItem[] + */ + private $lineItems; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + } + + + /** + * Returns amountIncludingTax. + * + * + * + * @return float + */ + public function getAmountIncludingTax() { + return $this->amountIncludingTax; + } + + /** + * Sets amountIncludingTax. + * + * @param float $amountIncludingTax + * @return InstallmentCalculatedSlice + */ + protected function setAmountIncludingTax($amountIncludingTax) { + $this->amountIncludingTax = $amountIncludingTax; + + return $this; + } + + /** + * Returns dueOn. + * + * + * + * @return \DateTime + */ + public function getDueOn() { + return $this->dueOn; + } + + /** + * Sets dueOn. + * + * @param \DateTime $dueOn + * @return InstallmentCalculatedSlice + */ + protected function setDueOn($dueOn) { + $this->dueOn = $dueOn; + + return $this; + } + + /** + * Returns lineItems. + * + * + * + * @return \Wallee\Sdk\Model\LineItem[] + */ + public function getLineItems() { + return $this->lineItems; + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItem[] $lineItems + * @return InstallmentCalculatedSlice + */ + public function setLineItems($lineItems) { + $this->lineItems = $lineItems; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPayment.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPayment.php new file mode 100644 index 0000000..954b589 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPayment.php @@ -0,0 +1,403 @@ + '\DateTime', + 'id' => 'int', + 'initialTransaction' => '\Wallee\Sdk\Model\Transaction', + 'lineItems' => '\Wallee\Sdk\Model\LineItem[]', + 'linkedSpaceId' => 'int', + 'planConfiguration' => 'int', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\InstallmentPaymentState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var \Wallee\Sdk\Model\Transaction + */ + private $initialTransaction; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItem[] + */ + private $lineItems; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var int + */ + private $planConfiguration; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\InstallmentPaymentState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['initialTransaction'])) { + $this->setInitialTransaction($data['initialTransaction']); + } + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return InstallmentPayment + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return InstallmentPayment + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns initialTransaction. + * + * + * + * @return \Wallee\Sdk\Model\Transaction + */ + public function getInitialTransaction() { + return $this->initialTransaction; + } + + /** + * Sets initialTransaction. + * + * @param \Wallee\Sdk\Model\Transaction $initialTransaction + * @return InstallmentPayment + */ + public function setInitialTransaction($initialTransaction) { + $this->initialTransaction = $initialTransaction; + + return $this; + } + + /** + * Returns lineItems. + * + * + * + * @return \Wallee\Sdk\Model\LineItem[] + */ + public function getLineItems() { + return $this->lineItems; + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItem[] $lineItems + * @return InstallmentPayment + */ + public function setLineItems($lineItems) { + $this->lineItems = $lineItems; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return InstallmentPayment + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns planConfiguration. + * + * + * + * @return int + */ + public function getPlanConfiguration() { + return $this->planConfiguration; + } + + /** + * Sets planConfiguration. + * + * @param int $planConfiguration + * @return InstallmentPayment + */ + protected function setPlanConfiguration($planConfiguration) { + $this->planConfiguration = $planConfiguration; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return InstallmentPayment + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\InstallmentPaymentState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\InstallmentPaymentState $state + * @return InstallmentPayment + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return InstallmentPayment + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPaymentSlice.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPaymentSlice.php new file mode 100644 index 0000000..4a45b52 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPaymentSlice.php @@ -0,0 +1,372 @@ + '\DateTime', + 'createdOn' => '\DateTime', + 'installmentPayment' => '\Wallee\Sdk\Model\InstallmentPayment', + 'lineItems' => '\Wallee\Sdk\Model\LineItem[]', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\InstallmentPaymentSliceState', + 'transaction' => '\Wallee\Sdk\Model\Transaction', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var \DateTime + */ + private $chargeOn; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var \Wallee\Sdk\Model\InstallmentPayment + */ + private $installmentPayment; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItem[] + */ + private $lineItems; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\InstallmentPaymentSliceState + */ + private $state; + + /** + * + * + * @var \Wallee\Sdk\Model\Transaction + */ + private $transaction; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['installmentPayment'])) { + $this->setInstallmentPayment($data['installmentPayment']); + } + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['transaction'])) { + $this->setTransaction($data['transaction']); + } + } + + + /** + * Returns chargeOn. + * + * + * + * @return \DateTime + */ + public function getChargeOn() { + return $this->chargeOn; + } + + /** + * Sets chargeOn. + * + * @param \DateTime $chargeOn + * @return InstallmentPaymentSlice + */ + protected function setChargeOn($chargeOn) { + $this->chargeOn = $chargeOn; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return InstallmentPaymentSlice + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns installmentPayment. + * + * + * + * @return \Wallee\Sdk\Model\InstallmentPayment + */ + public function getInstallmentPayment() { + return $this->installmentPayment; + } + + /** + * Sets installmentPayment. + * + * @param \Wallee\Sdk\Model\InstallmentPayment $installmentPayment + * @return InstallmentPaymentSlice + */ + public function setInstallmentPayment($installmentPayment) { + $this->installmentPayment = $installmentPayment; + + return $this; + } + + /** + * Returns lineItems. + * + * + * + * @return \Wallee\Sdk\Model\LineItem[] + */ + public function getLineItems() { + return $this->lineItems; + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItem[] $lineItems + * @return InstallmentPaymentSlice + */ + public function setLineItems($lineItems) { + $this->lineItems = $lineItems; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return InstallmentPaymentSlice + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\InstallmentPaymentSliceState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\InstallmentPaymentSliceState $state + * @return InstallmentPaymentSlice + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns transaction. + * + * + * + * @return \Wallee\Sdk\Model\Transaction + */ + public function getTransaction() { + return $this->transaction; + } + + /** + * Sets transaction. + * + * @param \Wallee\Sdk\Model\Transaction $transaction + * @return InstallmentPaymentSlice + */ + public function setTransaction($transaction) { + $this->transaction = $transaction; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return InstallmentPaymentSlice + */ + protected function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPaymentSliceState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPaymentSliceState.php new file mode 100644 index 0000000..6c786f7 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPaymentSliceState.php @@ -0,0 +1,48 @@ + 'string', + 'conditions' => 'int[]', + 'id' => 'int', + 'installmentFee' => 'float', + 'interestRate' => 'float', + 'linkedSpaceId' => 'int', + 'minimalAmount' => 'float', + 'name' => 'string', + 'paymentMethodConfigurations' => 'int[]', + 'plannedPurgeDate' => '\DateTime', + 'sortOrder' => 'int', + 'spaceReference' => '\Wallee\Sdk\Model\SpaceReference', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'taxClass' => '\Wallee\Sdk\Model\TaxClass', + 'termsAndConditions' => '\Wallee\Sdk\Model\ModelResourcePath', + 'title' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The base currency in which the installment fee and minimal amount are defined. + * + * @var string + */ + private $baseCurrency; + + /** + * If a transaction meets all selected conditions the installment plan will be available to the customer to be selected. + * + * @var int[] + */ + private $conditions; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The installment fee is a fixed amount that is charged additionally when applying this installment plan. + * + * @var float + */ + private $installmentFee; + + /** + * The interest rate is a percentage of the total amount that is charged additionally when applying this installment plan. + * + * @var float + */ + private $interestRate; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The installment plan can only be applied if the orders total is at least the defined minimal amount. + * + * @var float + */ + private $minimalAmount; + + /** + * The installment plan name is used internally to identify the plan in administrative interfaces.For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * A installment plan can be enabled only for specific payment method configurations. Other payment methods will not be selectable by the buyer. + * + * @var int[] + */ + private $paymentMethodConfigurations; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The sort order controls in which order the installation plans are listed. The sort order is used to order the plans in ascending order. + * + * @var int + */ + private $sortOrder; + + /** + * + * + * @var \Wallee\Sdk\Model\SpaceReference + */ + private $spaceReference; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The tax class determines the taxes which are applicable on all fees linked to the installment plan. + * + * @var \Wallee\Sdk\Model\TaxClass + */ + private $taxClass; + + /** + * The terms and conditions will be displayed to the customer when he or she selects this installment plan. + * + * @var \Wallee\Sdk\Model\ModelResourcePath + */ + private $termsAndConditions; + + /** + * The title of the installment plan is used within the payment process. The title is visible to the buyer. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $title; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['conditions'])) { + $this->setConditions($data['conditions']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['paymentMethodConfigurations'])) { + $this->setPaymentMethodConfigurations($data['paymentMethodConfigurations']); + } + if (isset($data['spaceReference'])) { + $this->setSpaceReference($data['spaceReference']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['taxClass'])) { + $this->setTaxClass($data['taxClass']); + } + if (isset($data['termsAndConditions'])) { + $this->setTermsAndConditions($data['termsAndConditions']); + } + if (isset($data['title'])) { + $this->setTitle($data['title']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns baseCurrency. + * + * The base currency in which the installment fee and minimal amount are defined. + * + * @return string + */ + public function getBaseCurrency() { + return $this->baseCurrency; + } + + /** + * Sets baseCurrency. + * + * @param string $baseCurrency + * @return InstallmentPlanConfiguration + */ + protected function setBaseCurrency($baseCurrency) { + $this->baseCurrency = $baseCurrency; + + return $this; + } + + /** + * Returns conditions. + * + * If a transaction meets all selected conditions the installment plan will be available to the customer to be selected. + * + * @return int[] + */ + public function getConditions() { + return $this->conditions; + } + + /** + * Sets conditions. + * + * @param int[] $conditions + * @return InstallmentPlanConfiguration + */ + public function setConditions($conditions) { + $this->conditions = $conditions; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return InstallmentPlanConfiguration + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns installmentFee. + * + * The installment fee is a fixed amount that is charged additionally when applying this installment plan. + * + * @return float + */ + public function getInstallmentFee() { + return $this->installmentFee; + } + + /** + * Sets installmentFee. + * + * @param float $installmentFee + * @return InstallmentPlanConfiguration + */ + protected function setInstallmentFee($installmentFee) { + $this->installmentFee = $installmentFee; + + return $this; + } + + /** + * Returns interestRate. + * + * The interest rate is a percentage of the total amount that is charged additionally when applying this installment plan. + * + * @return float + */ + public function getInterestRate() { + return $this->interestRate; + } + + /** + * Sets interestRate. + * + * @param float $interestRate + * @return InstallmentPlanConfiguration + */ + protected function setInterestRate($interestRate) { + $this->interestRate = $interestRate; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return InstallmentPlanConfiguration + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns minimalAmount. + * + * The installment plan can only be applied if the orders total is at least the defined minimal amount. + * + * @return float + */ + public function getMinimalAmount() { + return $this->minimalAmount; + } + + /** + * Sets minimalAmount. + * + * @param float $minimalAmount + * @return InstallmentPlanConfiguration + */ + protected function setMinimalAmount($minimalAmount) { + $this->minimalAmount = $minimalAmount; + + return $this; + } + + /** + * Returns name. + * + * The installment plan name is used internally to identify the plan in administrative interfaces.For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return InstallmentPlanConfiguration + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns paymentMethodConfigurations. + * + * A installment plan can be enabled only for specific payment method configurations. Other payment methods will not be selectable by the buyer. + * + * @return int[] + */ + public function getPaymentMethodConfigurations() { + return $this->paymentMethodConfigurations; + } + + /** + * Sets paymentMethodConfigurations. + * + * @param int[] $paymentMethodConfigurations + * @return InstallmentPlanConfiguration + */ + public function setPaymentMethodConfigurations($paymentMethodConfigurations) { + $this->paymentMethodConfigurations = $paymentMethodConfigurations; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return InstallmentPlanConfiguration + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns sortOrder. + * + * The sort order controls in which order the installation plans are listed. The sort order is used to order the plans in ascending order. + * + * @return int + */ + public function getSortOrder() { + return $this->sortOrder; + } + + /** + * Sets sortOrder. + * + * @param int $sortOrder + * @return InstallmentPlanConfiguration + */ + protected function setSortOrder($sortOrder) { + $this->sortOrder = $sortOrder; + + return $this; + } + + /** + * Returns spaceReference. + * + * + * + * @return \Wallee\Sdk\Model\SpaceReference + */ + public function getSpaceReference() { + return $this->spaceReference; + } + + /** + * Sets spaceReference. + * + * @param \Wallee\Sdk\Model\SpaceReference $spaceReference + * @return InstallmentPlanConfiguration + */ + public function setSpaceReference($spaceReference) { + $this->spaceReference = $spaceReference; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return InstallmentPlanConfiguration + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns taxClass. + * + * The tax class determines the taxes which are applicable on all fees linked to the installment plan. + * + * @return \Wallee\Sdk\Model\TaxClass + */ + public function getTaxClass() { + return $this->taxClass; + } + + /** + * Sets taxClass. + * + * @param \Wallee\Sdk\Model\TaxClass $taxClass + * @return InstallmentPlanConfiguration + */ + public function setTaxClass($taxClass) { + $this->taxClass = $taxClass; + + return $this; + } + + /** + * Returns termsAndConditions. + * + * The terms and conditions will be displayed to the customer when he or she selects this installment plan. + * + * @return \Wallee\Sdk\Model\ModelResourcePath + */ + public function getTermsAndConditions() { + return $this->termsAndConditions; + } + + /** + * Sets termsAndConditions. + * + * @param \Wallee\Sdk\Model\ModelResourcePath $termsAndConditions + * @return InstallmentPlanConfiguration + */ + public function setTermsAndConditions($termsAndConditions) { + $this->termsAndConditions = $termsAndConditions; + + return $this; + } + + /** + * Returns title. + * + * The title of the installment plan is used within the payment process. The title is visible to the buyer. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getTitle() { + return $this->title; + } + + /** + * Sets title. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $title + * @return InstallmentPlanConfiguration + */ + public function setTitle($title) { + $this->title = $title; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return InstallmentPlanConfiguration + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPlanSliceConfiguration.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPlanSliceConfiguration.php new file mode 100644 index 0000000..f523104 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/InstallmentPlanSliceConfiguration.php @@ -0,0 +1,434 @@ + 'int', + 'lineItemTitle' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'linkedSpaceId' => 'int', + 'period' => 'string', + 'plan' => '\Wallee\Sdk\Model\InstallmentPlanConfiguration', + 'plannedPurgeDate' => '\DateTime', + 'priority' => 'int', + 'proportion' => 'float', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The title of this slices line items. The title is visible to the buyer. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $lineItemTitle; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The period defines how much time passes between the last slice and this slice. The charge is triggered at the end of the period. When the slice should be charged immediately the period needs to be zero. + * + * @var string + */ + private $period; + + /** + * The installment plan this slice belongs to. + * + * @var \Wallee\Sdk\Model\InstallmentPlanConfiguration + */ + private $plan; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The priority controls in which order the slices are applied. The lower the value the higher the precedence. + * + * @var int + */ + private $priority; + + /** + * The proportion defines how much of the total installment payment has to be paid in this slice. The value is summed up with the other slices and the ratio of all proportions compared to proportion of this slice determines how much the buyer has to pay in this slice. + * + * @var float + */ + private $proportion; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['lineItemTitle'])) { + $this->setLineItemTitle($data['lineItemTitle']); + } + if (isset($data['plan'])) { + $this->setPlan($data['plan']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return InstallmentPlanSliceConfiguration + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns lineItemTitle. + * + * The title of this slices line items. The title is visible to the buyer. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getLineItemTitle() { + return $this->lineItemTitle; + } + + /** + * Sets lineItemTitle. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $lineItemTitle + * @return InstallmentPlanSliceConfiguration + */ + public function setLineItemTitle($lineItemTitle) { + $this->lineItemTitle = $lineItemTitle; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return InstallmentPlanSliceConfiguration + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns period. + * + * The period defines how much time passes between the last slice and this slice. The charge is triggered at the end of the period. When the slice should be charged immediately the period needs to be zero. + * + * @return string + */ + public function getPeriod() { + return $this->period; + } + + /** + * Sets period. + * + * @param string $period + * @return InstallmentPlanSliceConfiguration + */ + protected function setPeriod($period) { + $this->period = $period; + + return $this; + } + + /** + * Returns plan. + * + * The installment plan this slice belongs to. + * + * @return \Wallee\Sdk\Model\InstallmentPlanConfiguration + */ + public function getPlan() { + return $this->plan; + } + + /** + * Sets plan. + * + * @param \Wallee\Sdk\Model\InstallmentPlanConfiguration $plan + * @return InstallmentPlanSliceConfiguration + */ + public function setPlan($plan) { + $this->plan = $plan; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return InstallmentPlanSliceConfiguration + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns priority. + * + * The priority controls in which order the slices are applied. The lower the value the higher the precedence. + * + * @return int + */ + public function getPriority() { + return $this->priority; + } + + /** + * Sets priority. + * + * @param int $priority + * @return InstallmentPlanSliceConfiguration + */ + protected function setPriority($priority) { + $this->priority = $priority; + + return $this; + } + + /** + * Returns proportion. + * + * The proportion defines how much of the total installment payment has to be paid in this slice. The value is summed up with the other slices and the ratio of all proportions compared to proportion of this slice determines how much the buyer has to pay in this slice. + * + * @return float + */ + public function getProportion() { + return $this->proportion; + } + + /** + * Sets proportion. + * + * @param float $proportion + * @return InstallmentPlanSliceConfiguration + */ + protected function setProportion($proportion) { + $this->proportion = $proportion; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return InstallmentPlanSliceConfiguration + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return InstallmentPlanSliceConfiguration + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Label.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Label.php new file mode 100644 index 0000000..cae9c51 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Label.php @@ -0,0 +1,276 @@ + 'object', + 'contentAsString' => 'string', + 'descriptor' => '\Wallee\Sdk\Model\LabelDescriptor', + 'id' => 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var object + */ + private $content; + + /** + * + * + * @var string + */ + private $contentAsString; + + /** + * + * + * @var \Wallee\Sdk\Model\LabelDescriptor + */ + private $descriptor; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['content'])) { + $this->setContent($data['content']); + } + if (isset($data['descriptor'])) { + $this->setDescriptor($data['descriptor']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns content. + * + * + * + * @return object + */ + public function getContent() { + return $this->content; + } + + /** + * Sets content. + * + * @param object $content + * @return Label + */ + public function setContent($content) { + $this->content = $content; + + return $this; + } + + /** + * Returns contentAsString. + * + * + * + * @return string + */ + public function getContentAsString() { + return $this->contentAsString; + } + + /** + * Sets contentAsString. + * + * @param string $contentAsString + * @return Label + */ + protected function setContentAsString($contentAsString) { + $this->contentAsString = $contentAsString; + + return $this; + } + + /** + * Returns descriptor. + * + * + * + * @return \Wallee\Sdk\Model\LabelDescriptor + */ + public function getDescriptor() { + return $this->descriptor; + } + + /** + * Sets descriptor. + * + * @param \Wallee\Sdk\Model\LabelDescriptor $descriptor + * @return Label + */ + public function setDescriptor($descriptor) { + $this->descriptor = $descriptor; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return Label + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return Label + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LabelDescriptor.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LabelDescriptor.php new file mode 100644 index 0000000..1e9e7a8 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LabelDescriptor.php @@ -0,0 +1,369 @@ + '\Wallee\Sdk\Model\LabelDescriptorCategory', + 'description' => 'map[string,string]', + 'features' => 'int[]', + 'group' => 'int', + 'id' => 'int', + 'name' => 'map[string,string]', + 'type' => 'int', + 'weight' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\LabelDescriptorCategory + */ + private $category; + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var int[] + */ + private $features; + + /** + * + * + * @var int + */ + private $group; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + /** + * + * + * @var int + */ + private $type; + + /** + * + * + * @var int + */ + private $weight; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['category'])) { + $this->setCategory($data['category']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['features'])) { + $this->setFeatures($data['features']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns category. + * + * + * + * @return \Wallee\Sdk\Model\LabelDescriptorCategory + */ + public function getCategory() { + return $this->category; + } + + /** + * Sets category. + * + * @param \Wallee\Sdk\Model\LabelDescriptorCategory $category + * @return LabelDescriptor + */ + public function setCategory($category) { + $this->category = $category; + + return $this; + } + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return LabelDescriptor + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns features. + * + * + * + * @return int[] + */ + public function getFeatures() { + return $this->features; + } + + /** + * Sets features. + * + * @param int[] $features + * @return LabelDescriptor + */ + public function setFeatures($features) { + $this->features = $features; + + return $this; + } + + /** + * Returns group. + * + * + * + * @return int + */ + public function getGroup() { + return $this->group; + } + + /** + * Sets group. + * + * @param int $group + * @return LabelDescriptor + */ + protected function setGroup($group) { + $this->group = $group; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return LabelDescriptor + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return LabelDescriptor + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns type. + * + * + * + * @return int + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param int $type + * @return LabelDescriptor + */ + protected function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns weight. + * + * + * + * @return int + */ + public function getWeight() { + return $this->weight; + } + + /** + * Sets weight. + * + * @param int $weight + * @return LabelDescriptor + */ + protected function setWeight($weight) { + $this->weight = $weight; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LabelDescriptorCategory.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LabelDescriptorCategory.php new file mode 100644 index 0000000..b8458e8 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LabelDescriptorCategory.php @@ -0,0 +1,43 @@ + 'map[string,string]', + 'id' => 'int', + 'name' => 'map[string,string]', + 'weight' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + /** + * + * + * @var int + */ + private $weight; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return LabelDescriptorGroup + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return LabelDescriptorGroup + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return LabelDescriptorGroup + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns weight. + * + * + * + * @return int + */ + public function getWeight() { + return $this->weight; + } + + /** + * Sets weight. + * + * @param int $weight + * @return LabelDescriptorGroup + */ + protected function setWeight($weight) { + $this->weight = $weight; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LabelDescriptorType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LabelDescriptorType.php new file mode 100644 index 0000000..bb223c3 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LabelDescriptorType.php @@ -0,0 +1,208 @@ + 'map[string,string]', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return LabelDescriptorType + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return LabelDescriptorType + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return LabelDescriptorType + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LegalOrganizationForm.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LegalOrganizationForm.php new file mode 100644 index 0000000..3baabd5 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LegalOrganizationForm.php @@ -0,0 +1,270 @@ + 'string', + 'description' => '\Wallee\Sdk\Model\LocalizedString[]', + 'englishDescription' => 'string', + 'id' => 'int', + 'shortcut' => '\Wallee\Sdk\Model\LocalizedString[]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $country; + + /** + * + * + * @var \Wallee\Sdk\Model\LocalizedString[] + */ + private $description; + + /** + * + * + * @var string + */ + private $englishDescription; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var \Wallee\Sdk\Model\LocalizedString[] + */ + private $shortcut; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['shortcut'])) { + $this->setShortcut($data['shortcut']); + } + } + + + /** + * Returns country. + * + * + * + * @return string + */ + public function getCountry() { + return $this->country; + } + + /** + * Sets country. + * + * @param string $country + * @return LegalOrganizationForm + */ + protected function setCountry($country) { + $this->country = $country; + + return $this; + } + + /** + * Returns description. + * + * + * + * @return \Wallee\Sdk\Model\LocalizedString[] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param \Wallee\Sdk\Model\LocalizedString[] $description + * @return LegalOrganizationForm + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns englishDescription. + * + * + * + * @return string + */ + public function getEnglishDescription() { + return $this->englishDescription; + } + + /** + * Sets englishDescription. + * + * @param string $englishDescription + * @return LegalOrganizationForm + */ + protected function setEnglishDescription($englishDescription) { + $this->englishDescription = $englishDescription; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return LegalOrganizationForm + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns shortcut. + * + * + * + * @return \Wallee\Sdk\Model\LocalizedString[] + */ + public function getShortcut() { + return $this->shortcut; + } + + /** + * Sets shortcut. + * + * @param \Wallee\Sdk\Model\LocalizedString[] $shortcut + * @return LegalOrganizationForm + */ + public function setShortcut($shortcut) { + $this->shortcut = $shortcut; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItem.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItem.php new file mode 100644 index 0000000..3f788ce --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItem.php @@ -0,0 +1,583 @@ + 'float', + 'amountExcludingTax' => 'float', + 'amountIncludingTax' => 'float', + 'attributes' => 'map[string,\Wallee\Sdk\Model\LineItemAttribute]', + 'name' => 'string', + 'quantity' => 'float', + 'shippingRequired' => 'bool', + 'sku' => 'string', + 'taxAmount' => 'float', + 'taxAmountPerUnit' => 'float', + 'taxes' => '\Wallee\Sdk\Model\Tax[]', + 'type' => '\Wallee\Sdk\Model\LineItemType', + 'uniqueId' => 'string', + 'unitPriceExcludingTax' => 'float', + 'unitPriceIncludingTax' => 'float' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The aggregated tax rate is the sum of all tax rates of the line item. + * + * @var float + */ + private $aggregatedTaxRate; + + /** + * + * + * @var float + */ + private $amountExcludingTax; + + /** + * + * + * @var float + */ + private $amountIncludingTax; + + /** + * + * + * @var map[string,\Wallee\Sdk\Model\LineItemAttribute] + */ + private $attributes; + + /** + * + * + * @var string + */ + private $name; + + /** + * + * + * @var float + */ + private $quantity; + + /** + * + * + * @var bool + */ + private $shippingRequired; + + /** + * + * + * @var string + */ + private $sku; + + /** + * + * + * @var float + */ + private $taxAmount; + + /** + * + * + * @var float + */ + private $taxAmountPerUnit; + + /** + * + * + * @var \Wallee\Sdk\Model\Tax[] + */ + private $taxes; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItemType + */ + private $type; + + /** + * The unique id identifies the line item within the set of line items associated with the transaction. + * + * @var string + */ + private $uniqueId; + + /** + * + * + * @var float + */ + private $unitPriceExcludingTax; + + /** + * + * + * @var float + */ + private $unitPriceIncludingTax; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['attributes'])) { + $this->setAttributes($data['attributes']); + } + if (isset($data['taxes'])) { + $this->setTaxes($data['taxes']); + } + if (isset($data['type'])) { + $this->setType($data['type']); + } + } + + + /** + * Returns aggregatedTaxRate. + * + * The aggregated tax rate is the sum of all tax rates of the line item. + * + * @return float + */ + public function getAggregatedTaxRate() { + return $this->aggregatedTaxRate; + } + + /** + * Sets aggregatedTaxRate. + * + * @param float $aggregatedTaxRate + * @return LineItem + */ + protected function setAggregatedTaxRate($aggregatedTaxRate) { + $this->aggregatedTaxRate = $aggregatedTaxRate; + + return $this; + } + + /** + * Returns amountExcludingTax. + * + * + * + * @return float + */ + public function getAmountExcludingTax() { + return $this->amountExcludingTax; + } + + /** + * Sets amountExcludingTax. + * + * @param float $amountExcludingTax + * @return LineItem + */ + protected function setAmountExcludingTax($amountExcludingTax) { + $this->amountExcludingTax = $amountExcludingTax; + + return $this; + } + + /** + * Returns amountIncludingTax. + * + * + * + * @return float + */ + public function getAmountIncludingTax() { + return $this->amountIncludingTax; + } + + /** + * Sets amountIncludingTax. + * + * @param float $amountIncludingTax + * @return LineItem + */ + protected function setAmountIncludingTax($amountIncludingTax) { + $this->amountIncludingTax = $amountIncludingTax; + + return $this; + } + + /** + * Returns attributes. + * + * + * + * @return map[string,\Wallee\Sdk\Model\LineItemAttribute] + */ + public function getAttributes() { + return $this->attributes; + } + + /** + * Sets attributes. + * + * @param map[string,\Wallee\Sdk\Model\LineItemAttribute] $attributes + * @return LineItem + */ + public function setAttributes($attributes) { + $this->attributes = $attributes; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return LineItem + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns quantity. + * + * + * + * @return float + */ + public function getQuantity() { + return $this->quantity; + } + + /** + * Sets quantity. + * + * @param float $quantity + * @return LineItem + */ + protected function setQuantity($quantity) { + $this->quantity = $quantity; + + return $this; + } + + /** + * Returns shippingRequired. + * + * + * + * @return bool + */ + public function getShippingRequired() { + return $this->shippingRequired; + } + + /** + * Sets shippingRequired. + * + * @param bool $shippingRequired + * @return LineItem + */ + protected function setShippingRequired($shippingRequired) { + $this->shippingRequired = $shippingRequired; + + return $this; + } + + /** + * Returns sku. + * + * + * + * @return string + */ + public function getSku() { + return $this->sku; + } + + /** + * Sets sku. + * + * @param string $sku + * @return LineItem + */ + protected function setSku($sku) { + $this->sku = $sku; + + return $this; + } + + /** + * Returns taxAmount. + * + * + * + * @return float + */ + public function getTaxAmount() { + return $this->taxAmount; + } + + /** + * Sets taxAmount. + * + * @param float $taxAmount + * @return LineItem + */ + protected function setTaxAmount($taxAmount) { + $this->taxAmount = $taxAmount; + + return $this; + } + + /** + * Returns taxAmountPerUnit. + * + * + * + * @return float + */ + public function getTaxAmountPerUnit() { + return $this->taxAmountPerUnit; + } + + /** + * Sets taxAmountPerUnit. + * + * @param float $taxAmountPerUnit + * @return LineItem + */ + protected function setTaxAmountPerUnit($taxAmountPerUnit) { + $this->taxAmountPerUnit = $taxAmountPerUnit; + + return $this; + } + + /** + * Returns taxes. + * + * + * + * @return \Wallee\Sdk\Model\Tax[] + */ + public function getTaxes() { + return $this->taxes; + } + + /** + * Sets taxes. + * + * @param \Wallee\Sdk\Model\Tax[] $taxes + * @return LineItem + */ + public function setTaxes($taxes) { + $this->taxes = $taxes; + + return $this; + } + + /** + * Returns type. + * + * + * + * @return \Wallee\Sdk\Model\LineItemType + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param \Wallee\Sdk\Model\LineItemType $type + * @return LineItem + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns uniqueId. + * + * The unique id identifies the line item within the set of line items associated with the transaction. + * + * @return string + */ + public function getUniqueId() { + return $this->uniqueId; + } + + /** + * Sets uniqueId. + * + * @param string $uniqueId + * @return LineItem + */ + protected function setUniqueId($uniqueId) { + $this->uniqueId = $uniqueId; + + return $this; + } + + /** + * Returns unitPriceExcludingTax. + * + * + * + * @return float + */ + public function getUnitPriceExcludingTax() { + return $this->unitPriceExcludingTax; + } + + /** + * Sets unitPriceExcludingTax. + * + * @param float $unitPriceExcludingTax + * @return LineItem + */ + protected function setUnitPriceExcludingTax($unitPriceExcludingTax) { + $this->unitPriceExcludingTax = $unitPriceExcludingTax; + + return $this; + } + + /** + * Returns unitPriceIncludingTax. + * + * + * + * @return float + */ + public function getUnitPriceIncludingTax() { + return $this->unitPriceIncludingTax; + } + + /** + * Sets unitPriceIncludingTax. + * + * @param float $unitPriceIncludingTax + * @return LineItem + */ + protected function setUnitPriceIncludingTax($unitPriceIncludingTax) { + $this->unitPriceIncludingTax = $unitPriceIncludingTax; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemAttribute.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemAttribute.php new file mode 100644 index 0000000..8505d1a --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemAttribute.php @@ -0,0 +1,171 @@ + 'string', + 'value' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $label; + + /** + * + * + * @var string + */ + private $value; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + } + + + /** + * Returns label. + * + * + * + * @return string + */ + public function getLabel() { + return $this->label; + } + + /** + * Sets label. + * + * @param string $label + * @return LineItemAttribute + */ + protected function setLabel($label) { + $this->label = $label; + + return $this; + } + + /** + * Returns value. + * + * + * + * @return string + */ + public function getValue() { + return $this->value; + } + + /** + * Sets value. + * + * @param string $value + * @return LineItemAttribute + */ + protected function setValue($value) { + $this->value = $value; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemAttributeCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemAttributeCreate.php new file mode 100644 index 0000000..7645d8b --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemAttributeCreate.php @@ -0,0 +1,183 @@ + 'string', + 'value' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $label; + + /** + * + * + * @var string + */ + private $value; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['label'])) { + $this->setLabel($data['label']); + } + if (isset($data['value'])) { + $this->setValue($data['value']); + } + } + + + /** + * Returns label. + * + * + * + * @return string + */ + public function getLabel() { + return $this->label; + } + + /** + * Sets label. + * + * @param string $label + * @return LineItemAttributeCreate + */ + public function setLabel($label) { + $this->label = $label; + + return $this; + } + + /** + * Returns value. + * + * + * + * @return string + */ + public function getValue() { + return $this->value; + } + + /** + * Sets value. + * + * @param string $value + * @return LineItemAttributeCreate + */ + public function setValue($value) { + $this->value = $value; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getLabel() === null) { + throw new ValidationException("'label' can't be null", 'label', $this); + } + if ($this->getValue() === null) { + throw new ValidationException("'value' can't be null", 'value', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemCreate.php new file mode 100644 index 0000000..a4ae36f --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemCreate.php @@ -0,0 +1,430 @@ + 'float', + 'attributes' => 'map[string,\Wallee\Sdk\Model\LineItemAttributeCreate]', + 'name' => 'string', + 'quantity' => 'float', + 'shippingRequired' => 'bool', + 'sku' => 'string', + 'taxes' => '\Wallee\Sdk\Model\TaxCreate[]', + 'type' => '\Wallee\Sdk\Model\LineItemType', + 'uniqueId' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var float + */ + private $amountIncludingTax; + + /** + * + * + * @var map[string,\Wallee\Sdk\Model\LineItemAttributeCreate] + */ + private $attributes; + + /** + * + * + * @var string + */ + private $name; + + /** + * + * + * @var float + */ + private $quantity; + + /** + * + * + * @var bool + */ + private $shippingRequired; + + /** + * + * + * @var string + */ + private $sku; + + /** + * + * + * @var \Wallee\Sdk\Model\TaxCreate[] + */ + private $taxes; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItemType + */ + private $type; + + /** + * The unique id identifies the line item within the set of line items associated with the transaction. + * + * @var string + */ + private $uniqueId; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['amountIncludingTax'])) { + $this->setAmountIncludingTax($data['amountIncludingTax']); + } + if (isset($data['attributes'])) { + $this->setAttributes($data['attributes']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['quantity'])) { + $this->setQuantity($data['quantity']); + } + if (isset($data['shippingRequired'])) { + $this->setShippingRequired($data['shippingRequired']); + } + if (isset($data['sku'])) { + $this->setSku($data['sku']); + } + if (isset($data['taxes'])) { + $this->setTaxes($data['taxes']); + } + if (isset($data['type'])) { + $this->setType($data['type']); + } + if (isset($data['uniqueId'])) { + $this->setUniqueId($data['uniqueId']); + } + } + + + /** + * Returns amountIncludingTax. + * + * + * + * @return float + */ + public function getAmountIncludingTax() { + return $this->amountIncludingTax; + } + + /** + * Sets amountIncludingTax. + * + * @param float $amountIncludingTax + * @return LineItemCreate + */ + public function setAmountIncludingTax($amountIncludingTax) { + $this->amountIncludingTax = $amountIncludingTax; + + return $this; + } + + /** + * Returns attributes. + * + * + * + * @return map[string,\Wallee\Sdk\Model\LineItemAttributeCreate] + */ + public function getAttributes() { + return $this->attributes; + } + + /** + * Sets attributes. + * + * @param map[string,\Wallee\Sdk\Model\LineItemAttributeCreate] $attributes + * @return LineItemCreate + */ + public function setAttributes($attributes) { + $this->attributes = $attributes; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return LineItemCreate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns quantity. + * + * + * + * @return float + */ + public function getQuantity() { + return $this->quantity; + } + + /** + * Sets quantity. + * + * @param float $quantity + * @return LineItemCreate + */ + public function setQuantity($quantity) { + $this->quantity = $quantity; + + return $this; + } + + /** + * Returns shippingRequired. + * + * + * + * @return bool + */ + public function getShippingRequired() { + return $this->shippingRequired; + } + + /** + * Sets shippingRequired. + * + * @param bool $shippingRequired + * @return LineItemCreate + */ + public function setShippingRequired($shippingRequired) { + $this->shippingRequired = $shippingRequired; + + return $this; + } + + /** + * Returns sku. + * + * + * + * @return string + */ + public function getSku() { + return $this->sku; + } + + /** + * Sets sku. + * + * @param string $sku + * @return LineItemCreate + */ + public function setSku($sku) { + $this->sku = $sku; + + return $this; + } + + /** + * Returns taxes. + * + * + * + * @return \Wallee\Sdk\Model\TaxCreate[] + */ + public function getTaxes() { + return $this->taxes; + } + + /** + * Sets taxes. + * + * @param \Wallee\Sdk\Model\TaxCreate[] $taxes + * @return LineItemCreate + */ + public function setTaxes($taxes) { + $this->taxes = $taxes; + + return $this; + } + + /** + * Returns type. + * + * + * + * @return \Wallee\Sdk\Model\LineItemType + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param \Wallee\Sdk\Model\LineItemType $type + * @return LineItemCreate + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns uniqueId. + * + * The unique id identifies the line item within the set of line items associated with the transaction. + * + * @return string + */ + public function getUniqueId() { + return $this->uniqueId; + } + + /** + * Sets uniqueId. + * + * @param string $uniqueId + * @return LineItemCreate + */ + public function setUniqueId($uniqueId) { + $this->uniqueId = $uniqueId; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getAmountIncludingTax() === null) { + throw new ValidationException("'amountIncludingTax' can't be null", 'amountIncludingTax', $this); + } + if ($this->getName() === null) { + throw new ValidationException("'name' can't be null", 'name', $this); + } + if ($this->getQuantity() === null) { + throw new ValidationException("'quantity' can't be null", 'quantity', $this); + } + if ($this->getType() === null) { + throw new ValidationException("'type' can't be null", 'type', $this); + } + if ($this->getUniqueId() === null) { + throw new ValidationException("'uniqueId' can't be null", 'uniqueId', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemReduction.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemReduction.php new file mode 100644 index 0000000..1bc7b81 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemReduction.php @@ -0,0 +1,202 @@ + 'string', + 'quantityReduction' => 'float', + 'unitPriceReduction' => 'float' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The unique id identifies the line item on which the reduction is applied on. + * + * @var string + */ + private $lineItemUniqueId; + + /** + * + * + * @var float + */ + private $quantityReduction; + + /** + * + * + * @var float + */ + private $unitPriceReduction; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + } + + + /** + * Returns lineItemUniqueId. + * + * The unique id identifies the line item on which the reduction is applied on. + * + * @return string + */ + public function getLineItemUniqueId() { + return $this->lineItemUniqueId; + } + + /** + * Sets lineItemUniqueId. + * + * @param string $lineItemUniqueId + * @return LineItemReduction + */ + protected function setLineItemUniqueId($lineItemUniqueId) { + $this->lineItemUniqueId = $lineItemUniqueId; + + return $this; + } + + /** + * Returns quantityReduction. + * + * + * + * @return float + */ + public function getQuantityReduction() { + return $this->quantityReduction; + } + + /** + * Sets quantityReduction. + * + * @param float $quantityReduction + * @return LineItemReduction + */ + protected function setQuantityReduction($quantityReduction) { + $this->quantityReduction = $quantityReduction; + + return $this; + } + + /** + * Returns unitPriceReduction. + * + * + * + * @return float + */ + public function getUnitPriceReduction() { + return $this->unitPriceReduction; + } + + /** + * Sets unitPriceReduction. + * + * @param float $unitPriceReduction + * @return LineItemReduction + */ + protected function setUnitPriceReduction($unitPriceReduction) { + $this->unitPriceReduction = $unitPriceReduction; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemReductionCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemReductionCreate.php new file mode 100644 index 0000000..0b10dce --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemReductionCreate.php @@ -0,0 +1,220 @@ + 'string', + 'quantityReduction' => 'float', + 'unitPriceReduction' => 'float' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The unique id identifies the line item on which the reduction is applied on. + * + * @var string + */ + private $lineItemUniqueId; + + /** + * + * + * @var float + */ + private $quantityReduction; + + /** + * + * + * @var float + */ + private $unitPriceReduction; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['lineItemUniqueId'])) { + $this->setLineItemUniqueId($data['lineItemUniqueId']); + } + if (isset($data['quantityReduction'])) { + $this->setQuantityReduction($data['quantityReduction']); + } + if (isset($data['unitPriceReduction'])) { + $this->setUnitPriceReduction($data['unitPriceReduction']); + } + } + + + /** + * Returns lineItemUniqueId. + * + * The unique id identifies the line item on which the reduction is applied on. + * + * @return string + */ + public function getLineItemUniqueId() { + return $this->lineItemUniqueId; + } + + /** + * Sets lineItemUniqueId. + * + * @param string $lineItemUniqueId + * @return LineItemReductionCreate + */ + public function setLineItemUniqueId($lineItemUniqueId) { + $this->lineItemUniqueId = $lineItemUniqueId; + + return $this; + } + + /** + * Returns quantityReduction. + * + * + * + * @return float + */ + public function getQuantityReduction() { + return $this->quantityReduction; + } + + /** + * Sets quantityReduction. + * + * @param float $quantityReduction + * @return LineItemReductionCreate + */ + public function setQuantityReduction($quantityReduction) { + $this->quantityReduction = $quantityReduction; + + return $this; + } + + /** + * Returns unitPriceReduction. + * + * + * + * @return float + */ + public function getUnitPriceReduction() { + return $this->unitPriceReduction; + } + + /** + * Sets unitPriceReduction. + * + * @param float $unitPriceReduction + * @return LineItemReductionCreate + */ + public function setUnitPriceReduction($unitPriceReduction) { + $this->unitPriceReduction = $unitPriceReduction; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getLineItemUniqueId() === null) { + throw new ValidationException("'lineItemUniqueId' can't be null", 'lineItemUniqueId', $this); + } + if ($this->getQuantityReduction() === null) { + throw new ValidationException("'quantityReduction' can't be null", 'quantityReduction', $this); + } + if ($this->getUnitPriceReduction() === null) { + throw new ValidationException("'unitPriceReduction' can't be null", 'unitPriceReduction', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemType.php new file mode 100644 index 0000000..ac88f6e --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/LineItemType.php @@ -0,0 +1,45 @@ + 'string', + 'language' => 'string', + 'string' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $displayName; + + /** + * + * + * @var string + */ + private $language; + + /** + * + * + * @var string + */ + private $string; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + } + + + /** + * Returns displayName. + * + * + * + * @return string + */ + public function getDisplayName() { + return $this->displayName; + } + + /** + * Sets displayName. + * + * @param string $displayName + * @return LocalizedString + */ + protected function setDisplayName($displayName) { + $this->displayName = $displayName; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return LocalizedString + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns string. + * + * + * + * @return string + */ + public function getString() { + return $this->string; + } + + /** + * Sets string. + * + * @param string $string + * @return LocalizedString + */ + protected function setString($string) { + $this->string = $string; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ManualTask.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ManualTask.php new file mode 100644 index 0000000..aee7048 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ManualTask.php @@ -0,0 +1,425 @@ + 'int[]', + 'contextEntityId' => 'int', + 'createdOn' => '\DateTime', + 'expiresOn' => '\DateTime', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'plannedPurgeDate' => '\DateTime', + 'spaceId' => 'int', + 'state' => '\Wallee\Sdk\Model\ManualTaskState', + 'type' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var int[] + */ + private $actions; + + /** + * The context entity ID links the manual task to the entity which caused its creation. + * + * @var int + */ + private $contextEntityId; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * The expiry date indicates until when the manual task has to be executed. + * + * @var \DateTime + */ + private $expiresOn; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var int + */ + private $spaceId; + + /** + * + * + * @var \Wallee\Sdk\Model\ManualTaskState + */ + private $state; + + /** + * The type categorizes the manual task. + * + * @var int + */ + private $type; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['actions'])) { + $this->setActions($data['actions']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + } + + + /** + * Returns actions. + * + * + * + * @return int[] + */ + public function getActions() { + return $this->actions; + } + + /** + * Sets actions. + * + * @param int[] $actions + * @return ManualTask + */ + public function setActions($actions) { + $this->actions = $actions; + + return $this; + } + + /** + * Returns contextEntityId. + * + * The context entity ID links the manual task to the entity which caused its creation. + * + * @return int + */ + public function getContextEntityId() { + return $this->contextEntityId; + } + + /** + * Sets contextEntityId. + * + * @param int $contextEntityId + * @return ManualTask + */ + protected function setContextEntityId($contextEntityId) { + $this->contextEntityId = $contextEntityId; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return ManualTask + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns expiresOn. + * + * The expiry date indicates until when the manual task has to be executed. + * + * @return \DateTime + */ + public function getExpiresOn() { + return $this->expiresOn; + } + + /** + * Sets expiresOn. + * + * @param \DateTime $expiresOn + * @return ManualTask + */ + protected function setExpiresOn($expiresOn) { + $this->expiresOn = $expiresOn; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ManualTask + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return ManualTask + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return ManualTask + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns spaceId. + * + * + * + * @return int + */ + public function getSpaceId() { + return $this->spaceId; + } + + /** + * Sets spaceId. + * + * @param int $spaceId + * @return ManualTask + */ + protected function setSpaceId($spaceId) { + $this->spaceId = $spaceId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\ManualTaskState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\ManualTaskState $state + * @return ManualTask + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns type. + * + * The type categorizes the manual task. + * + * @return int + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param int $type + * @return ManualTask + */ + protected function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ManualTaskAction.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ManualTaskAction.php new file mode 100644 index 0000000..53cdc28 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ManualTaskAction.php @@ -0,0 +1,239 @@ + 'int', + 'label' => 'map[string,string]', + 'style' => '\Wallee\Sdk\Model\ManualTaskActionStyle', + 'taskType' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $label; + + /** + * + * + * @var \Wallee\Sdk\Model\ManualTaskActionStyle + */ + private $style; + + /** + * + * + * @var int + */ + private $taskType; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['label'])) { + $this->setLabel($data['label']); + } + if (isset($data['style'])) { + $this->setStyle($data['style']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ManualTaskAction + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns label. + * + * + * + * @return map[string,string] + */ + public function getLabel() { + return $this->label; + } + + /** + * Sets label. + * + * @param map[string,string] $label + * @return ManualTaskAction + */ + public function setLabel($label) { + $this->label = $label; + + return $this; + } + + /** + * Returns style. + * + * + * + * @return \Wallee\Sdk\Model\ManualTaskActionStyle + */ + public function getStyle() { + return $this->style; + } + + /** + * Sets style. + * + * @param \Wallee\Sdk\Model\ManualTaskActionStyle $style + * @return ManualTaskAction + */ + public function setStyle($style) { + $this->style = $style; + + return $this; + } + + /** + * Returns taskType. + * + * + * + * @return int + */ + public function getTaskType() { + return $this->taskType; + } + + /** + * Sets taskType. + * + * @param int $taskType + * @return ManualTaskAction + */ + protected function setTaskType($taskType) { + $this->taskType = $taskType; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ManualTaskActionStyle.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ManualTaskActionStyle.php new file mode 100644 index 0000000..d7f8ae3 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ManualTaskActionStyle.php @@ -0,0 +1,44 @@ + 'map[string,string]', + 'features' => 'int[]', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var int[] + */ + private $features; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['features'])) { + $this->setFeatures($data['features']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return ManualTaskType + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns features. + * + * + * + * @return int[] + */ + public function getFeatures() { + return $this->features; + } + + /** + * Sets features. + * + * @param int[] $features + * @return ManualTaskType + */ + public function setFeatures($features) { + $this->features = $features; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ManualTaskType + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return ManualTaskType + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/MetricUsage.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/MetricUsage.php new file mode 100644 index 0000000..dc75694 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/MetricUsage.php @@ -0,0 +1,239 @@ + 'float', + 'metricDescription' => 'map[string,string]', + 'metricId' => 'int', + 'metricName' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The consumed units provide the value of how much has been consumed of the particular metric. + * + * @var float + */ + private $consumedUnits; + + /** + * The metric description describes the metric. + * + * @var map[string,string] + */ + private $metricDescription; + + /** + * The metric ID identifies the metric for consumed units. + * + * @var int + */ + private $metricId; + + /** + * The metric name defines the name of the consumed units. + * + * @var map[string,string] + */ + private $metricName; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['metricDescription'])) { + $this->setMetricDescription($data['metricDescription']); + } + if (isset($data['metricName'])) { + $this->setMetricName($data['metricName']); + } + } + + + /** + * Returns consumedUnits. + * + * The consumed units provide the value of how much has been consumed of the particular metric. + * + * @return float + */ + public function getConsumedUnits() { + return $this->consumedUnits; + } + + /** + * Sets consumedUnits. + * + * @param float $consumedUnits + * @return MetricUsage + */ + protected function setConsumedUnits($consumedUnits) { + $this->consumedUnits = $consumedUnits; + + return $this; + } + + /** + * Returns metricDescription. + * + * The metric description describes the metric. + * + * @return map[string,string] + */ + public function getMetricDescription() { + return $this->metricDescription; + } + + /** + * Sets metricDescription. + * + * @param map[string,string] $metricDescription + * @return MetricUsage + */ + public function setMetricDescription($metricDescription) { + $this->metricDescription = $metricDescription; + + return $this; + } + + /** + * Returns metricId. + * + * The metric ID identifies the metric for consumed units. + * + * @return int + */ + public function getMetricId() { + return $this->metricId; + } + + /** + * Sets metricId. + * + * @param int $metricId + * @return MetricUsage + */ + protected function setMetricId($metricId) { + $this->metricId = $metricId; + + return $this; + } + + /** + * Returns metricName. + * + * The metric name defines the name of the consumed units. + * + * @return map[string,string] + */ + public function getMetricName() { + return $this->metricName; + } + + /** + * Sets metricName. + * + * @param map[string,string] $metricName + * @return MetricUsage + */ + public function setMetricName($metricName) { + $this->metricName = $metricName; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ModelResourcePath.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ModelResourcePath.php new file mode 100644 index 0000000..11a666f --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ModelResourcePath.php @@ -0,0 +1,335 @@ + 'int', + 'linkedSpaceId' => 'int', + 'path' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'spaceId' => 'int', + 'state' => '\Wallee\Sdk\Model\ResourceState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var string + */ + private $path; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var int + */ + private $spaceId; + + /** + * + * + * @var \Wallee\Sdk\Model\ResourceState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ModelResourcePath + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return ModelResourcePath + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns path. + * + * + * + * @return string + */ + public function getPath() { + return $this->path; + } + + /** + * Sets path. + * + * @param string $path + * @return ModelResourcePath + */ + protected function setPath($path) { + $this->path = $path; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return ModelResourcePath + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns spaceId. + * + * + * + * @return int + */ + public function getSpaceId() { + return $this->spaceId; + } + + /** + * Sets spaceId. + * + * @param int $spaceId + * @return ModelResourcePath + */ + protected function setSpaceId($spaceId) { + $this->spaceId = $spaceId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\ResourceState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\ResourceState $state + * @return ModelResourcePath + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ModelResourcePath + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/OneClickPaymentMode.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/OneClickPaymentMode.php new file mode 100644 index 0000000..11b13c7 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/OneClickPaymentMode.php @@ -0,0 +1,44 @@ + '\Wallee\Sdk\Model\DataCollectionType', + 'deprecated' => 'bool', + 'deprecationReason' => 'map[string,string]', + 'description' => 'map[string,string]', + 'feature' => '\Wallee\Sdk\Model\Feature', + 'id' => 'int', + 'name' => 'map[string,string]', + 'paymentMethod' => 'int', + 'paymentMethodBrand' => '\Wallee\Sdk\Model\PaymentMethodBrand', + 'primaryRiskTaker' => '\Wallee\Sdk\Model\PaymentPrimaryRiskTaker', + 'processor' => 'int', + 'supportedCustomersPresences' => '\Wallee\Sdk\Model\CustomersPresence[]', + 'supportedFeatures' => 'int[]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\DataCollectionType + */ + private $dataCollectionType; + + /** + * + * + * @var bool + */ + private $deprecated; + + /** + * + * + * @var map[string,string] + */ + private $deprecationReason; + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var \Wallee\Sdk\Model\Feature + */ + private $feature; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + /** + * + * + * @var int + */ + private $paymentMethod; + + /** + * + * + * @var \Wallee\Sdk\Model\PaymentMethodBrand + */ + private $paymentMethodBrand; + + /** + * + * + * @var \Wallee\Sdk\Model\PaymentPrimaryRiskTaker + */ + private $primaryRiskTaker; + + /** + * + * + * @var int + */ + private $processor; + + /** + * + * + * @var \Wallee\Sdk\Model\CustomersPresence[] + */ + private $supportedCustomersPresences; + + /** + * + * + * @var int[] + */ + private $supportedFeatures; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['dataCollectionType'])) { + $this->setDataCollectionType($data['dataCollectionType']); + } + if (isset($data['deprecationReason'])) { + $this->setDeprecationReason($data['deprecationReason']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['feature'])) { + $this->setFeature($data['feature']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['paymentMethodBrand'])) { + $this->setPaymentMethodBrand($data['paymentMethodBrand']); + } + if (isset($data['primaryRiskTaker'])) { + $this->setPrimaryRiskTaker($data['primaryRiskTaker']); + } + if (isset($data['supportedCustomersPresences'])) { + $this->setSupportedCustomersPresences($data['supportedCustomersPresences']); + } + if (isset($data['supportedFeatures'])) { + $this->setSupportedFeatures($data['supportedFeatures']); + } + } + + + /** + * Returns dataCollectionType. + * + * + * + * @return \Wallee\Sdk\Model\DataCollectionType + */ + public function getDataCollectionType() { + return $this->dataCollectionType; + } + + /** + * Sets dataCollectionType. + * + * @param \Wallee\Sdk\Model\DataCollectionType $dataCollectionType + * @return PaymentConnector + */ + public function setDataCollectionType($dataCollectionType) { + $this->dataCollectionType = $dataCollectionType; + + return $this; + } + + /** + * Returns deprecated. + * + * + * + * @return bool + */ + public function getDeprecated() { + return $this->deprecated; + } + + /** + * Sets deprecated. + * + * @param bool $deprecated + * @return PaymentConnector + */ + protected function setDeprecated($deprecated) { + $this->deprecated = $deprecated; + + return $this; + } + + /** + * Returns deprecationReason. + * + * + * + * @return map[string,string] + */ + public function getDeprecationReason() { + return $this->deprecationReason; + } + + /** + * Sets deprecationReason. + * + * @param map[string,string] $deprecationReason + * @return PaymentConnector + */ + public function setDeprecationReason($deprecationReason) { + $this->deprecationReason = $deprecationReason; + + return $this; + } + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return PaymentConnector + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns feature. + * + * + * + * @return \Wallee\Sdk\Model\Feature + */ + public function getFeature() { + return $this->feature; + } + + /** + * Sets feature. + * + * @param \Wallee\Sdk\Model\Feature $feature + * @return PaymentConnector + */ + public function setFeature($feature) { + $this->feature = $feature; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return PaymentConnector + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return PaymentConnector + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns paymentMethod. + * + * + * + * @return int + */ + public function getPaymentMethod() { + return $this->paymentMethod; + } + + /** + * Sets paymentMethod. + * + * @param int $paymentMethod + * @return PaymentConnector + */ + protected function setPaymentMethod($paymentMethod) { + $this->paymentMethod = $paymentMethod; + + return $this; + } + + /** + * Returns paymentMethodBrand. + * + * + * + * @return \Wallee\Sdk\Model\PaymentMethodBrand + */ + public function getPaymentMethodBrand() { + return $this->paymentMethodBrand; + } + + /** + * Sets paymentMethodBrand. + * + * @param \Wallee\Sdk\Model\PaymentMethodBrand $paymentMethodBrand + * @return PaymentConnector + */ + public function setPaymentMethodBrand($paymentMethodBrand) { + $this->paymentMethodBrand = $paymentMethodBrand; + + return $this; + } + + /** + * Returns primaryRiskTaker. + * + * + * + * @return \Wallee\Sdk\Model\PaymentPrimaryRiskTaker + */ + public function getPrimaryRiskTaker() { + return $this->primaryRiskTaker; + } + + /** + * Sets primaryRiskTaker. + * + * @param \Wallee\Sdk\Model\PaymentPrimaryRiskTaker $primaryRiskTaker + * @return PaymentConnector + */ + public function setPrimaryRiskTaker($primaryRiskTaker) { + $this->primaryRiskTaker = $primaryRiskTaker; + + return $this; + } + + /** + * Returns processor. + * + * + * + * @return int + */ + public function getProcessor() { + return $this->processor; + } + + /** + * Sets processor. + * + * @param int $processor + * @return PaymentConnector + */ + protected function setProcessor($processor) { + $this->processor = $processor; + + return $this; + } + + /** + * Returns supportedCustomersPresences. + * + * + * + * @return \Wallee\Sdk\Model\CustomersPresence[] + */ + public function getSupportedCustomersPresences() { + return $this->supportedCustomersPresences; + } + + /** + * Sets supportedCustomersPresences. + * + * @param \Wallee\Sdk\Model\CustomersPresence[] $supportedCustomersPresences + * @return PaymentConnector + */ + public function setSupportedCustomersPresences($supportedCustomersPresences) { + $this->supportedCustomersPresences = $supportedCustomersPresences; + + return $this; + } + + /** + * Returns supportedFeatures. + * + * + * + * @return int[] + */ + public function getSupportedFeatures() { + return $this->supportedFeatures; + } + + /** + * Sets supportedFeatures. + * + * @param int[] $supportedFeatures + * @return PaymentConnector + */ + public function setSupportedFeatures($supportedFeatures) { + $this->supportedFeatures = $supportedFeatures; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentConnectorConfiguration.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentConnectorConfiguration.php new file mode 100644 index 0000000..1f994dd --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentConnectorConfiguration.php @@ -0,0 +1,533 @@ + 'bool', + 'conditions' => 'int[]', + 'connector' => 'int', + 'enabledSpaceViews' => 'int[]', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'paymentMethodConfiguration' => '\Wallee\Sdk\Model\PaymentMethodConfiguration', + 'plannedPurgeDate' => '\DateTime', + 'priority' => 'int', + 'processorConfiguration' => '\Wallee\Sdk\Model\PaymentProcessorConfiguration', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * This property indicates if the connector is currently used for processing transactions. In case either the payment method configuration or the processor configuration is not active the connector will not be used even though the connector state is active. + * + * @var bool + */ + private $applicableForTransactionProcessing; + + /** + * If a transaction meet all selected conditions the connector configuration will be used to process the transaction otherwise the next connector configuration in line will be chosen according to the priorities. + * + * @var int[] + */ + private $conditions; + + /** + * + * + * @var int + */ + private $connector; + + /** + * The connector configuration is only enabled for the selected space views. In case the set is empty the connector configuration is enabled for all space views. + * + * @var int[] + */ + private $enabledSpaceViews; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The connector configuration name is used internally to identify the configuration in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * + * + * @var \Wallee\Sdk\Model\PaymentMethodConfiguration + */ + private $paymentMethodConfiguration; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The priority will define the order of choice of the connector configurations. The lower the value, the higher the priority is going to be. This value can also be a negative number in case you are adding a new configuration that you want to have a high priority and you dont want to change the priority of all the other configurations. + * + * @var int + */ + private $priority; + + /** + * + * + * @var \Wallee\Sdk\Model\PaymentProcessorConfiguration + */ + private $processorConfiguration; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['conditions'])) { + $this->setConditions($data['conditions']); + } + if (isset($data['enabledSpaceViews'])) { + $this->setEnabledSpaceViews($data['enabledSpaceViews']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['paymentMethodConfiguration'])) { + $this->setPaymentMethodConfiguration($data['paymentMethodConfiguration']); + } + if (isset($data['processorConfiguration'])) { + $this->setProcessorConfiguration($data['processorConfiguration']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns applicableForTransactionProcessing. + * + * This property indicates if the connector is currently used for processing transactions. In case either the payment method configuration or the processor configuration is not active the connector will not be used even though the connector state is active. + * + * @return bool + */ + public function getApplicableForTransactionProcessing() { + return $this->applicableForTransactionProcessing; + } + + /** + * Sets applicableForTransactionProcessing. + * + * @param bool $applicableForTransactionProcessing + * @return PaymentConnectorConfiguration + */ + protected function setApplicableForTransactionProcessing($applicableForTransactionProcessing) { + $this->applicableForTransactionProcessing = $applicableForTransactionProcessing; + + return $this; + } + + /** + * Returns conditions. + * + * If a transaction meet all selected conditions the connector configuration will be used to process the transaction otherwise the next connector configuration in line will be chosen according to the priorities. + * + * @return int[] + */ + public function getConditions() { + return $this->conditions; + } + + /** + * Sets conditions. + * + * @param int[] $conditions + * @return PaymentConnectorConfiguration + */ + public function setConditions($conditions) { + $this->conditions = $conditions; + + return $this; + } + + /** + * Returns connector. + * + * + * + * @return int + */ + public function getConnector() { + return $this->connector; + } + + /** + * Sets connector. + * + * @param int $connector + * @return PaymentConnectorConfiguration + */ + protected function setConnector($connector) { + $this->connector = $connector; + + return $this; + } + + /** + * Returns enabledSpaceViews. + * + * The connector configuration is only enabled for the selected space views. In case the set is empty the connector configuration is enabled for all space views. + * + * @return int[] + */ + public function getEnabledSpaceViews() { + return $this->enabledSpaceViews; + } + + /** + * Sets enabledSpaceViews. + * + * @param int[] $enabledSpaceViews + * @return PaymentConnectorConfiguration + */ + public function setEnabledSpaceViews($enabledSpaceViews) { + $this->enabledSpaceViews = $enabledSpaceViews; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return PaymentConnectorConfiguration + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return PaymentConnectorConfiguration + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The connector configuration name is used internally to identify the configuration in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return PaymentConnectorConfiguration + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns paymentMethodConfiguration. + * + * + * + * @return \Wallee\Sdk\Model\PaymentMethodConfiguration + */ + public function getPaymentMethodConfiguration() { + return $this->paymentMethodConfiguration; + } + + /** + * Sets paymentMethodConfiguration. + * + * @param \Wallee\Sdk\Model\PaymentMethodConfiguration $paymentMethodConfiguration + * @return PaymentConnectorConfiguration + */ + public function setPaymentMethodConfiguration($paymentMethodConfiguration) { + $this->paymentMethodConfiguration = $paymentMethodConfiguration; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return PaymentConnectorConfiguration + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns priority. + * + * The priority will define the order of choice of the connector configurations. The lower the value, the higher the priority is going to be. This value can also be a negative number in case you are adding a new configuration that you want to have a high priority and you dont want to change the priority of all the other configurations. + * + * @return int + */ + public function getPriority() { + return $this->priority; + } + + /** + * Sets priority. + * + * @param int $priority + * @return PaymentConnectorConfiguration + */ + protected function setPriority($priority) { + $this->priority = $priority; + + return $this; + } + + /** + * Returns processorConfiguration. + * + * + * + * @return \Wallee\Sdk\Model\PaymentProcessorConfiguration + */ + public function getProcessorConfiguration() { + return $this->processorConfiguration; + } + + /** + * Sets processorConfiguration. + * + * @param \Wallee\Sdk\Model\PaymentProcessorConfiguration $processorConfiguration + * @return PaymentConnectorConfiguration + */ + public function setProcessorConfiguration($processorConfiguration) { + $this->processorConfiguration = $processorConfiguration; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return PaymentConnectorConfiguration + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return PaymentConnectorConfiguration + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentConnectorFeature.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentConnectorFeature.php new file mode 100644 index 0000000..bc09dd3 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentConnectorFeature.php @@ -0,0 +1,205 @@ + 'string', + 'feature' => '\Wallee\Sdk\Model\Feature', + 'id' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $displayName; + + /** + * + * + * @var \Wallee\Sdk\Model\Feature + */ + private $feature; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['feature'])) { + $this->setFeature($data['feature']); + } + } + + + /** + * Returns displayName. + * + * + * + * @return string + */ + public function getDisplayName() { + return $this->displayName; + } + + /** + * Sets displayName. + * + * @param string $displayName + * @return PaymentConnectorFeature + */ + protected function setDisplayName($displayName) { + $this->displayName = $displayName; + + return $this; + } + + /** + * Returns feature. + * + * + * + * @return \Wallee\Sdk\Model\Feature + */ + public function getFeature() { + return $this->feature; + } + + /** + * Sets feature. + * + * @param \Wallee\Sdk\Model\Feature $feature + * @return PaymentConnectorFeature + */ + public function setFeature($feature) { + $this->feature = $feature; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return PaymentConnectorFeature + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentContract.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentContract.php new file mode 100644 index 0000000..bb46294 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentContract.php @@ -0,0 +1,598 @@ + '\Wallee\Sdk\Model\Account', + 'activatedOn' => '\DateTime', + 'contractIdentifier' => 'string', + 'contractType' => '\Wallee\Sdk\Model\PaymentContractType', + 'createdBy' => '\Wallee\Sdk\Model\User', + 'createdOn' => '\DateTime', + 'externalId' => 'string', + 'id' => 'int', + 'rejectedOn' => '\DateTime', + 'rejectionReason' => '\Wallee\Sdk\Model\FailureReason', + 'startTerminatingOn' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\PaymentContractState', + 'terminatedBy' => '\Wallee\Sdk\Model\User', + 'terminatedOn' => '\DateTime', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\Account + */ + private $account; + + /** + * + * + * @var \DateTime + */ + private $activatedOn; + + /** + * + * + * @var string + */ + private $contractIdentifier; + + /** + * + * + * @var \Wallee\Sdk\Model\PaymentContractType + */ + private $contractType; + + /** + * + * + * @var \Wallee\Sdk\Model\User + */ + private $createdBy; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var \DateTime + */ + private $rejectedOn; + + /** + * + * + * @var \Wallee\Sdk\Model\FailureReason + */ + private $rejectionReason; + + /** + * + * + * @var \DateTime + */ + private $startTerminatingOn; + + /** + * + * + * @var \Wallee\Sdk\Model\PaymentContractState + */ + private $state; + + /** + * + * + * @var \Wallee\Sdk\Model\User + */ + private $terminatedBy; + + /** + * + * + * @var \DateTime + */ + private $terminatedOn; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['account'])) { + $this->setAccount($data['account']); + } + if (isset($data['contractType'])) { + $this->setContractType($data['contractType']); + } + if (isset($data['createdBy'])) { + $this->setCreatedBy($data['createdBy']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['rejectionReason'])) { + $this->setRejectionReason($data['rejectionReason']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['terminatedBy'])) { + $this->setTerminatedBy($data['terminatedBy']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns account. + * + * + * + * @return \Wallee\Sdk\Model\Account + */ + public function getAccount() { + return $this->account; + } + + /** + * Sets account. + * + * @param \Wallee\Sdk\Model\Account $account + * @return PaymentContract + */ + public function setAccount($account) { + $this->account = $account; + + return $this; + } + + /** + * Returns activatedOn. + * + * + * + * @return \DateTime + */ + public function getActivatedOn() { + return $this->activatedOn; + } + + /** + * Sets activatedOn. + * + * @param \DateTime $activatedOn + * @return PaymentContract + */ + protected function setActivatedOn($activatedOn) { + $this->activatedOn = $activatedOn; + + return $this; + } + + /** + * Returns contractIdentifier. + * + * + * + * @return string + */ + public function getContractIdentifier() { + return $this->contractIdentifier; + } + + /** + * Sets contractIdentifier. + * + * @param string $contractIdentifier + * @return PaymentContract + */ + protected function setContractIdentifier($contractIdentifier) { + $this->contractIdentifier = $contractIdentifier; + + return $this; + } + + /** + * Returns contractType. + * + * + * + * @return \Wallee\Sdk\Model\PaymentContractType + */ + public function getContractType() { + return $this->contractType; + } + + /** + * Sets contractType. + * + * @param \Wallee\Sdk\Model\PaymentContractType $contractType + * @return PaymentContract + */ + public function setContractType($contractType) { + $this->contractType = $contractType; + + return $this; + } + + /** + * Returns createdBy. + * + * + * + * @return \Wallee\Sdk\Model\User + */ + public function getCreatedBy() { + return $this->createdBy; + } + + /** + * Sets createdBy. + * + * @param \Wallee\Sdk\Model\User $createdBy + * @return PaymentContract + */ + public function setCreatedBy($createdBy) { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return PaymentContract + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return PaymentContract + */ + protected function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return PaymentContract + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns rejectedOn. + * + * + * + * @return \DateTime + */ + public function getRejectedOn() { + return $this->rejectedOn; + } + + /** + * Sets rejectedOn. + * + * @param \DateTime $rejectedOn + * @return PaymentContract + */ + protected function setRejectedOn($rejectedOn) { + $this->rejectedOn = $rejectedOn; + + return $this; + } + + /** + * Returns rejectionReason. + * + * + * + * @return \Wallee\Sdk\Model\FailureReason + */ + public function getRejectionReason() { + return $this->rejectionReason; + } + + /** + * Sets rejectionReason. + * + * @param \Wallee\Sdk\Model\FailureReason $rejectionReason + * @return PaymentContract + */ + public function setRejectionReason($rejectionReason) { + $this->rejectionReason = $rejectionReason; + + return $this; + } + + /** + * Returns startTerminatingOn. + * + * + * + * @return \DateTime + */ + public function getStartTerminatingOn() { + return $this->startTerminatingOn; + } + + /** + * Sets startTerminatingOn. + * + * @param \DateTime $startTerminatingOn + * @return PaymentContract + */ + protected function setStartTerminatingOn($startTerminatingOn) { + $this->startTerminatingOn = $startTerminatingOn; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\PaymentContractState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\PaymentContractState $state + * @return PaymentContract + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns terminatedBy. + * + * + * + * @return \Wallee\Sdk\Model\User + */ + public function getTerminatedBy() { + return $this->terminatedBy; + } + + /** + * Sets terminatedBy. + * + * @param \Wallee\Sdk\Model\User $terminatedBy + * @return PaymentContract + */ + public function setTerminatedBy($terminatedBy) { + $this->terminatedBy = $terminatedBy; + + return $this; + } + + /** + * Returns terminatedOn. + * + * + * + * @return \DateTime + */ + public function getTerminatedOn() { + return $this->terminatedOn; + } + + /** + * Sets terminatedOn. + * + * @param \DateTime $terminatedOn + * @return PaymentContract + */ + protected function setTerminatedOn($terminatedOn) { + $this->terminatedOn = $terminatedOn; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return PaymentContract + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentContractState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentContractState.php new file mode 100644 index 0000000..8bd96c7 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentContractState.php @@ -0,0 +1,46 @@ + 'map[string,string]', + 'feature' => '\Wallee\Sdk\Model\Feature', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var \Wallee\Sdk\Model\Feature + */ + private $feature; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['feature'])) { + $this->setFeature($data['feature']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return PaymentContractType + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns feature. + * + * + * + * @return \Wallee\Sdk\Model\Feature + */ + public function getFeature() { + return $this->feature; + } + + /** + * Sets feature. + * + * @param \Wallee\Sdk\Model\Feature $feature + * @return PaymentContractType + */ + public function setFeature($feature) { + $this->feature = $feature; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return PaymentContractType + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return PaymentContractType + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLink.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLink.php new file mode 100644 index 0000000..88cc67b --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLink.php @@ -0,0 +1,716 @@ + '\Wallee\Sdk\Model\PaymentMethodConfiguration[]', + 'appliedSpaceView' => 'int', + 'availableFrom' => '\DateTime', + 'availableUntil' => '\DateTime', + 'billingAddressRequired' => 'bool', + 'currency' => 'string', + 'externalId' => 'string', + 'id' => 'int', + 'language' => 'string', + 'lineItems' => '\Wallee\Sdk\Model\LineItem[]', + 'linkedSpaceId' => 'int', + 'maximalNumberOfTransactions' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'protectionMode' => '\Wallee\Sdk\Model\PaymentLinkProtectionMode', + 'shippingAddressRequired' => 'bool', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'url' => 'string', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The allowed payment method configurations restrict the payment methods which can be used with this payment link. + * + * @var \Wallee\Sdk\Model\PaymentMethodConfiguration[] + */ + private $allowedPaymentMethodConfigurations; + + /** + * The payment link can be conducted in a specific space view. The space view may apply a specific design to the payment page. + * + * @var int + */ + private $appliedSpaceView; + + /** + * The available from date defines the earliest date on which the payment link can be used. When no date is specified there will be no restriction. + * + * @var \DateTime + */ + private $availableFrom; + + /** + * The available from date defines the latest date on which the payment link can be used to initialize a transaction. When no date is specified there will be no restriction. + * + * @var \DateTime + */ + private $availableUntil; + + /** + * By making the billing address required the transaction can only be created when a billing address is provided within the request. + * + * @var bool + */ + private $billingAddressRequired; + + /** + * The currency defines in which currency the payment is executed in. If no currency is defined it has to be specified within the request parameter 'currency'. + * + * @var string + */ + private $currency; + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The language defines the language of the payment page. If no language is provided it can be provided through the request parameter. + * + * @var string + */ + private $language; + + /** + * The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters. + * + * @var \Wallee\Sdk\Model\LineItem[] + */ + private $lineItems; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The maximal number of transactions limits the number of transactions which can be created with this payment link. + * + * @var int + */ + private $maximalNumberOfTransactions; + + /** + * The payment link name is used internally to identify the payment link. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The protection mode determines if the payment link is protected against tampering and in what way. + * + * @var \Wallee\Sdk\Model\PaymentLinkProtectionMode + */ + private $protectionMode; + + /** + * By making the shipping address required the transaction can only be created when a shipping address is provided within the request. + * + * @var bool + */ + private $shippingAddressRequired; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The URL defines the URL to which the user has to be forwarded to initialize the payment. + * + * @var string + */ + private $url; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['allowedPaymentMethodConfigurations'])) { + $this->setAllowedPaymentMethodConfigurations($data['allowedPaymentMethodConfigurations']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + if (isset($data['protectionMode'])) { + $this->setProtectionMode($data['protectionMode']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns allowedPaymentMethodConfigurations. + * + * The allowed payment method configurations restrict the payment methods which can be used with this payment link. + * + * @return \Wallee\Sdk\Model\PaymentMethodConfiguration[] + */ + public function getAllowedPaymentMethodConfigurations() { + return $this->allowedPaymentMethodConfigurations; + } + + /** + * Sets allowedPaymentMethodConfigurations. + * + * @param \Wallee\Sdk\Model\PaymentMethodConfiguration[] $allowedPaymentMethodConfigurations + * @return PaymentLink + */ + public function setAllowedPaymentMethodConfigurations($allowedPaymentMethodConfigurations) { + $this->allowedPaymentMethodConfigurations = $allowedPaymentMethodConfigurations; + + return $this; + } + + /** + * Returns appliedSpaceView. + * + * The payment link can be conducted in a specific space view. The space view may apply a specific design to the payment page. + * + * @return int + */ + public function getAppliedSpaceView() { + return $this->appliedSpaceView; + } + + /** + * Sets appliedSpaceView. + * + * @param int $appliedSpaceView + * @return PaymentLink + */ + protected function setAppliedSpaceView($appliedSpaceView) { + $this->appliedSpaceView = $appliedSpaceView; + + return $this; + } + + /** + * Returns availableFrom. + * + * The available from date defines the earliest date on which the payment link can be used. When no date is specified there will be no restriction. + * + * @return \DateTime + */ + public function getAvailableFrom() { + return $this->availableFrom; + } + + /** + * Sets availableFrom. + * + * @param \DateTime $availableFrom + * @return PaymentLink + */ + protected function setAvailableFrom($availableFrom) { + $this->availableFrom = $availableFrom; + + return $this; + } + + /** + * Returns availableUntil. + * + * The available from date defines the latest date on which the payment link can be used to initialize a transaction. When no date is specified there will be no restriction. + * + * @return \DateTime + */ + public function getAvailableUntil() { + return $this->availableUntil; + } + + /** + * Sets availableUntil. + * + * @param \DateTime $availableUntil + * @return PaymentLink + */ + protected function setAvailableUntil($availableUntil) { + $this->availableUntil = $availableUntil; + + return $this; + } + + /** + * Returns billingAddressRequired. + * + * By making the billing address required the transaction can only be created when a billing address is provided within the request. + * + * @return bool + */ + public function getBillingAddressRequired() { + return $this->billingAddressRequired; + } + + /** + * Sets billingAddressRequired. + * + * @param bool $billingAddressRequired + * @return PaymentLink + */ + protected function setBillingAddressRequired($billingAddressRequired) { + $this->billingAddressRequired = $billingAddressRequired; + + return $this; + } + + /** + * Returns currency. + * + * The currency defines in which currency the payment is executed in. If no currency is defined it has to be specified within the request parameter 'currency'. + * + * @return string + */ + public function getCurrency() { + return $this->currency; + } + + /** + * Sets currency. + * + * @param string $currency + * @return PaymentLink + */ + protected function setCurrency($currency) { + $this->currency = $currency; + + return $this; + } + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return PaymentLink + */ + protected function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return PaymentLink + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns language. + * + * The language defines the language of the payment page. If no language is provided it can be provided through the request parameter. + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return PaymentLink + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns lineItems. + * + * The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters. + * + * @return \Wallee\Sdk\Model\LineItem[] + */ + public function getLineItems() { + return $this->lineItems; + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItem[] $lineItems + * @return PaymentLink + */ + public function setLineItems($lineItems) { + $this->lineItems = $lineItems; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return PaymentLink + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns maximalNumberOfTransactions. + * + * The maximal number of transactions limits the number of transactions which can be created with this payment link. + * + * @return int + */ + public function getMaximalNumberOfTransactions() { + return $this->maximalNumberOfTransactions; + } + + /** + * Sets maximalNumberOfTransactions. + * + * @param int $maximalNumberOfTransactions + * @return PaymentLink + */ + protected function setMaximalNumberOfTransactions($maximalNumberOfTransactions) { + $this->maximalNumberOfTransactions = $maximalNumberOfTransactions; + + return $this; + } + + /** + * Returns name. + * + * The payment link name is used internally to identify the payment link. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return PaymentLink + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return PaymentLink + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns protectionMode. + * + * The protection mode determines if the payment link is protected against tampering and in what way. + * + * @return \Wallee\Sdk\Model\PaymentLinkProtectionMode + */ + public function getProtectionMode() { + return $this->protectionMode; + } + + /** + * Sets protectionMode. + * + * @param \Wallee\Sdk\Model\PaymentLinkProtectionMode $protectionMode + * @return PaymentLink + */ + public function setProtectionMode($protectionMode) { + $this->protectionMode = $protectionMode; + + return $this; + } + + /** + * Returns shippingAddressRequired. + * + * By making the shipping address required the transaction can only be created when a shipping address is provided within the request. + * + * @return bool + */ + public function getShippingAddressRequired() { + return $this->shippingAddressRequired; + } + + /** + * Sets shippingAddressRequired. + * + * @param bool $shippingAddressRequired + * @return PaymentLink + */ + protected function setShippingAddressRequired($shippingAddressRequired) { + $this->shippingAddressRequired = $shippingAddressRequired; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return PaymentLink + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns url. + * + * The URL defines the URL to which the user has to be forwarded to initialize the payment. + * + * @return string + */ + public function getUrl() { + return $this->url; + } + + /** + * Sets url. + * + * @param string $url + * @return PaymentLink + */ + protected function setUrl($url) { + $this->url = $url; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return PaymentLink + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLinkActive.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLinkActive.php new file mode 100644 index 0000000..1351410 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLinkActive.php @@ -0,0 +1,146 @@ + '\Wallee\Sdk\Model\CreationEntityState' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['state'])) { + $this->setState($data['state']); + } + } + + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return PaymentLinkActive + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLinkCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLinkCreate.php new file mode 100644 index 0000000..4c77cf7 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLinkCreate.php @@ -0,0 +1,217 @@ + '\Wallee\Sdk\Model\CreationEntityState', + 'externalId' => 'string', + 'protectionMode' => '\Wallee\Sdk\Model\PaymentLinkProtectionMode' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * The protection mode determines if the payment link is protected against tampering and in what way. + * + * @var \Wallee\Sdk\Model\PaymentLinkProtectionMode + */ + private $protectionMode; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['externalId'])) { + $this->setExternalId($data['externalId']); + } + if (isset($data['protectionMode'])) { + $this->setProtectionMode($data['protectionMode']); + } + } + + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return PaymentLinkCreate + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return PaymentLinkCreate + */ + public function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns protectionMode. + * + * The protection mode determines if the payment link is protected against tampering and in what way. + * + * @return \Wallee\Sdk\Model\PaymentLinkProtectionMode + */ + public function getProtectionMode() { + return $this->protectionMode; + } + + /** + * Sets protectionMode. + * + * @param \Wallee\Sdk\Model\PaymentLinkProtectionMode $protectionMode + * @return PaymentLinkCreate + */ + public function setProtectionMode($protectionMode) { + $this->protectionMode = $protectionMode; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getExternalId() === null) { + throw new ValidationException("'externalId' can't be null", 'externalId', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLinkProtectionMode.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLinkProtectionMode.php new file mode 100644 index 0000000..44abd83 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentLinkProtectionMode.php @@ -0,0 +1,43 @@ + 'int', + 'version' => 'int', + 'allowedPaymentMethodConfigurations' => '\Wallee\Sdk\Model\PaymentMethodConfiguration[]', + 'appliedSpaceView' => 'int', + 'availableFrom' => '\DateTime', + 'availableUntil' => '\DateTime', + 'billingAddressRequired' => 'bool', + 'currency' => 'string', + 'language' => 'string', + 'lineItems' => '\Wallee\Sdk\Model\LineItemCreate[]', + 'maximalNumberOfTransactions' => 'int', + 'name' => 'string', + 'shippingAddressRequired' => 'bool' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + /** + * The allowed payment method configurations restrict the payment methods which can be used with this payment link. + * + * @var \Wallee\Sdk\Model\PaymentMethodConfiguration[] + */ + private $allowedPaymentMethodConfigurations; + + /** + * The payment link can be conducted in a specific space view. The space view may apply a specific design to the payment page. + * + * @var int + */ + private $appliedSpaceView; + + /** + * The available from date defines the earliest date on which the payment link can be used. When no date is specified there will be no restriction. + * + * @var \DateTime + */ + private $availableFrom; + + /** + * The available from date defines the latest date on which the payment link can be used to initialize a transaction. When no date is specified there will be no restriction. + * + * @var \DateTime + */ + private $availableUntil; + + /** + * By making the billing address required the transaction can only be created when a billing address is provided within the request. + * + * @var bool + */ + private $billingAddressRequired; + + /** + * The currency defines in which currency the payment is executed in. If no currency is defined it has to be specified within the request parameter 'currency'. + * + * @var string + */ + private $currency; + + /** + * The language defines the language of the payment page. If no language is provided it can be provided through the request parameter. + * + * @var string + */ + private $language; + + /** + * The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters. + * + * @var \Wallee\Sdk\Model\LineItemCreate[] + */ + private $lineItems; + + /** + * The maximal number of transactions limits the number of transactions which can be created with this payment link. + * + * @var int + */ + private $maximalNumberOfTransactions; + + /** + * The payment link name is used internally to identify the payment link. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * By making the shipping address required the transaction can only be created when a shipping address is provided within the request. + * + * @var bool + */ + private $shippingAddressRequired; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + if (isset($data['allowedPaymentMethodConfigurations'])) { + $this->setAllowedPaymentMethodConfigurations($data['allowedPaymentMethodConfigurations']); + } + if (isset($data['appliedSpaceView'])) { + $this->setAppliedSpaceView($data['appliedSpaceView']); + } + if (isset($data['availableFrom'])) { + $this->setAvailableFrom($data['availableFrom']); + } + if (isset($data['availableUntil'])) { + $this->setAvailableUntil($data['availableUntil']); + } + if (isset($data['billingAddressRequired'])) { + $this->setBillingAddressRequired($data['billingAddressRequired']); + } + if (isset($data['currency'])) { + $this->setCurrency($data['currency']); + } + if (isset($data['language'])) { + $this->setLanguage($data['language']); + } + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + if (isset($data['maximalNumberOfTransactions'])) { + $this->setMaximalNumberOfTransactions($data['maximalNumberOfTransactions']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['shippingAddressRequired'])) { + $this->setShippingAddressRequired($data['shippingAddressRequired']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return PaymentLinkUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return PaymentLinkUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Returns allowedPaymentMethodConfigurations. + * + * The allowed payment method configurations restrict the payment methods which can be used with this payment link. + * + * @return \Wallee\Sdk\Model\PaymentMethodConfiguration[] + */ + public function getAllowedPaymentMethodConfigurations() { + return $this->allowedPaymentMethodConfigurations; + } + + /** + * Sets allowedPaymentMethodConfigurations. + * + * @param \Wallee\Sdk\Model\PaymentMethodConfiguration[] $allowedPaymentMethodConfigurations + * @return PaymentLinkUpdate + */ + public function setAllowedPaymentMethodConfigurations($allowedPaymentMethodConfigurations) { + $this->allowedPaymentMethodConfigurations = $allowedPaymentMethodConfigurations; + + return $this; + } + + /** + * Returns appliedSpaceView. + * + * The payment link can be conducted in a specific space view. The space view may apply a specific design to the payment page. + * + * @return int + */ + public function getAppliedSpaceView() { + return $this->appliedSpaceView; + } + + /** + * Sets appliedSpaceView. + * + * @param int $appliedSpaceView + * @return PaymentLinkUpdate + */ + public function setAppliedSpaceView($appliedSpaceView) { + $this->appliedSpaceView = $appliedSpaceView; + + return $this; + } + + /** + * Returns availableFrom. + * + * The available from date defines the earliest date on which the payment link can be used. When no date is specified there will be no restriction. + * + * @return \DateTime + */ + public function getAvailableFrom() { + return $this->availableFrom; + } + + /** + * Sets availableFrom. + * + * @param \DateTime $availableFrom + * @return PaymentLinkUpdate + */ + public function setAvailableFrom($availableFrom) { + $this->availableFrom = $availableFrom; + + return $this; + } + + /** + * Returns availableUntil. + * + * The available from date defines the latest date on which the payment link can be used to initialize a transaction. When no date is specified there will be no restriction. + * + * @return \DateTime + */ + public function getAvailableUntil() { + return $this->availableUntil; + } + + /** + * Sets availableUntil. + * + * @param \DateTime $availableUntil + * @return PaymentLinkUpdate + */ + public function setAvailableUntil($availableUntil) { + $this->availableUntil = $availableUntil; + + return $this; + } + + /** + * Returns billingAddressRequired. + * + * By making the billing address required the transaction can only be created when a billing address is provided within the request. + * + * @return bool + */ + public function getBillingAddressRequired() { + return $this->billingAddressRequired; + } + + /** + * Sets billingAddressRequired. + * + * @param bool $billingAddressRequired + * @return PaymentLinkUpdate + */ + public function setBillingAddressRequired($billingAddressRequired) { + $this->billingAddressRequired = $billingAddressRequired; + + return $this; + } + + /** + * Returns currency. + * + * The currency defines in which currency the payment is executed in. If no currency is defined it has to be specified within the request parameter 'currency'. + * + * @return string + */ + public function getCurrency() { + return $this->currency; + } + + /** + * Sets currency. + * + * @param string $currency + * @return PaymentLinkUpdate + */ + public function setCurrency($currency) { + $this->currency = $currency; + + return $this; + } + + /** + * Returns language. + * + * The language defines the language of the payment page. If no language is provided it can be provided through the request parameter. + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return PaymentLinkUpdate + */ + public function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns lineItems. + * + * The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters. + * + * @return \Wallee\Sdk\Model\LineItemCreate[] + */ + public function getLineItems() { + return $this->lineItems; + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItemCreate[] $lineItems + * @return PaymentLinkUpdate + */ + public function setLineItems($lineItems) { + $this->lineItems = $lineItems; + + return $this; + } + + /** + * Returns maximalNumberOfTransactions. + * + * The maximal number of transactions limits the number of transactions which can be created with this payment link. + * + * @return int + */ + public function getMaximalNumberOfTransactions() { + return $this->maximalNumberOfTransactions; + } + + /** + * Sets maximalNumberOfTransactions. + * + * @param int $maximalNumberOfTransactions + * @return PaymentLinkUpdate + */ + public function setMaximalNumberOfTransactions($maximalNumberOfTransactions) { + $this->maximalNumberOfTransactions = $maximalNumberOfTransactions; + + return $this; + } + + /** + * Returns name. + * + * The payment link name is used internally to identify the payment link. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return PaymentLinkUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns shippingAddressRequired. + * + * By making the shipping address required the transaction can only be created when a shipping address is provided within the request. + * + * @return bool + */ + public function getShippingAddressRequired() { + return $this->shippingAddressRequired; + } + + /** + * Sets shippingAddressRequired. + * + * @param bool $shippingAddressRequired + * @return PaymentLinkUpdate + */ + public function setShippingAddressRequired($shippingAddressRequired) { + $this->shippingAddressRequired = $shippingAddressRequired; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentMethod.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentMethod.php new file mode 100644 index 0000000..13d8d1d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentMethod.php @@ -0,0 +1,341 @@ + '\Wallee\Sdk\Model\DataCollectionType[]', + 'description' => 'map[string,string]', + 'id' => 'int', + 'imagePath' => 'string', + 'merchantDescription' => 'map[string,string]', + 'name' => 'map[string,string]', + 'supportedCurrencies' => 'string[]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\DataCollectionType[] + */ + private $dataCollectionTypes; + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var string + */ + private $imagePath; + + /** + * + * + * @var map[string,string] + */ + private $merchantDescription; + + /** + * + * + * @var map[string,string] + */ + private $name; + + /** + * + * + * @var string[] + */ + private $supportedCurrencies; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['dataCollectionTypes'])) { + $this->setDataCollectionTypes($data['dataCollectionTypes']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['merchantDescription'])) { + $this->setMerchantDescription($data['merchantDescription']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['supportedCurrencies'])) { + $this->setSupportedCurrencies($data['supportedCurrencies']); + } + } + + + /** + * Returns dataCollectionTypes. + * + * + * + * @return \Wallee\Sdk\Model\DataCollectionType[] + */ + public function getDataCollectionTypes() { + return $this->dataCollectionTypes; + } + + /** + * Sets dataCollectionTypes. + * + * @param \Wallee\Sdk\Model\DataCollectionType[] $dataCollectionTypes + * @return PaymentMethod + */ + public function setDataCollectionTypes($dataCollectionTypes) { + $this->dataCollectionTypes = $dataCollectionTypes; + + return $this; + } + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return PaymentMethod + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return PaymentMethod + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns imagePath. + * + * + * + * @return string + */ + public function getImagePath() { + return $this->imagePath; + } + + /** + * Sets imagePath. + * + * @param string $imagePath + * @return PaymentMethod + */ + protected function setImagePath($imagePath) { + $this->imagePath = $imagePath; + + return $this; + } + + /** + * Returns merchantDescription. + * + * + * + * @return map[string,string] + */ + public function getMerchantDescription() { + return $this->merchantDescription; + } + + /** + * Sets merchantDescription. + * + * @param map[string,string] $merchantDescription + * @return PaymentMethod + */ + public function setMerchantDescription($merchantDescription) { + $this->merchantDescription = $merchantDescription; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return PaymentMethod + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns supportedCurrencies. + * + * + * + * @return string[] + */ + public function getSupportedCurrencies() { + return $this->supportedCurrencies; + } + + /** + * Sets supportedCurrencies. + * + * @param string[] $supportedCurrencies + * @return PaymentMethod + */ + public function setSupportedCurrencies($supportedCurrencies) { + $this->supportedCurrencies = $supportedCurrencies; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentMethodBrand.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentMethodBrand.php new file mode 100644 index 0000000..a8a6b69 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentMethodBrand.php @@ -0,0 +1,301 @@ + 'map[string,string]', + 'grayImagePath' => 'string', + 'id' => 'int', + 'imagePath' => 'string', + 'name' => 'map[string,string]', + 'paymentMethod' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var string + */ + private $grayImagePath; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var string + */ + private $imagePath; + + /** + * + * + * @var map[string,string] + */ + private $name; + + /** + * + * + * @var int + */ + private $paymentMethod; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return PaymentMethodBrand + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns grayImagePath. + * + * + * + * @return string + */ + public function getGrayImagePath() { + return $this->grayImagePath; + } + + /** + * Sets grayImagePath. + * + * @param string $grayImagePath + * @return PaymentMethodBrand + */ + protected function setGrayImagePath($grayImagePath) { + $this->grayImagePath = $grayImagePath; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return PaymentMethodBrand + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns imagePath. + * + * + * + * @return string + */ + public function getImagePath() { + return $this->imagePath; + } + + /** + * Sets imagePath. + * + * @param string $imagePath + * @return PaymentMethodBrand + */ + protected function setImagePath($imagePath) { + $this->imagePath = $imagePath; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return PaymentMethodBrand + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns paymentMethod. + * + * + * + * @return int + */ + public function getPaymentMethod() { + return $this->paymentMethod; + } + + /** + * Sets paymentMethod. + * + * @param int $paymentMethod + * @return PaymentMethodBrand + */ + protected function setPaymentMethod($paymentMethod) { + $this->paymentMethod = $paymentMethod; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentMethodConfiguration.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentMethodConfiguration.php new file mode 100644 index 0000000..8d5159f --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentMethodConfiguration.php @@ -0,0 +1,666 @@ + '\Wallee\Sdk\Model\DataCollectionType', + 'description' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'id' => 'int', + 'imageResourcePath' => '\Wallee\Sdk\Model\ModelResourcePath', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'oneClickPaymentMode' => '\Wallee\Sdk\Model\OneClickPaymentMode', + 'paymentMethod' => 'int', + 'plannedPurgeDate' => '\DateTime', + 'resolvedDescription' => 'map[string,string]', + 'resolvedImageUrl' => 'string', + 'resolvedTitle' => 'map[string,string]', + 'sortOrder' => 'int', + 'spaceId' => 'int', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'title' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The data collection type determines who is collecting the payment information. This can be done either by the processor (offsite) or by our application (onsite). + * + * @var \Wallee\Sdk\Model\DataCollectionType + */ + private $dataCollectionType; + + /** + * The payment method configuration description can be used to show a text during the payment process. Choose an appropriate description as it will be displayed to your customer. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The image of the payment method configuration overrides the default image of the payment method. + * + * @var \Wallee\Sdk\Model\ModelResourcePath + */ + private $imageResourcePath; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The payment method configuration name is used internally to identify the payment method configuration. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * When the buyer is present on the payment page or within the iFrame the payment details can be stored automatically. The buyer will be able to use the stored payment details for subsequent transactions. When the transaction already contains a token one-click payments are disabled anyway + * + * @var \Wallee\Sdk\Model\OneClickPaymentMode + */ + private $oneClickPaymentMode; + + /** + * + * + * @var int + */ + private $paymentMethod; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The resolved description uses the specified description or the default one when it is not overridden. + * + * @var map[string,string] + */ + private $resolvedDescription; + + /** + * The resolved URL of the image to use with this payment method. + * + * @var string + */ + private $resolvedImageUrl; + + /** + * The resolved title uses the specified title or the default one when it is not overridden. + * + * @var map[string,string] + */ + private $resolvedTitle; + + /** + * The sort order of the payment method determines the ordering of the methods shown to the user during the payment process. + * + * @var int + */ + private $sortOrder; + + /** + * + * + * @var int + */ + private $spaceId; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The title of the payment method configuration is used within the payment process. The title is visible to the customer. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $title; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['dataCollectionType'])) { + $this->setDataCollectionType($data['dataCollectionType']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['imageResourcePath'])) { + $this->setImageResourcePath($data['imageResourcePath']); + } + if (isset($data['oneClickPaymentMode'])) { + $this->setOneClickPaymentMode($data['oneClickPaymentMode']); + } + if (isset($data['resolvedDescription'])) { + $this->setResolvedDescription($data['resolvedDescription']); + } + if (isset($data['resolvedTitle'])) { + $this->setResolvedTitle($data['resolvedTitle']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['title'])) { + $this->setTitle($data['title']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns dataCollectionType. + * + * The data collection type determines who is collecting the payment information. This can be done either by the processor (offsite) or by our application (onsite). + * + * @return \Wallee\Sdk\Model\DataCollectionType + */ + public function getDataCollectionType() { + return $this->dataCollectionType; + } + + /** + * Sets dataCollectionType. + * + * @param \Wallee\Sdk\Model\DataCollectionType $dataCollectionType + * @return PaymentMethodConfiguration + */ + public function setDataCollectionType($dataCollectionType) { + $this->dataCollectionType = $dataCollectionType; + + return $this; + } + + /** + * Returns description. + * + * The payment method configuration description can be used to show a text during the payment process. Choose an appropriate description as it will be displayed to your customer. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $description + * @return PaymentMethodConfiguration + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return PaymentMethodConfiguration + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns imageResourcePath. + * + * The image of the payment method configuration overrides the default image of the payment method. + * + * @return \Wallee\Sdk\Model\ModelResourcePath + */ + public function getImageResourcePath() { + return $this->imageResourcePath; + } + + /** + * Sets imageResourcePath. + * + * @param \Wallee\Sdk\Model\ModelResourcePath $imageResourcePath + * @return PaymentMethodConfiguration + */ + public function setImageResourcePath($imageResourcePath) { + $this->imageResourcePath = $imageResourcePath; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return PaymentMethodConfiguration + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The payment method configuration name is used internally to identify the payment method configuration. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return PaymentMethodConfiguration + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns oneClickPaymentMode. + * + * When the buyer is present on the payment page or within the iFrame the payment details can be stored automatically. The buyer will be able to use the stored payment details for subsequent transactions. When the transaction already contains a token one-click payments are disabled anyway + * + * @return \Wallee\Sdk\Model\OneClickPaymentMode + */ + public function getOneClickPaymentMode() { + return $this->oneClickPaymentMode; + } + + /** + * Sets oneClickPaymentMode. + * + * @param \Wallee\Sdk\Model\OneClickPaymentMode $oneClickPaymentMode + * @return PaymentMethodConfiguration + */ + public function setOneClickPaymentMode($oneClickPaymentMode) { + $this->oneClickPaymentMode = $oneClickPaymentMode; + + return $this; + } + + /** + * Returns paymentMethod. + * + * + * + * @return int + */ + public function getPaymentMethod() { + return $this->paymentMethod; + } + + /** + * Sets paymentMethod. + * + * @param int $paymentMethod + * @return PaymentMethodConfiguration + */ + protected function setPaymentMethod($paymentMethod) { + $this->paymentMethod = $paymentMethod; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return PaymentMethodConfiguration + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns resolvedDescription. + * + * The resolved description uses the specified description or the default one when it is not overridden. + * + * @return map[string,string] + */ + public function getResolvedDescription() { + return $this->resolvedDescription; + } + + /** + * Sets resolvedDescription. + * + * @param map[string,string] $resolvedDescription + * @return PaymentMethodConfiguration + */ + public function setResolvedDescription($resolvedDescription) { + $this->resolvedDescription = $resolvedDescription; + + return $this; + } + + /** + * Returns resolvedImageUrl. + * + * The resolved URL of the image to use with this payment method. + * + * @return string + */ + public function getResolvedImageUrl() { + return $this->resolvedImageUrl; + } + + /** + * Sets resolvedImageUrl. + * + * @param string $resolvedImageUrl + * @return PaymentMethodConfiguration + */ + protected function setResolvedImageUrl($resolvedImageUrl) { + $this->resolvedImageUrl = $resolvedImageUrl; + + return $this; + } + + /** + * Returns resolvedTitle. + * + * The resolved title uses the specified title or the default one when it is not overridden. + * + * @return map[string,string] + */ + public function getResolvedTitle() { + return $this->resolvedTitle; + } + + /** + * Sets resolvedTitle. + * + * @param map[string,string] $resolvedTitle + * @return PaymentMethodConfiguration + */ + public function setResolvedTitle($resolvedTitle) { + $this->resolvedTitle = $resolvedTitle; + + return $this; + } + + /** + * Returns sortOrder. + * + * The sort order of the payment method determines the ordering of the methods shown to the user during the payment process. + * + * @return int + */ + public function getSortOrder() { + return $this->sortOrder; + } + + /** + * Sets sortOrder. + * + * @param int $sortOrder + * @return PaymentMethodConfiguration + */ + protected function setSortOrder($sortOrder) { + $this->sortOrder = $sortOrder; + + return $this; + } + + /** + * Returns spaceId. + * + * + * + * @return int + */ + public function getSpaceId() { + return $this->spaceId; + } + + /** + * Sets spaceId. + * + * @param int $spaceId + * @return PaymentMethodConfiguration + */ + protected function setSpaceId($spaceId) { + $this->spaceId = $spaceId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return PaymentMethodConfiguration + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns title. + * + * The title of the payment method configuration is used within the payment process. The title is visible to the customer. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getTitle() { + return $this->title; + } + + /** + * Sets title. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $title + * @return PaymentMethodConfiguration + */ + public function setTitle($title) { + $this->title = $title; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return PaymentMethodConfiguration + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentPrimaryRiskTaker.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentPrimaryRiskTaker.php new file mode 100644 index 0000000..2ee4e56 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentPrimaryRiskTaker.php @@ -0,0 +1,44 @@ + 'map[string,string]', + 'description' => 'map[string,string]', + 'feature' => 'int', + 'headquartersLocation' => 'map[string,string]', + 'id' => 'int', + 'logoPath' => 'string', + 'name' => 'map[string,string]', + 'productName' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $companyName; + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var int + */ + private $feature; + + /** + * + * + * @var map[string,string] + */ + private $headquartersLocation; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var string + */ + private $logoPath; + + /** + * + * + * @var map[string,string] + */ + private $name; + + /** + * + * + * @var map[string,string] + */ + private $productName; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['companyName'])) { + $this->setCompanyName($data['companyName']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['headquartersLocation'])) { + $this->setHeadquartersLocation($data['headquartersLocation']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['productName'])) { + $this->setProductName($data['productName']); + } + } + + + /** + * Returns companyName. + * + * + * + * @return map[string,string] + */ + public function getCompanyName() { + return $this->companyName; + } + + /** + * Sets companyName. + * + * @param map[string,string] $companyName + * @return PaymentProcessor + */ + public function setCompanyName($companyName) { + $this->companyName = $companyName; + + return $this; + } + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return PaymentProcessor + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns feature. + * + * + * + * @return int + */ + public function getFeature() { + return $this->feature; + } + + /** + * Sets feature. + * + * @param int $feature + * @return PaymentProcessor + */ + protected function setFeature($feature) { + $this->feature = $feature; + + return $this; + } + + /** + * Returns headquartersLocation. + * + * + * + * @return map[string,string] + */ + public function getHeadquartersLocation() { + return $this->headquartersLocation; + } + + /** + * Sets headquartersLocation. + * + * @param map[string,string] $headquartersLocation + * @return PaymentProcessor + */ + public function setHeadquartersLocation($headquartersLocation) { + $this->headquartersLocation = $headquartersLocation; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return PaymentProcessor + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns logoPath. + * + * + * + * @return string + */ + public function getLogoPath() { + return $this->logoPath; + } + + /** + * Sets logoPath. + * + * @param string $logoPath + * @return PaymentProcessor + */ + protected function setLogoPath($logoPath) { + $this->logoPath = $logoPath; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return PaymentProcessor + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns productName. + * + * + * + * @return map[string,string] + */ + public function getProductName() { + return $this->productName; + } + + /** + * Sets productName. + * + * @param map[string,string] $productName + * @return PaymentProcessor + */ + public function setProductName($productName) { + $this->productName = $productName; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentProcessorConfiguration.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentProcessorConfiguration.php new file mode 100644 index 0000000..ea54b28 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PaymentProcessorConfiguration.php @@ -0,0 +1,366 @@ + 'int', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'processor' => 'int', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The contract links the processor configuration with the contract that is used to process payments. + * + * @var int + */ + private $contractId; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The processor configuration name is used internally to identify a specific processor configuration. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * A processor handles the connection to a third part company (a Payment Service Provider) that technically manages the transaction and therefore processes the payment. For the same processor multiple processor configuration can be setup. + * + * @var int + */ + private $processor; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns contractId. + * + * The contract links the processor configuration with the contract that is used to process payments. + * + * @return int + */ + public function getContractId() { + return $this->contractId; + } + + /** + * Sets contractId. + * + * @param int $contractId + * @return PaymentProcessorConfiguration + */ + protected function setContractId($contractId) { + $this->contractId = $contractId; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return PaymentProcessorConfiguration + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return PaymentProcessorConfiguration + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The processor configuration name is used internally to identify a specific processor configuration. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return PaymentProcessorConfiguration + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return PaymentProcessorConfiguration + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns processor. + * + * A processor handles the connection to a third part company (a Payment Service Provider) that technically manages the transaction and therefore processes the payment. For the same processor multiple processor configuration can be setup. + * + * @return int + */ + public function getProcessor() { + return $this->processor; + } + + /** + * Sets processor. + * + * @param int $processor + * @return PaymentProcessorConfiguration + */ + protected function setProcessor($processor) { + $this->processor = $processor; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return PaymentProcessorConfiguration + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return PaymentProcessorConfiguration + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Permission.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Permission.php new file mode 100644 index 0000000..7f75f9a --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Permission.php @@ -0,0 +1,400 @@ + 'map[string,string]', + 'feature' => 'int', + 'group' => 'bool', + 'id' => 'int', + 'leaf' => 'bool', + 'name' => 'map[string,string]', + 'parent' => 'int', + 'pathToRoot' => 'int[]', + 'title' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var int + */ + private $feature; + + /** + * + * + * @var bool + */ + private $group; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var bool + */ + private $leaf; + + /** + * + * + * @var map[string,string] + */ + private $name; + + /** + * + * + * @var int + */ + private $parent; + + /** + * + * + * @var int[] + */ + private $pathToRoot; + + /** + * + * + * @var map[string,string] + */ + private $title; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['pathToRoot'])) { + $this->setPathToRoot($data['pathToRoot']); + } + if (isset($data['title'])) { + $this->setTitle($data['title']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return Permission + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns feature. + * + * + * + * @return int + */ + public function getFeature() { + return $this->feature; + } + + /** + * Sets feature. + * + * @param int $feature + * @return Permission + */ + protected function setFeature($feature) { + $this->feature = $feature; + + return $this; + } + + /** + * Returns group. + * + * + * + * @return bool + */ + public function getGroup() { + return $this->group; + } + + /** + * Sets group. + * + * @param bool $group + * @return Permission + */ + protected function setGroup($group) { + $this->group = $group; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return Permission + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns leaf. + * + * + * + * @return bool + */ + public function getLeaf() { + return $this->leaf; + } + + /** + * Sets leaf. + * + * @param bool $leaf + * @return Permission + */ + protected function setLeaf($leaf) { + $this->leaf = $leaf; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return Permission + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns parent. + * + * + * + * @return int + */ + public function getParent() { + return $this->parent; + } + + /** + * Sets parent. + * + * @param int $parent + * @return Permission + */ + protected function setParent($parent) { + $this->parent = $parent; + + return $this; + } + + /** + * Returns pathToRoot. + * + * + * + * @return int[] + */ + public function getPathToRoot() { + return $this->pathToRoot; + } + + /** + * Sets pathToRoot. + * + * @param int[] $pathToRoot + * @return Permission + */ + public function setPathToRoot($pathToRoot) { + $this->pathToRoot = $pathToRoot; + + return $this; + } + + /** + * Returns title. + * + * + * + * @return map[string,string] + */ + public function getTitle() { + return $this->title; + } + + /** + * Sets title. + * + * @param map[string,string] $title + * @return Permission + */ + public function setTitle($title) { + $this->title = $title; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PersistableCurrencyAmount.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PersistableCurrencyAmount.php new file mode 100644 index 0000000..7d81a69 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PersistableCurrencyAmount.php @@ -0,0 +1,171 @@ + 'float', + 'currency' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var float + */ + private $amount; + + /** + * + * + * @var string + */ + private $currency; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + } + + + /** + * Returns amount. + * + * + * + * @return float + */ + public function getAmount() { + return $this->amount; + } + + /** + * Sets amount. + * + * @param float $amount + * @return PersistableCurrencyAmount + */ + protected function setAmount($amount) { + $this->amount = $amount; + + return $this; + } + + /** + * Returns currency. + * + * + * + * @return string + */ + public function getCurrency() { + return $this->currency; + } + + /** + * Sets currency. + * + * @param string $currency + * @return PersistableCurrencyAmount + */ + protected function setCurrency($currency) { + $this->currency = $currency; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PersistableCurrencyAmountUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PersistableCurrencyAmountUpdate.php new file mode 100644 index 0000000..4a6e1ef --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/PersistableCurrencyAmountUpdate.php @@ -0,0 +1,177 @@ + 'float', + 'currency' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var float + */ + private $amount; + + /** + * + * + * @var string + */ + private $currency; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['amount'])) { + $this->setAmount($data['amount']); + } + if (isset($data['currency'])) { + $this->setCurrency($data['currency']); + } + } + + + /** + * Returns amount. + * + * + * + * @return float + */ + public function getAmount() { + return $this->amount; + } + + /** + * Sets amount. + * + * @param float $amount + * @return PersistableCurrencyAmountUpdate + */ + public function setAmount($amount) { + $this->amount = $amount; + + return $this; + } + + /** + * Returns currency. + * + * + * + * @return string + */ + public function getCurrency() { + return $this->currency; + } + + /** + * Sets currency. + * + * @param string $currency + * @return PersistableCurrencyAmountUpdate + */ + public function setCurrency($currency) { + $this->currency = $currency; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductFeeType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductFeeType.php new file mode 100644 index 0000000..d6857f9 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductFeeType.php @@ -0,0 +1,44 @@ + '\Wallee\Sdk\Model\SubscriptionProductComponent', + 'description' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'metric' => '\Wallee\Sdk\Model\SubscriptionMetric', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'tierPricing' => '\Wallee\Sdk\Model\ProductMeteredTierPricing', + 'type' => '\Wallee\Sdk\Model\ProductFeeType', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductComponent + */ + private $component; + + /** + * The description of a component fee describes the fee to the subscriber. The description may be shown in documents or on certain user interfaces. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionMetric + */ + private $metric; + + /** + * The name of the fee should describe for the subscriber in few words for what the fee is for. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $name; + + /** + * The tier pricing determines the calculation method of the tiers. The prices of the different tiers can be applied in different ways. The tier pricing controls this calculation. + * + * @var \Wallee\Sdk\Model\ProductMeteredTierPricing + */ + private $tierPricing; + + /** + * + * + * @var \Wallee\Sdk\Model\ProductFeeType + */ + private $type; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['component'])) { + $this->setComponent($data['component']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['metric'])) { + $this->setMetric($data['metric']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['tierPricing'])) { + $this->setTierPricing($data['tierPricing']); + } + if (isset($data['type'])) { + $this->setType($data['type']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns component. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductComponent + */ + public function getComponent() { + return $this->component; + } + + /** + * Sets component. + * + * @param \Wallee\Sdk\Model\SubscriptionProductComponent $component + * @return ProductMeteredFee + */ + public function setComponent($component) { + $this->component = $component; + + return $this; + } + + /** + * Returns description. + * + * The description of a component fee describes the fee to the subscriber. The description may be shown in documents or on certain user interfaces. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $description + * @return ProductMeteredFee + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ProductMeteredFee + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return ProductMeteredFee + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns metric. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionMetric + */ + public function getMetric() { + return $this->metric; + } + + /** + * Sets metric. + * + * @param \Wallee\Sdk\Model\SubscriptionMetric $metric + * @return ProductMeteredFee + */ + public function setMetric($metric) { + $this->metric = $metric; + + return $this; + } + + /** + * Returns name. + * + * The name of the fee should describe for the subscriber in few words for what the fee is for. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $name + * @return ProductMeteredFee + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns tierPricing. + * + * The tier pricing determines the calculation method of the tiers. The prices of the different tiers can be applied in different ways. The tier pricing controls this calculation. + * + * @return \Wallee\Sdk\Model\ProductMeteredTierPricing + */ + public function getTierPricing() { + return $this->tierPricing; + } + + /** + * Sets tierPricing. + * + * @param \Wallee\Sdk\Model\ProductMeteredTierPricing $tierPricing + * @return ProductMeteredFee + */ + public function setTierPricing($tierPricing) { + $this->tierPricing = $tierPricing; + + return $this; + } + + /** + * Returns type. + * + * + * + * @return \Wallee\Sdk\Model\ProductFeeType + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param \Wallee\Sdk\Model\ProductFeeType $type + * @return ProductMeteredFee + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ProductMeteredFee + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredFeeUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredFeeUpdate.php new file mode 100644 index 0000000..1eacbfe --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredFeeUpdate.php @@ -0,0 +1,353 @@ + 'int', + 'version' => 'int', + 'component' => 'int', + 'description' => '\Wallee\Sdk\Model\DatabaseTranslatedStringCreate', + 'metric' => 'int', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedStringCreate', + 'tierPricing' => '\Wallee\Sdk\Model\ProductMeteredTierPricing' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + /** + * + * + * @var int + */ + private $component; + + /** + * The description of a component fee describes the fee to the subscriber. The description may be shown in documents or on certain user interfaces. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + private $description; + + /** + * + * + * @var int + */ + private $metric; + + /** + * The name of the fee should describe for the subscriber in few words for what the fee is for. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + private $name; + + /** + * The tier pricing determines the calculation method of the tiers. The prices of the different tiers can be applied in different ways. The tier pricing controls this calculation. + * + * @var \Wallee\Sdk\Model\ProductMeteredTierPricing + */ + private $tierPricing; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + if (isset($data['component'])) { + $this->setComponent($data['component']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['metric'])) { + $this->setMetric($data['metric']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['tierPricing'])) { + $this->setTierPricing($data['tierPricing']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ProductMeteredFeeUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ProductMeteredFeeUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Returns component. + * + * + * + * @return int + */ + public function getComponent() { + return $this->component; + } + + /** + * Sets component. + * + * @param int $component + * @return ProductMeteredFeeUpdate + */ + public function setComponent($component) { + $this->component = $component; + + return $this; + } + + /** + * Returns description. + * + * The description of a component fee describes the fee to the subscriber. The description may be shown in documents or on certain user interfaces. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $description + * @return ProductMeteredFeeUpdate + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns metric. + * + * + * + * @return int + */ + public function getMetric() { + return $this->metric; + } + + /** + * Sets metric. + * + * @param int $metric + * @return ProductMeteredFeeUpdate + */ + public function setMetric($metric) { + $this->metric = $metric; + + return $this; + } + + /** + * Returns name. + * + * The name of the fee should describe for the subscriber in few words for what the fee is for. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $name + * @return ProductMeteredFeeUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns tierPricing. + * + * The tier pricing determines the calculation method of the tiers. The prices of the different tiers can be applied in different ways. The tier pricing controls this calculation. + * + * @return \Wallee\Sdk\Model\ProductMeteredTierPricing + */ + public function getTierPricing() { + return $this->tierPricing; + } + + /** + * Sets tierPricing. + * + * @param \Wallee\Sdk\Model\ProductMeteredTierPricing $tierPricing + * @return ProductMeteredFeeUpdate + */ + public function setTierPricing($tierPricing) { + $this->tierPricing = $tierPricing; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredTierFee.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredTierFee.php new file mode 100644 index 0000000..29568e2 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredTierFee.php @@ -0,0 +1,276 @@ + '\Wallee\Sdk\Model\PersistableCurrencyAmount[]', + 'id' => 'int', + 'meteredFee' => '\Wallee\Sdk\Model\ProductMeteredFee', + 'startRange' => 'float', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The fee determines the amount which is charged. The consumed metric is multiplied by the defined fee. The resulting amount is charged at the end of the period. + * + * @var \Wallee\Sdk\Model\PersistableCurrencyAmount[] + */ + private $fee; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var \Wallee\Sdk\Model\ProductMeteredFee + */ + private $meteredFee; + + /** + * The start range defines the metered consumption of the metric from which on the defined fee gets applied. This means when a subscription consumes a value of 10 or more and the start range is set to 10 the fee defined on the tier will be applied. + * + * @var float + */ + private $startRange; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['fee'])) { + $this->setFee($data['fee']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['meteredFee'])) { + $this->setMeteredFee($data['meteredFee']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns fee. + * + * The fee determines the amount which is charged. The consumed metric is multiplied by the defined fee. The resulting amount is charged at the end of the period. + * + * @return \Wallee\Sdk\Model\PersistableCurrencyAmount[] + */ + public function getFee() { + return $this->fee; + } + + /** + * Sets fee. + * + * @param \Wallee\Sdk\Model\PersistableCurrencyAmount[] $fee + * @return ProductMeteredTierFee + */ + public function setFee($fee) { + $this->fee = $fee; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ProductMeteredTierFee + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns meteredFee. + * + * + * + * @return \Wallee\Sdk\Model\ProductMeteredFee + */ + public function getMeteredFee() { + return $this->meteredFee; + } + + /** + * Sets meteredFee. + * + * @param \Wallee\Sdk\Model\ProductMeteredFee $meteredFee + * @return ProductMeteredTierFee + */ + public function setMeteredFee($meteredFee) { + $this->meteredFee = $meteredFee; + + return $this; + } + + /** + * Returns startRange. + * + * The start range defines the metered consumption of the metric from which on the defined fee gets applied. This means when a subscription consumes a value of 10 or more and the start range is set to 10 the fee defined on the tier will be applied. + * + * @return float + */ + public function getStartRange() { + return $this->startRange; + } + + /** + * Sets startRange. + * + * @param float $startRange + * @return ProductMeteredTierFee + */ + protected function setStartRange($startRange) { + $this->startRange = $startRange; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ProductMeteredTierFee + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredTierFeeUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredTierFeeUpdate.php new file mode 100644 index 0000000..762342c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredTierFeeUpdate.php @@ -0,0 +1,285 @@ + 'int', + 'version' => 'int', + 'fee' => '\Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[]', + 'meteredFee' => 'int', + 'startRange' => 'float' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + /** + * The fee determines the amount which is charged. The consumed metric is multiplied by the defined fee. The resulting amount is charged at the end of the period. + * + * @var \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] + */ + private $fee; + + /** + * + * + * @var int + */ + private $meteredFee; + + /** + * The start range defines the metered consumption of the metric from which on the defined fee gets applied. This means when a subscription consumes a value of 10 or more and the start range is set to 10 the fee defined on the tier will be applied. + * + * @var float + */ + private $startRange; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + if (isset($data['fee'])) { + $this->setFee($data['fee']); + } + if (isset($data['meteredFee'])) { + $this->setMeteredFee($data['meteredFee']); + } + if (isset($data['startRange'])) { + $this->setStartRange($data['startRange']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ProductMeteredTierFeeUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ProductMeteredTierFeeUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Returns fee. + * + * The fee determines the amount which is charged. The consumed metric is multiplied by the defined fee. The resulting amount is charged at the end of the period. + * + * @return \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] + */ + public function getFee() { + return $this->fee; + } + + /** + * Sets fee. + * + * @param \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] $fee + * @return ProductMeteredTierFeeUpdate + */ + public function setFee($fee) { + $this->fee = $fee; + + return $this; + } + + /** + * Returns meteredFee. + * + * + * + * @return int + */ + public function getMeteredFee() { + return $this->meteredFee; + } + + /** + * Sets meteredFee. + * + * @param int $meteredFee + * @return ProductMeteredTierFeeUpdate + */ + public function setMeteredFee($meteredFee) { + $this->meteredFee = $meteredFee; + + return $this; + } + + /** + * Returns startRange. + * + * The start range defines the metered consumption of the metric from which on the defined fee gets applied. This means when a subscription consumes a value of 10 or more and the start range is set to 10 the fee defined on the tier will be applied. + * + * @return float + */ + public function getStartRange() { + return $this->startRange; + } + + /** + * Sets startRange. + * + * @param float $startRange + * @return ProductMeteredTierFeeUpdate + */ + public function setStartRange($startRange) { + $this->startRange = $startRange; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredTierPricing.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredTierPricing.php new file mode 100644 index 0000000..1f4880a --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductMeteredTierPricing.php @@ -0,0 +1,43 @@ + '\Wallee\Sdk\Model\SubscriptionProductComponent', + 'description' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'numberOfFreeTrialPeriods' => 'int', + 'periodFee' => '\Wallee\Sdk\Model\PersistableCurrencyAmount[]', + 'type' => '\Wallee\Sdk\Model\ProductFeeType', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductComponent + */ + private $component; + + /** + * The description of a component fee describes the fee to the subscriber. The description may be shown in documents or on certain user interfaces. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The name of the fee should describe for the subscriber in few words for what the fee is for. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $name; + + /** + * The number of free trial periods specify how many periods are free of charge at the begining of the subscription. + * + * @var int + */ + private $numberOfFreeTrialPeriods; + + /** + * The period fee is charged for every period of the subscription except for those periods which are trial periods. + * + * @var \Wallee\Sdk\Model\PersistableCurrencyAmount[] + */ + private $periodFee; + + /** + * + * + * @var \Wallee\Sdk\Model\ProductFeeType + */ + private $type; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['component'])) { + $this->setComponent($data['component']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['periodFee'])) { + $this->setPeriodFee($data['periodFee']); + } + if (isset($data['type'])) { + $this->setType($data['type']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns component. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductComponent + */ + public function getComponent() { + return $this->component; + } + + /** + * Sets component. + * + * @param \Wallee\Sdk\Model\SubscriptionProductComponent $component + * @return ProductPeriodFee + */ + public function setComponent($component) { + $this->component = $component; + + return $this; + } + + /** + * Returns description. + * + * The description of a component fee describes the fee to the subscriber. The description may be shown in documents or on certain user interfaces. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $description + * @return ProductPeriodFee + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ProductPeriodFee + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return ProductPeriodFee + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The name of the fee should describe for the subscriber in few words for what the fee is for. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $name + * @return ProductPeriodFee + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns numberOfFreeTrialPeriods. + * + * The number of free trial periods specify how many periods are free of charge at the begining of the subscription. + * + * @return int + */ + public function getNumberOfFreeTrialPeriods() { + return $this->numberOfFreeTrialPeriods; + } + + /** + * Sets numberOfFreeTrialPeriods. + * + * @param int $numberOfFreeTrialPeriods + * @return ProductPeriodFee + */ + protected function setNumberOfFreeTrialPeriods($numberOfFreeTrialPeriods) { + $this->numberOfFreeTrialPeriods = $numberOfFreeTrialPeriods; + + return $this; + } + + /** + * Returns periodFee. + * + * The period fee is charged for every period of the subscription except for those periods which are trial periods. + * + * @return \Wallee\Sdk\Model\PersistableCurrencyAmount[] + */ + public function getPeriodFee() { + return $this->periodFee; + } + + /** + * Sets periodFee. + * + * @param \Wallee\Sdk\Model\PersistableCurrencyAmount[] $periodFee + * @return ProductPeriodFee + */ + public function setPeriodFee($periodFee) { + $this->periodFee = $periodFee; + + return $this; + } + + /** + * Returns type. + * + * + * + * @return \Wallee\Sdk\Model\ProductFeeType + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param \Wallee\Sdk\Model\ProductFeeType $type + * @return ProductPeriodFee + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ProductPeriodFee + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductPeriodFeeUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductPeriodFeeUpdate.php new file mode 100644 index 0000000..0781517 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductPeriodFeeUpdate.php @@ -0,0 +1,353 @@ + 'int', + 'version' => 'int', + 'component' => 'int', + 'description' => '\Wallee\Sdk\Model\DatabaseTranslatedStringCreate', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedStringCreate', + 'numberOfFreeTrialPeriods' => 'int', + 'periodFee' => '\Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + /** + * + * + * @var int + */ + private $component; + + /** + * The description of a component fee describes the fee to the subscriber. The description may be shown in documents or on certain user interfaces. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + private $description; + + /** + * The name of the fee should describe for the subscriber in few words for what the fee is for. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + private $name; + + /** + * The number of free trial periods specify how many periods are free of charge at the begining of the subscription. + * + * @var int + */ + private $numberOfFreeTrialPeriods; + + /** + * The period fee is charged for every period of the subscription except for those periods which are trial periods. + * + * @var \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] + */ + private $periodFee; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + if (isset($data['component'])) { + $this->setComponent($data['component']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['numberOfFreeTrialPeriods'])) { + $this->setNumberOfFreeTrialPeriods($data['numberOfFreeTrialPeriods']); + } + if (isset($data['periodFee'])) { + $this->setPeriodFee($data['periodFee']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ProductPeriodFeeUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ProductPeriodFeeUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Returns component. + * + * + * + * @return int + */ + public function getComponent() { + return $this->component; + } + + /** + * Sets component. + * + * @param int $component + * @return ProductPeriodFeeUpdate + */ + public function setComponent($component) { + $this->component = $component; + + return $this; + } + + /** + * Returns description. + * + * The description of a component fee describes the fee to the subscriber. The description may be shown in documents or on certain user interfaces. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $description + * @return ProductPeriodFeeUpdate + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns name. + * + * The name of the fee should describe for the subscriber in few words for what the fee is for. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $name + * @return ProductPeriodFeeUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns numberOfFreeTrialPeriods. + * + * The number of free trial periods specify how many periods are free of charge at the begining of the subscription. + * + * @return int + */ + public function getNumberOfFreeTrialPeriods() { + return $this->numberOfFreeTrialPeriods; + } + + /** + * Sets numberOfFreeTrialPeriods. + * + * @param int $numberOfFreeTrialPeriods + * @return ProductPeriodFeeUpdate + */ + public function setNumberOfFreeTrialPeriods($numberOfFreeTrialPeriods) { + $this->numberOfFreeTrialPeriods = $numberOfFreeTrialPeriods; + + return $this; + } + + /** + * Returns periodFee. + * + * The period fee is charged for every period of the subscription except for those periods which are trial periods. + * + * @return \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] + */ + public function getPeriodFee() { + return $this->periodFee; + } + + /** + * Sets periodFee. + * + * @param \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] $periodFee + * @return ProductPeriodFeeUpdate + */ + public function setPeriodFee($periodFee) { + $this->periodFee = $periodFee; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductSetupFee.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductSetupFee.php new file mode 100644 index 0000000..ae809e9 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductSetupFee.php @@ -0,0 +1,446 @@ + '\Wallee\Sdk\Model\SubscriptionProductComponent', + 'description' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'onDowngradeCreditedAmount' => '\Wallee\Sdk\Model\PersistableCurrencyAmount[]', + 'onUpgradeCreditedAmount' => '\Wallee\Sdk\Model\PersistableCurrencyAmount[]', + 'setupFee' => '\Wallee\Sdk\Model\PersistableCurrencyAmount[]', + 'type' => '\Wallee\Sdk\Model\ProductFeeType', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductComponent + */ + private $component; + + /** + * The description of a component fee describes the fee to the subscriber. The description may be shown in documents or on certain user interfaces. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The name of the fee should describe for the subscriber in few words for what the fee is for. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $name; + + /** + * When the subscription is changed and the change is considered as a downgrade the amount defined by this property will be credited to the subscriber. + * + * @var \Wallee\Sdk\Model\PersistableCurrencyAmount[] + */ + private $onDowngradeCreditedAmount; + + /** + * When the subscription is changed and the change is considered as a upgrade the amount defined by this property will be credited to the subscriber. + * + * @var \Wallee\Sdk\Model\PersistableCurrencyAmount[] + */ + private $onUpgradeCreditedAmount; + + /** + * The setup fee is charged when the subscriber subscribes to this component. The setup fee is debited with the first charge for the subscriptions. + * + * @var \Wallee\Sdk\Model\PersistableCurrencyAmount[] + */ + private $setupFee; + + /** + * + * + * @var \Wallee\Sdk\Model\ProductFeeType + */ + private $type; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['component'])) { + $this->setComponent($data['component']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['onDowngradeCreditedAmount'])) { + $this->setOnDowngradeCreditedAmount($data['onDowngradeCreditedAmount']); + } + if (isset($data['onUpgradeCreditedAmount'])) { + $this->setOnUpgradeCreditedAmount($data['onUpgradeCreditedAmount']); + } + if (isset($data['setupFee'])) { + $this->setSetupFee($data['setupFee']); + } + if (isset($data['type'])) { + $this->setType($data['type']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns component. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductComponent + */ + public function getComponent() { + return $this->component; + } + + /** + * Sets component. + * + * @param \Wallee\Sdk\Model\SubscriptionProductComponent $component + * @return ProductSetupFee + */ + public function setComponent($component) { + $this->component = $component; + + return $this; + } + + /** + * Returns description. + * + * The description of a component fee describes the fee to the subscriber. The description may be shown in documents or on certain user interfaces. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $description + * @return ProductSetupFee + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ProductSetupFee + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return ProductSetupFee + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The name of the fee should describe for the subscriber in few words for what the fee is for. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $name + * @return ProductSetupFee + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns onDowngradeCreditedAmount. + * + * When the subscription is changed and the change is considered as a downgrade the amount defined by this property will be credited to the subscriber. + * + * @return \Wallee\Sdk\Model\PersistableCurrencyAmount[] + */ + public function getOnDowngradeCreditedAmount() { + return $this->onDowngradeCreditedAmount; + } + + /** + * Sets onDowngradeCreditedAmount. + * + * @param \Wallee\Sdk\Model\PersistableCurrencyAmount[] $onDowngradeCreditedAmount + * @return ProductSetupFee + */ + public function setOnDowngradeCreditedAmount($onDowngradeCreditedAmount) { + $this->onDowngradeCreditedAmount = $onDowngradeCreditedAmount; + + return $this; + } + + /** + * Returns onUpgradeCreditedAmount. + * + * When the subscription is changed and the change is considered as a upgrade the amount defined by this property will be credited to the subscriber. + * + * @return \Wallee\Sdk\Model\PersistableCurrencyAmount[] + */ + public function getOnUpgradeCreditedAmount() { + return $this->onUpgradeCreditedAmount; + } + + /** + * Sets onUpgradeCreditedAmount. + * + * @param \Wallee\Sdk\Model\PersistableCurrencyAmount[] $onUpgradeCreditedAmount + * @return ProductSetupFee + */ + public function setOnUpgradeCreditedAmount($onUpgradeCreditedAmount) { + $this->onUpgradeCreditedAmount = $onUpgradeCreditedAmount; + + return $this; + } + + /** + * Returns setupFee. + * + * The setup fee is charged when the subscriber subscribes to this component. The setup fee is debited with the first charge for the subscriptions. + * + * @return \Wallee\Sdk\Model\PersistableCurrencyAmount[] + */ + public function getSetupFee() { + return $this->setupFee; + } + + /** + * Sets setupFee. + * + * @param \Wallee\Sdk\Model\PersistableCurrencyAmount[] $setupFee + * @return ProductSetupFee + */ + public function setSetupFee($setupFee) { + $this->setupFee = $setupFee; + + return $this; + } + + /** + * Returns type. + * + * + * + * @return \Wallee\Sdk\Model\ProductFeeType + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param \Wallee\Sdk\Model\ProductFeeType $type + * @return ProductSetupFee + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ProductSetupFee + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductSetupFeeUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductSetupFeeUpdate.php new file mode 100644 index 0000000..60b7168 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ProductSetupFeeUpdate.php @@ -0,0 +1,387 @@ + 'int', + 'version' => 'int', + 'component' => 'int', + 'description' => '\Wallee\Sdk\Model\DatabaseTranslatedStringCreate', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedStringCreate', + 'onDowngradeCreditedAmount' => '\Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[]', + 'onUpgradeCreditedAmount' => '\Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[]', + 'setupFee' => '\Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + /** + * + * + * @var int + */ + private $component; + + /** + * The description of a component fee describes the fee to the subscriber. The description may be shown in documents or on certain user interfaces. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + private $description; + + /** + * The name of the fee should describe for the subscriber in few words for what the fee is for. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + private $name; + + /** + * When the subscription is changed and the change is considered as a downgrade the amount defined by this property will be credited to the subscriber. + * + * @var \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] + */ + private $onDowngradeCreditedAmount; + + /** + * When the subscription is changed and the change is considered as a upgrade the amount defined by this property will be credited to the subscriber. + * + * @var \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] + */ + private $onUpgradeCreditedAmount; + + /** + * The setup fee is charged when the subscriber subscribes to this component. The setup fee is debited with the first charge for the subscriptions. + * + * @var \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] + */ + private $setupFee; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + if (isset($data['component'])) { + $this->setComponent($data['component']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['onDowngradeCreditedAmount'])) { + $this->setOnDowngradeCreditedAmount($data['onDowngradeCreditedAmount']); + } + if (isset($data['onUpgradeCreditedAmount'])) { + $this->setOnUpgradeCreditedAmount($data['onUpgradeCreditedAmount']); + } + if (isset($data['setupFee'])) { + $this->setSetupFee($data['setupFee']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return ProductSetupFeeUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return ProductSetupFeeUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Returns component. + * + * + * + * @return int + */ + public function getComponent() { + return $this->component; + } + + /** + * Sets component. + * + * @param int $component + * @return ProductSetupFeeUpdate + */ + public function setComponent($component) { + $this->component = $component; + + return $this; + } + + /** + * Returns description. + * + * The description of a component fee describes the fee to the subscriber. The description may be shown in documents or on certain user interfaces. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $description + * @return ProductSetupFeeUpdate + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns name. + * + * The name of the fee should describe for the subscriber in few words for what the fee is for. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $name + * @return ProductSetupFeeUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns onDowngradeCreditedAmount. + * + * When the subscription is changed and the change is considered as a downgrade the amount defined by this property will be credited to the subscriber. + * + * @return \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] + */ + public function getOnDowngradeCreditedAmount() { + return $this->onDowngradeCreditedAmount; + } + + /** + * Sets onDowngradeCreditedAmount. + * + * @param \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] $onDowngradeCreditedAmount + * @return ProductSetupFeeUpdate + */ + public function setOnDowngradeCreditedAmount($onDowngradeCreditedAmount) { + $this->onDowngradeCreditedAmount = $onDowngradeCreditedAmount; + + return $this; + } + + /** + * Returns onUpgradeCreditedAmount. + * + * When the subscription is changed and the change is considered as a upgrade the amount defined by this property will be credited to the subscriber. + * + * @return \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] + */ + public function getOnUpgradeCreditedAmount() { + return $this->onUpgradeCreditedAmount; + } + + /** + * Sets onUpgradeCreditedAmount. + * + * @param \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] $onUpgradeCreditedAmount + * @return ProductSetupFeeUpdate + */ + public function setOnUpgradeCreditedAmount($onUpgradeCreditedAmount) { + $this->onUpgradeCreditedAmount = $onUpgradeCreditedAmount; + + return $this; + } + + /** + * Returns setupFee. + * + * The setup fee is charged when the subscriber subscribes to this component. The setup fee is debited with the first charge for the subscriptions. + * + * @return \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] + */ + public function getSetupFee() { + return $this->setupFee; + } + + /** + * Sets setupFee. + * + * @param \Wallee\Sdk\Model\PersistableCurrencyAmountUpdate[] $setupFee + * @return ProductSetupFeeUpdate + */ + public function setSetupFee($setupFee) { + $this->setupFee = $setupFee; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Refund.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Refund.php new file mode 100644 index 0000000..c47606f --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Refund.php @@ -0,0 +1,954 @@ + 'float', + 'baseLineItems' => '\Wallee\Sdk\Model\LineItem[]', + 'createdBy' => 'int', + 'createdOn' => '\DateTime', + 'environment' => '\Wallee\Sdk\Model\Environment', + 'externalId' => 'string', + 'failedOn' => '\DateTime', + 'failureReason' => '\Wallee\Sdk\Model\FailureReason', + 'id' => 'int', + 'labels' => '\Wallee\Sdk\Model\Label[]', + 'language' => 'string', + 'lineItems' => '\Wallee\Sdk\Model\LineItem[]', + 'linkedSpaceId' => 'int', + 'merchantReference' => 'string', + 'nextUpdateOn' => '\DateTime', + 'plannedPurgeDate' => '\DateTime', + 'processorReference' => 'string', + 'reducedLineItems' => '\Wallee\Sdk\Model\LineItem[]', + 'reductions' => '\Wallee\Sdk\Model\LineItemReduction[]', + 'state' => '\Wallee\Sdk\Model\RefundState', + 'succeededOn' => '\DateTime', + 'taxes' => '\Wallee\Sdk\Model\Tax[]', + 'timeoutOn' => '\DateTime', + 'transaction' => '\Wallee\Sdk\Model\Transaction', + 'type' => '\Wallee\Sdk\Model\RefundType', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var float + */ + private $amount; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItem[] + */ + private $baseLineItems; + + /** + * + * + * @var int + */ + private $createdBy; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var \Wallee\Sdk\Model\Environment + */ + private $environment; + + /** + * The external id helps to identify duplicate calls to the refund service. As such the external ID has to be unique per transaction. + * + * @var string + */ + private $externalId; + + /** + * + * + * @var \DateTime + */ + private $failedOn; + + /** + * + * + * @var \Wallee\Sdk\Model\FailureReason + */ + private $failureReason; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var \Wallee\Sdk\Model\Label[] + */ + private $labels; + + /** + * + * + * @var string + */ + private $language; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItem[] + */ + private $lineItems; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var string + */ + private $merchantReference; + + /** + * + * + * @var \DateTime + */ + private $nextUpdateOn; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var string + */ + private $processorReference; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItem[] + */ + private $reducedLineItems; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItemReduction[] + */ + private $reductions; + + /** + * + * + * @var \Wallee\Sdk\Model\RefundState + */ + private $state; + + /** + * + * + * @var \DateTime + */ + private $succeededOn; + + /** + * + * + * @var \Wallee\Sdk\Model\Tax[] + */ + private $taxes; + + /** + * + * + * @var \DateTime + */ + private $timeoutOn; + + /** + * + * + * @var \Wallee\Sdk\Model\Transaction + */ + private $transaction; + + /** + * + * + * @var \Wallee\Sdk\Model\RefundType + */ + private $type; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['baseLineItems'])) { + $this->setBaseLineItems($data['baseLineItems']); + } + if (isset($data['environment'])) { + $this->setEnvironment($data['environment']); + } + if (isset($data['failureReason'])) { + $this->setFailureReason($data['failureReason']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['labels'])) { + $this->setLabels($data['labels']); + } + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + if (isset($data['reducedLineItems'])) { + $this->setReducedLineItems($data['reducedLineItems']); + } + if (isset($data['reductions'])) { + $this->setReductions($data['reductions']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['taxes'])) { + $this->setTaxes($data['taxes']); + } + if (isset($data['transaction'])) { + $this->setTransaction($data['transaction']); + } + if (isset($data['type'])) { + $this->setType($data['type']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns amount. + * + * + * + * @return float + */ + public function getAmount() { + return $this->amount; + } + + /** + * Sets amount. + * + * @param float $amount + * @return Refund + */ + protected function setAmount($amount) { + $this->amount = $amount; + + return $this; + } + + /** + * Returns baseLineItems. + * + * + * + * @return \Wallee\Sdk\Model\LineItem[] + */ + public function getBaseLineItems() { + return $this->baseLineItems; + } + + /** + * Sets baseLineItems. + * + * @param \Wallee\Sdk\Model\LineItem[] $baseLineItems + * @return Refund + */ + public function setBaseLineItems($baseLineItems) { + $this->baseLineItems = $baseLineItems; + + return $this; + } + + /** + * Returns createdBy. + * + * + * + * @return int + */ + public function getCreatedBy() { + return $this->createdBy; + } + + /** + * Sets createdBy. + * + * @param int $createdBy + * @return Refund + */ + protected function setCreatedBy($createdBy) { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return Refund + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns environment. + * + * + * + * @return \Wallee\Sdk\Model\Environment + */ + public function getEnvironment() { + return $this->environment; + } + + /** + * Sets environment. + * + * @param \Wallee\Sdk\Model\Environment $environment + * @return Refund + */ + public function setEnvironment($environment) { + $this->environment = $environment; + + return $this; + } + + /** + * Returns externalId. + * + * The external id helps to identify duplicate calls to the refund service. As such the external ID has to be unique per transaction. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return Refund + */ + protected function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns failedOn. + * + * + * + * @return \DateTime + */ + public function getFailedOn() { + return $this->failedOn; + } + + /** + * Sets failedOn. + * + * @param \DateTime $failedOn + * @return Refund + */ + protected function setFailedOn($failedOn) { + $this->failedOn = $failedOn; + + return $this; + } + + /** + * Returns failureReason. + * + * + * + * @return \Wallee\Sdk\Model\FailureReason + */ + public function getFailureReason() { + return $this->failureReason; + } + + /** + * Sets failureReason. + * + * @param \Wallee\Sdk\Model\FailureReason $failureReason + * @return Refund + */ + public function setFailureReason($failureReason) { + $this->failureReason = $failureReason; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return Refund + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns labels. + * + * + * + * @return \Wallee\Sdk\Model\Label[] + */ + public function getLabels() { + return $this->labels; + } + + /** + * Sets labels. + * + * @param \Wallee\Sdk\Model\Label[] $labels + * @return Refund + */ + public function setLabels($labels) { + $this->labels = $labels; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return Refund + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns lineItems. + * + * + * + * @return \Wallee\Sdk\Model\LineItem[] + */ + public function getLineItems() { + return $this->lineItems; + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItem[] $lineItems + * @return Refund + */ + public function setLineItems($lineItems) { + $this->lineItems = $lineItems; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return Refund + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns merchantReference. + * + * + * + * @return string + */ + public function getMerchantReference() { + return $this->merchantReference; + } + + /** + * Sets merchantReference. + * + * @param string $merchantReference + * @return Refund + */ + protected function setMerchantReference($merchantReference) { + $this->merchantReference = $merchantReference; + + return $this; + } + + /** + * Returns nextUpdateOn. + * + * + * + * @return \DateTime + */ + public function getNextUpdateOn() { + return $this->nextUpdateOn; + } + + /** + * Sets nextUpdateOn. + * + * @param \DateTime $nextUpdateOn + * @return Refund + */ + protected function setNextUpdateOn($nextUpdateOn) { + $this->nextUpdateOn = $nextUpdateOn; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return Refund + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns processorReference. + * + * + * + * @return string + */ + public function getProcessorReference() { + return $this->processorReference; + } + + /** + * Sets processorReference. + * + * @param string $processorReference + * @return Refund + */ + protected function setProcessorReference($processorReference) { + $this->processorReference = $processorReference; + + return $this; + } + + /** + * Returns reducedLineItems. + * + * + * + * @return \Wallee\Sdk\Model\LineItem[] + */ + public function getReducedLineItems() { + return $this->reducedLineItems; + } + + /** + * Sets reducedLineItems. + * + * @param \Wallee\Sdk\Model\LineItem[] $reducedLineItems + * @return Refund + */ + public function setReducedLineItems($reducedLineItems) { + $this->reducedLineItems = $reducedLineItems; + + return $this; + } + + /** + * Returns reductions. + * + * + * + * @return \Wallee\Sdk\Model\LineItemReduction[] + */ + public function getReductions() { + return $this->reductions; + } + + /** + * Sets reductions. + * + * @param \Wallee\Sdk\Model\LineItemReduction[] $reductions + * @return Refund + */ + public function setReductions($reductions) { + $this->reductions = $reductions; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\RefundState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\RefundState $state + * @return Refund + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns succeededOn. + * + * + * + * @return \DateTime + */ + public function getSucceededOn() { + return $this->succeededOn; + } + + /** + * Sets succeededOn. + * + * @param \DateTime $succeededOn + * @return Refund + */ + protected function setSucceededOn($succeededOn) { + $this->succeededOn = $succeededOn; + + return $this; + } + + /** + * Returns taxes. + * + * + * + * @return \Wallee\Sdk\Model\Tax[] + */ + public function getTaxes() { + return $this->taxes; + } + + /** + * Sets taxes. + * + * @param \Wallee\Sdk\Model\Tax[] $taxes + * @return Refund + */ + public function setTaxes($taxes) { + $this->taxes = $taxes; + + return $this; + } + + /** + * Returns timeoutOn. + * + * + * + * @return \DateTime + */ + public function getTimeoutOn() { + return $this->timeoutOn; + } + + /** + * Sets timeoutOn. + * + * @param \DateTime $timeoutOn + * @return Refund + */ + protected function setTimeoutOn($timeoutOn) { + $this->timeoutOn = $timeoutOn; + + return $this; + } + + /** + * Returns transaction. + * + * + * + * @return \Wallee\Sdk\Model\Transaction + */ + public function getTransaction() { + return $this->transaction; + } + + /** + * Sets transaction. + * + * @param \Wallee\Sdk\Model\Transaction $transaction + * @return Refund + */ + public function setTransaction($transaction) { + $this->transaction = $transaction; + + return $this; + } + + /** + * Returns type. + * + * + * + * @return \Wallee\Sdk\Model\RefundType + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param \Wallee\Sdk\Model\RefundType $type + * @return Refund + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return Refund + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RefundCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RefundCreate.php new file mode 100644 index 0000000..8e6996d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RefundCreate.php @@ -0,0 +1,291 @@ + 'string', + 'merchantReference' => 'string', + 'reductions' => '\Wallee\Sdk\Model\LineItemReductionCreate[]', + 'transaction' => 'int', + 'type' => '\Wallee\Sdk\Model\RefundType' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The external id helps to identify duplicate calls to the refund service. As such the external ID has to be unique per transaction. + * + * @var string + */ + private $externalId; + + /** + * + * + * @var string + */ + private $merchantReference; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItemReductionCreate[] + */ + private $reductions; + + /** + * + * + * @var int + */ + private $transaction; + + /** + * + * + * @var \Wallee\Sdk\Model\RefundType + */ + private $type; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['externalId'])) { + $this->setExternalId($data['externalId']); + } + if (isset($data['merchantReference'])) { + $this->setMerchantReference($data['merchantReference']); + } + if (isset($data['reductions'])) { + $this->setReductions($data['reductions']); + } + if (isset($data['transaction'])) { + $this->setTransaction($data['transaction']); + } + if (isset($data['type'])) { + $this->setType($data['type']); + } + } + + + /** + * Returns externalId. + * + * The external id helps to identify duplicate calls to the refund service. As such the external ID has to be unique per transaction. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return RefundCreate + */ + public function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns merchantReference. + * + * + * + * @return string + */ + public function getMerchantReference() { + return $this->merchantReference; + } + + /** + * Sets merchantReference. + * + * @param string $merchantReference + * @return RefundCreate + */ + public function setMerchantReference($merchantReference) { + $this->merchantReference = $merchantReference; + + return $this; + } + + /** + * Returns reductions. + * + * + * + * @return \Wallee\Sdk\Model\LineItemReductionCreate[] + */ + public function getReductions() { + return $this->reductions; + } + + /** + * Sets reductions. + * + * @param \Wallee\Sdk\Model\LineItemReductionCreate[] $reductions + * @return RefundCreate + */ + public function setReductions($reductions) { + $this->reductions = $reductions; + + return $this; + } + + /** + * Returns transaction. + * + * + * + * @return int + */ + public function getTransaction() { + return $this->transaction; + } + + /** + * Sets transaction. + * + * @param int $transaction + * @return RefundCreate + */ + public function setTransaction($transaction) { + $this->transaction = $transaction; + + return $this; + } + + /** + * Returns type. + * + * + * + * @return \Wallee\Sdk\Model\RefundType + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param \Wallee\Sdk\Model\RefundType $type + * @return RefundCreate + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getExternalId() === null) { + throw new ValidationException("'externalId' can't be null", 'externalId', $this); + } + if ($this->getReductions() === null) { + throw new ValidationException("'reductions' can't be null", 'reductions', $this); + } + if ($this->getTransaction() === null) { + throw new ValidationException("'transaction' can't be null", 'transaction', $this); + } + if ($this->getType() === null) { + throw new ValidationException("'type' can't be null", 'type', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RefundState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RefundState.php new file mode 100644 index 0000000..964dd0d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RefundState.php @@ -0,0 +1,46 @@ + 'string', + 'documentTemplateType' => 'int', + 'mimeType' => 'string', + 'title' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $data; + + /** + * + * + * @var int + */ + private $documentTemplateType; + + /** + * + * + * @var string + */ + private $mimeType; + + /** + * + * + * @var string + */ + private $title; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['data'])) { + $this->setData($data['data']); + } + } + + + /** + * Returns data. + * + * + * + * @return string + */ + public function getData() { + return $this->data; + } + + /** + * Sets data. + * + * @param string $data + * @return RenderedDocument + */ + public function setData($data) { + $this->data = $data; + + return $this; + } + + /** + * Returns documentTemplateType. + * + * + * + * @return int + */ + public function getDocumentTemplateType() { + return $this->documentTemplateType; + } + + /** + * Sets documentTemplateType. + * + * @param int $documentTemplateType + * @return RenderedDocument + */ + protected function setDocumentTemplateType($documentTemplateType) { + $this->documentTemplateType = $documentTemplateType; + + return $this; + } + + /** + * Returns mimeType. + * + * + * + * @return string + */ + public function getMimeType() { + return $this->mimeType; + } + + /** + * Sets mimeType. + * + * @param string $mimeType + * @return RenderedDocument + */ + protected function setMimeType($mimeType) { + $this->mimeType = $mimeType; + + return $this; + } + + /** + * Returns title. + * + * + * + * @return string + */ + public function getTitle() { + return $this->title; + } + + /** + * Sets title. + * + * @param string $title + * @return RenderedDocument + */ + protected function setTitle($title) { + $this->title = $title; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ResourceState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ResourceState.php new file mode 100644 index 0000000..e054b76 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ResourceState.php @@ -0,0 +1,44 @@ + 'string[]', + 'postCodeRegex' => 'string', + 'requiredFields' => '\Wallee\Sdk\Model\RestAddressFormatField[]', + 'usedFields' => '\Wallee\Sdk\Model\RestAddressFormatField[]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The example post codes allow the user to understand what we expect here. + * + * @var string[] + */ + private $postCodeExamples; + + /** + * The post code regex is a regular expression which can validates the input of the post code. + * + * @var string + */ + private $postCodeRegex; + + /** + * The required fields indicate what fields are required within an address to comply with the address format. + * + * @var \Wallee\Sdk\Model\RestAddressFormatField[] + */ + private $requiredFields; + + /** + * The used fields indicate what fields are used within this address format. + * + * @var \Wallee\Sdk\Model\RestAddressFormatField[] + */ + private $usedFields; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['postCodeExamples'])) { + $this->setPostCodeExamples($data['postCodeExamples']); + } + if (isset($data['requiredFields'])) { + $this->setRequiredFields($data['requiredFields']); + } + if (isset($data['usedFields'])) { + $this->setUsedFields($data['usedFields']); + } + } + + + /** + * Returns postCodeExamples. + * + * The example post codes allow the user to understand what we expect here. + * + * @return string[] + */ + public function getPostCodeExamples() { + return $this->postCodeExamples; + } + + /** + * Sets postCodeExamples. + * + * @param string[] $postCodeExamples + * @return RestAddressFormat + */ + public function setPostCodeExamples($postCodeExamples) { + $this->postCodeExamples = $postCodeExamples; + + return $this; + } + + /** + * Returns postCodeRegex. + * + * The post code regex is a regular expression which can validates the input of the post code. + * + * @return string + */ + public function getPostCodeRegex() { + return $this->postCodeRegex; + } + + /** + * Sets postCodeRegex. + * + * @param string $postCodeRegex + * @return RestAddressFormat + */ + protected function setPostCodeRegex($postCodeRegex) { + $this->postCodeRegex = $postCodeRegex; + + return $this; + } + + /** + * Returns requiredFields. + * + * The required fields indicate what fields are required within an address to comply with the address format. + * + * @return \Wallee\Sdk\Model\RestAddressFormatField[] + */ + public function getRequiredFields() { + return $this->requiredFields; + } + + /** + * Sets requiredFields. + * + * @param \Wallee\Sdk\Model\RestAddressFormatField[] $requiredFields + * @return RestAddressFormat + */ + public function setRequiredFields($requiredFields) { + $this->requiredFields = $requiredFields; + + return $this; + } + + /** + * Returns usedFields. + * + * The used fields indicate what fields are used within this address format. + * + * @return \Wallee\Sdk\Model\RestAddressFormatField[] + */ + public function getUsedFields() { + return $this->usedFields; + } + + /** + * Sets usedFields. + * + * @param \Wallee\Sdk\Model\RestAddressFormatField[] $usedFields + * @return RestAddressFormat + */ + public function setUsedFields($usedFields) { + $this->usedFields = $usedFields; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestAddressFormatField.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestAddressFormatField.php new file mode 100644 index 0000000..d16ecae --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestAddressFormatField.php @@ -0,0 +1,51 @@ + 'string', + 'iSOCode3Letter' => 'string', + 'addressFormat' => '\Wallee\Sdk\Model\RestAddressFormat', + 'name' => 'string', + 'numericCode' => 'string', + 'stateCodes' => 'string[]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ISO code 2 letter identifies the country by two chars as defined in ISO 3166-1 (e.g. US, DE, CH). + * + * @var string + */ + private $iSOCode2Letter; + + /** + * The ISO code 3 letter identifies the country by three chars as defined in ISO 3166-1 (e.g. CHE, USA, GBR). + * + * @var string + */ + private $iSOCode3Letter; + + /** + * The address format of the country indicates how an address has to look like for the country. + * + * @var \Wallee\Sdk\Model\RestAddressFormat + */ + private $addressFormat; + + /** + * The name labels the country by a name in English. + * + * @var string + */ + private $name; + + /** + * The numeric code identifies the country by a three digit number as defined in ISO 3166-1 (e.g. 840, 826, 756). + * + * @var string + */ + private $numericCode; + + /** + * The state codes field is a list of all states associated with this country. The list contains the identifiers of the states. The identifiers corresponds to the ISO 3166-2 subdivision identifier. + * + * @var string[] + */ + private $stateCodes; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['addressFormat'])) { + $this->setAddressFormat($data['addressFormat']); + } + if (isset($data['stateCodes'])) { + $this->setStateCodes($data['stateCodes']); + } + } + + + /** + * Returns iSOCode2Letter. + * + * The ISO code 2 letter identifies the country by two chars as defined in ISO 3166-1 (e.g. US, DE, CH). + * + * @return string + */ + public function getISOCode2Letter() { + return $this->iSOCode2Letter; + } + + /** + * Sets iSOCode2Letter. + * + * @param string $iSOCode2Letter + * @return RestCountry + */ + protected function setISOCode2Letter($iSOCode2Letter) { + $this->iSOCode2Letter = $iSOCode2Letter; + + return $this; + } + + /** + * Returns iSOCode3Letter. + * + * The ISO code 3 letter identifies the country by three chars as defined in ISO 3166-1 (e.g. CHE, USA, GBR). + * + * @return string + */ + public function getISOCode3Letter() { + return $this->iSOCode3Letter; + } + + /** + * Sets iSOCode3Letter. + * + * @param string $iSOCode3Letter + * @return RestCountry + */ + protected function setISOCode3Letter($iSOCode3Letter) { + $this->iSOCode3Letter = $iSOCode3Letter; + + return $this; + } + + /** + * Returns addressFormat. + * + * The address format of the country indicates how an address has to look like for the country. + * + * @return \Wallee\Sdk\Model\RestAddressFormat + */ + public function getAddressFormat() { + return $this->addressFormat; + } + + /** + * Sets addressFormat. + * + * @param \Wallee\Sdk\Model\RestAddressFormat $addressFormat + * @return RestCountry + */ + public function setAddressFormat($addressFormat) { + $this->addressFormat = $addressFormat; + + return $this; + } + + /** + * Returns name. + * + * The name labels the country by a name in English. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return RestCountry + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns numericCode. + * + * The numeric code identifies the country by a three digit number as defined in ISO 3166-1 (e.g. 840, 826, 756). + * + * @return string + */ + public function getNumericCode() { + return $this->numericCode; + } + + /** + * Sets numericCode. + * + * @param string $numericCode + * @return RestCountry + */ + protected function setNumericCode($numericCode) { + $this->numericCode = $numericCode; + + return $this; + } + + /** + * Returns stateCodes. + * + * The state codes field is a list of all states associated with this country. The list contains the identifiers of the states. The identifiers corresponds to the ISO 3166-2 subdivision identifier. + * + * @return string[] + */ + public function getStateCodes() { + return $this->stateCodes; + } + + /** + * Sets stateCodes. + * + * @param string[] $stateCodes + * @return RestCountry + */ + public function setStateCodes($stateCodes) { + $this->stateCodes = $stateCodes; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestCountryState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestCountryState.php new file mode 100644 index 0000000..c44fc84 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestCountryState.php @@ -0,0 +1,233 @@ + 'string', + 'countryCode' => 'string', + 'id' => 'string', + 'name' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The code of the state identifies the state. The code is typically used within addresses. Some countries may not provide a code. For those the field is null. + * + * @var string + */ + private $code; + + /** + * The country code in ISO two letter format (e.g. UK, DE, CH, US). + * + * @var string + */ + private $countryCode; + + /** + * The ID of the state corresponds to the subdivision identifier defined in ISO 3166-2. The format consists of the country code followed by a dash and a subdivision identifier. + * + * @var string + */ + private $id; + + /** + * The name is a human readable label of the state in the language of the region. + * + * @var string + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + } + + + /** + * Returns code. + * + * The code of the state identifies the state. The code is typically used within addresses. Some countries may not provide a code. For those the field is null. + * + * @return string + */ + public function getCode() { + return $this->code; + } + + /** + * Sets code. + * + * @param string $code + * @return RestCountryState + */ + protected function setCode($code) { + $this->code = $code; + + return $this; + } + + /** + * Returns countryCode. + * + * The country code in ISO two letter format (e.g. UK, DE, CH, US). + * + * @return string + */ + public function getCountryCode() { + return $this->countryCode; + } + + /** + * Sets countryCode. + * + * @param string $countryCode + * @return RestCountryState + */ + protected function setCountryCode($countryCode) { + $this->countryCode = $countryCode; + + return $this; + } + + /** + * Returns id. + * + * The ID of the state corresponds to the subdivision identifier defined in ISO 3166-2. The format consists of the country code followed by a dash and a subdivision identifier. + * + * @return string + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param string $id + * @return RestCountryState + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * The name is a human readable label of the state in the language of the region. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return RestCountryState + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestCurrency.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestCurrency.php new file mode 100644 index 0000000..3a16550 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestCurrency.php @@ -0,0 +1,202 @@ + 'string', + 'fractionDigits' => 'int', + 'numericCode' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The currency code identifies the currency with the three char long ISO 4217 code (e.g. USD, CHF, EUR). + * + * @var string + */ + private $currencyCode; + + /** + * The fraction digits indicates how many places the currency has. This also indicates with which precision we calculate internally when we do calculations with this currency. + * + * @var int + */ + private $fractionDigits; + + /** + * The numeric code identifies the currency with the three digit long ISO 4217 code (e.g. 978, 756, 840). + * + * @var int + */ + private $numericCode; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + } + + + /** + * Returns currencyCode. + * + * The currency code identifies the currency with the three char long ISO 4217 code (e.g. USD, CHF, EUR). + * + * @return string + */ + public function getCurrencyCode() { + return $this->currencyCode; + } + + /** + * Sets currencyCode. + * + * @param string $currencyCode + * @return RestCurrency + */ + protected function setCurrencyCode($currencyCode) { + $this->currencyCode = $currencyCode; + + return $this; + } + + /** + * Returns fractionDigits. + * + * The fraction digits indicates how many places the currency has. This also indicates with which precision we calculate internally when we do calculations with this currency. + * + * @return int + */ + public function getFractionDigits() { + return $this->fractionDigits; + } + + /** + * Sets fractionDigits. + * + * @param int $fractionDigits + * @return RestCurrency + */ + protected function setFractionDigits($fractionDigits) { + $this->fractionDigits = $fractionDigits; + + return $this; + } + + /** + * Returns numericCode. + * + * The numeric code identifies the currency with the three digit long ISO 4217 code (e.g. 978, 756, 840). + * + * @return int + */ + public function getNumericCode() { + return $this->numericCode; + } + + /** + * Sets numericCode. + * + * @param int $numericCode + * @return RestCurrency + */ + protected function setNumericCode($numericCode) { + $this->numericCode = $numericCode; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestLanguage.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestLanguage.php new file mode 100644 index 0000000..e6ca971 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/RestLanguage.php @@ -0,0 +1,295 @@ + 'string', + 'ietfCode' => 'string', + 'iso2Code' => 'string', + 'iso3Code' => 'string', + 'pluralExpression' => 'string', + 'primaryOfGroup' => 'bool' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The country code represents the region of the language as a 2 letter ISO code. + * + * @var string + */ + private $countryCode; + + /** + * The IETF code represents the language as the two letter ISO code including the region (e.g. en-US). + * + * @var string + */ + private $ietfCode; + + /** + * The ISO 2 letter code represents the language with two letters. + * + * @var string + */ + private $iso2Code; + + /** + * The ISO 3 letter code represents the language with three letters. + * + * @var string + */ + private $iso3Code; + + /** + * The plural expression defines how to map a plural into the language index. This expression is used to determine the plural form for the translations. + * + * @var string + */ + private $pluralExpression; + + /** + * The primary language of a group indicates whether a language is the primary language of a group of languages. The group is determine by the ISO 2 letter code. + * + * @var bool + */ + private $primaryOfGroup; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + } + + + /** + * Returns countryCode. + * + * The country code represents the region of the language as a 2 letter ISO code. + * + * @return string + */ + public function getCountryCode() { + return $this->countryCode; + } + + /** + * Sets countryCode. + * + * @param string $countryCode + * @return RestLanguage + */ + protected function setCountryCode($countryCode) { + $this->countryCode = $countryCode; + + return $this; + } + + /** + * Returns ietfCode. + * + * The IETF code represents the language as the two letter ISO code including the region (e.g. en-US). + * + * @return string + */ + public function getIetfCode() { + return $this->ietfCode; + } + + /** + * Sets ietfCode. + * + * @param string $ietfCode + * @return RestLanguage + */ + protected function setIetfCode($ietfCode) { + $this->ietfCode = $ietfCode; + + return $this; + } + + /** + * Returns iso2Code. + * + * The ISO 2 letter code represents the language with two letters. + * + * @return string + */ + public function getIso2Code() { + return $this->iso2Code; + } + + /** + * Sets iso2Code. + * + * @param string $iso2Code + * @return RestLanguage + */ + protected function setIso2Code($iso2Code) { + $this->iso2Code = $iso2Code; + + return $this; + } + + /** + * Returns iso3Code. + * + * The ISO 3 letter code represents the language with three letters. + * + * @return string + */ + public function getIso3Code() { + return $this->iso3Code; + } + + /** + * Sets iso3Code. + * + * @param string $iso3Code + * @return RestLanguage + */ + protected function setIso3Code($iso3Code) { + $this->iso3Code = $iso3Code; + + return $this; + } + + /** + * Returns pluralExpression. + * + * The plural expression defines how to map a plural into the language index. This expression is used to determine the plural form for the translations. + * + * @return string + */ + public function getPluralExpression() { + return $this->pluralExpression; + } + + /** + * Sets pluralExpression. + * + * @param string $pluralExpression + * @return RestLanguage + */ + protected function setPluralExpression($pluralExpression) { + $this->pluralExpression = $pluralExpression; + + return $this; + } + + /** + * Returns primaryOfGroup. + * + * The primary language of a group indicates whether a language is the primary language of a group of languages. The group is determine by the ISO 2 letter code. + * + * @return bool + */ + public function getPrimaryOfGroup() { + return $this->primaryOfGroup; + } + + /** + * Sets primaryOfGroup. + * + * @param bool $primaryOfGroup + * @return RestLanguage + */ + protected function setPrimaryOfGroup($primaryOfGroup) { + $this->primaryOfGroup = $primaryOfGroup; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Role.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Role.php new file mode 100644 index 0000000..e30bc20 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Role.php @@ -0,0 +1,344 @@ + '\Wallee\Sdk\Model\Account', + 'id' => 'int', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'permissions' => '\Wallee\Sdk\Model\Permission[]', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The account to which this role belongs to. This role can only be assigned within the assigned account and the sub accounts of the assigned account. + * + * @var \Wallee\Sdk\Model\Account + */ + private $account; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The name of this role is used to identify the role within administrative interfaces. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $name; + + /** + * Set of permissions that are granted to this role. + * + * @var \Wallee\Sdk\Model\Permission[] + */ + private $permissions; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['account'])) { + $this->setAccount($data['account']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['permissions'])) { + $this->setPermissions($data['permissions']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns account. + * + * The account to which this role belongs to. This role can only be assigned within the assigned account and the sub accounts of the assigned account. + * + * @return \Wallee\Sdk\Model\Account + */ + public function getAccount() { + return $this->account; + } + + /** + * Sets account. + * + * @param \Wallee\Sdk\Model\Account $account + * @return Role + */ + public function setAccount($account) { + $this->account = $account; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return Role + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * The name of this role is used to identify the role within administrative interfaces. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $name + * @return Role + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns permissions. + * + * Set of permissions that are granted to this role. + * + * @return \Wallee\Sdk\Model\Permission[] + */ + public function getPermissions() { + return $this->permissions; + } + + /** + * Sets permissions. + * + * @param \Wallee\Sdk\Model\Permission[] $permissions + * @return Role + */ + public function setPermissions($permissions) { + $this->permissions = $permissions; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return Role + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return Role + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return Role + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Scope.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Scope.php new file mode 100644 index 0000000..0a5ddf3 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Scope.php @@ -0,0 +1,465 @@ + 'string', + 'features' => '\Wallee\Sdk\Model\Feature[]', + 'id' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'port' => 'int', + 'sslActive' => 'bool', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'themes' => 'string[]', + 'url' => 'string', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The domain name to which this scope is mapped to. + * + * @var string + */ + private $domainName; + + /** + * + * + * @var \Wallee\Sdk\Model\Feature[] + */ + private $features; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The name of the scope is shown to the user where the user should select a scope. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The port number to which this scope is mapped to. + * + * @var int + */ + private $port; + + /** + * Define whether the scope supports SSL. + * + * @var bool + */ + private $sslActive; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The themes determines how the application layout, look and feel is. By providing multiple themes you can fallback to other themes. + * + * @var string[] + */ + private $themes; + + /** + * + * + * @var string + */ + private $url; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['features'])) { + $this->setFeatures($data['features']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['themes'])) { + $this->setThemes($data['themes']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns domainName. + * + * The domain name to which this scope is mapped to. + * + * @return string + */ + public function getDomainName() { + return $this->domainName; + } + + /** + * Sets domainName. + * + * @param string $domainName + * @return Scope + */ + protected function setDomainName($domainName) { + $this->domainName = $domainName; + + return $this; + } + + /** + * Returns features. + * + * + * + * @return \Wallee\Sdk\Model\Feature[] + */ + public function getFeatures() { + return $this->features; + } + + /** + * Sets features. + * + * @param \Wallee\Sdk\Model\Feature[] $features + * @return Scope + */ + public function setFeatures($features) { + $this->features = $features; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return Scope + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * The name of the scope is shown to the user where the user should select a scope. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return Scope + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return Scope + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns port. + * + * The port number to which this scope is mapped to. + * + * @return int + */ + public function getPort() { + return $this->port; + } + + /** + * Sets port. + * + * @param int $port + * @return Scope + */ + protected function setPort($port) { + $this->port = $port; + + return $this; + } + + /** + * Returns sslActive. + * + * Define whether the scope supports SSL. + * + * @return bool + */ + public function getSslActive() { + return $this->sslActive; + } + + /** + * Sets sslActive. + * + * @param bool $sslActive + * @return Scope + */ + protected function setSslActive($sslActive) { + $this->sslActive = $sslActive; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return Scope + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns themes. + * + * The themes determines how the application layout, look and feel is. By providing multiple themes you can fallback to other themes. + * + * @return string[] + */ + public function getThemes() { + return $this->themes; + } + + /** + * Sets themes. + * + * @param string[] $themes + * @return Scope + */ + public function setThemes($themes) { + $this->themes = $themes; + + return $this; + } + + /** + * Returns url. + * + * + * + * @return string + */ + public function getUrl() { + return $this->url; + } + + /** + * Sets url. + * + * @param string $url + * @return Scope + */ + protected function setUrl($url) { + $this->url = $url; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return Scope + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ServerError.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ServerError.php new file mode 100644 index 0000000..7489bb7 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/ServerError.php @@ -0,0 +1,202 @@ + 'string', + 'id' => 'string', + 'message' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * Date when an error has occurred. + * + * @var string + */ + private $date; + + /** + * Unique identifier of an error. + * + * @var string + */ + private $id; + + /** + * This message describes an error. + * + * @var string + */ + private $message; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + } + + + /** + * Returns date. + * + * Date when an error has occurred. + * + * @return string + */ + public function getDate() { + return $this->date; + } + + /** + * Sets date. + * + * @param string $date + * @return ServerError + */ + protected function setDate($date) { + $this->date = $date; + + return $this; + } + + /** + * Returns id. + * + * Unique identifier of an error. + * + * @return string + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param string $id + * @return ServerError + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns message. + * + * This message describes an error. + * + * @return string + */ + public function getMessage() { + return $this->message; + } + + /** + * Sets message. + * + * @param string $message + * @return ServerError + */ + protected function setMessage($message) { + $this->message = $message; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Space.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Space.php new file mode 100644 index 0000000..9b0084d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Space.php @@ -0,0 +1,564 @@ + '\Wallee\Sdk\Model\Account', + 'active' => 'bool', + 'activeOrRestrictedActive' => 'bool', + 'database' => '\Wallee\Sdk\Model\TenantDatabase', + 'id' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'postalAddress' => '\Wallee\Sdk\Model\SpaceAddress', + 'requestLimit' => 'int', + 'restrictedActive' => 'bool', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'technicalContactAddresses' => 'string[]', + 'timeZone' => 'string', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The account to which the space belongs to. + * + * @var \Wallee\Sdk\Model\Account + */ + private $account; + + /** + * Active means that this account and all accounts in the hierarchy are active. + * + * @var bool + */ + private $active; + + /** + * This property is true when all accounts in the hierarchy are active or restricted active. + * + * @var bool + */ + private $activeOrRestrictedActive; + + /** + * The database in which the space's data are stored in. + * + * @var \Wallee\Sdk\Model\TenantDatabase + */ + private $database; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The space name is used internally to identify the space in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The address to use in communication with clients for example in email, documents etc. + * + * @var \Wallee\Sdk\Model\SpaceAddress + */ + private $postalAddress; + + /** + * The request limit defines the maximum number of API request accepted within 2 minutes per cluster node. This limit can only be changed with special privileges. + * + * @var int + */ + private $requestLimit; + + /** + * Restricted active means that at least one account in the hierarchy is only restricted active, but all are either restricted active or active. + * + * @var bool + */ + private $restrictedActive; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The email address provided as contact addresses will be informed about technical issues or errors triggered by the space. + * + * @var string[] + */ + private $technicalContactAddresses; + + /** + * The time zone assigned to the space determines the time offset for calculating dates within the space. This is typically used for background processed which needs to be triggered on a specific hour within the day. Changing the space time zone will not change the display of dates. + * + * @var string + */ + private $timeZone; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['account'])) { + $this->setAccount($data['account']); + } + if (isset($data['database'])) { + $this->setDatabase($data['database']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['postalAddress'])) { + $this->setPostalAddress($data['postalAddress']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['technicalContactAddresses'])) { + $this->setTechnicalContactAddresses($data['technicalContactAddresses']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns account. + * + * The account to which the space belongs to. + * + * @return \Wallee\Sdk\Model\Account + */ + public function getAccount() { + return $this->account; + } + + /** + * Sets account. + * + * @param \Wallee\Sdk\Model\Account $account + * @return Space + */ + public function setAccount($account) { + $this->account = $account; + + return $this; + } + + /** + * Returns active. + * + * Active means that this account and all accounts in the hierarchy are active. + * + * @return bool + */ + public function getActive() { + return $this->active; + } + + /** + * Sets active. + * + * @param bool $active + * @return Space + */ + protected function setActive($active) { + $this->active = $active; + + return $this; + } + + /** + * Returns activeOrRestrictedActive. + * + * This property is true when all accounts in the hierarchy are active or restricted active. + * + * @return bool + */ + public function getActiveOrRestrictedActive() { + return $this->activeOrRestrictedActive; + } + + /** + * Sets activeOrRestrictedActive. + * + * @param bool $activeOrRestrictedActive + * @return Space + */ + protected function setActiveOrRestrictedActive($activeOrRestrictedActive) { + $this->activeOrRestrictedActive = $activeOrRestrictedActive; + + return $this; + } + + /** + * Returns database. + * + * The database in which the space's data are stored in. + * + * @return \Wallee\Sdk\Model\TenantDatabase + */ + public function getDatabase() { + return $this->database; + } + + /** + * Sets database. + * + * @param \Wallee\Sdk\Model\TenantDatabase $database + * @return Space + */ + public function setDatabase($database) { + $this->database = $database; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return Space + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * The space name is used internally to identify the space in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return Space + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return Space + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns postalAddress. + * + * The address to use in communication with clients for example in email, documents etc. + * + * @return \Wallee\Sdk\Model\SpaceAddress + */ + public function getPostalAddress() { + return $this->postalAddress; + } + + /** + * Sets postalAddress. + * + * @param \Wallee\Sdk\Model\SpaceAddress $postalAddress + * @return Space + */ + public function setPostalAddress($postalAddress) { + $this->postalAddress = $postalAddress; + + return $this; + } + + /** + * Returns requestLimit. + * + * The request limit defines the maximum number of API request accepted within 2 minutes per cluster node. This limit can only be changed with special privileges. + * + * @return int + */ + public function getRequestLimit() { + return $this->requestLimit; + } + + /** + * Sets requestLimit. + * + * @param int $requestLimit + * @return Space + */ + protected function setRequestLimit($requestLimit) { + $this->requestLimit = $requestLimit; + + return $this; + } + + /** + * Returns restrictedActive. + * + * Restricted active means that at least one account in the hierarchy is only restricted active, but all are either restricted active or active. + * + * @return bool + */ + public function getRestrictedActive() { + return $this->restrictedActive; + } + + /** + * Sets restrictedActive. + * + * @param bool $restrictedActive + * @return Space + */ + protected function setRestrictedActive($restrictedActive) { + $this->restrictedActive = $restrictedActive; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return Space + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns technicalContactAddresses. + * + * The email address provided as contact addresses will be informed about technical issues or errors triggered by the space. + * + * @return string[] + */ + public function getTechnicalContactAddresses() { + return $this->technicalContactAddresses; + } + + /** + * Sets technicalContactAddresses. + * + * @param string[] $technicalContactAddresses + * @return Space + */ + public function setTechnicalContactAddresses($technicalContactAddresses) { + $this->technicalContactAddresses = $technicalContactAddresses; + + return $this; + } + + /** + * Returns timeZone. + * + * The time zone assigned to the space determines the time offset for calculating dates within the space. This is typically used for background processed which needs to be triggered on a specific hour within the day. Changing the space time zone will not change the display of dates. + * + * @return string + */ + public function getTimeZone() { + return $this->timeZone; + } + + /** + * Sets timeZone. + * + * @param string $timeZone + * @return Space + */ + protected function setTimeZone($timeZone) { + $this->timeZone = $timeZone; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return Space + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceAddress.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceAddress.php new file mode 100644 index 0000000..c92ce20 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceAddress.php @@ -0,0 +1,512 @@ + 'string', + 'country' => 'string', + 'dependentLocality' => 'string', + 'emailAddress' => 'string', + 'familyName' => 'string', + 'givenName' => 'string', + 'organizationName' => 'string', + 'postCode' => 'string', + 'postalState' => 'string', + 'salesTaxNumber' => 'string', + 'salutation' => 'string', + 'sortingCode' => 'string', + 'street' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $city; + + /** + * + * + * @var string + */ + private $country; + + /** + * + * + * @var string + */ + private $dependentLocality; + + /** + * The email address is used within emails and as reply to address. + * + * @var string + */ + private $emailAddress; + + /** + * + * + * @var string + */ + private $familyName; + + /** + * + * + * @var string + */ + private $givenName; + + /** + * + * + * @var string + */ + private $organizationName; + + /** + * + * + * @var string + */ + private $postCode; + + /** + * + * + * @var string + */ + private $postalState; + + /** + * + * + * @var string + */ + private $salesTaxNumber; + + /** + * + * + * @var string + */ + private $salutation; + + /** + * The sorting code identifies the post office at which the post box is located in. + * + * @var string + */ + private $sortingCode; + + /** + * + * + * @var string + */ + private $street; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + } + + + /** + * Returns city. + * + * + * + * @return string + */ + public function getCity() { + return $this->city; + } + + /** + * Sets city. + * + * @param string $city + * @return SpaceAddress + */ + protected function setCity($city) { + $this->city = $city; + + return $this; + } + + /** + * Returns country. + * + * + * + * @return string + */ + public function getCountry() { + return $this->country; + } + + /** + * Sets country. + * + * @param string $country + * @return SpaceAddress + */ + protected function setCountry($country) { + $this->country = $country; + + return $this; + } + + /** + * Returns dependentLocality. + * + * + * + * @return string + */ + public function getDependentLocality() { + return $this->dependentLocality; + } + + /** + * Sets dependentLocality. + * + * @param string $dependentLocality + * @return SpaceAddress + */ + protected function setDependentLocality($dependentLocality) { + $this->dependentLocality = $dependentLocality; + + return $this; + } + + /** + * Returns emailAddress. + * + * The email address is used within emails and as reply to address. + * + * @return string + */ + public function getEmailAddress() { + return $this->emailAddress; + } + + /** + * Sets emailAddress. + * + * @param string $emailAddress + * @return SpaceAddress + */ + protected function setEmailAddress($emailAddress) { + $this->emailAddress = $emailAddress; + + return $this; + } + + /** + * Returns familyName. + * + * + * + * @return string + */ + public function getFamilyName() { + return $this->familyName; + } + + /** + * Sets familyName. + * + * @param string $familyName + * @return SpaceAddress + */ + protected function setFamilyName($familyName) { + $this->familyName = $familyName; + + return $this; + } + + /** + * Returns givenName. + * + * + * + * @return string + */ + public function getGivenName() { + return $this->givenName; + } + + /** + * Sets givenName. + * + * @param string $givenName + * @return SpaceAddress + */ + protected function setGivenName($givenName) { + $this->givenName = $givenName; + + return $this; + } + + /** + * Returns organizationName. + * + * + * + * @return string + */ + public function getOrganizationName() { + return $this->organizationName; + } + + /** + * Sets organizationName. + * + * @param string $organizationName + * @return SpaceAddress + */ + protected function setOrganizationName($organizationName) { + $this->organizationName = $organizationName; + + return $this; + } + + /** + * Returns postCode. + * + * + * + * @return string + */ + public function getPostCode() { + return $this->postCode; + } + + /** + * Sets postCode. + * + * @param string $postCode + * @return SpaceAddress + */ + protected function setPostCode($postCode) { + $this->postCode = $postCode; + + return $this; + } + + /** + * Returns postalState. + * + * + * + * @return string + */ + public function getPostalState() { + return $this->postalState; + } + + /** + * Sets postalState. + * + * @param string $postalState + * @return SpaceAddress + */ + protected function setPostalState($postalState) { + $this->postalState = $postalState; + + return $this; + } + + /** + * Returns salesTaxNumber. + * + * + * + * @return string + */ + public function getSalesTaxNumber() { + return $this->salesTaxNumber; + } + + /** + * Sets salesTaxNumber. + * + * @param string $salesTaxNumber + * @return SpaceAddress + */ + protected function setSalesTaxNumber($salesTaxNumber) { + $this->salesTaxNumber = $salesTaxNumber; + + return $this; + } + + /** + * Returns salutation. + * + * + * + * @return string + */ + public function getSalutation() { + return $this->salutation; + } + + /** + * Sets salutation. + * + * @param string $salutation + * @return SpaceAddress + */ + protected function setSalutation($salutation) { + $this->salutation = $salutation; + + return $this; + } + + /** + * Returns sortingCode. + * + * The sorting code identifies the post office at which the post box is located in. + * + * @return string + */ + public function getSortingCode() { + return $this->sortingCode; + } + + /** + * Sets sortingCode. + * + * @param string $sortingCode + * @return SpaceAddress + */ + protected function setSortingCode($sortingCode) { + $this->sortingCode = $sortingCode; + + return $this; + } + + /** + * Returns street. + * + * + * + * @return string + */ + public function getStreet() { + return $this->street; + } + + /** + * Sets street. + * + * @param string $street + * @return SpaceAddress + */ + protected function setStreet($street) { + $this->street = $street; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceAddressCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceAddressCreate.php new file mode 100644 index 0000000..afe355d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceAddressCreate.php @@ -0,0 +1,551 @@ + 'string', + 'country' => 'string', + 'dependentLocality' => 'string', + 'emailAddress' => 'string', + 'familyName' => 'string', + 'givenName' => 'string', + 'organizationName' => 'string', + 'postCode' => 'string', + 'postalState' => 'string', + 'salesTaxNumber' => 'string', + 'salutation' => 'string', + 'sortingCode' => 'string', + 'street' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $city; + + /** + * + * + * @var string + */ + private $country; + + /** + * + * + * @var string + */ + private $dependentLocality; + + /** + * The email address is used within emails and as reply to address. + * + * @var string + */ + private $emailAddress; + + /** + * + * + * @var string + */ + private $familyName; + + /** + * + * + * @var string + */ + private $givenName; + + /** + * + * + * @var string + */ + private $organizationName; + + /** + * + * + * @var string + */ + private $postCode; + + /** + * + * + * @var string + */ + private $postalState; + + /** + * + * + * @var string + */ + private $salesTaxNumber; + + /** + * + * + * @var string + */ + private $salutation; + + /** + * The sorting code identifies the post office at which the post box is located in. + * + * @var string + */ + private $sortingCode; + + /** + * + * + * @var string + */ + private $street; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['city'])) { + $this->setCity($data['city']); + } + if (isset($data['country'])) { + $this->setCountry($data['country']); + } + if (isset($data['dependentLocality'])) { + $this->setDependentLocality($data['dependentLocality']); + } + if (isset($data['emailAddress'])) { + $this->setEmailAddress($data['emailAddress']); + } + if (isset($data['familyName'])) { + $this->setFamilyName($data['familyName']); + } + if (isset($data['givenName'])) { + $this->setGivenName($data['givenName']); + } + if (isset($data['organizationName'])) { + $this->setOrganizationName($data['organizationName']); + } + if (isset($data['postCode'])) { + $this->setPostCode($data['postCode']); + } + if (isset($data['postalState'])) { + $this->setPostalState($data['postalState']); + } + if (isset($data['salesTaxNumber'])) { + $this->setSalesTaxNumber($data['salesTaxNumber']); + } + if (isset($data['salutation'])) { + $this->setSalutation($data['salutation']); + } + if (isset($data['sortingCode'])) { + $this->setSortingCode($data['sortingCode']); + } + if (isset($data['street'])) { + $this->setStreet($data['street']); + } + } + + + /** + * Returns city. + * + * + * + * @return string + */ + public function getCity() { + return $this->city; + } + + /** + * Sets city. + * + * @param string $city + * @return SpaceAddressCreate + */ + public function setCity($city) { + $this->city = $city; + + return $this; + } + + /** + * Returns country. + * + * + * + * @return string + */ + public function getCountry() { + return $this->country; + } + + /** + * Sets country. + * + * @param string $country + * @return SpaceAddressCreate + */ + public function setCountry($country) { + $this->country = $country; + + return $this; + } + + /** + * Returns dependentLocality. + * + * + * + * @return string + */ + public function getDependentLocality() { + return $this->dependentLocality; + } + + /** + * Sets dependentLocality. + * + * @param string $dependentLocality + * @return SpaceAddressCreate + */ + public function setDependentLocality($dependentLocality) { + $this->dependentLocality = $dependentLocality; + + return $this; + } + + /** + * Returns emailAddress. + * + * The email address is used within emails and as reply to address. + * + * @return string + */ + public function getEmailAddress() { + return $this->emailAddress; + } + + /** + * Sets emailAddress. + * + * @param string $emailAddress + * @return SpaceAddressCreate + */ + public function setEmailAddress($emailAddress) { + $this->emailAddress = $emailAddress; + + return $this; + } + + /** + * Returns familyName. + * + * + * + * @return string + */ + public function getFamilyName() { + return $this->familyName; + } + + /** + * Sets familyName. + * + * @param string $familyName + * @return SpaceAddressCreate + */ + public function setFamilyName($familyName) { + $this->familyName = $familyName; + + return $this; + } + + /** + * Returns givenName. + * + * + * + * @return string + */ + public function getGivenName() { + return $this->givenName; + } + + /** + * Sets givenName. + * + * @param string $givenName + * @return SpaceAddressCreate + */ + public function setGivenName($givenName) { + $this->givenName = $givenName; + + return $this; + } + + /** + * Returns organizationName. + * + * + * + * @return string + */ + public function getOrganizationName() { + return $this->organizationName; + } + + /** + * Sets organizationName. + * + * @param string $organizationName + * @return SpaceAddressCreate + */ + public function setOrganizationName($organizationName) { + $this->organizationName = $organizationName; + + return $this; + } + + /** + * Returns postCode. + * + * + * + * @return string + */ + public function getPostCode() { + return $this->postCode; + } + + /** + * Sets postCode. + * + * @param string $postCode + * @return SpaceAddressCreate + */ + public function setPostCode($postCode) { + $this->postCode = $postCode; + + return $this; + } + + /** + * Returns postalState. + * + * + * + * @return string + */ + public function getPostalState() { + return $this->postalState; + } + + /** + * Sets postalState. + * + * @param string $postalState + * @return SpaceAddressCreate + */ + public function setPostalState($postalState) { + $this->postalState = $postalState; + + return $this; + } + + /** + * Returns salesTaxNumber. + * + * + * + * @return string + */ + public function getSalesTaxNumber() { + return $this->salesTaxNumber; + } + + /** + * Sets salesTaxNumber. + * + * @param string $salesTaxNumber + * @return SpaceAddressCreate + */ + public function setSalesTaxNumber($salesTaxNumber) { + $this->salesTaxNumber = $salesTaxNumber; + + return $this; + } + + /** + * Returns salutation. + * + * + * + * @return string + */ + public function getSalutation() { + return $this->salutation; + } + + /** + * Sets salutation. + * + * @param string $salutation + * @return SpaceAddressCreate + */ + public function setSalutation($salutation) { + $this->salutation = $salutation; + + return $this; + } + + /** + * Returns sortingCode. + * + * The sorting code identifies the post office at which the post box is located in. + * + * @return string + */ + public function getSortingCode() { + return $this->sortingCode; + } + + /** + * Sets sortingCode. + * + * @param string $sortingCode + * @return SpaceAddressCreate + */ + public function setSortingCode($sortingCode) { + $this->sortingCode = $sortingCode; + + return $this; + } + + /** + * Returns street. + * + * + * + * @return string + */ + public function getStreet() { + return $this->street; + } + + /** + * Sets street. + * + * @param string $street + * @return SpaceAddressCreate + */ + public function setStreet($street) { + $this->street = $street; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceAddressSetter.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceAddressSetter.php new file mode 100644 index 0000000..9fe1b6f --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceAddressSetter.php @@ -0,0 +1,426 @@ +setCity($data['city']); + } + if (isset($data['country']) && $data['country'] != null) { + $this->setCountry($data['country']); + } + if (isset($data['dependentLocality']) && $data['dependentLocality'] != null) { + $this->setDependentLocality($data['dependentLocality']); + } + if (isset($data['emailAddress']) && $data['emailAddress'] != null) { + $this->setEmailAddress($data['emailAddress']); + } + if (isset($data['familyName']) && $data['familyName'] != null) { + $this->setFamilyName($data['familyName']); + } + if (isset($data['givenName']) && $data['givenName'] != null) { + $this->setGivenName($data['givenName']); + } + if (isset($data['organizationName']) && $data['organizationName'] != null) { + $this->setOrganizationName($data['organizationName']); + } + if (isset($data['postCode']) && $data['postCode'] != null) { + $this->setPostCode($data['postCode']); + } + if (isset($data['postalState']) && $data['postalState'] != null) { + $this->setPostalState($data['postalState']); + } + if (isset($data['salesTaxNumber']) && $data['salesTaxNumber'] != null) { + $this->setSalesTaxNumber($data['salesTaxNumber']); + } + if (isset($data['salutation']) && $data['salutation'] != null) { + $this->setSalutation($data['salutation']); + } + if (isset($data['sortingCode']) && $data['sortingCode'] != null) { + $this->setSortingCode($data['sortingCode']); + } + if (isset($data['street']) && $data['street'] != null) { + $this->setStreet($data['street']); + } + } + + + /** + * Returns city. + * + * + * + * @return string + */ + public function getCity() { + return parent::getCity(); + } + + /** + * Sets city. + * + * @param string $city + * @return SpaceAddressSetter + */ + public function setCity($city) { + return parent::setCity($city); + } + + /** + * Returns country. + * + * + * + * @return string + */ + public function getCountry() { + return parent::getCountry(); + } + + /** + * Sets country. + * + * @param string $country + * @return SpaceAddressSetter + */ + public function setCountry($country) { + return parent::setCountry($country); + } + + /** + * Returns dependentLocality. + * + * + * + * @return string + */ + public function getDependentLocality() { + return parent::getDependentLocality(); + } + + /** + * Sets dependentLocality. + * + * @param string $dependentLocality + * @return SpaceAddressSetter + */ + public function setDependentLocality($dependentLocality) { + return parent::setDependentLocality($dependentLocality); + } + + /** + * Returns emailAddress. + * + * The email address is used within emails and as reply to address. + * + * @return string + */ + public function getEmailAddress() { + return parent::getEmailAddress(); + } + + /** + * Sets emailAddress. + * + * @param string $emailAddress + * @return SpaceAddressSetter + */ + public function setEmailAddress($emailAddress) { + return parent::setEmailAddress($emailAddress); + } + + /** + * Returns familyName. + * + * + * + * @return string + */ + public function getFamilyName() { + return parent::getFamilyName(); + } + + /** + * Sets familyName. + * + * @param string $familyName + * @return SpaceAddressSetter + */ + public function setFamilyName($familyName) { + return parent::setFamilyName($familyName); + } + + /** + * Returns givenName. + * + * + * + * @return string + */ + public function getGivenName() { + return parent::getGivenName(); + } + + /** + * Sets givenName. + * + * @param string $givenName + * @return SpaceAddressSetter + */ + public function setGivenName($givenName) { + return parent::setGivenName($givenName); + } + + /** + * Returns organizationName. + * + * + * + * @return string + */ + public function getOrganizationName() { + return parent::getOrganizationName(); + } + + /** + * Sets organizationName. + * + * @param string $organizationName + * @return SpaceAddressSetter + */ + public function setOrganizationName($organizationName) { + return parent::setOrganizationName($organizationName); + } + + /** + * Returns postCode. + * + * + * + * @return string + */ + public function getPostCode() { + return parent::getPostCode(); + } + + /** + * Sets postCode. + * + * @param string $postCode + * @return SpaceAddressSetter + */ + public function setPostCode($postCode) { + return parent::setPostCode($postCode); + } + + /** + * Returns postalState. + * + * + * + * @return string + */ + public function getPostalState() { + return parent::getPostalState(); + } + + /** + * Sets postalState. + * + * @param string $postalState + * @return SpaceAddressSetter + */ + public function setPostalState($postalState) { + return parent::setPostalState($postalState); + } + + /** + * Returns salesTaxNumber. + * + * + * + * @return string + */ + public function getSalesTaxNumber() { + return parent::getSalesTaxNumber(); + } + + /** + * Sets salesTaxNumber. + * + * @param string $salesTaxNumber + * @return SpaceAddressSetter + */ + public function setSalesTaxNumber($salesTaxNumber) { + return parent::setSalesTaxNumber($salesTaxNumber); + } + + /** + * Returns salutation. + * + * + * + * @return string + */ + public function getSalutation() { + return parent::getSalutation(); + } + + /** + * Sets salutation. + * + * @param string $salutation + * @return SpaceAddressSetter + */ + public function setSalutation($salutation) { + return parent::setSalutation($salutation); + } + + /** + * Returns sortingCode. + * + * The sorting code identifies the post office at which the post box is located in. + * + * @return string + */ + public function getSortingCode() { + return parent::getSortingCode(); + } + + /** + * Sets sortingCode. + * + * @param string $sortingCode + * @return SpaceAddressSetter + */ + public function setSortingCode($sortingCode) { + return parent::setSortingCode($sortingCode); + } + + /** + * Returns street. + * + * + * + * @return string + */ + public function getStreet() { + return parent::getStreet(); + } + + /** + * Sets street. + * + * @param string $street + * @return SpaceAddressSetter + */ + public function setStreet($street) { + return parent::setStreet($street); + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceCreate.php new file mode 100644 index 0000000..75e7e74 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceCreate.php @@ -0,0 +1,149 @@ + 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The account to which the space belongs to. + * + * @var int + */ + private $account; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['account'])) { + $this->setAccount($data['account']); + } + } + + + /** + * Returns account. + * + * The account to which the space belongs to. + * + * @return int + */ + public function getAccount() { + return $this->account; + } + + /** + * Sets account. + * + * @param int $account + * @return SpaceCreate + */ + public function setAccount($account) { + $this->account = $account; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getAccount() === null) { + throw new ValidationException("'account' can't be null", 'account', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceReference.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceReference.php new file mode 100644 index 0000000..3314a65 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceReference.php @@ -0,0 +1,335 @@ + '\DateTime', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'plannedPurgeDate' => '\DateTime', + 'spaceId' => 'int', + 'state' => '\Wallee\Sdk\Model\SpaceReferenceState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \DateTime + */ + private $createdOn; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var int + */ + private $spaceId; + + /** + * + * + * @var \Wallee\Sdk\Model\SpaceReferenceState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns createdOn. + * + * + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return SpaceReference + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SpaceReference + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SpaceReference + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return SpaceReference + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns spaceId. + * + * + * + * @return int + */ + public function getSpaceId() { + return $this->spaceId; + } + + /** + * Sets spaceId. + * + * @param int $spaceId + * @return SpaceReference + */ + protected function setSpaceId($spaceId) { + $this->spaceId = $spaceId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\SpaceReferenceState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\SpaceReferenceState $state + * @return SpaceReference + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SpaceReference + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceReferenceState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceReferenceState.php new file mode 100644 index 0000000..6f0a1c9 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceReferenceState.php @@ -0,0 +1,46 @@ + 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SpaceUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SpaceUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceView.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceView.php new file mode 100644 index 0000000..8165b23 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SpaceView.php @@ -0,0 +1,338 @@ + 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'space' => '\Wallee\Sdk\Model\Space', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The space view name is used internally to identify the space view in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The space to which the view belongs to. + * + * @var \Wallee\Sdk\Model\Space + */ + private $space; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['space'])) { + $this->setSpace($data['space']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SpaceView + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SpaceView + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The space view name is used internally to identify the space view in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return SpaceView + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return SpaceView + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns space. + * + * The space to which the view belongs to. + * + * @return \Wallee\Sdk\Model\Space + */ + public function getSpace() { + return $this->space; + } + + /** + * Sets space. + * + * @param \Wallee\Sdk\Model\Space $space + * @return SpaceView + */ + public function setSpace($space) { + $this->space = $space; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return SpaceView + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SpaceView + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/StaticValue.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/StaticValue.php new file mode 100644 index 0000000..f3a7068 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/StaticValue.php @@ -0,0 +1,242 @@ + 'map[string,string]', + 'features' => 'int[]', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var int[] + */ + private $features; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['features'])) { + $this->setFeatures($data['features']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return StaticValue + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns features. + * + * + * + * @return int[] + */ + public function getFeatures() { + return $this->features; + } + + /** + * Sets features. + * + * @param int[] $features + * @return StaticValue + */ + public function setFeatures($features) { + $this->features = $features; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return StaticValue + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return StaticValue + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Subscriber.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Subscriber.php new file mode 100644 index 0000000..1217dc9 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Subscriber.php @@ -0,0 +1,598 @@ + 'int[]', + 'billingAddress' => '\Wallee\Sdk\Model\Address', + 'description' => 'string', + 'disallowedPaymentMethodConfigurations' => 'int[]', + 'emailAddress' => 'string', + 'externalId' => 'string', + 'id' => 'int', + 'language' => 'string', + 'linkedSpaceId' => 'int', + 'metaData' => 'map[string,string]', + 'plannedPurgeDate' => '\DateTime', + 'reference' => 'string', + 'shippingAddress' => '\Wallee\Sdk\Model\Address', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * Those payment methods which are allowed additionally will be available even when the product does not allow those methods. + * + * @var int[] + */ + private $additionalAllowedPaymentMethodConfigurations; + + /** + * + * + * @var \Wallee\Sdk\Model\Address + */ + private $billingAddress; + + /** + * The subscriber description can be used to add a description to the subscriber. This is used in the back office to identify the subscriber. + * + * @var string + */ + private $description; + + /** + * Those payment methods which are disallowed will not be available to the subscriber even if the product allows those methods. + * + * @var int[] + */ + private $disallowedPaymentMethodConfigurations; + + /** + * The email address is used to communicate with the subscriber. There can be only one subscriber per space with the same email address. + * + * @var string + */ + private $emailAddress; + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The subscriber language determines the language which is used to communicate with the subscriber in emails and documents (e.g. invoices). + * + * @var string + */ + private $language; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * Meta data allow to store additional data along the object. + * + * @var map[string,string] + */ + private $metaData; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The subscriber reference identifies the subscriber in administrative interfaces (e.g. customer id). + * + * @var string + */ + private $reference; + + /** + * + * + * @var \Wallee\Sdk\Model\Address + */ + private $shippingAddress; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['additionalAllowedPaymentMethodConfigurations'])) { + $this->setAdditionalAllowedPaymentMethodConfigurations($data['additionalAllowedPaymentMethodConfigurations']); + } + if (isset($data['billingAddress'])) { + $this->setBillingAddress($data['billingAddress']); + } + if (isset($data['disallowedPaymentMethodConfigurations'])) { + $this->setDisallowedPaymentMethodConfigurations($data['disallowedPaymentMethodConfigurations']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['metaData'])) { + $this->setMetaData($data['metaData']); + } + if (isset($data['shippingAddress'])) { + $this->setShippingAddress($data['shippingAddress']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns additionalAllowedPaymentMethodConfigurations. + * + * Those payment methods which are allowed additionally will be available even when the product does not allow those methods. + * + * @return int[] + */ + public function getAdditionalAllowedPaymentMethodConfigurations() { + return $this->additionalAllowedPaymentMethodConfigurations; + } + + /** + * Sets additionalAllowedPaymentMethodConfigurations. + * + * @param int[] $additionalAllowedPaymentMethodConfigurations + * @return Subscriber + */ + public function setAdditionalAllowedPaymentMethodConfigurations($additionalAllowedPaymentMethodConfigurations) { + $this->additionalAllowedPaymentMethodConfigurations = $additionalAllowedPaymentMethodConfigurations; + + return $this; + } + + /** + * Returns billingAddress. + * + * + * + * @return \Wallee\Sdk\Model\Address + */ + public function getBillingAddress() { + return $this->billingAddress; + } + + /** + * Sets billingAddress. + * + * @param \Wallee\Sdk\Model\Address $billingAddress + * @return Subscriber + */ + public function setBillingAddress($billingAddress) { + $this->billingAddress = $billingAddress; + + return $this; + } + + /** + * Returns description. + * + * The subscriber description can be used to add a description to the subscriber. This is used in the back office to identify the subscriber. + * + * @return string + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param string $description + * @return Subscriber + */ + protected function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns disallowedPaymentMethodConfigurations. + * + * Those payment methods which are disallowed will not be available to the subscriber even if the product allows those methods. + * + * @return int[] + */ + public function getDisallowedPaymentMethodConfigurations() { + return $this->disallowedPaymentMethodConfigurations; + } + + /** + * Sets disallowedPaymentMethodConfigurations. + * + * @param int[] $disallowedPaymentMethodConfigurations + * @return Subscriber + */ + public function setDisallowedPaymentMethodConfigurations($disallowedPaymentMethodConfigurations) { + $this->disallowedPaymentMethodConfigurations = $disallowedPaymentMethodConfigurations; + + return $this; + } + + /** + * Returns emailAddress. + * + * The email address is used to communicate with the subscriber. There can be only one subscriber per space with the same email address. + * + * @return string + */ + public function getEmailAddress() { + return $this->emailAddress; + } + + /** + * Sets emailAddress. + * + * @param string $emailAddress + * @return Subscriber + */ + protected function setEmailAddress($emailAddress) { + $this->emailAddress = $emailAddress; + + return $this; + } + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return Subscriber + */ + protected function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return Subscriber + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns language. + * + * The subscriber language determines the language which is used to communicate with the subscriber in emails and documents (e.g. invoices). + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return Subscriber + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return Subscriber + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns metaData. + * + * Meta data allow to store additional data along the object. + * + * @return map[string,string] + */ + public function getMetaData() { + return $this->metaData; + } + + /** + * Sets metaData. + * + * @param map[string,string] $metaData + * @return Subscriber + */ + public function setMetaData($metaData) { + $this->metaData = $metaData; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return Subscriber + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns reference. + * + * The subscriber reference identifies the subscriber in administrative interfaces (e.g. customer id). + * + * @return string + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param string $reference + * @return Subscriber + */ + protected function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Returns shippingAddress. + * + * + * + * @return \Wallee\Sdk\Model\Address + */ + public function getShippingAddress() { + return $this->shippingAddress; + } + + /** + * Sets shippingAddress. + * + * @param \Wallee\Sdk\Model\Address $shippingAddress + * @return Subscriber + */ + public function setShippingAddress($shippingAddress) { + $this->shippingAddress = $shippingAddress; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return Subscriber + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return Subscriber + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriberActive.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriberActive.php new file mode 100644 index 0000000..0b90b64 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriberActive.php @@ -0,0 +1,146 @@ + '\Wallee\Sdk\Model\CreationEntityState' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['state'])) { + $this->setState($data['state']); + } + } + + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return SubscriberActive + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriberCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriberCreate.php new file mode 100644 index 0000000..3707f7f --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriberCreate.php @@ -0,0 +1,183 @@ + '\Wallee\Sdk\Model\CreationEntityState', + 'externalId' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['externalId'])) { + $this->setExternalId($data['externalId']); + } + } + + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return SubscriberCreate + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return SubscriberCreate + */ + public function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getExternalId() === null) { + throw new ValidationException("'externalId' can't be null", 'externalId', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriberUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriberUpdate.php new file mode 100644 index 0000000..c229b56 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriberUpdate.php @@ -0,0 +1,489 @@ + 'int', + 'version' => 'int', + 'additionalAllowedPaymentMethodConfigurations' => 'int[]', + 'billingAddress' => '\Wallee\Sdk\Model\AddressCreate', + 'description' => 'string', + 'disallowedPaymentMethodConfigurations' => 'int[]', + 'emailAddress' => 'string', + 'language' => 'string', + 'metaData' => 'map[string,string]', + 'reference' => 'string', + 'shippingAddress' => '\Wallee\Sdk\Model\AddressCreate' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + /** + * Those payment methods which are allowed additionally will be available even when the product does not allow those methods. + * + * @var int[] + */ + private $additionalAllowedPaymentMethodConfigurations; + + /** + * + * + * @var \Wallee\Sdk\Model\AddressCreate + */ + private $billingAddress; + + /** + * The subscriber description can be used to add a description to the subscriber. This is used in the back office to identify the subscriber. + * + * @var string + */ + private $description; + + /** + * Those payment methods which are disallowed will not be available to the subscriber even if the product allows those methods. + * + * @var int[] + */ + private $disallowedPaymentMethodConfigurations; + + /** + * The email address is used to communicate with the subscriber. There can be only one subscriber per space with the same email address. + * + * @var string + */ + private $emailAddress; + + /** + * The subscriber language determines the language which is used to communicate with the subscriber in emails and documents (e.g. invoices). + * + * @var string + */ + private $language; + + /** + * Meta data allow to store additional data along the object. + * + * @var map[string,string] + */ + private $metaData; + + /** + * The subscriber reference identifies the subscriber in administrative interfaces (e.g. customer id). + * + * @var string + */ + private $reference; + + /** + * + * + * @var \Wallee\Sdk\Model\AddressCreate + */ + private $shippingAddress; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + if (isset($data['additionalAllowedPaymentMethodConfigurations'])) { + $this->setAdditionalAllowedPaymentMethodConfigurations($data['additionalAllowedPaymentMethodConfigurations']); + } + if (isset($data['billingAddress'])) { + $this->setBillingAddress($data['billingAddress']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['disallowedPaymentMethodConfigurations'])) { + $this->setDisallowedPaymentMethodConfigurations($data['disallowedPaymentMethodConfigurations']); + } + if (isset($data['emailAddress'])) { + $this->setEmailAddress($data['emailAddress']); + } + if (isset($data['language'])) { + $this->setLanguage($data['language']); + } + if (isset($data['metaData'])) { + $this->setMetaData($data['metaData']); + } + if (isset($data['reference'])) { + $this->setReference($data['reference']); + } + if (isset($data['shippingAddress'])) { + $this->setShippingAddress($data['shippingAddress']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriberUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriberUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Returns additionalAllowedPaymentMethodConfigurations. + * + * Those payment methods which are allowed additionally will be available even when the product does not allow those methods. + * + * @return int[] + */ + public function getAdditionalAllowedPaymentMethodConfigurations() { + return $this->additionalAllowedPaymentMethodConfigurations; + } + + /** + * Sets additionalAllowedPaymentMethodConfigurations. + * + * @param int[] $additionalAllowedPaymentMethodConfigurations + * @return SubscriberUpdate + */ + public function setAdditionalAllowedPaymentMethodConfigurations($additionalAllowedPaymentMethodConfigurations) { + $this->additionalAllowedPaymentMethodConfigurations = $additionalAllowedPaymentMethodConfigurations; + + return $this; + } + + /** + * Returns billingAddress. + * + * + * + * @return \Wallee\Sdk\Model\AddressCreate + */ + public function getBillingAddress() { + return $this->billingAddress; + } + + /** + * Sets billingAddress. + * + * @param \Wallee\Sdk\Model\AddressCreate $billingAddress + * @return SubscriberUpdate + */ + public function setBillingAddress($billingAddress) { + $this->billingAddress = $billingAddress; + + return $this; + } + + /** + * Returns description. + * + * The subscriber description can be used to add a description to the subscriber. This is used in the back office to identify the subscriber. + * + * @return string + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param string $description + * @return SubscriberUpdate + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns disallowedPaymentMethodConfigurations. + * + * Those payment methods which are disallowed will not be available to the subscriber even if the product allows those methods. + * + * @return int[] + */ + public function getDisallowedPaymentMethodConfigurations() { + return $this->disallowedPaymentMethodConfigurations; + } + + /** + * Sets disallowedPaymentMethodConfigurations. + * + * @param int[] $disallowedPaymentMethodConfigurations + * @return SubscriberUpdate + */ + public function setDisallowedPaymentMethodConfigurations($disallowedPaymentMethodConfigurations) { + $this->disallowedPaymentMethodConfigurations = $disallowedPaymentMethodConfigurations; + + return $this; + } + + /** + * Returns emailAddress. + * + * The email address is used to communicate with the subscriber. There can be only one subscriber per space with the same email address. + * + * @return string + */ + public function getEmailAddress() { + return $this->emailAddress; + } + + /** + * Sets emailAddress. + * + * @param string $emailAddress + * @return SubscriberUpdate + */ + public function setEmailAddress($emailAddress) { + $this->emailAddress = $emailAddress; + + return $this; + } + + /** + * Returns language. + * + * The subscriber language determines the language which is used to communicate with the subscriber in emails and documents (e.g. invoices). + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return SubscriberUpdate + */ + public function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns metaData. + * + * Meta data allow to store additional data along the object. + * + * @return map[string,string] + */ + public function getMetaData() { + return $this->metaData; + } + + /** + * Sets metaData. + * + * @param map[string,string] $metaData + * @return SubscriberUpdate + */ + public function setMetaData($metaData) { + $this->metaData = $metaData; + + return $this; + } + + /** + * Returns reference. + * + * The subscriber reference identifies the subscriber in administrative interfaces (e.g. customer id). + * + * @return string + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param string $reference + * @return SubscriberUpdate + */ + public function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Returns shippingAddress. + * + * + * + * @return \Wallee\Sdk\Model\AddressCreate + */ + public function getShippingAddress() { + return $this->shippingAddress; + } + + /** + * Sets shippingAddress. + * + * @param \Wallee\Sdk\Model\AddressCreate $shippingAddress + * @return SubscriberUpdate + */ + public function setShippingAddress($shippingAddress) { + $this->shippingAddress = $shippingAddress; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Subscription.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Subscription.php new file mode 100644 index 0000000..fc084bc --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Subscription.php @@ -0,0 +1,623 @@ + '\Wallee\Sdk\Model\SubscriptionAffiliate', + 'createdOn' => '\DateTime', + 'description' => 'string', + 'id' => 'int', + 'initializedOn' => '\DateTime', + 'language' => 'string', + 'linkedSpaceId' => 'int', + 'plannedPurgeDate' => '\DateTime', + 'plannedTerminationDate' => '\DateTime', + 'reference' => 'string', + 'state' => '\Wallee\Sdk\Model\SubscriptionState', + 'subscriber' => '\Wallee\Sdk\Model\Subscriber', + 'terminatedOn' => '\DateTime', + 'terminatingOn' => '\DateTime', + 'token' => '\Wallee\Sdk\Model\Token', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionAffiliate + */ + private $affiliate; + + /** + * + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var string + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var \DateTime + */ + private $initializedOn; + + /** + * + * + * @var string + */ + private $language; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \DateTime + */ + private $plannedTerminationDate; + + /** + * + * + * @var string + */ + private $reference; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionState + */ + private $state; + + /** + * + * + * @var \Wallee\Sdk\Model\Subscriber + */ + private $subscriber; + + /** + * + * + * @var \DateTime + */ + private $terminatedOn; + + /** + * + * + * @var \DateTime + */ + private $terminatingOn; + + /** + * + * + * @var \Wallee\Sdk\Model\Token + */ + private $token; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['affiliate'])) { + $this->setAffiliate($data['affiliate']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['subscriber'])) { + $this->setSubscriber($data['subscriber']); + } + if (isset($data['token'])) { + $this->setToken($data['token']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns affiliate. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionAffiliate + */ + public function getAffiliate() { + return $this->affiliate; + } + + /** + * Sets affiliate. + * + * @param \Wallee\Sdk\Model\SubscriptionAffiliate $affiliate + * @return Subscription + */ + public function setAffiliate($affiliate) { + $this->affiliate = $affiliate; + + return $this; + } + + /** + * Returns createdOn. + * + * + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return Subscription + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns description. + * + * + * + * @return string + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param string $description + * @return Subscription + */ + protected function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return Subscription + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns initializedOn. + * + * + * + * @return \DateTime + */ + public function getInitializedOn() { + return $this->initializedOn; + } + + /** + * Sets initializedOn. + * + * @param \DateTime $initializedOn + * @return Subscription + */ + protected function setInitializedOn($initializedOn) { + $this->initializedOn = $initializedOn; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return Subscription + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return Subscription + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return Subscription + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns plannedTerminationDate. + * + * + * + * @return \DateTime + */ + public function getPlannedTerminationDate() { + return $this->plannedTerminationDate; + } + + /** + * Sets plannedTerminationDate. + * + * @param \DateTime $plannedTerminationDate + * @return Subscription + */ + protected function setPlannedTerminationDate($plannedTerminationDate) { + $this->plannedTerminationDate = $plannedTerminationDate; + + return $this; + } + + /** + * Returns reference. + * + * + * + * @return string + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param string $reference + * @return Subscription + */ + protected function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\SubscriptionState $state + * @return Subscription + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns subscriber. + * + * + * + * @return \Wallee\Sdk\Model\Subscriber + */ + public function getSubscriber() { + return $this->subscriber; + } + + /** + * Sets subscriber. + * + * @param \Wallee\Sdk\Model\Subscriber $subscriber + * @return Subscription + */ + public function setSubscriber($subscriber) { + $this->subscriber = $subscriber; + + return $this; + } + + /** + * Returns terminatedOn. + * + * + * + * @return \DateTime + */ + public function getTerminatedOn() { + return $this->terminatedOn; + } + + /** + * Sets terminatedOn. + * + * @param \DateTime $terminatedOn + * @return Subscription + */ + protected function setTerminatedOn($terminatedOn) { + $this->terminatedOn = $terminatedOn; + + return $this; + } + + /** + * Returns terminatingOn. + * + * + * + * @return \DateTime + */ + public function getTerminatingOn() { + return $this->terminatingOn; + } + + /** + * Sets terminatingOn. + * + * @param \DateTime $terminatingOn + * @return Subscription + */ + protected function setTerminatingOn($terminatingOn) { + $this->terminatingOn = $terminatingOn; + + return $this; + } + + /** + * Returns token. + * + * + * + * @return \Wallee\Sdk\Model\Token + */ + public function getToken() { + return $this->token; + } + + /** + * Sets token. + * + * @param \Wallee\Sdk\Model\Token $token + * @return Subscription + */ + public function setToken($token) { + $this->token = $token; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return Subscription + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliate.php new file mode 100644 index 0000000..b4eea8a --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliate.php @@ -0,0 +1,431 @@ + 'string', + 'id' => 'int', + 'language' => 'string', + 'linkedSpaceId' => 'int', + 'metaData' => 'map[string,string]', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'reference' => 'string', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var string + */ + private $language; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * Meta data allow to store additional data along the object. + * + * @var map[string,string] + */ + private $metaData; + + /** + * + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var string + */ + private $reference; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['metaData'])) { + $this->setMetaData($data['metaData']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return SubscriptionAffiliate + */ + protected function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionAffiliate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return SubscriptionAffiliate + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionAffiliate + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns metaData. + * + * Meta data allow to store additional data along the object. + * + * @return map[string,string] + */ + public function getMetaData() { + return $this->metaData; + } + + /** + * Sets metaData. + * + * @param map[string,string] $metaData + * @return SubscriptionAffiliate + */ + public function setMetaData($metaData) { + $this->metaData = $metaData; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return SubscriptionAffiliate + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return SubscriptionAffiliate + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns reference. + * + * + * + * @return string + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param string $reference + * @return SubscriptionAffiliate + */ + protected function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return SubscriptionAffiliate + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionAffiliate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateCreate.php new file mode 100644 index 0000000..a3e0089 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateCreate.php @@ -0,0 +1,208 @@ + 'string', + 'reference' => 'string', + ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * + * + * @var string + */ + private $reference; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['externalId'])) { + $this->setExternalId($data['externalId']); + } + if (isset($data['reference'])) { + $this->setReference($data['reference']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + } + + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return SubscriptionAffiliateCreate + */ + public function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns reference. + * + * + * + * @return string + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param string $reference + * @return SubscriptionAffiliateCreate + */ + public function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return parent::getState(); + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return SubscriptionAffiliateCreate + */ + public function setState($state) { + return parent::setState($state); + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getExternalId() === null) { + throw new ValidationException("'externalId' can't be null", 'externalId', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateDeleted.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateDeleted.php new file mode 100644 index 0000000..41fc87c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateDeleted.php @@ -0,0 +1,113 @@ +validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateDeleting.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateDeleting.php new file mode 100644 index 0000000..185e933 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateDeleting.php @@ -0,0 +1,113 @@ +validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateInactive.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateInactive.php new file mode 100644 index 0000000..08eafb8 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateInactive.php @@ -0,0 +1,113 @@ +validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateUpdate.php new file mode 100644 index 0000000..09f37b4 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionAffiliateUpdate.php @@ -0,0 +1,319 @@ + 'int', + 'version' => 'int', + 'language' => 'string', + 'metaData' => 'map[string,string]', + 'name' => 'string', + 'state' => '\Wallee\Sdk\Model\CreationEntityState' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + /** + * + * + * @var string + */ + private $language; + + /** + * Meta data allow to store additional data along the object. + * + * @var map[string,string] + */ + private $metaData; + + /** + * + * + * @var string + */ + private $name; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + if (isset($data['language'])) { + $this->setLanguage($data['language']); + } + if (isset($data['metaData'])) { + $this->setMetaData($data['metaData']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionAffiliateUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionAffiliateUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return SubscriptionAffiliateUpdate + */ + public function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns metaData. + * + * Meta data allow to store additional data along the object. + * + * @return map[string,string] + */ + public function getMetaData() { + return $this->metaData; + } + + /** + * Sets metaData. + * + * @param map[string,string] $metaData + * @return SubscriptionAffiliateUpdate + */ + public function setMetaData($metaData) { + $this->metaData = $metaData; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return SubscriptionAffiliateUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return SubscriptionAffiliateUpdate + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionChangeRequest.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionChangeRequest.php new file mode 100644 index 0000000..b91c455 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionChangeRequest.php @@ -0,0 +1,285 @@ + 'string', + 'product' => 'int', + 'respectTerminationPeriod' => 'bool', + 'selectedComponents' => '\Wallee\Sdk\Model\SubscriptionProductComponentReference[]', + 'subscription' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $currency; + + /** + * The subscription has to be linked with a product. + * + * @var int + */ + private $product; + + /** + * The subscription version may be retired. The respect termination period controls whether the termination period configured on the product version should be respected or if the operation should take effect immediately. + * + * @var bool + */ + private $respectTerminationPeriod; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductComponentReference[] + */ + private $selectedComponents; + + /** + * + * + * @var int + */ + private $subscription; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['currency'])) { + $this->setCurrency($data['currency']); + } + if (isset($data['product'])) { + $this->setProduct($data['product']); + } + if (isset($data['respectTerminationPeriod'])) { + $this->setRespectTerminationPeriod($data['respectTerminationPeriod']); + } + if (isset($data['selectedComponents'])) { + $this->setSelectedComponents($data['selectedComponents']); + } + if (isset($data['subscription'])) { + $this->setSubscription($data['subscription']); + } + } + + + /** + * Returns currency. + * + * + * + * @return string + */ + public function getCurrency() { + return $this->currency; + } + + /** + * Sets currency. + * + * @param string $currency + * @return SubscriptionChangeRequest + */ + public function setCurrency($currency) { + $this->currency = $currency; + + return $this; + } + + /** + * Returns product. + * + * The subscription has to be linked with a product. + * + * @return int + */ + public function getProduct() { + return $this->product; + } + + /** + * Sets product. + * + * @param int $product + * @return SubscriptionChangeRequest + */ + public function setProduct($product) { + $this->product = $product; + + return $this; + } + + /** + * Returns respectTerminationPeriod. + * + * The subscription version may be retired. The respect termination period controls whether the termination period configured on the product version should be respected or if the operation should take effect immediately. + * + * @return bool + */ + public function getRespectTerminationPeriod() { + return $this->respectTerminationPeriod; + } + + /** + * Sets respectTerminationPeriod. + * + * @param bool $respectTerminationPeriod + * @return SubscriptionChangeRequest + */ + public function setRespectTerminationPeriod($respectTerminationPeriod) { + $this->respectTerminationPeriod = $respectTerminationPeriod; + + return $this; + } + + /** + * Returns selectedComponents. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductComponentReference[] + */ + public function getSelectedComponents() { + return $this->selectedComponents; + } + + /** + * Sets selectedComponents. + * + * @param \Wallee\Sdk\Model\SubscriptionProductComponentReference[] $selectedComponents + * @return SubscriptionChangeRequest + */ + public function setSelectedComponents($selectedComponents) { + $this->selectedComponents = $selectedComponents; + + return $this; + } + + /** + * Returns subscription. + * + * + * + * @return int + */ + public function getSubscription() { + return $this->subscription; + } + + /** + * Sets subscription. + * + * @param int $subscription + * @return SubscriptionChangeRequest + */ + public function setSubscription($subscription) { + $this->subscription = $subscription; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getCurrency() === null) { + throw new ValidationException("'currency' can't be null", 'currency', $this); + } + if ($this->getProduct() === null) { + throw new ValidationException("'product' can't be null", 'product', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionCharge.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionCharge.php new file mode 100644 index 0000000..a97c9a4 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionCharge.php @@ -0,0 +1,753 @@ + '\DateTime', + 'discardedBy' => 'int', + 'discardedOn' => '\DateTime', + 'externalId' => 'string', + 'failedOn' => '\DateTime', + 'failedUrl' => 'string', + 'id' => 'int', + 'ledgerEntries' => '\Wallee\Sdk\Model\SubscriptionLedgerEntry[]', + 'linkedSpaceId' => 'int', + 'plannedExecutionDate' => '\DateTime', + 'plannedPurgeDate' => '\DateTime', + 'processingType' => '\Wallee\Sdk\Model\SubscriptionChargeProcessingType', + 'reference' => 'string', + 'state' => '\Wallee\Sdk\Model\SubscriptionChargeState', + 'subscription' => '\Wallee\Sdk\Model\Subscription', + 'succeedOn' => '\DateTime', + 'successUrl' => 'string', + 'transaction' => '\Wallee\Sdk\Model\Transaction', + 'type' => '\Wallee\Sdk\Model\SubscriptionChargeType', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var int + */ + private $discardedBy; + + /** + * + * + * @var \DateTime + */ + private $discardedOn; + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * + * + * @var \DateTime + */ + private $failedOn; + + /** + * The user will be redirected to failed URL when the transaction could not be authorized or completed. In case no failed URL is specified a default failed page will be displayed. + * + * @var string + */ + private $failedUrl; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionLedgerEntry[] + */ + private $ledgerEntries; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var \DateTime + */ + private $plannedExecutionDate; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionChargeProcessingType + */ + private $processingType; + + /** + * + * + * @var string + */ + private $reference; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionChargeState + */ + private $state; + + /** + * The field subscription indicates the subscription to which the charge belongs to. + * + * @var \Wallee\Sdk\Model\Subscription + */ + private $subscription; + + /** + * + * + * @var \DateTime + */ + private $succeedOn; + + /** + * The user will be redirected to success URL when the transaction could be authorized or completed. In case no success URL is specified a default success page will be displayed. + * + * @var string + */ + private $successUrl; + + /** + * + * + * @var \Wallee\Sdk\Model\Transaction + */ + private $transaction; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionChargeType + */ + private $type; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['ledgerEntries'])) { + $this->setLedgerEntries($data['ledgerEntries']); + } + if (isset($data['processingType'])) { + $this->setProcessingType($data['processingType']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['subscription'])) { + $this->setSubscription($data['subscription']); + } + if (isset($data['transaction'])) { + $this->setTransaction($data['transaction']); + } + if (isset($data['type'])) { + $this->setType($data['type']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns createdOn. + * + * + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return SubscriptionCharge + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns discardedBy. + * + * + * + * @return int + */ + public function getDiscardedBy() { + return $this->discardedBy; + } + + /** + * Sets discardedBy. + * + * @param int $discardedBy + * @return SubscriptionCharge + */ + protected function setDiscardedBy($discardedBy) { + $this->discardedBy = $discardedBy; + + return $this; + } + + /** + * Returns discardedOn. + * + * + * + * @return \DateTime + */ + public function getDiscardedOn() { + return $this->discardedOn; + } + + /** + * Sets discardedOn. + * + * @param \DateTime $discardedOn + * @return SubscriptionCharge + */ + protected function setDiscardedOn($discardedOn) { + $this->discardedOn = $discardedOn; + + return $this; + } + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return SubscriptionCharge + */ + protected function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns failedOn. + * + * + * + * @return \DateTime + */ + public function getFailedOn() { + return $this->failedOn; + } + + /** + * Sets failedOn. + * + * @param \DateTime $failedOn + * @return SubscriptionCharge + */ + protected function setFailedOn($failedOn) { + $this->failedOn = $failedOn; + + return $this; + } + + /** + * Returns failedUrl. + * + * The user will be redirected to failed URL when the transaction could not be authorized or completed. In case no failed URL is specified a default failed page will be displayed. + * + * @return string + */ + public function getFailedUrl() { + return $this->failedUrl; + } + + /** + * Sets failedUrl. + * + * @param string $failedUrl + * @return SubscriptionCharge + */ + protected function setFailedUrl($failedUrl) { + $this->failedUrl = $failedUrl; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionCharge + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns ledgerEntries. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionLedgerEntry[] + */ + public function getLedgerEntries() { + return $this->ledgerEntries; + } + + /** + * Sets ledgerEntries. + * + * @param \Wallee\Sdk\Model\SubscriptionLedgerEntry[] $ledgerEntries + * @return SubscriptionCharge + */ + public function setLedgerEntries($ledgerEntries) { + $this->ledgerEntries = $ledgerEntries; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionCharge + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns plannedExecutionDate. + * + * + * + * @return \DateTime + */ + public function getPlannedExecutionDate() { + return $this->plannedExecutionDate; + } + + /** + * Sets plannedExecutionDate. + * + * @param \DateTime $plannedExecutionDate + * @return SubscriptionCharge + */ + protected function setPlannedExecutionDate($plannedExecutionDate) { + $this->plannedExecutionDate = $plannedExecutionDate; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return SubscriptionCharge + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns processingType. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionChargeProcessingType + */ + public function getProcessingType() { + return $this->processingType; + } + + /** + * Sets processingType. + * + * @param \Wallee\Sdk\Model\SubscriptionChargeProcessingType $processingType + * @return SubscriptionCharge + */ + public function setProcessingType($processingType) { + $this->processingType = $processingType; + + return $this; + } + + /** + * Returns reference. + * + * + * + * @return string + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param string $reference + * @return SubscriptionCharge + */ + protected function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionChargeState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\SubscriptionChargeState $state + * @return SubscriptionCharge + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns subscription. + * + * The field subscription indicates the subscription to which the charge belongs to. + * + * @return \Wallee\Sdk\Model\Subscription + */ + public function getSubscription() { + return $this->subscription; + } + + /** + * Sets subscription. + * + * @param \Wallee\Sdk\Model\Subscription $subscription + * @return SubscriptionCharge + */ + public function setSubscription($subscription) { + $this->subscription = $subscription; + + return $this; + } + + /** + * Returns succeedOn. + * + * + * + * @return \DateTime + */ + public function getSucceedOn() { + return $this->succeedOn; + } + + /** + * Sets succeedOn. + * + * @param \DateTime $succeedOn + * @return SubscriptionCharge + */ + protected function setSucceedOn($succeedOn) { + $this->succeedOn = $succeedOn; + + return $this; + } + + /** + * Returns successUrl. + * + * The user will be redirected to success URL when the transaction could be authorized or completed. In case no success URL is specified a default success page will be displayed. + * + * @return string + */ + public function getSuccessUrl() { + return $this->successUrl; + } + + /** + * Sets successUrl. + * + * @param string $successUrl + * @return SubscriptionCharge + */ + protected function setSuccessUrl($successUrl) { + $this->successUrl = $successUrl; + + return $this; + } + + /** + * Returns transaction. + * + * + * + * @return \Wallee\Sdk\Model\Transaction + */ + public function getTransaction() { + return $this->transaction; + } + + /** + * Sets transaction. + * + * @param \Wallee\Sdk\Model\Transaction $transaction + * @return SubscriptionCharge + */ + public function setTransaction($transaction) { + $this->transaction = $transaction; + + return $this; + } + + /** + * Returns type. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionChargeType + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param \Wallee\Sdk\Model\SubscriptionChargeType $type + * @return SubscriptionCharge + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionCharge + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionChargeCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionChargeCreate.php new file mode 100644 index 0000000..81738ac --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionChargeCreate.php @@ -0,0 +1,356 @@ + 'string', + 'failedUrl' => 'string', + 'plannedExecutionDate' => '\DateTime', + 'processingType' => '\Wallee\Sdk\Model\SubscriptionChargeProcessingType', + 'reference' => 'string', + 'subscription' => 'int', + 'successUrl' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * The user will be redirected to failed URL when the transaction could not be authorized or completed. In case no failed URL is specified a default failed page will be displayed. + * + * @var string + */ + private $failedUrl; + + /** + * + * + * @var \DateTime + */ + private $plannedExecutionDate; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionChargeProcessingType + */ + private $processingType; + + /** + * + * + * @var string + */ + private $reference; + + /** + * The field subscription indicates the subscription to which the charge belongs to. + * + * @var int + */ + private $subscription; + + /** + * The user will be redirected to success URL when the transaction could be authorized or completed. In case no success URL is specified a default success page will be displayed. + * + * @var string + */ + private $successUrl; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['externalId'])) { + $this->setExternalId($data['externalId']); + } + if (isset($data['failedUrl'])) { + $this->setFailedUrl($data['failedUrl']); + } + if (isset($data['plannedExecutionDate'])) { + $this->setPlannedExecutionDate($data['plannedExecutionDate']); + } + if (isset($data['processingType'])) { + $this->setProcessingType($data['processingType']); + } + if (isset($data['reference'])) { + $this->setReference($data['reference']); + } + if (isset($data['subscription'])) { + $this->setSubscription($data['subscription']); + } + if (isset($data['successUrl'])) { + $this->setSuccessUrl($data['successUrl']); + } + } + + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return SubscriptionChargeCreate + */ + public function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns failedUrl. + * + * The user will be redirected to failed URL when the transaction could not be authorized or completed. In case no failed URL is specified a default failed page will be displayed. + * + * @return string + */ + public function getFailedUrl() { + return $this->failedUrl; + } + + /** + * Sets failedUrl. + * + * @param string $failedUrl + * @return SubscriptionChargeCreate + */ + public function setFailedUrl($failedUrl) { + $this->failedUrl = $failedUrl; + + return $this; + } + + /** + * Returns plannedExecutionDate. + * + * + * + * @return \DateTime + */ + public function getPlannedExecutionDate() { + return $this->plannedExecutionDate; + } + + /** + * Sets plannedExecutionDate. + * + * @param \DateTime $plannedExecutionDate + * @return SubscriptionChargeCreate + */ + public function setPlannedExecutionDate($plannedExecutionDate) { + $this->plannedExecutionDate = $plannedExecutionDate; + + return $this; + } + + /** + * Returns processingType. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionChargeProcessingType + */ + public function getProcessingType() { + return $this->processingType; + } + + /** + * Sets processingType. + * + * @param \Wallee\Sdk\Model\SubscriptionChargeProcessingType $processingType + * @return SubscriptionChargeCreate + */ + public function setProcessingType($processingType) { + $this->processingType = $processingType; + + return $this; + } + + /** + * Returns reference. + * + * + * + * @return string + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param string $reference + * @return SubscriptionChargeCreate + */ + public function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Returns subscription. + * + * The field subscription indicates the subscription to which the charge belongs to. + * + * @return int + */ + public function getSubscription() { + return $this->subscription; + } + + /** + * Sets subscription. + * + * @param int $subscription + * @return SubscriptionChargeCreate + */ + public function setSubscription($subscription) { + $this->subscription = $subscription; + + return $this; + } + + /** + * Returns successUrl. + * + * The user will be redirected to success URL when the transaction could be authorized or completed. In case no success URL is specified a default success page will be displayed. + * + * @return string + */ + public function getSuccessUrl() { + return $this->successUrl; + } + + /** + * Sets successUrl. + * + * @param string $successUrl + * @return SubscriptionChargeCreate + */ + public function setSuccessUrl($successUrl) { + $this->successUrl = $successUrl; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getExternalId() === null) { + throw new ValidationException("'externalId' can't be null", 'externalId', $this); + } + if ($this->getProcessingType() === null) { + throw new ValidationException("'processingType' can't be null", 'processingType', $this); + } + if ($this->getSubscription() === null) { + throw new ValidationException("'subscription' can't be null", 'subscription', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionChargeProcessingType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionChargeProcessingType.php new file mode 100644 index 0000000..d05193a --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionChargeProcessingType.php @@ -0,0 +1,43 @@ + 'string', + 'product' => 'int', + 'selectedComponents' => '\Wallee\Sdk\Model\SubscriptionProductComponentReference[]', + 'subscription' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $currency; + + /** + * The subscription has to be linked with a product. + * + * @var int + */ + private $product; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductComponentReference[] + */ + private $selectedComponents; + + /** + * + * + * @var int + */ + private $subscription; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['currency'])) { + $this->setCurrency($data['currency']); + } + if (isset($data['product'])) { + $this->setProduct($data['product']); + } + if (isset($data['selectedComponents'])) { + $this->setSelectedComponents($data['selectedComponents']); + } + if (isset($data['subscription'])) { + $this->setSubscription($data['subscription']); + } + } + + + /** + * Returns currency. + * + * + * + * @return string + */ + public function getCurrency() { + return $this->currency; + } + + /** + * Sets currency. + * + * @param string $currency + * @return SubscriptionCreateRequest + */ + public function setCurrency($currency) { + $this->currency = $currency; + + return $this; + } + + /** + * Returns product. + * + * The subscription has to be linked with a product. + * + * @return int + */ + public function getProduct() { + return $this->product; + } + + /** + * Sets product. + * + * @param int $product + * @return SubscriptionCreateRequest + */ + public function setProduct($product) { + $this->product = $product; + + return $this; + } + + /** + * Returns selectedComponents. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductComponentReference[] + */ + public function getSelectedComponents() { + return $this->selectedComponents; + } + + /** + * Sets selectedComponents. + * + * @param \Wallee\Sdk\Model\SubscriptionProductComponentReference[] $selectedComponents + * @return SubscriptionCreateRequest + */ + public function setSelectedComponents($selectedComponents) { + $this->selectedComponents = $selectedComponents; + + return $this; + } + + /** + * Returns subscription. + * + * + * + * @return int + */ + public function getSubscription() { + return $this->subscription; + } + + /** + * Sets subscription. + * + * @param int $subscription + * @return SubscriptionCreateRequest + */ + public function setSubscription($subscription) { + $this->subscription = $subscription; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getCurrency() === null) { + throw new ValidationException("'currency' can't be null", 'currency', $this); + } + if ($this->getProduct() === null) { + throw new ValidationException("'product' can't be null", 'product', $this); + } + if ($this->getSubscription() === null) { + throw new ValidationException("'subscription' can't be null", 'subscription', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionLedgerEntry.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionLedgerEntry.php new file mode 100644 index 0000000..e1c3fec --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionLedgerEntry.php @@ -0,0 +1,617 @@ + 'float', + 'amountExcludingTax' => 'float', + 'amountIncludingTax' => 'float', + 'createdBy' => 'int', + 'createdOn' => '\DateTime', + 'externalId' => 'string', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'plannedPurgeDate' => '\DateTime', + 'quantity' => 'float', + 'state' => '\Wallee\Sdk\Model\SubscriptionLedgerEntryState', + 'subscriptionVersion' => 'int', + 'taxAmount' => 'float', + 'taxes' => '\Wallee\Sdk\Model\Tax[]', + 'title' => 'string', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var float + */ + private $aggregatedTaxRate; + + /** + * + * + * @var float + */ + private $amountExcludingTax; + + /** + * + * + * @var float + */ + private $amountIncludingTax; + + /** + * + * + * @var int + */ + private $createdBy; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var float + */ + private $quantity; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionLedgerEntryState + */ + private $state; + + /** + * + * + * @var int + */ + private $subscriptionVersion; + + /** + * + * + * @var float + */ + private $taxAmount; + + /** + * + * + * @var \Wallee\Sdk\Model\Tax[] + */ + private $taxes; + + /** + * + * + * @var string + */ + private $title; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['taxes'])) { + $this->setTaxes($data['taxes']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns aggregatedTaxRate. + * + * + * + * @return float + */ + public function getAggregatedTaxRate() { + return $this->aggregatedTaxRate; + } + + /** + * Sets aggregatedTaxRate. + * + * @param float $aggregatedTaxRate + * @return SubscriptionLedgerEntry + */ + protected function setAggregatedTaxRate($aggregatedTaxRate) { + $this->aggregatedTaxRate = $aggregatedTaxRate; + + return $this; + } + + /** + * Returns amountExcludingTax. + * + * + * + * @return float + */ + public function getAmountExcludingTax() { + return $this->amountExcludingTax; + } + + /** + * Sets amountExcludingTax. + * + * @param float $amountExcludingTax + * @return SubscriptionLedgerEntry + */ + protected function setAmountExcludingTax($amountExcludingTax) { + $this->amountExcludingTax = $amountExcludingTax; + + return $this; + } + + /** + * Returns amountIncludingTax. + * + * + * + * @return float + */ + public function getAmountIncludingTax() { + return $this->amountIncludingTax; + } + + /** + * Sets amountIncludingTax. + * + * @param float $amountIncludingTax + * @return SubscriptionLedgerEntry + */ + protected function setAmountIncludingTax($amountIncludingTax) { + $this->amountIncludingTax = $amountIncludingTax; + + return $this; + } + + /** + * Returns createdBy. + * + * + * + * @return int + */ + public function getCreatedBy() { + return $this->createdBy; + } + + /** + * Sets createdBy. + * + * @param int $createdBy + * @return SubscriptionLedgerEntry + */ + protected function setCreatedBy($createdBy) { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return SubscriptionLedgerEntry + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return SubscriptionLedgerEntry + */ + protected function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionLedgerEntry + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionLedgerEntry + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return SubscriptionLedgerEntry + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns quantity. + * + * + * + * @return float + */ + public function getQuantity() { + return $this->quantity; + } + + /** + * Sets quantity. + * + * @param float $quantity + * @return SubscriptionLedgerEntry + */ + protected function setQuantity($quantity) { + $this->quantity = $quantity; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionLedgerEntryState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\SubscriptionLedgerEntryState $state + * @return SubscriptionLedgerEntry + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns subscriptionVersion. + * + * + * + * @return int + */ + public function getSubscriptionVersion() { + return $this->subscriptionVersion; + } + + /** + * Sets subscriptionVersion. + * + * @param int $subscriptionVersion + * @return SubscriptionLedgerEntry + */ + protected function setSubscriptionVersion($subscriptionVersion) { + $this->subscriptionVersion = $subscriptionVersion; + + return $this; + } + + /** + * Returns taxAmount. + * + * + * + * @return float + */ + public function getTaxAmount() { + return $this->taxAmount; + } + + /** + * Sets taxAmount. + * + * @param float $taxAmount + * @return SubscriptionLedgerEntry + */ + protected function setTaxAmount($taxAmount) { + $this->taxAmount = $taxAmount; + + return $this; + } + + /** + * Returns taxes. + * + * + * + * @return \Wallee\Sdk\Model\Tax[] + */ + public function getTaxes() { + return $this->taxes; + } + + /** + * Sets taxes. + * + * @param \Wallee\Sdk\Model\Tax[] $taxes + * @return SubscriptionLedgerEntry + */ + public function setTaxes($taxes) { + $this->taxes = $taxes; + + return $this; + } + + /** + * Returns title. + * + * + * + * @return string + */ + public function getTitle() { + return $this->title; + } + + /** + * Sets title. + * + * @param string $title + * @return SubscriptionLedgerEntry + */ + protected function setTitle($title) { + $this->title = $title; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionLedgerEntry + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionLedgerEntryCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionLedgerEntryCreate.php new file mode 100644 index 0000000..883d923 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionLedgerEntryCreate.php @@ -0,0 +1,328 @@ + 'float', + 'externalId' => 'string', + 'quantity' => 'float', + 'subscriptionVersion' => 'int', + 'taxes' => '\Wallee\Sdk\Model\TaxCreate[]', + 'title' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var float + */ + private $amountIncludingTax; + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * + * + * @var float + */ + private $quantity; + + /** + * + * + * @var int + */ + private $subscriptionVersion; + + /** + * + * + * @var \Wallee\Sdk\Model\TaxCreate[] + */ + private $taxes; + + /** + * + * + * @var string + */ + private $title; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['amountIncludingTax'])) { + $this->setAmountIncludingTax($data['amountIncludingTax']); + } + if (isset($data['externalId'])) { + $this->setExternalId($data['externalId']); + } + if (isset($data['quantity'])) { + $this->setQuantity($data['quantity']); + } + if (isset($data['subscriptionVersion'])) { + $this->setSubscriptionVersion($data['subscriptionVersion']); + } + if (isset($data['taxes'])) { + $this->setTaxes($data['taxes']); + } + if (isset($data['title'])) { + $this->setTitle($data['title']); + } + } + + + /** + * Returns amountIncludingTax. + * + * + * + * @return float + */ + public function getAmountIncludingTax() { + return $this->amountIncludingTax; + } + + /** + * Sets amountIncludingTax. + * + * @param float $amountIncludingTax + * @return SubscriptionLedgerEntryCreate + */ + public function setAmountIncludingTax($amountIncludingTax) { + $this->amountIncludingTax = $amountIncludingTax; + + return $this; + } + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return SubscriptionLedgerEntryCreate + */ + public function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns quantity. + * + * + * + * @return float + */ + public function getQuantity() { + return $this->quantity; + } + + /** + * Sets quantity. + * + * @param float $quantity + * @return SubscriptionLedgerEntryCreate + */ + public function setQuantity($quantity) { + $this->quantity = $quantity; + + return $this; + } + + /** + * Returns subscriptionVersion. + * + * + * + * @return int + */ + public function getSubscriptionVersion() { + return $this->subscriptionVersion; + } + + /** + * Sets subscriptionVersion. + * + * @param int $subscriptionVersion + * @return SubscriptionLedgerEntryCreate + */ + public function setSubscriptionVersion($subscriptionVersion) { + $this->subscriptionVersion = $subscriptionVersion; + + return $this; + } + + /** + * Returns taxes. + * + * + * + * @return \Wallee\Sdk\Model\TaxCreate[] + */ + public function getTaxes() { + return $this->taxes; + } + + /** + * Sets taxes. + * + * @param \Wallee\Sdk\Model\TaxCreate[] $taxes + * @return SubscriptionLedgerEntryCreate + */ + public function setTaxes($taxes) { + $this->taxes = $taxes; + + return $this; + } + + /** + * Returns title. + * + * + * + * @return string + */ + public function getTitle() { + return $this->title; + } + + /** + * Sets title. + * + * @param string $title + * @return SubscriptionLedgerEntryCreate + */ + public function setTitle($title) { + $this->title = $title; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getAmountIncludingTax() === null) { + throw new ValidationException("'amountIncludingTax' can't be null", 'amountIncludingTax', $this); + } + if ($this->getExternalId() === null) { + throw new ValidationException("'externalId' can't be null", 'externalId', $this); + } + if ($this->getQuantity() === null) { + throw new ValidationException("'quantity' can't be null", 'quantity', $this); + } + if ($this->getSubscriptionVersion() === null) { + throw new ValidationException("'subscriptionVersion' can't be null", 'subscriptionVersion', $this); + } + if ($this->getTitle() === null) { + throw new ValidationException("'title' can't be null", 'title', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionLedgerEntryState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionLedgerEntryState.php new file mode 100644 index 0000000..7d58040 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionLedgerEntryState.php @@ -0,0 +1,44 @@ + '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'type' => '\Wallee\Sdk\Model\SubscriptionMetricType', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionMetricType + */ + private $type; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['type'])) { + $this->setType($data['type']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns description. + * + * + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $description + * @return SubscriptionMetric + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionMetric + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionMetric + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $name + * @return SubscriptionMetric + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return SubscriptionMetric + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return SubscriptionMetric + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns type. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionMetricType + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param \Wallee\Sdk\Model\SubscriptionMetricType $type + * @return SubscriptionMetric + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionMetric + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricActive.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricActive.php new file mode 100644 index 0000000..ee95c0c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricActive.php @@ -0,0 +1,113 @@ +validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricCreate.php new file mode 100644 index 0000000..4dedc65 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricCreate.php @@ -0,0 +1,200 @@ + 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var int + */ + private $type; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['type'])) { + $this->setType($data['type']); + } + } + + + /** + * Returns description. + * + * + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getDescription() { + return parent::getDescription(); + } + + /** + * Sets description. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $description + * @return SubscriptionMetricCreate + */ + public function setDescription($description) { + return parent::setDescription($description); + } + + /** + * Returns name. + * + * + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getName() { + return parent::getName(); + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $name + * @return SubscriptionMetricCreate + */ + public function setName($name) { + return parent::setName($name); + } + + /** + * Returns type. + * + * + * + * @return int + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param int $type + * @return SubscriptionMetricCreate + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getName() === null) { + throw new ValidationException("'name' can't be null", 'name', $this); + } + if ($this->getType() === null) { + throw new ValidationException("'type' can't be null", 'type', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricType.php new file mode 100644 index 0000000..db93a54 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricType.php @@ -0,0 +1,242 @@ + 'map[string,string]', + 'feature' => '\Wallee\Sdk\Model\Feature', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var \Wallee\Sdk\Model\Feature + */ + private $feature; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['feature'])) { + $this->setFeature($data['feature']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return SubscriptionMetricType + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns feature. + * + * + * + * @return \Wallee\Sdk\Model\Feature + */ + public function getFeature() { + return $this->feature; + } + + /** + * Sets feature. + * + * @param \Wallee\Sdk\Model\Feature $feature + * @return SubscriptionMetricType + */ + public function setFeature($feature) { + $this->feature = $feature; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionMetricType + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return SubscriptionMetricType + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricUpdate.php new file mode 100644 index 0000000..4c2ee4f --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricUpdate.php @@ -0,0 +1,251 @@ + 'int', + 'version' => 'int', + 'description' => '\Wallee\Sdk\Model\DatabaseTranslatedStringCreate', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedStringCreate' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + /** + * + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + private $description; + + /** + * + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionMetricUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionMetricUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Returns description. + * + * + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $description + * @return SubscriptionMetricUpdate + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $name + * @return SubscriptionMetricUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricUsageReport.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricUsageReport.php new file mode 100644 index 0000000..108c262 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricUsageReport.php @@ -0,0 +1,456 @@ + 'float', + 'createdByUserId' => 'int', + 'createdOn' => '\DateTime', + 'description' => 'string', + 'externalId' => 'string', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'metric' => 'int', + 'plannedPurgeDate' => '\DateTime', + 'subscription' => 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The consumed units describe the amount of resources consumed. Those consumed units will be billed in the next billing cycle. + * + * @var float + */ + private $consumedUnits; + + /** + * + * + * @var int + */ + private $createdByUserId; + + /** + * + * + * @var \DateTime + */ + private $createdOn; + + /** + * The metric usage report description describe the reported usage. This description may be shown to the end user. + * + * @var string + */ + private $description; + + /** + * The external id identifies the metric usage uniquely. + * + * @var string + */ + private $externalId; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The metric usage report is linked to the metric for which the usage should be recorded. + * + * @var int + */ + private $metric; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The subscription to which the usage is added to. + * + * @var int + */ + private $subscription; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns consumedUnits. + * + * The consumed units describe the amount of resources consumed. Those consumed units will be billed in the next billing cycle. + * + * @return float + */ + public function getConsumedUnits() { + return $this->consumedUnits; + } + + /** + * Sets consumedUnits. + * + * @param float $consumedUnits + * @return SubscriptionMetricUsageReport + */ + protected function setConsumedUnits($consumedUnits) { + $this->consumedUnits = $consumedUnits; + + return $this; + } + + /** + * Returns createdByUserId. + * + * + * + * @return int + */ + public function getCreatedByUserId() { + return $this->createdByUserId; + } + + /** + * Sets createdByUserId. + * + * @param int $createdByUserId + * @return SubscriptionMetricUsageReport + */ + protected function setCreatedByUserId($createdByUserId) { + $this->createdByUserId = $createdByUserId; + + return $this; + } + + /** + * Returns createdOn. + * + * + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return SubscriptionMetricUsageReport + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns description. + * + * The metric usage report description describe the reported usage. This description may be shown to the end user. + * + * @return string + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param string $description + * @return SubscriptionMetricUsageReport + */ + protected function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns externalId. + * + * The external id identifies the metric usage uniquely. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return SubscriptionMetricUsageReport + */ + protected function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionMetricUsageReport + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionMetricUsageReport + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns metric. + * + * The metric usage report is linked to the metric for which the usage should be recorded. + * + * @return int + */ + public function getMetric() { + return $this->metric; + } + + /** + * Sets metric. + * + * @param int $metric + * @return SubscriptionMetricUsageReport + */ + protected function setMetric($metric) { + $this->metric = $metric; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return SubscriptionMetricUsageReport + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns subscription. + * + * The subscription to which the usage is added to. + * + * @return int + */ + public function getSubscription() { + return $this->subscription; + } + + /** + * Sets subscription. + * + * @param int $subscription + * @return SubscriptionMetricUsageReport + */ + protected function setSubscription($subscription) { + $this->subscription = $subscription; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionMetricUsageReport + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricUsageReportCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricUsageReportCreate.php new file mode 100644 index 0000000..d07e2a5 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionMetricUsageReportCreate.php @@ -0,0 +1,291 @@ + 'float', + 'description' => 'string', + 'externalId' => 'string', + 'metric' => 'int', + 'subscription' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The consumed units describe the amount of resources consumed. Those consumed units will be billed in the next billing cycle. + * + * @var float + */ + private $consumedUnits; + + /** + * The metric usage report description describe the reported usage. This description may be shown to the end user. + * + * @var string + */ + private $description; + + /** + * The external id identifies the metric usage uniquely. + * + * @var string + */ + private $externalId; + + /** + * The metric usage report is linked to the metric for which the usage should be recorded. + * + * @var int + */ + private $metric; + + /** + * The subscription to which the usage is added to. + * + * @var int + */ + private $subscription; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['consumedUnits'])) { + $this->setConsumedUnits($data['consumedUnits']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['externalId'])) { + $this->setExternalId($data['externalId']); + } + if (isset($data['metric'])) { + $this->setMetric($data['metric']); + } + if (isset($data['subscription'])) { + $this->setSubscription($data['subscription']); + } + } + + + /** + * Returns consumedUnits. + * + * The consumed units describe the amount of resources consumed. Those consumed units will be billed in the next billing cycle. + * + * @return float + */ + public function getConsumedUnits() { + return $this->consumedUnits; + } + + /** + * Sets consumedUnits. + * + * @param float $consumedUnits + * @return SubscriptionMetricUsageReportCreate + */ + public function setConsumedUnits($consumedUnits) { + $this->consumedUnits = $consumedUnits; + + return $this; + } + + /** + * Returns description. + * + * The metric usage report description describe the reported usage. This description may be shown to the end user. + * + * @return string + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param string $description + * @return SubscriptionMetricUsageReportCreate + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns externalId. + * + * The external id identifies the metric usage uniquely. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return SubscriptionMetricUsageReportCreate + */ + public function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns metric. + * + * The metric usage report is linked to the metric for which the usage should be recorded. + * + * @return int + */ + public function getMetric() { + return $this->metric; + } + + /** + * Sets metric. + * + * @param int $metric + * @return SubscriptionMetricUsageReportCreate + */ + public function setMetric($metric) { + $this->metric = $metric; + + return $this; + } + + /** + * Returns subscription. + * + * The subscription to which the usage is added to. + * + * @return int + */ + public function getSubscription() { + return $this->subscription; + } + + /** + * Sets subscription. + * + * @param int $subscription + * @return SubscriptionMetricUsageReportCreate + */ + public function setSubscription($subscription) { + $this->subscription = $subscription; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getConsumedUnits() === null) { + throw new ValidationException("'consumedUnits' can't be null", 'consumedUnits', $this); + } + if ($this->getExternalId() === null) { + throw new ValidationException("'externalId' can't be null", 'externalId', $this); + } + if ($this->getMetric() === null) { + throw new ValidationException("'metric' can't be null", 'metric', $this); + } + if ($this->getSubscription() === null) { + throw new ValidationException("'subscription' can't be null", 'subscription', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionPending.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionPending.php new file mode 100644 index 0000000..77f9321 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionPending.php @@ -0,0 +1,248 @@ + 'int', + 'reference' => 'string', + 'subscriber' => 'int', + 'token' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var int + */ + private $affiliate; + + /** + * + * + * @var string + */ + private $reference; + + /** + * + * + * @var int + */ + private $subscriber; + + /** + * + * + * @var int + */ + private $token; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['affiliate'])) { + $this->setAffiliate($data['affiliate']); + } + if (isset($data['reference'])) { + $this->setReference($data['reference']); + } + if (isset($data['subscriber'])) { + $this->setSubscriber($data['subscriber']); + } + if (isset($data['token'])) { + $this->setToken($data['token']); + } + } + + + /** + * Returns affiliate. + * + * + * + * @return int + */ + public function getAffiliate() { + return $this->affiliate; + } + + /** + * Sets affiliate. + * + * @param int $affiliate + * @return SubscriptionPending + */ + public function setAffiliate($affiliate) { + $this->affiliate = $affiliate; + + return $this; + } + + /** + * Returns reference. + * + * + * + * @return string + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param string $reference + * @return SubscriptionPending + */ + public function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Returns subscriber. + * + * + * + * @return int + */ + public function getSubscriber() { + return $this->subscriber; + } + + /** + * Sets subscriber. + * + * @param int $subscriber + * @return SubscriptionPending + */ + public function setSubscriber($subscriber) { + $this->subscriber = $subscriber; + + return $this; + } + + /** + * Returns token. + * + * + * + * @return int + */ + public function getToken() { + return $this->token; + } + + /** + * Sets token. + * + * @param int $token + * @return SubscriptionPending + */ + public function setToken($token) { + $this->token = $token; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionPeriodBill.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionPeriodBill.php new file mode 100644 index 0000000..72d7478 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionPeriodBill.php @@ -0,0 +1,462 @@ + '\DateTime', + 'effectivePeriodEndDate' => '\DateTime', + 'id' => 'int', + 'language' => 'string', + 'linkedSpaceId' => 'int', + 'periodStartDate' => '\DateTime', + 'plannedPeriodEndDate' => '\DateTime', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\SubscriptionPeriodBillState', + 'subscriptionVersion' => '\Wallee\Sdk\Model\SubscriptionVersion', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var \DateTime + */ + private $effectivePeriodEndDate; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var string + */ + private $language; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var \DateTime + */ + private $periodStartDate; + + /** + * + * + * @var \DateTime + */ + private $plannedPeriodEndDate; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionPeriodBillState + */ + private $state; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionVersion + */ + private $subscriptionVersion; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['subscriptionVersion'])) { + $this->setSubscriptionVersion($data['subscriptionVersion']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns createdOn. + * + * + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return SubscriptionPeriodBill + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns effectivePeriodEndDate. + * + * + * + * @return \DateTime + */ + public function getEffectivePeriodEndDate() { + return $this->effectivePeriodEndDate; + } + + /** + * Sets effectivePeriodEndDate. + * + * @param \DateTime $effectivePeriodEndDate + * @return SubscriptionPeriodBill + */ + protected function setEffectivePeriodEndDate($effectivePeriodEndDate) { + $this->effectivePeriodEndDate = $effectivePeriodEndDate; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionPeriodBill + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return SubscriptionPeriodBill + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionPeriodBill + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns periodStartDate. + * + * + * + * @return \DateTime + */ + public function getPeriodStartDate() { + return $this->periodStartDate; + } + + /** + * Sets periodStartDate. + * + * @param \DateTime $periodStartDate + * @return SubscriptionPeriodBill + */ + protected function setPeriodStartDate($periodStartDate) { + $this->periodStartDate = $periodStartDate; + + return $this; + } + + /** + * Returns plannedPeriodEndDate. + * + * + * + * @return \DateTime + */ + public function getPlannedPeriodEndDate() { + return $this->plannedPeriodEndDate; + } + + /** + * Sets plannedPeriodEndDate. + * + * @param \DateTime $plannedPeriodEndDate + * @return SubscriptionPeriodBill + */ + protected function setPlannedPeriodEndDate($plannedPeriodEndDate) { + $this->plannedPeriodEndDate = $plannedPeriodEndDate; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return SubscriptionPeriodBill + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionPeriodBillState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\SubscriptionPeriodBillState $state + * @return SubscriptionPeriodBill + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns subscriptionVersion. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionVersion + */ + public function getSubscriptionVersion() { + return $this->subscriptionVersion; + } + + /** + * Sets subscriptionVersion. + * + * @param \Wallee\Sdk\Model\SubscriptionVersion $subscriptionVersion + * @return SubscriptionPeriodBill + */ + public function setSubscriptionVersion($subscriptionVersion) { + $this->subscriptionVersion = $subscriptionVersion; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionPeriodBill + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionPeriodBillState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionPeriodBillState.php new file mode 100644 index 0000000..a18cedb --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionPeriodBillState.php @@ -0,0 +1,43 @@ + 'int[]', + 'failedPaymentSuspensionPeriod' => 'string', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'reference' => 'string', + 'sortOrder' => 'int', + 'spaceId' => 'int', + 'state' => '\Wallee\Sdk\Model\SubscriptionProductState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The allowed payment method configurations control which payment methods can be used with this product. When none is selected all methods will be allowed. + * + * @var int[] + */ + private $allowedPaymentMethodConfigurations; + + /** + * When a payment fails, the subscription to which the payment belongs to will be suspended. When the suspension is not removed within the specified period the subscription will be terminated. A payment is considered as failed when the subscriber issues a refund or when a subscription charge fails. + * + * @var string + */ + private $failedPaymentSuspensionPeriod; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The product name is used internally to identify the configuration in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The product reference identifies the product for external systems. This field may contain the product's SKU. + * + * @var string + */ + private $reference; + + /** + * The sort order controls in which order the product is listed. The sort order is used to order the products in ascending order. + * + * @var int + */ + private $sortOrder; + + /** + * + * + * @var int + */ + private $spaceId; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['allowedPaymentMethodConfigurations'])) { + $this->setAllowedPaymentMethodConfigurations($data['allowedPaymentMethodConfigurations']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns allowedPaymentMethodConfigurations. + * + * The allowed payment method configurations control which payment methods can be used with this product. When none is selected all methods will be allowed. + * + * @return int[] + */ + public function getAllowedPaymentMethodConfigurations() { + return $this->allowedPaymentMethodConfigurations; + } + + /** + * Sets allowedPaymentMethodConfigurations. + * + * @param int[] $allowedPaymentMethodConfigurations + * @return SubscriptionProduct + */ + public function setAllowedPaymentMethodConfigurations($allowedPaymentMethodConfigurations) { + $this->allowedPaymentMethodConfigurations = $allowedPaymentMethodConfigurations; + + return $this; + } + + /** + * Returns failedPaymentSuspensionPeriod. + * + * When a payment fails, the subscription to which the payment belongs to will be suspended. When the suspension is not removed within the specified period the subscription will be terminated. A payment is considered as failed when the subscriber issues a refund or when a subscription charge fails. + * + * @return string + */ + public function getFailedPaymentSuspensionPeriod() { + return $this->failedPaymentSuspensionPeriod; + } + + /** + * Sets failedPaymentSuspensionPeriod. + * + * @param string $failedPaymentSuspensionPeriod + * @return SubscriptionProduct + */ + protected function setFailedPaymentSuspensionPeriod($failedPaymentSuspensionPeriod) { + $this->failedPaymentSuspensionPeriod = $failedPaymentSuspensionPeriod; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionProduct + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionProduct + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The product name is used internally to identify the configuration in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return SubscriptionProduct + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return SubscriptionProduct + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns reference. + * + * The product reference identifies the product for external systems. This field may contain the product's SKU. + * + * @return string + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param string $reference + * @return SubscriptionProduct + */ + protected function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Returns sortOrder. + * + * The sort order controls in which order the product is listed. The sort order is used to order the products in ascending order. + * + * @return int + */ + public function getSortOrder() { + return $this->sortOrder; + } + + /** + * Sets sortOrder. + * + * @param int $sortOrder + * @return SubscriptionProduct + */ + protected function setSortOrder($sortOrder) { + $this->sortOrder = $sortOrder; + + return $this; + } + + /** + * Returns spaceId. + * + * + * + * @return int + */ + public function getSpaceId() { + return $this->spaceId; + } + + /** + * Sets spaceId. + * + * @param int $spaceId + * @return SubscriptionProduct + */ + protected function setSpaceId($spaceId) { + $this->spaceId = $spaceId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\SubscriptionProductState $state + * @return SubscriptionProduct + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionProduct + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductActive.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductActive.php new file mode 100644 index 0000000..d125b1d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductActive.php @@ -0,0 +1,186 @@ + 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionProductActive + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionProductActive + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponent.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponent.php new file mode 100644 index 0000000..80d00f3 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponent.php @@ -0,0 +1,471 @@ + 'int', + 'componentGroup' => '\Wallee\Sdk\Model\SubscriptionProductComponentGroup', + 'defaultComponent' => 'bool', + 'description' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'reference' => '\Wallee\Sdk\Model\SubscriptionProductComponentReference', + 'sortOrder' => 'int', + 'taxClass' => '\Wallee\Sdk\Model\TaxClass', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The change weight determines whether if a component change is considered as upgrade or downgrade. If product component with a weight 10 is changed to a product component with a weight 20, the change is considered as upgrade. On the other hand a change from 20 to 10 is considered as a downgrade. + * + * @var int + */ + private $componentChangeWeight; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductComponentGroup + */ + private $componentGroup; + + /** + * When a component is marked as a 'default' component it is used when no other component is selected by the user. + * + * @var bool + */ + private $defaultComponent; + + /** + * The component description may contain a longer description which gives the subscriber a better understanding of what the component contains. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $description; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The component name is shown to the subscriber. It should describe in few words what the component does contain. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $name; + + /** + * The component reference is used to identify the component by external systems and it marks components to represent the same component within different product versions. + * + * @var \Wallee\Sdk\Model\SubscriptionProductComponentReference + */ + private $reference; + + /** + * The sort order controls in which order the component is listed. The sort order is used to order the components in ascending order. + * + * @var int + */ + private $sortOrder; + + /** + * The tax class of the component determines the taxes which are applicable on all fees linked with the component. + * + * @var \Wallee\Sdk\Model\TaxClass + */ + private $taxClass; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['componentGroup'])) { + $this->setComponentGroup($data['componentGroup']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['reference'])) { + $this->setReference($data['reference']); + } + if (isset($data['taxClass'])) { + $this->setTaxClass($data['taxClass']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns componentChangeWeight. + * + * The change weight determines whether if a component change is considered as upgrade or downgrade. If product component with a weight 10 is changed to a product component with a weight 20, the change is considered as upgrade. On the other hand a change from 20 to 10 is considered as a downgrade. + * + * @return int + */ + public function getComponentChangeWeight() { + return $this->componentChangeWeight; + } + + /** + * Sets componentChangeWeight. + * + * @param int $componentChangeWeight + * @return SubscriptionProductComponent + */ + protected function setComponentChangeWeight($componentChangeWeight) { + $this->componentChangeWeight = $componentChangeWeight; + + return $this; + } + + /** + * Returns componentGroup. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductComponentGroup + */ + public function getComponentGroup() { + return $this->componentGroup; + } + + /** + * Sets componentGroup. + * + * @param \Wallee\Sdk\Model\SubscriptionProductComponentGroup $componentGroup + * @return SubscriptionProductComponent + */ + public function setComponentGroup($componentGroup) { + $this->componentGroup = $componentGroup; + + return $this; + } + + /** + * Returns defaultComponent. + * + * When a component is marked as a 'default' component it is used when no other component is selected by the user. + * + * @return bool + */ + public function getDefaultComponent() { + return $this->defaultComponent; + } + + /** + * Sets defaultComponent. + * + * @param bool $defaultComponent + * @return SubscriptionProductComponent + */ + protected function setDefaultComponent($defaultComponent) { + $this->defaultComponent = $defaultComponent; + + return $this; + } + + /** + * Returns description. + * + * The component description may contain a longer description which gives the subscriber a better understanding of what the component contains. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $description + * @return SubscriptionProductComponent + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionProductComponent + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionProductComponent + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The component name is shown to the subscriber. It should describe in few words what the component does contain. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $name + * @return SubscriptionProductComponent + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns reference. + * + * The component reference is used to identify the component by external systems and it marks components to represent the same component within different product versions. + * + * @return \Wallee\Sdk\Model\SubscriptionProductComponentReference + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param \Wallee\Sdk\Model\SubscriptionProductComponentReference $reference + * @return SubscriptionProductComponent + */ + public function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Returns sortOrder. + * + * The sort order controls in which order the component is listed. The sort order is used to order the components in ascending order. + * + * @return int + */ + public function getSortOrder() { + return $this->sortOrder; + } + + /** + * Sets sortOrder. + * + * @param int $sortOrder + * @return SubscriptionProductComponent + */ + protected function setSortOrder($sortOrder) { + $this->sortOrder = $sortOrder; + + return $this; + } + + /** + * Returns taxClass. + * + * The tax class of the component determines the taxes which are applicable on all fees linked with the component. + * + * @return \Wallee\Sdk\Model\TaxClass + */ + public function getTaxClass() { + return $this->taxClass; + } + + /** + * Sets taxClass. + * + * @param \Wallee\Sdk\Model\TaxClass $taxClass + * @return SubscriptionProductComponent + */ + public function setTaxClass($taxClass) { + $this->taxClass = $taxClass; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionProductComponent + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentGroup.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentGroup.php new file mode 100644 index 0000000..470e273 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentGroup.php @@ -0,0 +1,338 @@ + 'int', + 'linkedSpaceId' => 'int', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'optional' => 'bool', + 'productVersion' => '\Wallee\Sdk\Model\SubscriptionProductVersion', + 'sortOrder' => 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The component group name will be shown when the components are selected. This can be visible to the subscriber. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $name; + + /** + * The component group can be optional. This means no component has to be selected by the subscriber. + * + * @var bool + */ + private $optional; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductVersion + */ + private $productVersion; + + /** + * The sort order controls in which order the component group is listed. The sort order is used to order the component groups in ascending order. + * + * @var int + */ + private $sortOrder; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['productVersion'])) { + $this->setProductVersion($data['productVersion']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionProductComponentGroup + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionProductComponentGroup + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The component group name will be shown when the components are selected. This can be visible to the subscriber. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $name + * @return SubscriptionProductComponentGroup + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns optional. + * + * The component group can be optional. This means no component has to be selected by the subscriber. + * + * @return bool + */ + public function getOptional() { + return $this->optional; + } + + /** + * Sets optional. + * + * @param bool $optional + * @return SubscriptionProductComponentGroup + */ + protected function setOptional($optional) { + $this->optional = $optional; + + return $this; + } + + /** + * Returns productVersion. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductVersion + */ + public function getProductVersion() { + return $this->productVersion; + } + + /** + * Sets productVersion. + * + * @param \Wallee\Sdk\Model\SubscriptionProductVersion $productVersion + * @return SubscriptionProductComponentGroup + */ + public function setProductVersion($productVersion) { + $this->productVersion = $productVersion; + + return $this; + } + + /** + * Returns sortOrder. + * + * The sort order controls in which order the component group is listed. The sort order is used to order the component groups in ascending order. + * + * @return int + */ + public function getSortOrder() { + return $this->sortOrder; + } + + /** + * Sets sortOrder. + * + * @param int $sortOrder + * @return SubscriptionProductComponentGroup + */ + protected function setSortOrder($sortOrder) { + $this->sortOrder = $sortOrder; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionProductComponentGroup + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentGroupUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentGroupUpdate.php new file mode 100644 index 0000000..04778f4 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentGroupUpdate.php @@ -0,0 +1,319 @@ + 'int', + 'version' => 'int', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedStringCreate', + 'optional' => 'bool', + 'productVersion' => 'int', + 'sortOrder' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + /** + * The component group name will be shown when the components are selected. This can be visible to the subscriber. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + private $name; + + /** + * The component group can be optional. This means no component has to be selected by the subscriber. + * + * @var bool + */ + private $optional; + + /** + * + * + * @var int + */ + private $productVersion; + + /** + * The sort order controls in which order the component group is listed. The sort order is used to order the component groups in ascending order. + * + * @var int + */ + private $sortOrder; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['optional'])) { + $this->setOptional($data['optional']); + } + if (isset($data['productVersion'])) { + $this->setProductVersion($data['productVersion']); + } + if (isset($data['sortOrder'])) { + $this->setSortOrder($data['sortOrder']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionProductComponentGroupUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionProductComponentGroupUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Returns name. + * + * The component group name will be shown when the components are selected. This can be visible to the subscriber. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $name + * @return SubscriptionProductComponentGroupUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns optional. + * + * The component group can be optional. This means no component has to be selected by the subscriber. + * + * @return bool + */ + public function getOptional() { + return $this->optional; + } + + /** + * Sets optional. + * + * @param bool $optional + * @return SubscriptionProductComponentGroupUpdate + */ + public function setOptional($optional) { + $this->optional = $optional; + + return $this; + } + + /** + * Returns productVersion. + * + * + * + * @return int + */ + public function getProductVersion() { + return $this->productVersion; + } + + /** + * Sets productVersion. + * + * @param int $productVersion + * @return SubscriptionProductComponentGroupUpdate + */ + public function setProductVersion($productVersion) { + $this->productVersion = $productVersion; + + return $this; + } + + /** + * Returns sortOrder. + * + * The sort order controls in which order the component group is listed. The sort order is used to order the component groups in ascending order. + * + * @return int + */ + public function getSortOrder() { + return $this->sortOrder; + } + + /** + * Sets sortOrder. + * + * @param int $sortOrder + * @return SubscriptionProductComponentGroupUpdate + */ + public function setSortOrder($sortOrder) { + $this->sortOrder = $sortOrder; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentReference.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentReference.php new file mode 100644 index 0000000..262d2a6 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentReference.php @@ -0,0 +1,335 @@ + 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'spaceId' => 'int', + 'state' => '\Wallee\Sdk\Model\SubscriptionProductComponentReferenceState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The component reference name is used internally to identify the reference. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var int + */ + private $spaceId; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductComponentReferenceState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionProductComponentReference + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionProductComponentReference + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The component reference name is used internally to identify the reference. For example the name is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return SubscriptionProductComponentReference + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return SubscriptionProductComponentReference + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns spaceId. + * + * + * + * @return int + */ + public function getSpaceId() { + return $this->spaceId; + } + + /** + * Sets spaceId. + * + * @param int $spaceId + * @return SubscriptionProductComponentReference + */ + protected function setSpaceId($spaceId) { + $this->spaceId = $spaceId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductComponentReferenceState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\SubscriptionProductComponentReferenceState $state + * @return SubscriptionProductComponentReference + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionProductComponentReference + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentReferenceState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentReferenceState.php new file mode 100644 index 0000000..238562b --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductComponentReferenceState.php @@ -0,0 +1,45 @@ + 'int', + 'version' => 'int', + 'componentChangeWeight' => 'int', + 'componentGroup' => 'int', + 'defaultComponent' => 'bool', + 'description' => '\Wallee\Sdk\Model\DatabaseTranslatedStringCreate', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedStringCreate', + 'reference' => 'int', + 'sortOrder' => 'int', + 'taxClass' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + /** + * The change weight determines whether if a component change is considered as upgrade or downgrade. If product component with a weight 10 is changed to a product component with a weight 20, the change is considered as upgrade. On the other hand a change from 20 to 10 is considered as a downgrade. + * + * @var int + */ + private $componentChangeWeight; + + /** + * + * + * @var int + */ + private $componentGroup; + + /** + * When a component is marked as a 'default' component it is used when no other component is selected by the user. + * + * @var bool + */ + private $defaultComponent; + + /** + * The component description may contain a longer description which gives the subscriber a better understanding of what the component contains. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + private $description; + + /** + * The component name is shown to the subscriber. It should describe in few words what the component does contain. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + private $name; + + /** + * The component reference is used to identify the component by external systems and it marks components to represent the same component within different product versions. + * + * @var int + */ + private $reference; + + /** + * The sort order controls in which order the component is listed. The sort order is used to order the components in ascending order. + * + * @var int + */ + private $sortOrder; + + /** + * The tax class of the component determines the taxes which are applicable on all fees linked with the component. + * + * @var int + */ + private $taxClass; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + if (isset($data['componentChangeWeight'])) { + $this->setComponentChangeWeight($data['componentChangeWeight']); + } + if (isset($data['componentGroup'])) { + $this->setComponentGroup($data['componentGroup']); + } + if (isset($data['defaultComponent'])) { + $this->setDefaultComponent($data['defaultComponent']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['reference'])) { + $this->setReference($data['reference']); + } + if (isset($data['sortOrder'])) { + $this->setSortOrder($data['sortOrder']); + } + if (isset($data['taxClass'])) { + $this->setTaxClass($data['taxClass']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionProductComponentUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionProductComponentUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Returns componentChangeWeight. + * + * The change weight determines whether if a component change is considered as upgrade or downgrade. If product component with a weight 10 is changed to a product component with a weight 20, the change is considered as upgrade. On the other hand a change from 20 to 10 is considered as a downgrade. + * + * @return int + */ + public function getComponentChangeWeight() { + return $this->componentChangeWeight; + } + + /** + * Sets componentChangeWeight. + * + * @param int $componentChangeWeight + * @return SubscriptionProductComponentUpdate + */ + public function setComponentChangeWeight($componentChangeWeight) { + $this->componentChangeWeight = $componentChangeWeight; + + return $this; + } + + /** + * Returns componentGroup. + * + * + * + * @return int + */ + public function getComponentGroup() { + return $this->componentGroup; + } + + /** + * Sets componentGroup. + * + * @param int $componentGroup + * @return SubscriptionProductComponentUpdate + */ + public function setComponentGroup($componentGroup) { + $this->componentGroup = $componentGroup; + + return $this; + } + + /** + * Returns defaultComponent. + * + * When a component is marked as a 'default' component it is used when no other component is selected by the user. + * + * @return bool + */ + public function getDefaultComponent() { + return $this->defaultComponent; + } + + /** + * Sets defaultComponent. + * + * @param bool $defaultComponent + * @return SubscriptionProductComponentUpdate + */ + public function setDefaultComponent($defaultComponent) { + $this->defaultComponent = $defaultComponent; + + return $this; + } + + /** + * Returns description. + * + * The component description may contain a longer description which gives the subscriber a better understanding of what the component contains. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $description + * @return SubscriptionProductComponentUpdate + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns name. + * + * The component name is shown to the subscriber. It should describe in few words what the component does contain. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $name + * @return SubscriptionProductComponentUpdate + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns reference. + * + * The component reference is used to identify the component by external systems and it marks components to represent the same component within different product versions. + * + * @return int + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param int $reference + * @return SubscriptionProductComponentUpdate + */ + public function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Returns sortOrder. + * + * The sort order controls in which order the component is listed. The sort order is used to order the components in ascending order. + * + * @return int + */ + public function getSortOrder() { + return $this->sortOrder; + } + + /** + * Sets sortOrder. + * + * @param int $sortOrder + * @return SubscriptionProductComponentUpdate + */ + public function setSortOrder($sortOrder) { + $this->sortOrder = $sortOrder; + + return $this; + } + + /** + * Returns taxClass. + * + * The tax class of the component determines the taxes which are applicable on all fees linked with the component. + * + * @return int + */ + public function getTaxClass() { + return $this->taxClass; + } + + /** + * Sets taxClass. + * + * @param int $taxClass + * @return SubscriptionProductComponentUpdate + */ + public function setTaxClass($taxClass) { + $this->taxClass = $taxClass; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductCreate.php new file mode 100644 index 0000000..b7f7525 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductCreate.php @@ -0,0 +1,149 @@ + 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The product reference identifies the product for external systems. This field may contain the product's SKU. + * + * @var string + */ + private $reference; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['reference'])) { + $this->setReference($data['reference']); + } + } + + + /** + * Returns reference. + * + * The product reference identifies the product for external systems. This field may contain the product's SKU. + * + * @return string + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param string $reference + * @return SubscriptionProductCreate + */ + public function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getReference() === null) { + throw new ValidationException("'reference' can't be null", 'reference', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductRetirement.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductRetirement.php new file mode 100644 index 0000000..48b7603 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductRetirement.php @@ -0,0 +1,338 @@ + '\DateTime', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'product' => '\Wallee\Sdk\Model\SubscriptionProduct', + 'respectTerminiationPeriodsEnabled' => 'bool', + 'targetProduct' => '\Wallee\Sdk\Model\SubscriptionProduct', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProduct + */ + private $product; + + /** + * + * + * @var bool + */ + private $respectTerminiationPeriodsEnabled; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProduct + */ + private $targetProduct; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['product'])) { + $this->setProduct($data['product']); + } + if (isset($data['targetProduct'])) { + $this->setTargetProduct($data['targetProduct']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return SubscriptionProductRetirement + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionProductRetirement + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionProductRetirement + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns product. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProduct + */ + public function getProduct() { + return $this->product; + } + + /** + * Sets product. + * + * @param \Wallee\Sdk\Model\SubscriptionProduct $product + * @return SubscriptionProductRetirement + */ + public function setProduct($product) { + $this->product = $product; + + return $this; + } + + /** + * Returns respectTerminiationPeriodsEnabled. + * + * + * + * @return bool + */ + public function getRespectTerminiationPeriodsEnabled() { + return $this->respectTerminiationPeriodsEnabled; + } + + /** + * Sets respectTerminiationPeriodsEnabled. + * + * @param bool $respectTerminiationPeriodsEnabled + * @return SubscriptionProductRetirement + */ + protected function setRespectTerminiationPeriodsEnabled($respectTerminiationPeriodsEnabled) { + $this->respectTerminiationPeriodsEnabled = $respectTerminiationPeriodsEnabled; + + return $this; + } + + /** + * Returns targetProduct. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProduct + */ + public function getTargetProduct() { + return $this->targetProduct; + } + + /** + * Sets targetProduct. + * + * @param \Wallee\Sdk\Model\SubscriptionProduct $targetProduct + * @return SubscriptionProductRetirement + */ + public function setTargetProduct($targetProduct) { + $this->targetProduct = $targetProduct; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionProductRetirement + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductRetirementCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductRetirementCreate.php new file mode 100644 index 0000000..a0e341f --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductRetirementCreate.php @@ -0,0 +1,214 @@ + 'int', + 'respectTerminiationPeriodsEnabled' => 'bool', + 'targetProduct' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var int + */ + private $product; + + /** + * + * + * @var bool + */ + private $respectTerminiationPeriodsEnabled; + + /** + * + * + * @var int + */ + private $targetProduct; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['product'])) { + $this->setProduct($data['product']); + } + if (isset($data['respectTerminiationPeriodsEnabled'])) { + $this->setRespectTerminiationPeriodsEnabled($data['respectTerminiationPeriodsEnabled']); + } + if (isset($data['targetProduct'])) { + $this->setTargetProduct($data['targetProduct']); + } + } + + + /** + * Returns product. + * + * + * + * @return int + */ + public function getProduct() { + return $this->product; + } + + /** + * Sets product. + * + * @param int $product + * @return SubscriptionProductRetirementCreate + */ + public function setProduct($product) { + $this->product = $product; + + return $this; + } + + /** + * Returns respectTerminiationPeriodsEnabled. + * + * + * + * @return bool + */ + public function getRespectTerminiationPeriodsEnabled() { + return $this->respectTerminiationPeriodsEnabled; + } + + /** + * Sets respectTerminiationPeriodsEnabled. + * + * @param bool $respectTerminiationPeriodsEnabled + * @return SubscriptionProductRetirementCreate + */ + public function setRespectTerminiationPeriodsEnabled($respectTerminiationPeriodsEnabled) { + $this->respectTerminiationPeriodsEnabled = $respectTerminiationPeriodsEnabled; + + return $this; + } + + /** + * Returns targetProduct. + * + * + * + * @return int + */ + public function getTargetProduct() { + return $this->targetProduct; + } + + /** + * Sets targetProduct. + * + * @param int $targetProduct + * @return SubscriptionProductRetirementCreate + */ + public function setTargetProduct($targetProduct) { + $this->targetProduct = $targetProduct; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getProduct() === null) { + throw new ValidationException("'product' can't be null", 'product', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductState.php new file mode 100644 index 0000000..145c3ab --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductState.php @@ -0,0 +1,46 @@ + '\DateTime', + 'billingCycle' => 'string', + 'comment' => 'string', + 'createdOn' => '\DateTime', + 'defaultCurrency' => 'string', + 'enabledCurrencies' => 'string[]', + 'id' => 'int', + 'incrementNumber' => 'int', + 'linkedSpaceId' => 'int', + 'minimalNumberOfPeriods' => 'int', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedString', + 'numberOfNoticePeriods' => 'int', + 'obsoletedOn' => '\DateTime', + 'plannedPurgeDate' => '\DateTime', + 'product' => '\Wallee\Sdk\Model\SubscriptionProduct', + 'reference' => 'string', + 'retiringFinishedOn' => '\DateTime', + 'retiringStartedOn' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\SubscriptionProductVersionState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \DateTime + */ + private $activatedOn; + + /** + * The billing cycle determines the rhythm with which the subscriber is billed. The charging may have different rhythm. + * + * @var string + */ + private $billingCycle; + + /** + * The comment allows to provide a internal comment for the version. It helps to document why a product was changed. The comment is not disclosed to the subscriber. + * + * @var string + */ + private $comment; + + /** + * + * + * @var \DateTime + */ + private $createdOn; + + /** + * The default currency has to be used in all fees. + * + * @var string + */ + private $defaultCurrency; + + /** + * The currencies which are enabled can be selected to define component fees. Currencies which are not enabled cannot be used to define fees. + * + * @var string[] + */ + private $enabledCurrencies; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The increment number represents the version number incremented whenever a new version is activated. + * + * @var int + */ + private $incrementNumber; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The minimal number of periods determines how long the subscription has to run before the subscription can be terminated. + * + * @var int + */ + private $minimalNumberOfPeriods; + + /** + * The product version name is the name of the product which is shown to the user for the version. When the visible product name should be changed for a particular product a new version has to be created which contains the new name of the product. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedString + */ + private $name; + + /** + * The number of notice periods determines the number of periods which need to be paid between the request to terminate the subscription and the final period. + * + * @var int + */ + private $numberOfNoticePeriods; + + /** + * + * + * @var \DateTime + */ + private $obsoletedOn; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * Each product version is linked to a product. + * + * @var \Wallee\Sdk\Model\SubscriptionProduct + */ + private $product; + + /** + * The product version reference helps to identify the version. The reference is generated out of the product reference. + * + * @var string + */ + private $reference; + + /** + * + * + * @var \DateTime + */ + private $retiringFinishedOn; + + /** + * + * + * @var \DateTime + */ + private $retiringStartedOn; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductVersionState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['enabledCurrencies'])) { + $this->setEnabledCurrencies($data['enabledCurrencies']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['product'])) { + $this->setProduct($data['product']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns activatedOn. + * + * + * + * @return \DateTime + */ + public function getActivatedOn() { + return $this->activatedOn; + } + + /** + * Sets activatedOn. + * + * @param \DateTime $activatedOn + * @return SubscriptionProductVersion + */ + protected function setActivatedOn($activatedOn) { + $this->activatedOn = $activatedOn; + + return $this; + } + + /** + * Returns billingCycle. + * + * The billing cycle determines the rhythm with which the subscriber is billed. The charging may have different rhythm. + * + * @return string + */ + public function getBillingCycle() { + return $this->billingCycle; + } + + /** + * Sets billingCycle. + * + * @param string $billingCycle + * @return SubscriptionProductVersion + */ + protected function setBillingCycle($billingCycle) { + $this->billingCycle = $billingCycle; + + return $this; + } + + /** + * Returns comment. + * + * The comment allows to provide a internal comment for the version. It helps to document why a product was changed. The comment is not disclosed to the subscriber. + * + * @return string + */ + public function getComment() { + return $this->comment; + } + + /** + * Sets comment. + * + * @param string $comment + * @return SubscriptionProductVersion + */ + protected function setComment($comment) { + $this->comment = $comment; + + return $this; + } + + /** + * Returns createdOn. + * + * + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return SubscriptionProductVersion + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns defaultCurrency. + * + * The default currency has to be used in all fees. + * + * @return string + */ + public function getDefaultCurrency() { + return $this->defaultCurrency; + } + + /** + * Sets defaultCurrency. + * + * @param string $defaultCurrency + * @return SubscriptionProductVersion + */ + protected function setDefaultCurrency($defaultCurrency) { + $this->defaultCurrency = $defaultCurrency; + + return $this; + } + + /** + * Returns enabledCurrencies. + * + * The currencies which are enabled can be selected to define component fees. Currencies which are not enabled cannot be used to define fees. + * + * @return string[] + */ + public function getEnabledCurrencies() { + return $this->enabledCurrencies; + } + + /** + * Sets enabledCurrencies. + * + * @param string[] $enabledCurrencies + * @return SubscriptionProductVersion + */ + public function setEnabledCurrencies($enabledCurrencies) { + $this->enabledCurrencies = $enabledCurrencies; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionProductVersion + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns incrementNumber. + * + * The increment number represents the version number incremented whenever a new version is activated. + * + * @return int + */ + public function getIncrementNumber() { + return $this->incrementNumber; + } + + /** + * Sets incrementNumber. + * + * @param int $incrementNumber + * @return SubscriptionProductVersion + */ + protected function setIncrementNumber($incrementNumber) { + $this->incrementNumber = $incrementNumber; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionProductVersion + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns minimalNumberOfPeriods. + * + * The minimal number of periods determines how long the subscription has to run before the subscription can be terminated. + * + * @return int + */ + public function getMinimalNumberOfPeriods() { + return $this->minimalNumberOfPeriods; + } + + /** + * Sets minimalNumberOfPeriods. + * + * @param int $minimalNumberOfPeriods + * @return SubscriptionProductVersion + */ + protected function setMinimalNumberOfPeriods($minimalNumberOfPeriods) { + $this->minimalNumberOfPeriods = $minimalNumberOfPeriods; + + return $this; + } + + /** + * Returns name. + * + * The product version name is the name of the product which is shown to the user for the version. When the visible product name should be changed for a particular product a new version has to be created which contains the new name of the product. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedString + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedString $name + * @return SubscriptionProductVersion + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns numberOfNoticePeriods. + * + * The number of notice periods determines the number of periods which need to be paid between the request to terminate the subscription and the final period. + * + * @return int + */ + public function getNumberOfNoticePeriods() { + return $this->numberOfNoticePeriods; + } + + /** + * Sets numberOfNoticePeriods. + * + * @param int $numberOfNoticePeriods + * @return SubscriptionProductVersion + */ + protected function setNumberOfNoticePeriods($numberOfNoticePeriods) { + $this->numberOfNoticePeriods = $numberOfNoticePeriods; + + return $this; + } + + /** + * Returns obsoletedOn. + * + * + * + * @return \DateTime + */ + public function getObsoletedOn() { + return $this->obsoletedOn; + } + + /** + * Sets obsoletedOn. + * + * @param \DateTime $obsoletedOn + * @return SubscriptionProductVersion + */ + protected function setObsoletedOn($obsoletedOn) { + $this->obsoletedOn = $obsoletedOn; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return SubscriptionProductVersion + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns product. + * + * Each product version is linked to a product. + * + * @return \Wallee\Sdk\Model\SubscriptionProduct + */ + public function getProduct() { + return $this->product; + } + + /** + * Sets product. + * + * @param \Wallee\Sdk\Model\SubscriptionProduct $product + * @return SubscriptionProductVersion + */ + public function setProduct($product) { + $this->product = $product; + + return $this; + } + + /** + * Returns reference. + * + * The product version reference helps to identify the version. The reference is generated out of the product reference. + * + * @return string + */ + public function getReference() { + return $this->reference; + } + + /** + * Sets reference. + * + * @param string $reference + * @return SubscriptionProductVersion + */ + protected function setReference($reference) { + $this->reference = $reference; + + return $this; + } + + /** + * Returns retiringFinishedOn. + * + * + * + * @return \DateTime + */ + public function getRetiringFinishedOn() { + return $this->retiringFinishedOn; + } + + /** + * Sets retiringFinishedOn. + * + * @param \DateTime $retiringFinishedOn + * @return SubscriptionProductVersion + */ + protected function setRetiringFinishedOn($retiringFinishedOn) { + $this->retiringFinishedOn = $retiringFinishedOn; + + return $this; + } + + /** + * Returns retiringStartedOn. + * + * + * + * @return \DateTime + */ + public function getRetiringStartedOn() { + return $this->retiringStartedOn; + } + + /** + * Sets retiringStartedOn. + * + * @param \DateTime $retiringStartedOn + * @return SubscriptionProductVersion + */ + protected function setRetiringStartedOn($retiringStartedOn) { + $this->retiringStartedOn = $retiringStartedOn; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductVersionState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\SubscriptionProductVersionState $state + * @return SubscriptionProductVersion + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionProductVersion + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionPending.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionPending.php new file mode 100644 index 0000000..60ef281 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionPending.php @@ -0,0 +1,489 @@ + 'int', + 'version' => 'int', + 'billingCycle' => 'string', + 'comment' => 'string', + 'defaultCurrency' => 'string', + 'enabledCurrencies' => 'string[]', + 'minimalNumberOfPeriods' => 'int', + 'name' => '\Wallee\Sdk\Model\DatabaseTranslatedStringCreate', + 'numberOfNoticePeriods' => 'int', + 'product' => 'int', + 'state' => '\Wallee\Sdk\Model\SubscriptionProductVersionState' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + /** + * The billing cycle determines the rhythm with which the subscriber is billed. The charging may have different rhythm. + * + * @var string + */ + private $billingCycle; + + /** + * The comment allows to provide a internal comment for the version. It helps to document why a product was changed. The comment is not disclosed to the subscriber. + * + * @var string + */ + private $comment; + + /** + * The default currency has to be used in all fees. + * + * @var string + */ + private $defaultCurrency; + + /** + * The currencies which are enabled can be selected to define component fees. Currencies which are not enabled cannot be used to define fees. + * + * @var string[] + */ + private $enabledCurrencies; + + /** + * The minimal number of periods determines how long the subscription has to run before the subscription can be terminated. + * + * @var int + */ + private $minimalNumberOfPeriods; + + /** + * The product version name is the name of the product which is shown to the user for the version. When the visible product name should be changed for a particular product a new version has to be created which contains the new name of the product. + * + * @var \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + private $name; + + /** + * The number of notice periods determines the number of periods which need to be paid between the request to terminate the subscription and the final period. + * + * @var int + */ + private $numberOfNoticePeriods; + + /** + * Each product version is linked to a product. + * + * @var int + */ + private $product; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductVersionState + */ + private $state; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + if (isset($data['billingCycle'])) { + $this->setBillingCycle($data['billingCycle']); + } + if (isset($data['comment'])) { + $this->setComment($data['comment']); + } + if (isset($data['defaultCurrency'])) { + $this->setDefaultCurrency($data['defaultCurrency']); + } + if (isset($data['enabledCurrencies'])) { + $this->setEnabledCurrencies($data['enabledCurrencies']); + } + if (isset($data['minimalNumberOfPeriods'])) { + $this->setMinimalNumberOfPeriods($data['minimalNumberOfPeriods']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + if (isset($data['numberOfNoticePeriods'])) { + $this->setNumberOfNoticePeriods($data['numberOfNoticePeriods']); + } + if (isset($data['product'])) { + $this->setProduct($data['product']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionProductVersionPending + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionProductVersionPending + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Returns billingCycle. + * + * The billing cycle determines the rhythm with which the subscriber is billed. The charging may have different rhythm. + * + * @return string + */ + public function getBillingCycle() { + return $this->billingCycle; + } + + /** + * Sets billingCycle. + * + * @param string $billingCycle + * @return SubscriptionProductVersionPending + */ + public function setBillingCycle($billingCycle) { + $this->billingCycle = $billingCycle; + + return $this; + } + + /** + * Returns comment. + * + * The comment allows to provide a internal comment for the version. It helps to document why a product was changed. The comment is not disclosed to the subscriber. + * + * @return string + */ + public function getComment() { + return $this->comment; + } + + /** + * Sets comment. + * + * @param string $comment + * @return SubscriptionProductVersionPending + */ + public function setComment($comment) { + $this->comment = $comment; + + return $this; + } + + /** + * Returns defaultCurrency. + * + * The default currency has to be used in all fees. + * + * @return string + */ + public function getDefaultCurrency() { + return $this->defaultCurrency; + } + + /** + * Sets defaultCurrency. + * + * @param string $defaultCurrency + * @return SubscriptionProductVersionPending + */ + public function setDefaultCurrency($defaultCurrency) { + $this->defaultCurrency = $defaultCurrency; + + return $this; + } + + /** + * Returns enabledCurrencies. + * + * The currencies which are enabled can be selected to define component fees. Currencies which are not enabled cannot be used to define fees. + * + * @return string[] + */ + public function getEnabledCurrencies() { + return $this->enabledCurrencies; + } + + /** + * Sets enabledCurrencies. + * + * @param string[] $enabledCurrencies + * @return SubscriptionProductVersionPending + */ + public function setEnabledCurrencies($enabledCurrencies) { + $this->enabledCurrencies = $enabledCurrencies; + + return $this; + } + + /** + * Returns minimalNumberOfPeriods. + * + * The minimal number of periods determines how long the subscription has to run before the subscription can be terminated. + * + * @return int + */ + public function getMinimalNumberOfPeriods() { + return $this->minimalNumberOfPeriods; + } + + /** + * Sets minimalNumberOfPeriods. + * + * @param int $minimalNumberOfPeriods + * @return SubscriptionProductVersionPending + */ + public function setMinimalNumberOfPeriods($minimalNumberOfPeriods) { + $this->minimalNumberOfPeriods = $minimalNumberOfPeriods; + + return $this; + } + + /** + * Returns name. + * + * The product version name is the name of the product which is shown to the user for the version. When the visible product name should be changed for a particular product a new version has to be created which contains the new name of the product. + * + * @return \Wallee\Sdk\Model\DatabaseTranslatedStringCreate + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param \Wallee\Sdk\Model\DatabaseTranslatedStringCreate $name + * @return SubscriptionProductVersionPending + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns numberOfNoticePeriods. + * + * The number of notice periods determines the number of periods which need to be paid between the request to terminate the subscription and the final period. + * + * @return int + */ + public function getNumberOfNoticePeriods() { + return $this->numberOfNoticePeriods; + } + + /** + * Sets numberOfNoticePeriods. + * + * @param int $numberOfNoticePeriods + * @return SubscriptionProductVersionPending + */ + public function setNumberOfNoticePeriods($numberOfNoticePeriods) { + $this->numberOfNoticePeriods = $numberOfNoticePeriods; + + return $this; + } + + /** + * Returns product. + * + * Each product version is linked to a product. + * + * @return int + */ + public function getProduct() { + return $this->product; + } + + /** + * Sets product. + * + * @param int $product + * @return SubscriptionProductVersionPending + */ + public function setProduct($product) { + $this->product = $product; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductVersionState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\SubscriptionProductVersionState $state + * @return SubscriptionProductVersionPending + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionRetirement.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionRetirement.php new file mode 100644 index 0000000..bcea72c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionRetirement.php @@ -0,0 +1,338 @@ + '\DateTime', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'productVersion' => '\Wallee\Sdk\Model\SubscriptionProductVersion', + 'respectTerminiationPeriodsEnabled' => 'bool', + 'targetProduct' => '\Wallee\Sdk\Model\SubscriptionProduct', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductVersion + */ + private $productVersion; + + /** + * + * + * @var bool + */ + private $respectTerminiationPeriodsEnabled; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProduct + */ + private $targetProduct; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['productVersion'])) { + $this->setProductVersion($data['productVersion']); + } + if (isset($data['targetProduct'])) { + $this->setTargetProduct($data['targetProduct']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return SubscriptionProductVersionRetirement + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionProductVersionRetirement + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionProductVersionRetirement + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns productVersion. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductVersion + */ + public function getProductVersion() { + return $this->productVersion; + } + + /** + * Sets productVersion. + * + * @param \Wallee\Sdk\Model\SubscriptionProductVersion $productVersion + * @return SubscriptionProductVersionRetirement + */ + public function setProductVersion($productVersion) { + $this->productVersion = $productVersion; + + return $this; + } + + /** + * Returns respectTerminiationPeriodsEnabled. + * + * + * + * @return bool + */ + public function getRespectTerminiationPeriodsEnabled() { + return $this->respectTerminiationPeriodsEnabled; + } + + /** + * Sets respectTerminiationPeriodsEnabled. + * + * @param bool $respectTerminiationPeriodsEnabled + * @return SubscriptionProductVersionRetirement + */ + protected function setRespectTerminiationPeriodsEnabled($respectTerminiationPeriodsEnabled) { + $this->respectTerminiationPeriodsEnabled = $respectTerminiationPeriodsEnabled; + + return $this; + } + + /** + * Returns targetProduct. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProduct + */ + public function getTargetProduct() { + return $this->targetProduct; + } + + /** + * Sets targetProduct. + * + * @param \Wallee\Sdk\Model\SubscriptionProduct $targetProduct + * @return SubscriptionProductVersionRetirement + */ + public function setTargetProduct($targetProduct) { + $this->targetProduct = $targetProduct; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionProductVersionRetirement + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionRetirementCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionRetirementCreate.php new file mode 100644 index 0000000..5577851 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionRetirementCreate.php @@ -0,0 +1,214 @@ + 'int', + 'respectTerminiationPeriodsEnabled' => 'bool', + 'targetProduct' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var int + */ + private $productVersion; + + /** + * + * + * @var bool + */ + private $respectTerminiationPeriodsEnabled; + + /** + * + * + * @var int + */ + private $targetProduct; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['productVersion'])) { + $this->setProductVersion($data['productVersion']); + } + if (isset($data['respectTerminiationPeriodsEnabled'])) { + $this->setRespectTerminiationPeriodsEnabled($data['respectTerminiationPeriodsEnabled']); + } + if (isset($data['targetProduct'])) { + $this->setTargetProduct($data['targetProduct']); + } + } + + + /** + * Returns productVersion. + * + * + * + * @return int + */ + public function getProductVersion() { + return $this->productVersion; + } + + /** + * Sets productVersion. + * + * @param int $productVersion + * @return SubscriptionProductVersionRetirementCreate + */ + public function setProductVersion($productVersion) { + $this->productVersion = $productVersion; + + return $this; + } + + /** + * Returns respectTerminiationPeriodsEnabled. + * + * + * + * @return bool + */ + public function getRespectTerminiationPeriodsEnabled() { + return $this->respectTerminiationPeriodsEnabled; + } + + /** + * Sets respectTerminiationPeriodsEnabled. + * + * @param bool $respectTerminiationPeriodsEnabled + * @return SubscriptionProductVersionRetirementCreate + */ + public function setRespectTerminiationPeriodsEnabled($respectTerminiationPeriodsEnabled) { + $this->respectTerminiationPeriodsEnabled = $respectTerminiationPeriodsEnabled; + + return $this; + } + + /** + * Returns targetProduct. + * + * + * + * @return int + */ + public function getTargetProduct() { + return $this->targetProduct; + } + + /** + * Sets targetProduct. + * + * @param int $targetProduct + * @return SubscriptionProductVersionRetirementCreate + */ + public function setTargetProduct($targetProduct) { + $this->targetProduct = $targetProduct; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getProductVersion() === null) { + throw new ValidationException("'productVersion' can't be null", 'productVersion', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionState.php new file mode 100644 index 0000000..a4ac31d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionProductVersionState.php @@ -0,0 +1,46 @@ + '\DateTime', + 'effectiveEndDate' => '\DateTime', + 'endAction' => '\Wallee\Sdk\Model\SubscriptionSuspensionAction', + 'id' => 'int', + 'language' => 'string', + 'linkedSpaceId' => 'int', + 'note' => 'string', + 'periodBill' => 'int', + 'plannedEndDate' => '\DateTime', + 'plannedPurgeDate' => '\DateTime', + 'reason' => '\Wallee\Sdk\Model\SubscriptionSuspensionReason', + 'state' => '\Wallee\Sdk\Model\SubscriptionSuspensionState', + 'subscription' => 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var \DateTime + */ + private $effectiveEndDate; + + /** + * When the suspension reaches the planned end date the end action will be carried out. This action is only executed when the suspension is ended automatically based on the end date. + * + * @var \Wallee\Sdk\Model\SubscriptionSuspensionAction + */ + private $endAction; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var string + */ + private $language; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The note may contain some internal information for the suspension. The note will not be disclosed to the subscriber. + * + * @var string + */ + private $note; + + /** + * + * + * @var int + */ + private $periodBill; + + /** + * The planned end date of the suspension identifies the date on which the suspension will be ended automatically. + * + * @var \DateTime + */ + private $plannedEndDate; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * The suspension reason indicates why a suspension has been created. + * + * @var \Wallee\Sdk\Model\SubscriptionSuspensionReason + */ + private $reason; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionSuspensionState + */ + private $state; + + /** + * + * + * @var int + */ + private $subscription; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['endAction'])) { + $this->setEndAction($data['endAction']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['reason'])) { + $this->setReason($data['reason']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return SubscriptionSuspension + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns effectiveEndDate. + * + * + * + * @return \DateTime + */ + public function getEffectiveEndDate() { + return $this->effectiveEndDate; + } + + /** + * Sets effectiveEndDate. + * + * @param \DateTime $effectiveEndDate + * @return SubscriptionSuspension + */ + protected function setEffectiveEndDate($effectiveEndDate) { + $this->effectiveEndDate = $effectiveEndDate; + + return $this; + } + + /** + * Returns endAction. + * + * When the suspension reaches the planned end date the end action will be carried out. This action is only executed when the suspension is ended automatically based on the end date. + * + * @return \Wallee\Sdk\Model\SubscriptionSuspensionAction + */ + public function getEndAction() { + return $this->endAction; + } + + /** + * Sets endAction. + * + * @param \Wallee\Sdk\Model\SubscriptionSuspensionAction $endAction + * @return SubscriptionSuspension + */ + public function setEndAction($endAction) { + $this->endAction = $endAction; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionSuspension + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return SubscriptionSuspension + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionSuspension + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns note. + * + * The note may contain some internal information for the suspension. The note will not be disclosed to the subscriber. + * + * @return string + */ + public function getNote() { + return $this->note; + } + + /** + * Sets note. + * + * @param string $note + * @return SubscriptionSuspension + */ + protected function setNote($note) { + $this->note = $note; + + return $this; + } + + /** + * Returns periodBill. + * + * + * + * @return int + */ + public function getPeriodBill() { + return $this->periodBill; + } + + /** + * Sets periodBill. + * + * @param int $periodBill + * @return SubscriptionSuspension + */ + protected function setPeriodBill($periodBill) { + $this->periodBill = $periodBill; + + return $this; + } + + /** + * Returns plannedEndDate. + * + * The planned end date of the suspension identifies the date on which the suspension will be ended automatically. + * + * @return \DateTime + */ + public function getPlannedEndDate() { + return $this->plannedEndDate; + } + + /** + * Sets plannedEndDate. + * + * @param \DateTime $plannedEndDate + * @return SubscriptionSuspension + */ + protected function setPlannedEndDate($plannedEndDate) { + $this->plannedEndDate = $plannedEndDate; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return SubscriptionSuspension + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns reason. + * + * The suspension reason indicates why a suspension has been created. + * + * @return \Wallee\Sdk\Model\SubscriptionSuspensionReason + */ + public function getReason() { + return $this->reason; + } + + /** + * Sets reason. + * + * @param \Wallee\Sdk\Model\SubscriptionSuspensionReason $reason + * @return SubscriptionSuspension + */ + public function setReason($reason) { + $this->reason = $reason; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionSuspensionState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\SubscriptionSuspensionState $state + * @return SubscriptionSuspension + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns subscription. + * + * + * + * @return int + */ + public function getSubscription() { + return $this->subscription; + } + + /** + * Sets subscription. + * + * @param int $subscription + * @return SubscriptionSuspension + */ + protected function setSubscription($subscription) { + $this->subscription = $subscription; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionSuspension + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspensionAction.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspensionAction.php new file mode 100644 index 0000000..c327025 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspensionAction.php @@ -0,0 +1,43 @@ + '\Wallee\Sdk\Model\SubscriptionSuspensionAction', + 'note' => 'string', + 'plannedEndDate' => '\DateTime', + 'subscription' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * When the suspension reaches the planned end date the end action will be carried out. This action is only executed when the suspension is ended automatically based on the end date. + * + * @var \Wallee\Sdk\Model\SubscriptionSuspensionAction + */ + private $endAction; + + /** + * The note may contain some internal information for the suspension. The note will not be disclosed to the subscriber. + * + * @var string + */ + private $note; + + /** + * The planned end date of the suspension identifies the date on which the suspension will be ended automatically. + * + * @var \DateTime + */ + private $plannedEndDate; + + /** + * + * + * @var int + */ + private $subscription; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['endAction'])) { + $this->setEndAction($data['endAction']); + } + if (isset($data['note'])) { + $this->setNote($data['note']); + } + if (isset($data['plannedEndDate'])) { + $this->setPlannedEndDate($data['plannedEndDate']); + } + if (isset($data['subscription'])) { + $this->setSubscription($data['subscription']); + } + } + + + /** + * Returns endAction. + * + * When the suspension reaches the planned end date the end action will be carried out. This action is only executed when the suspension is ended automatically based on the end date. + * + * @return \Wallee\Sdk\Model\SubscriptionSuspensionAction + */ + public function getEndAction() { + return $this->endAction; + } + + /** + * Sets endAction. + * + * @param \Wallee\Sdk\Model\SubscriptionSuspensionAction $endAction + * @return SubscriptionSuspensionCreate + */ + public function setEndAction($endAction) { + $this->endAction = $endAction; + + return $this; + } + + /** + * Returns note. + * + * The note may contain some internal information for the suspension. The note will not be disclosed to the subscriber. + * + * @return string + */ + public function getNote() { + return $this->note; + } + + /** + * Sets note. + * + * @param string $note + * @return SubscriptionSuspensionCreate + */ + public function setNote($note) { + $this->note = $note; + + return $this; + } + + /** + * Returns plannedEndDate. + * + * The planned end date of the suspension identifies the date on which the suspension will be ended automatically. + * + * @return \DateTime + */ + public function getPlannedEndDate() { + return $this->plannedEndDate; + } + + /** + * Sets plannedEndDate. + * + * @param \DateTime $plannedEndDate + * @return SubscriptionSuspensionCreate + */ + public function setPlannedEndDate($plannedEndDate) { + $this->plannedEndDate = $plannedEndDate; + + return $this; + } + + /** + * Returns subscription. + * + * + * + * @return int + */ + public function getSubscription() { + return $this->subscription; + } + + /** + * Sets subscription. + * + * @param int $subscription + * @return SubscriptionSuspensionCreate + */ + public function setSubscription($subscription) { + $this->subscription = $subscription; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getEndAction() === null) { + throw new ValidationException("'endAction' can't be null", 'endAction', $this); + } + if ($this->getPlannedEndDate() === null) { + throw new ValidationException("'plannedEndDate' can't be null", 'plannedEndDate', $this); + } + if ($this->getSubscription() === null) { + throw new ValidationException("'subscription' can't be null", 'subscription', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspensionReason.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspensionReason.php new file mode 100644 index 0000000..c9e645e --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspensionReason.php @@ -0,0 +1,44 @@ +validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspensionState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspensionState.php new file mode 100644 index 0000000..683ea14 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionSuspensionState.php @@ -0,0 +1,43 @@ + 'int', + 'version' => 'int', + 'description' => 'string', + 'plannedTerminationDate' => '\DateTime' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + /** + * + * + * @var string + */ + private $description; + + /** + * + * + * @var \DateTime + */ + private $plannedTerminationDate; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['plannedTerminationDate'])) { + $this->setPlannedTerminationDate($data['plannedTerminationDate']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Returns description. + * + * + * + * @return string + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param string $description + * @return SubscriptionUpdate + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns plannedTerminationDate. + * + * + * + * @return \DateTime + */ + public function getPlannedTerminationDate() { + return $this->plannedTerminationDate; + } + + /** + * Sets plannedTerminationDate. + * + * @param \DateTime $plannedTerminationDate + * @return SubscriptionUpdate + */ + public function setPlannedTerminationDate($plannedTerminationDate) { + $this->plannedTerminationDate = $plannedTerminationDate; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionVersion.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionVersion.php new file mode 100644 index 0000000..f9c1525 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionVersion.php @@ -0,0 +1,685 @@ + '\DateTime', + 'billingCurrency' => 'string', + 'createdOn' => '\DateTime', + 'expectedLastPeriodEnd' => '\DateTime', + 'failedOn' => '\DateTime', + 'id' => 'int', + 'language' => 'string', + 'linkedSpaceId' => 'int', + 'plannedPurgeDate' => '\DateTime', + 'plannedTerminationDate' => '\DateTime', + 'productVersion' => '\Wallee\Sdk\Model\SubscriptionProductVersion', + 'selectedComponents' => '\Wallee\Sdk\Model\SubscriptionProductComponent[]', + 'state' => '\Wallee\Sdk\Model\SubscriptionVersionState', + 'subscription' => '\Wallee\Sdk\Model\Subscription', + 'terminatedOn' => '\DateTime', + 'terminatingOn' => '\DateTime', + 'terminationIssuedOn' => '\DateTime', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \DateTime + */ + private $activatedOn; + + /** + * The subscriber is charged in the billing currency. The billing currency has to be one of the enabled currencies on the subscription product. + * + * @var string + */ + private $billingCurrency; + + /** + * + * + * @var \DateTime + */ + private $createdOn; + + /** + * The expected last period end is the date on which the projected end date of the last period is. This is only a projection and as such the actual date may be different. + * + * @var \DateTime + */ + private $expectedLastPeriodEnd; + + /** + * + * + * @var \DateTime + */ + private $failedOn; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var string + */ + private $language; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \DateTime + */ + private $plannedTerminationDate; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductVersion + */ + private $productVersion; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionProductComponent[] + */ + private $selectedComponents; + + /** + * + * + * @var \Wallee\Sdk\Model\SubscriptionVersionState + */ + private $state; + + /** + * + * + * @var \Wallee\Sdk\Model\Subscription + */ + private $subscription; + + /** + * + * + * @var \DateTime + */ + private $terminatedOn; + + /** + * + * + * @var \DateTime + */ + private $terminatingOn; + + /** + * + * + * @var \DateTime + */ + private $terminationIssuedOn; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['productVersion'])) { + $this->setProductVersion($data['productVersion']); + } + if (isset($data['selectedComponents'])) { + $this->setSelectedComponents($data['selectedComponents']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['subscription'])) { + $this->setSubscription($data['subscription']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns activatedOn. + * + * + * + * @return \DateTime + */ + public function getActivatedOn() { + return $this->activatedOn; + } + + /** + * Sets activatedOn. + * + * @param \DateTime $activatedOn + * @return SubscriptionVersion + */ + protected function setActivatedOn($activatedOn) { + $this->activatedOn = $activatedOn; + + return $this; + } + + /** + * Returns billingCurrency. + * + * The subscriber is charged in the billing currency. The billing currency has to be one of the enabled currencies on the subscription product. + * + * @return string + */ + public function getBillingCurrency() { + return $this->billingCurrency; + } + + /** + * Sets billingCurrency. + * + * @param string $billingCurrency + * @return SubscriptionVersion + */ + protected function setBillingCurrency($billingCurrency) { + $this->billingCurrency = $billingCurrency; + + return $this; + } + + /** + * Returns createdOn. + * + * + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return SubscriptionVersion + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns expectedLastPeriodEnd. + * + * The expected last period end is the date on which the projected end date of the last period is. This is only a projection and as such the actual date may be different. + * + * @return \DateTime + */ + public function getExpectedLastPeriodEnd() { + return $this->expectedLastPeriodEnd; + } + + /** + * Sets expectedLastPeriodEnd. + * + * @param \DateTime $expectedLastPeriodEnd + * @return SubscriptionVersion + */ + protected function setExpectedLastPeriodEnd($expectedLastPeriodEnd) { + $this->expectedLastPeriodEnd = $expectedLastPeriodEnd; + + return $this; + } + + /** + * Returns failedOn. + * + * + * + * @return \DateTime + */ + public function getFailedOn() { + return $this->failedOn; + } + + /** + * Sets failedOn. + * + * @param \DateTime $failedOn + * @return SubscriptionVersion + */ + protected function setFailedOn($failedOn) { + $this->failedOn = $failedOn; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return SubscriptionVersion + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return SubscriptionVersion + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return SubscriptionVersion + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return SubscriptionVersion + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns plannedTerminationDate. + * + * + * + * @return \DateTime + */ + public function getPlannedTerminationDate() { + return $this->plannedTerminationDate; + } + + /** + * Sets plannedTerminationDate. + * + * @param \DateTime $plannedTerminationDate + * @return SubscriptionVersion + */ + protected function setPlannedTerminationDate($plannedTerminationDate) { + $this->plannedTerminationDate = $plannedTerminationDate; + + return $this; + } + + /** + * Returns productVersion. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductVersion + */ + public function getProductVersion() { + return $this->productVersion; + } + + /** + * Sets productVersion. + * + * @param \Wallee\Sdk\Model\SubscriptionProductVersion $productVersion + * @return SubscriptionVersion + */ + public function setProductVersion($productVersion) { + $this->productVersion = $productVersion; + + return $this; + } + + /** + * Returns selectedComponents. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionProductComponent[] + */ + public function getSelectedComponents() { + return $this->selectedComponents; + } + + /** + * Sets selectedComponents. + * + * @param \Wallee\Sdk\Model\SubscriptionProductComponent[] $selectedComponents + * @return SubscriptionVersion + */ + public function setSelectedComponents($selectedComponents) { + $this->selectedComponents = $selectedComponents; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\SubscriptionVersionState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\SubscriptionVersionState $state + * @return SubscriptionVersion + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns subscription. + * + * + * + * @return \Wallee\Sdk\Model\Subscription + */ + public function getSubscription() { + return $this->subscription; + } + + /** + * Sets subscription. + * + * @param \Wallee\Sdk\Model\Subscription $subscription + * @return SubscriptionVersion + */ + public function setSubscription($subscription) { + $this->subscription = $subscription; + + return $this; + } + + /** + * Returns terminatedOn. + * + * + * + * @return \DateTime + */ + public function getTerminatedOn() { + return $this->terminatedOn; + } + + /** + * Sets terminatedOn. + * + * @param \DateTime $terminatedOn + * @return SubscriptionVersion + */ + protected function setTerminatedOn($terminatedOn) { + $this->terminatedOn = $terminatedOn; + + return $this; + } + + /** + * Returns terminatingOn. + * + * + * + * @return \DateTime + */ + public function getTerminatingOn() { + return $this->terminatingOn; + } + + /** + * Sets terminatingOn. + * + * @param \DateTime $terminatingOn + * @return SubscriptionVersion + */ + protected function setTerminatingOn($terminatingOn) { + $this->terminatingOn = $terminatingOn; + + return $this; + } + + /** + * Returns terminationIssuedOn. + * + * + * + * @return \DateTime + */ + public function getTerminationIssuedOn() { + return $this->terminationIssuedOn; + } + + /** + * Sets terminationIssuedOn. + * + * @param \DateTime $terminationIssuedOn + * @return SubscriptionVersion + */ + protected function setTerminationIssuedOn($terminationIssuedOn) { + $this->terminationIssuedOn = $terminationIssuedOn; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return SubscriptionVersion + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionVersionState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionVersionState.php new file mode 100644 index 0000000..8dbe5ed --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/SubscriptionVersionState.php @@ -0,0 +1,47 @@ + 'float', + 'title' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var float + */ + private $rate; + + /** + * + * + * @var string + */ + private $title; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + } + + + /** + * Returns rate. + * + * + * + * @return float + */ + public function getRate() { + return $this->rate; + } + + /** + * Sets rate. + * + * @param float $rate + * @return Tax + */ + protected function setRate($rate) { + $this->rate = $rate; + + return $this; + } + + /** + * Returns title. + * + * + * + * @return string + */ + public function getTitle() { + return $this->title; + } + + /** + * Sets title. + * + * @param string $title + * @return Tax + */ + protected function setTitle($title) { + $this->title = $title; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TaxClass.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TaxClass.php new file mode 100644 index 0000000..060849f --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TaxClass.php @@ -0,0 +1,335 @@ + 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'spaceId' => 'int', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The tax class name is used internally to identify the tax class in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var int + */ + private $spaceId; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return TaxClass + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return TaxClass + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The tax class name is used internally to identify the tax class in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return TaxClass + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return TaxClass + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns spaceId. + * + * + * + * @return int + */ + public function getSpaceId() { + return $this->spaceId; + } + + /** + * Sets spaceId. + * + * @param int $spaceId + * @return TaxClass + */ + protected function setSpaceId($spaceId) { + $this->spaceId = $spaceId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return TaxClass + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return TaxClass + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TaxCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TaxCreate.php new file mode 100644 index 0000000..2d8d48c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TaxCreate.php @@ -0,0 +1,183 @@ + 'float', + 'title' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var float + */ + private $rate; + + /** + * + * + * @var string + */ + private $title; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['rate'])) { + $this->setRate($data['rate']); + } + if (isset($data['title'])) { + $this->setTitle($data['title']); + } + } + + + /** + * Returns rate. + * + * + * + * @return float + */ + public function getRate() { + return $this->rate; + } + + /** + * Sets rate. + * + * @param float $rate + * @return TaxCreate + */ + public function setRate($rate) { + $this->rate = $rate; + + return $this; + } + + /** + * Returns title. + * + * + * + * @return string + */ + public function getTitle() { + return $this->title; + } + + /** + * Sets title. + * + * @param string $title + * @return TaxCreate + */ + public function setTitle($title) { + $this->title = $title; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getRate() === null) { + throw new ValidationException("'rate' can't be null", 'rate', $this); + } + if ($this->getTitle() === null) { + throw new ValidationException("'title' can't be null", 'title', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TenantDatabase.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TenantDatabase.php new file mode 100644 index 0000000..4bcd3b1 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TenantDatabase.php @@ -0,0 +1,208 @@ + 'int', + 'name' => 'string', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The name of the database. + * + * @var string + */ + private $name; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return TenantDatabase + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * The name of the database. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return TenantDatabase + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return TenantDatabase + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Token.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Token.php new file mode 100644 index 0000000..1134013 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/Token.php @@ -0,0 +1,521 @@ + '\DateTime', + 'customerEmailAddress' => 'string', + 'customerId' => 'string', + 'enabledForOneClickPayment' => 'bool', + 'externalId' => 'string', + 'id' => 'int', + 'language' => 'string', + 'linkedSpaceId' => 'int', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'timeZone' => 'string', + 'tokenReference' => 'string', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * The customer email address is the email address of the customer. + * + * @var string + */ + private $customerEmailAddress; + + /** + * The customer ID identifies the customer in the merchant system. In case the customer ID has been provided it has to correspond with the customer ID provided on the transaction. The customer ID will not be changed automatically. The merchant system has to provide it. + * + * @var string + */ + private $customerId; + + /** + * When a token is enabled for one-click payments the buyer will be able to select the token within the iFrame or on the payment page to pay with the token. The usage of the token will reduce the number of steps the buyer has to go through. The buyer is linked via the customer ID on the transaction with the token. Means the token will be visible for buyers with the same customer ID. Additionally the payment method has to be configured to allow the one-click payments. + * + * @var bool + */ + private $enabledForOneClickPayment; + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var string + */ + private $language; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The time zone defines in which time zone the customer is located in. The time zone may affects how dates are formatted when interacting with the customer. + * + * @var string + */ + private $timeZone; + + /** + * Use something that it is easy to identify and may help you find the token (e.g. customer id, email address). + * + * @var string + */ + private $tokenReference; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return Token + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns customerEmailAddress. + * + * The customer email address is the email address of the customer. + * + * @return string + */ + public function getCustomerEmailAddress() { + return $this->customerEmailAddress; + } + + /** + * Sets customerEmailAddress. + * + * @param string $customerEmailAddress + * @return Token + */ + protected function setCustomerEmailAddress($customerEmailAddress) { + $this->customerEmailAddress = $customerEmailAddress; + + return $this; + } + + /** + * Returns customerId. + * + * The customer ID identifies the customer in the merchant system. In case the customer ID has been provided it has to correspond with the customer ID provided on the transaction. The customer ID will not be changed automatically. The merchant system has to provide it. + * + * @return string + */ + public function getCustomerId() { + return $this->customerId; + } + + /** + * Sets customerId. + * + * @param string $customerId + * @return Token + */ + protected function setCustomerId($customerId) { + $this->customerId = $customerId; + + return $this; + } + + /** + * Returns enabledForOneClickPayment. + * + * When a token is enabled for one-click payments the buyer will be able to select the token within the iFrame or on the payment page to pay with the token. The usage of the token will reduce the number of steps the buyer has to go through. The buyer is linked via the customer ID on the transaction with the token. Means the token will be visible for buyers with the same customer ID. Additionally the payment method has to be configured to allow the one-click payments. + * + * @return bool + */ + public function getEnabledForOneClickPayment() { + return $this->enabledForOneClickPayment; + } + + /** + * Sets enabledForOneClickPayment. + * + * @param bool $enabledForOneClickPayment + * @return Token + */ + protected function setEnabledForOneClickPayment($enabledForOneClickPayment) { + $this->enabledForOneClickPayment = $enabledForOneClickPayment; + + return $this; + } + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return Token + */ + protected function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return Token + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return Token + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return Token + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return Token + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return Token + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns timeZone. + * + * The time zone defines in which time zone the customer is located in. The time zone may affects how dates are formatted when interacting with the customer. + * + * @return string + */ + public function getTimeZone() { + return $this->timeZone; + } + + /** + * Sets timeZone. + * + * @param string $timeZone + * @return Token + */ + protected function setTimeZone($timeZone) { + $this->timeZone = $timeZone; + + return $this; + } + + /** + * Returns tokenReference. + * + * Use something that it is easy to identify and may help you find the token (e.g. customer id, email address). + * + * @return string + */ + public function getTokenReference() { + return $this->tokenReference; + } + + /** + * Sets tokenReference. + * + * @param string $tokenReference + * @return Token + */ + protected function setTokenReference($tokenReference) { + $this->tokenReference = $tokenReference; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return Token + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenCreate.php new file mode 100644 index 0000000..4106ee7 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenCreate.php @@ -0,0 +1,183 @@ + 'string', + 'state' => '\Wallee\Sdk\Model\CreationEntityState' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['externalId'])) { + $this->setExternalId($data['externalId']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + } + + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return TokenCreate + */ + public function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return TokenCreate + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getExternalId() === null) { + throw new ValidationException("'externalId' can't be null", 'externalId', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenUpdate.php new file mode 100644 index 0000000..22a535c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenUpdate.php @@ -0,0 +1,186 @@ + 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return TokenUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return TokenUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenVersion.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenVersion.php new file mode 100644 index 0000000..092641e --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenVersion.php @@ -0,0 +1,728 @@ + '\DateTime', + 'billingAddress' => '\Wallee\Sdk\Model\Address', + 'createdOn' => '\DateTime', + 'environment' => '\Wallee\Sdk\Model\ChargeAttemptEnvironment', + 'expiresOn' => '\DateTime', + 'id' => 'int', + 'labels' => '\Wallee\Sdk\Model\Label[]', + 'language' => 'string', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'obsoletedOn' => '\DateTime', + 'paymentConnectorConfiguration' => '\Wallee\Sdk\Model\PaymentConnectorConfiguration', + 'plannedPurgeDate' => '\DateTime', + 'processorToken' => 'string', + 'shippingAddress' => '\Wallee\Sdk\Model\Address', + 'state' => '\Wallee\Sdk\Model\TokenVersionState', + 'token' => '\Wallee\Sdk\Model\Token', + 'type' => '\Wallee\Sdk\Model\TokenVersionType', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \DateTime + */ + private $activatedOn; + + /** + * + * + * @var \Wallee\Sdk\Model\Address + */ + private $billingAddress; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var \Wallee\Sdk\Model\ChargeAttemptEnvironment + */ + private $environment; + + /** + * The expires on date indicates when token version expires. Once this date is reached the token version is marked as obsolete. + * + * @var \DateTime + */ + private $expiresOn; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var \Wallee\Sdk\Model\Label[] + */ + private $labels; + + /** + * + * + * @var string + */ + private $language; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var string + */ + private $name; + + /** + * + * + * @var \DateTime + */ + private $obsoletedOn; + + /** + * + * + * @var \Wallee\Sdk\Model\PaymentConnectorConfiguration + */ + private $paymentConnectorConfiguration; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var string + */ + private $processorToken; + + /** + * + * + * @var \Wallee\Sdk\Model\Address + */ + private $shippingAddress; + + /** + * + * + * @var \Wallee\Sdk\Model\TokenVersionState + */ + private $state; + + /** + * + * + * @var \Wallee\Sdk\Model\Token + */ + private $token; + + /** + * The token version type determines what kind of token it is and by which payment connector the token can be processed by. + * + * @var \Wallee\Sdk\Model\TokenVersionType + */ + private $type; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['billingAddress'])) { + $this->setBillingAddress($data['billingAddress']); + } + if (isset($data['environment'])) { + $this->setEnvironment($data['environment']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['labels'])) { + $this->setLabels($data['labels']); + } + if (isset($data['paymentConnectorConfiguration'])) { + $this->setPaymentConnectorConfiguration($data['paymentConnectorConfiguration']); + } + if (isset($data['shippingAddress'])) { + $this->setShippingAddress($data['shippingAddress']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['token'])) { + $this->setToken($data['token']); + } + if (isset($data['type'])) { + $this->setType($data['type']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns activatedOn. + * + * + * + * @return \DateTime + */ + public function getActivatedOn() { + return $this->activatedOn; + } + + /** + * Sets activatedOn. + * + * @param \DateTime $activatedOn + * @return TokenVersion + */ + protected function setActivatedOn($activatedOn) { + $this->activatedOn = $activatedOn; + + return $this; + } + + /** + * Returns billingAddress. + * + * + * + * @return \Wallee\Sdk\Model\Address + */ + public function getBillingAddress() { + return $this->billingAddress; + } + + /** + * Sets billingAddress. + * + * @param \Wallee\Sdk\Model\Address $billingAddress + * @return TokenVersion + */ + public function setBillingAddress($billingAddress) { + $this->billingAddress = $billingAddress; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return TokenVersion + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns environment. + * + * + * + * @return \Wallee\Sdk\Model\ChargeAttemptEnvironment + */ + public function getEnvironment() { + return $this->environment; + } + + /** + * Sets environment. + * + * @param \Wallee\Sdk\Model\ChargeAttemptEnvironment $environment + * @return TokenVersion + */ + public function setEnvironment($environment) { + $this->environment = $environment; + + return $this; + } + + /** + * Returns expiresOn. + * + * The expires on date indicates when token version expires. Once this date is reached the token version is marked as obsolete. + * + * @return \DateTime + */ + public function getExpiresOn() { + return $this->expiresOn; + } + + /** + * Sets expiresOn. + * + * @param \DateTime $expiresOn + * @return TokenVersion + */ + protected function setExpiresOn($expiresOn) { + $this->expiresOn = $expiresOn; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return TokenVersion + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns labels. + * + * + * + * @return \Wallee\Sdk\Model\Label[] + */ + public function getLabels() { + return $this->labels; + } + + /** + * Sets labels. + * + * @param \Wallee\Sdk\Model\Label[] $labels + * @return TokenVersion + */ + public function setLabels($labels) { + $this->labels = $labels; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return TokenVersion + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return TokenVersion + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return TokenVersion + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns obsoletedOn. + * + * + * + * @return \DateTime + */ + public function getObsoletedOn() { + return $this->obsoletedOn; + } + + /** + * Sets obsoletedOn. + * + * @param \DateTime $obsoletedOn + * @return TokenVersion + */ + protected function setObsoletedOn($obsoletedOn) { + $this->obsoletedOn = $obsoletedOn; + + return $this; + } + + /** + * Returns paymentConnectorConfiguration. + * + * + * + * @return \Wallee\Sdk\Model\PaymentConnectorConfiguration + */ + public function getPaymentConnectorConfiguration() { + return $this->paymentConnectorConfiguration; + } + + /** + * Sets paymentConnectorConfiguration. + * + * @param \Wallee\Sdk\Model\PaymentConnectorConfiguration $paymentConnectorConfiguration + * @return TokenVersion + */ + public function setPaymentConnectorConfiguration($paymentConnectorConfiguration) { + $this->paymentConnectorConfiguration = $paymentConnectorConfiguration; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return TokenVersion + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns processorToken. + * + * + * + * @return string + */ + public function getProcessorToken() { + return $this->processorToken; + } + + /** + * Sets processorToken. + * + * @param string $processorToken + * @return TokenVersion + */ + protected function setProcessorToken($processorToken) { + $this->processorToken = $processorToken; + + return $this; + } + + /** + * Returns shippingAddress. + * + * + * + * @return \Wallee\Sdk\Model\Address + */ + public function getShippingAddress() { + return $this->shippingAddress; + } + + /** + * Sets shippingAddress. + * + * @param \Wallee\Sdk\Model\Address $shippingAddress + * @return TokenVersion + */ + public function setShippingAddress($shippingAddress) { + $this->shippingAddress = $shippingAddress; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\TokenVersionState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\TokenVersionState $state + * @return TokenVersion + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns token. + * + * + * + * @return \Wallee\Sdk\Model\Token + */ + public function getToken() { + return $this->token; + } + + /** + * Sets token. + * + * @param \Wallee\Sdk\Model\Token $token + * @return TokenVersion + */ + public function setToken($token) { + $this->token = $token; + + return $this; + } + + /** + * Returns type. + * + * The token version type determines what kind of token it is and by which payment connector the token can be processed by. + * + * @return \Wallee\Sdk\Model\TokenVersionType + */ + public function getType() { + return $this->type; + } + + /** + * Sets type. + * + * @param \Wallee\Sdk\Model\TokenVersionType $type + * @return TokenVersion + */ + public function setType($type) { + $this->type = $type; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return TokenVersion + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenVersionState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenVersionState.php new file mode 100644 index 0000000..71a9e99 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenVersionState.php @@ -0,0 +1,44 @@ + 'map[string,string]', + 'feature' => '\Wallee\Sdk\Model\Feature', + 'id' => 'int', + 'name' => 'map[string,string]' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var map[string,string] + */ + private $description; + + /** + * + * + * @var \Wallee\Sdk\Model\Feature + */ + private $feature; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['description'])) { + $this->setDescription($data['description']); + } + if (isset($data['feature'])) { + $this->setFeature($data['feature']); + } + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns description. + * + * + * + * @return map[string,string] + */ + public function getDescription() { + return $this->description; + } + + /** + * Sets description. + * + * @param map[string,string] $description + * @return TokenVersionType + */ + public function setDescription($description) { + $this->description = $description; + + return $this; + } + + /** + * Returns feature. + * + * + * + * @return \Wallee\Sdk\Model\Feature + */ + public function getFeature() { + return $this->feature; + } + + /** + * Sets feature. + * + * @param \Wallee\Sdk\Model\Feature $feature + * @return TokenVersionType + */ + public function setFeature($feature) { + $this->feature = $feature; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return TokenVersionType + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return TokenVersionType + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenizationnMode.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenizationnMode.php new file mode 100644 index 0000000..7c4474c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TokenizationnMode.php @@ -0,0 +1,44 @@ + 'string', + 'acceptLanguageHeader' => 'string', + 'allowedPaymentMethodBrands' => '\Wallee\Sdk\Model\PaymentMethodBrand[]', + 'allowedPaymentMethodConfigurations' => 'int[]', + 'authorizationAmount' => 'float', + 'authorizationEnvironment' => '\Wallee\Sdk\Model\ChargeAttemptEnvironment', + 'authorizationTimeoutOn' => '\DateTime', + 'authorizedOn' => '\DateTime', + 'autoConfirmationEnabled' => 'bool', + 'billingAddress' => '\Wallee\Sdk\Model\Address', + 'chargeRetryEnabled' => 'bool', + 'completedOn' => '\DateTime', + 'completionTimeoutOn' => '\DateTime', + 'confirmedBy' => 'int', + 'confirmedOn' => '\DateTime', + 'createdBy' => 'int', + 'createdOn' => '\DateTime', + 'currency' => 'string', + 'customerEmailAddress' => 'string', + 'customerId' => 'string', + 'customersPresence' => '\Wallee\Sdk\Model\CustomersPresence', + 'deliveryDecisionMadeOn' => '\DateTime', + 'deviceSessionIdentifier' => 'string', + 'endOfLife' => '\DateTime', + 'environment' => '\Wallee\Sdk\Model\Environment', + 'environmentSelectionStrategy' => '\Wallee\Sdk\Model\TransactionEnvironmentSelectionStrategy', + 'failedOn' => '\DateTime', + 'failedUrl' => 'string', + 'failureReason' => '\Wallee\Sdk\Model\FailureReason', + 'group' => '\Wallee\Sdk\Model\TransactionGroup', + 'id' => 'int', + 'internetProtocolAddress' => 'string', + 'internetProtocolAddressCountry' => 'string', + 'invoiceMerchantReference' => 'string', + 'language' => 'string', + 'lineItems' => '\Wallee\Sdk\Model\LineItem[]', + 'linkedSpaceId' => 'int', + 'merchantReference' => 'string', + 'metaData' => 'map[string,string]', + 'paymentConnectorConfiguration' => '\Wallee\Sdk\Model\PaymentConnectorConfiguration', + 'plannedPurgeDate' => '\DateTime', + 'processingOn' => '\DateTime', + 'refundedAmount' => 'float', + 'shippingAddress' => '\Wallee\Sdk\Model\Address', + 'shippingMethod' => 'string', + 'spaceViewId' => 'int', + 'state' => '\Wallee\Sdk\Model\TransactionState', + 'successUrl' => 'string', + 'timeZone' => 'string', + 'token' => '\Wallee\Sdk\Model\Token', + 'tokenizationMode' => '\Wallee\Sdk\Model\TokenizationnMode', + 'userAgentHeader' => 'string', + 'userFailureMessage' => 'string', + 'userInterfaceType' => '\Wallee\Sdk\Model\TransactionUserInterfaceType', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var string + */ + private $acceptHeader; + + /** + * The accept language contains the header which indicates the language preferences of the buyer. + * + * @var string + */ + private $acceptLanguageHeader; + + /** + * + * + * @var \Wallee\Sdk\Model\PaymentMethodBrand[] + */ + private $allowedPaymentMethodBrands; + + /** + * + * + * @var int[] + */ + private $allowedPaymentMethodConfigurations; + + /** + * + * + * @var float + */ + private $authorizationAmount; + + /** + * The environment in which this transaction was successfully authorized. + * + * @var \Wallee\Sdk\Model\ChargeAttemptEnvironment + */ + private $authorizationEnvironment; + + /** + * This is the time on which the transaction will be timed out when it is not at least authorized. The timeout time may change over time. + * + * @var \DateTime + */ + private $authorizationTimeoutOn; + + /** + * + * + * @var \DateTime + */ + private $authorizedOn; + + /** + * When auto confirmation is enabled the transaction can be confirmed by the user and does not require an explicit confirmation through the web service API. + * + * @var bool + */ + private $autoConfirmationEnabled; + + /** + * + * + * @var \Wallee\Sdk\Model\Address + */ + private $billingAddress; + + /** + * When the charging of the customer fails we can retry the charging. This implies that we redirect the user back to the payment page which allows the customer to retry. By default we will retry. + * + * @var bool + */ + private $chargeRetryEnabled; + + /** + * + * + * @var \DateTime + */ + private $completedOn; + + /** + * + * + * @var \DateTime + */ + private $completionTimeoutOn; + + /** + * + * + * @var int + */ + private $confirmedBy; + + /** + * + * + * @var \DateTime + */ + private $confirmedOn; + + /** + * + * + * @var int + */ + private $createdBy; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var string + */ + private $currency; + + /** + * The customer email address is the email address of the customer. If no email address is provided on the shipping or billing address this address is used. + * + * @var string + */ + private $customerEmailAddress; + + /** + * + * + * @var string + */ + private $customerId; + + /** + * The customer's presence indicates what kind of authentication methods can be used during the authorization of the transaction. If no value is provided, 'Virtually Present' is used by default. + * + * @var \Wallee\Sdk\Model\CustomersPresence + */ + private $customersPresence; + + /** + * This date indicates when the decision has been made if a transaction should be delivered or not. + * + * @var \DateTime + */ + private $deliveryDecisionMadeOn; + + /** + * The device session identifier links the transaction with the session identifier provided in the URL of the device data JavaScript. This allows to link the transaction with the collected device data of the buyer. + * + * @var string + */ + private $deviceSessionIdentifier; + + /** + * The transaction's end of life indicates the date from which on no operation can be carried out anymore. + * + * @var \DateTime + */ + private $endOfLife; + + /** + * + * + * @var \Wallee\Sdk\Model\Environment + */ + private $environment; + + /** + * The environment selection strategy determines how the environment (test or production) for processing the transaction is selected. + * + * @var \Wallee\Sdk\Model\TransactionEnvironmentSelectionStrategy + */ + private $environmentSelectionStrategy; + + /** + * + * + * @var \DateTime + */ + private $failedOn; + + /** + * The user will be redirected to failed URL when the transaction could not be authorized or completed. In case no failed URL is specified a default failed page will be displayed. + * + * @var string + */ + private $failedUrl; + + /** + * The failure reason describes why the transaction failed. This is only provided when the transaction is marked as failed. + * + * @var \Wallee\Sdk\Model\FailureReason + */ + private $failureReason; + + /** + * + * + * @var \Wallee\Sdk\Model\TransactionGroup + */ + private $group; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The Internet Protocol (IP) address identifies the device of the buyer. + * + * @var string + */ + private $internetProtocolAddress; + + /** + * + * + * @var string + */ + private $internetProtocolAddressCountry; + + /** + * + * + * @var string + */ + private $invoiceMerchantReference; + + /** + * + * + * @var string + */ + private $language; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItem[] + */ + private $lineItems; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var string + */ + private $merchantReference; + + /** + * Meta data allow to store additional data along the object. + * + * @var map[string,string] + */ + private $metaData; + + /** + * + * + * @var \Wallee\Sdk\Model\PaymentConnectorConfiguration + */ + private $paymentConnectorConfiguration; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \DateTime + */ + private $processingOn; + + /** + * The refunded amount is the total amount which has been refunded so far. + * + * @var float + */ + private $refundedAmount; + + /** + * + * + * @var \Wallee\Sdk\Model\Address + */ + private $shippingAddress; + + /** + * + * + * @var string + */ + private $shippingMethod; + + /** + * + * + * @var int + */ + private $spaceViewId; + + /** + * + * + * @var \Wallee\Sdk\Model\TransactionState + */ + private $state; + + /** + * The user will be redirected to success URL when the transaction could be authorized or completed. In case no success URL is specified a default success page will be displayed. + * + * @var string + */ + private $successUrl; + + /** + * The time zone defines in which time zone the customer is located in. The time zone may affects how dates are formatted when interacting with the customer. + * + * @var string + */ + private $timeZone; + + /** + * + * + * @var \Wallee\Sdk\Model\Token + */ + private $token; + + /** + * The tokenization mode controls if and how a token is automatically applied to the transaction. When a token is directly assigned to the transaction the mode will have no effect at all. Obmitting the mode will disable the automatic application of a token. + * + * @var \Wallee\Sdk\Model\TokenizationnMode + */ + private $tokenizationMode; + + /** + * The user agent header provides the exact string which contains the user agent of the buyer. + * + * @var string + */ + private $userAgentHeader; + + /** + * The failure message describes for an end user why the transaction is failed in the language of the user. This is only provided when the transaction is marked as failed. + * + * @var string + */ + private $userFailureMessage; + + /** + * The user interface type defines through which user interface the transaction has been processed resp. created. + * + * @var \Wallee\Sdk\Model\TransactionUserInterfaceType + */ + private $userInterfaceType; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['allowedPaymentMethodBrands'])) { + $this->setAllowedPaymentMethodBrands($data['allowedPaymentMethodBrands']); + } + if (isset($data['allowedPaymentMethodConfigurations'])) { + $this->setAllowedPaymentMethodConfigurations($data['allowedPaymentMethodConfigurations']); + } + if (isset($data['authorizationEnvironment'])) { + $this->setAuthorizationEnvironment($data['authorizationEnvironment']); + } + if (isset($data['billingAddress'])) { + $this->setBillingAddress($data['billingAddress']); + } + if (isset($data['customersPresence'])) { + $this->setCustomersPresence($data['customersPresence']); + } + if (isset($data['environment'])) { + $this->setEnvironment($data['environment']); + } + if (isset($data['environmentSelectionStrategy'])) { + $this->setEnvironmentSelectionStrategy($data['environmentSelectionStrategy']); + } + if (isset($data['failureReason'])) { + $this->setFailureReason($data['failureReason']); + } + if (isset($data['group'])) { + $this->setGroup($data['group']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + if (isset($data['metaData'])) { + $this->setMetaData($data['metaData']); + } + if (isset($data['paymentConnectorConfiguration'])) { + $this->setPaymentConnectorConfiguration($data['paymentConnectorConfiguration']); + } + if (isset($data['shippingAddress'])) { + $this->setShippingAddress($data['shippingAddress']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['token'])) { + $this->setToken($data['token']); + } + if (isset($data['tokenizationMode'])) { + $this->setTokenizationMode($data['tokenizationMode']); + } + if (isset($data['userInterfaceType'])) { + $this->setUserInterfaceType($data['userInterfaceType']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns acceptHeader. + * + * + * + * @return string + */ + public function getAcceptHeader() { + return $this->acceptHeader; + } + + /** + * Sets acceptHeader. + * + * @param string $acceptHeader + * @return Transaction + */ + protected function setAcceptHeader($acceptHeader) { + $this->acceptHeader = $acceptHeader; + + return $this; + } + + /** + * Returns acceptLanguageHeader. + * + * The accept language contains the header which indicates the language preferences of the buyer. + * + * @return string + */ + public function getAcceptLanguageHeader() { + return $this->acceptLanguageHeader; + } + + /** + * Sets acceptLanguageHeader. + * + * @param string $acceptLanguageHeader + * @return Transaction + */ + protected function setAcceptLanguageHeader($acceptLanguageHeader) { + $this->acceptLanguageHeader = $acceptLanguageHeader; + + return $this; + } + + /** + * Returns allowedPaymentMethodBrands. + * + * + * + * @return \Wallee\Sdk\Model\PaymentMethodBrand[] + */ + public function getAllowedPaymentMethodBrands() { + return $this->allowedPaymentMethodBrands; + } + + /** + * Sets allowedPaymentMethodBrands. + * + * @param \Wallee\Sdk\Model\PaymentMethodBrand[] $allowedPaymentMethodBrands + * @return Transaction + */ + public function setAllowedPaymentMethodBrands($allowedPaymentMethodBrands) { + $this->allowedPaymentMethodBrands = $allowedPaymentMethodBrands; + + return $this; + } + + /** + * Returns allowedPaymentMethodConfigurations. + * + * + * + * @return int[] + */ + public function getAllowedPaymentMethodConfigurations() { + return $this->allowedPaymentMethodConfigurations; + } + + /** + * Sets allowedPaymentMethodConfigurations. + * + * @param int[] $allowedPaymentMethodConfigurations + * @return Transaction + */ + public function setAllowedPaymentMethodConfigurations($allowedPaymentMethodConfigurations) { + $this->allowedPaymentMethodConfigurations = $allowedPaymentMethodConfigurations; + + return $this; + } + + /** + * Returns authorizationAmount. + * + * + * + * @return float + */ + public function getAuthorizationAmount() { + return $this->authorizationAmount; + } + + /** + * Sets authorizationAmount. + * + * @param float $authorizationAmount + * @return Transaction + */ + protected function setAuthorizationAmount($authorizationAmount) { + $this->authorizationAmount = $authorizationAmount; + + return $this; + } + + /** + * Returns authorizationEnvironment. + * + * The environment in which this transaction was successfully authorized. + * + * @return \Wallee\Sdk\Model\ChargeAttemptEnvironment + */ + public function getAuthorizationEnvironment() { + return $this->authorizationEnvironment; + } + + /** + * Sets authorizationEnvironment. + * + * @param \Wallee\Sdk\Model\ChargeAttemptEnvironment $authorizationEnvironment + * @return Transaction + */ + public function setAuthorizationEnvironment($authorizationEnvironment) { + $this->authorizationEnvironment = $authorizationEnvironment; + + return $this; + } + + /** + * Returns authorizationTimeoutOn. + * + * This is the time on which the transaction will be timed out when it is not at least authorized. The timeout time may change over time. + * + * @return \DateTime + */ + public function getAuthorizationTimeoutOn() { + return $this->authorizationTimeoutOn; + } + + /** + * Sets authorizationTimeoutOn. + * + * @param \DateTime $authorizationTimeoutOn + * @return Transaction + */ + protected function setAuthorizationTimeoutOn($authorizationTimeoutOn) { + $this->authorizationTimeoutOn = $authorizationTimeoutOn; + + return $this; + } + + /** + * Returns authorizedOn. + * + * + * + * @return \DateTime + */ + public function getAuthorizedOn() { + return $this->authorizedOn; + } + + /** + * Sets authorizedOn. + * + * @param \DateTime $authorizedOn + * @return Transaction + */ + protected function setAuthorizedOn($authorizedOn) { + $this->authorizedOn = $authorizedOn; + + return $this; + } + + /** + * Returns autoConfirmationEnabled. + * + * When auto confirmation is enabled the transaction can be confirmed by the user and does not require an explicit confirmation through the web service API. + * + * @return bool + */ + public function getAutoConfirmationEnabled() { + return $this->autoConfirmationEnabled; + } + + /** + * Sets autoConfirmationEnabled. + * + * @param bool $autoConfirmationEnabled + * @return Transaction + */ + protected function setAutoConfirmationEnabled($autoConfirmationEnabled) { + $this->autoConfirmationEnabled = $autoConfirmationEnabled; + + return $this; + } + + /** + * Returns billingAddress. + * + * + * + * @return \Wallee\Sdk\Model\Address + */ + public function getBillingAddress() { + return $this->billingAddress; + } + + /** + * Sets billingAddress. + * + * @param \Wallee\Sdk\Model\Address $billingAddress + * @return Transaction + */ + public function setBillingAddress($billingAddress) { + $this->billingAddress = $billingAddress; + + return $this; + } + + /** + * Returns chargeRetryEnabled. + * + * When the charging of the customer fails we can retry the charging. This implies that we redirect the user back to the payment page which allows the customer to retry. By default we will retry. + * + * @return bool + */ + public function getChargeRetryEnabled() { + return $this->chargeRetryEnabled; + } + + /** + * Sets chargeRetryEnabled. + * + * @param bool $chargeRetryEnabled + * @return Transaction + */ + protected function setChargeRetryEnabled($chargeRetryEnabled) { + $this->chargeRetryEnabled = $chargeRetryEnabled; + + return $this; + } + + /** + * Returns completedOn. + * + * + * + * @return \DateTime + */ + public function getCompletedOn() { + return $this->completedOn; + } + + /** + * Sets completedOn. + * + * @param \DateTime $completedOn + * @return Transaction + */ + protected function setCompletedOn($completedOn) { + $this->completedOn = $completedOn; + + return $this; + } + + /** + * Returns completionTimeoutOn. + * + * + * + * @return \DateTime + */ + public function getCompletionTimeoutOn() { + return $this->completionTimeoutOn; + } + + /** + * Sets completionTimeoutOn. + * + * @param \DateTime $completionTimeoutOn + * @return Transaction + */ + protected function setCompletionTimeoutOn($completionTimeoutOn) { + $this->completionTimeoutOn = $completionTimeoutOn; + + return $this; + } + + /** + * Returns confirmedBy. + * + * + * + * @return int + */ + public function getConfirmedBy() { + return $this->confirmedBy; + } + + /** + * Sets confirmedBy. + * + * @param int $confirmedBy + * @return Transaction + */ + protected function setConfirmedBy($confirmedBy) { + $this->confirmedBy = $confirmedBy; + + return $this; + } + + /** + * Returns confirmedOn. + * + * + * + * @return \DateTime + */ + public function getConfirmedOn() { + return $this->confirmedOn; + } + + /** + * Sets confirmedOn. + * + * @param \DateTime $confirmedOn + * @return Transaction + */ + protected function setConfirmedOn($confirmedOn) { + $this->confirmedOn = $confirmedOn; + + return $this; + } + + /** + * Returns createdBy. + * + * + * + * @return int + */ + public function getCreatedBy() { + return $this->createdBy; + } + + /** + * Sets createdBy. + * + * @param int $createdBy + * @return Transaction + */ + protected function setCreatedBy($createdBy) { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return Transaction + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns currency. + * + * + * + * @return string + */ + public function getCurrency() { + return $this->currency; + } + + /** + * Sets currency. + * + * @param string $currency + * @return Transaction + */ + protected function setCurrency($currency) { + $this->currency = $currency; + + return $this; + } + + /** + * Returns customerEmailAddress. + * + * The customer email address is the email address of the customer. If no email address is provided on the shipping or billing address this address is used. + * + * @return string + */ + public function getCustomerEmailAddress() { + return $this->customerEmailAddress; + } + + /** + * Sets customerEmailAddress. + * + * @param string $customerEmailAddress + * @return Transaction + */ + protected function setCustomerEmailAddress($customerEmailAddress) { + $this->customerEmailAddress = $customerEmailAddress; + + return $this; + } + + /** + * Returns customerId. + * + * + * + * @return string + */ + public function getCustomerId() { + return $this->customerId; + } + + /** + * Sets customerId. + * + * @param string $customerId + * @return Transaction + */ + protected function setCustomerId($customerId) { + $this->customerId = $customerId; + + return $this; + } + + /** + * Returns customersPresence. + * + * The customer's presence indicates what kind of authentication methods can be used during the authorization of the transaction. If no value is provided, 'Virtually Present' is used by default. + * + * @return \Wallee\Sdk\Model\CustomersPresence + */ + public function getCustomersPresence() { + return $this->customersPresence; + } + + /** + * Sets customersPresence. + * + * @param \Wallee\Sdk\Model\CustomersPresence $customersPresence + * @return Transaction + */ + public function setCustomersPresence($customersPresence) { + $this->customersPresence = $customersPresence; + + return $this; + } + + /** + * Returns deliveryDecisionMadeOn. + * + * This date indicates when the decision has been made if a transaction should be delivered or not. + * + * @return \DateTime + */ + public function getDeliveryDecisionMadeOn() { + return $this->deliveryDecisionMadeOn; + } + + /** + * Sets deliveryDecisionMadeOn. + * + * @param \DateTime $deliveryDecisionMadeOn + * @return Transaction + */ + protected function setDeliveryDecisionMadeOn($deliveryDecisionMadeOn) { + $this->deliveryDecisionMadeOn = $deliveryDecisionMadeOn; + + return $this; + } + + /** + * Returns deviceSessionIdentifier. + * + * The device session identifier links the transaction with the session identifier provided in the URL of the device data JavaScript. This allows to link the transaction with the collected device data of the buyer. + * + * @return string + */ + public function getDeviceSessionIdentifier() { + return $this->deviceSessionIdentifier; + } + + /** + * Sets deviceSessionIdentifier. + * + * @param string $deviceSessionIdentifier + * @return Transaction + */ + protected function setDeviceSessionIdentifier($deviceSessionIdentifier) { + $this->deviceSessionIdentifier = $deviceSessionIdentifier; + + return $this; + } + + /** + * Returns endOfLife. + * + * The transaction's end of life indicates the date from which on no operation can be carried out anymore. + * + * @return \DateTime + */ + public function getEndOfLife() { + return $this->endOfLife; + } + + /** + * Sets endOfLife. + * + * @param \DateTime $endOfLife + * @return Transaction + */ + protected function setEndOfLife($endOfLife) { + $this->endOfLife = $endOfLife; + + return $this; + } + + /** + * Returns environment. + * + * + * + * @return \Wallee\Sdk\Model\Environment + */ + public function getEnvironment() { + return $this->environment; + } + + /** + * Sets environment. + * + * @param \Wallee\Sdk\Model\Environment $environment + * @return Transaction + */ + public function setEnvironment($environment) { + $this->environment = $environment; + + return $this; + } + + /** + * Returns environmentSelectionStrategy. + * + * The environment selection strategy determines how the environment (test or production) for processing the transaction is selected. + * + * @return \Wallee\Sdk\Model\TransactionEnvironmentSelectionStrategy + */ + public function getEnvironmentSelectionStrategy() { + return $this->environmentSelectionStrategy; + } + + /** + * Sets environmentSelectionStrategy. + * + * @param \Wallee\Sdk\Model\TransactionEnvironmentSelectionStrategy $environmentSelectionStrategy + * @return Transaction + */ + public function setEnvironmentSelectionStrategy($environmentSelectionStrategy) { + $this->environmentSelectionStrategy = $environmentSelectionStrategy; + + return $this; + } + + /** + * Returns failedOn. + * + * + * + * @return \DateTime + */ + public function getFailedOn() { + return $this->failedOn; + } + + /** + * Sets failedOn. + * + * @param \DateTime $failedOn + * @return Transaction + */ + protected function setFailedOn($failedOn) { + $this->failedOn = $failedOn; + + return $this; + } + + /** + * Returns failedUrl. + * + * The user will be redirected to failed URL when the transaction could not be authorized or completed. In case no failed URL is specified a default failed page will be displayed. + * + * @return string + */ + public function getFailedUrl() { + return $this->failedUrl; + } + + /** + * Sets failedUrl. + * + * @param string $failedUrl + * @return Transaction + */ + protected function setFailedUrl($failedUrl) { + $this->failedUrl = $failedUrl; + + return $this; + } + + /** + * Returns failureReason. + * + * The failure reason describes why the transaction failed. This is only provided when the transaction is marked as failed. + * + * @return \Wallee\Sdk\Model\FailureReason + */ + public function getFailureReason() { + return $this->failureReason; + } + + /** + * Sets failureReason. + * + * @param \Wallee\Sdk\Model\FailureReason $failureReason + * @return Transaction + */ + public function setFailureReason($failureReason) { + $this->failureReason = $failureReason; + + return $this; + } + + /** + * Returns group. + * + * + * + * @return \Wallee\Sdk\Model\TransactionGroup + */ + public function getGroup() { + return $this->group; + } + + /** + * Sets group. + * + * @param \Wallee\Sdk\Model\TransactionGroup $group + * @return Transaction + */ + public function setGroup($group) { + $this->group = $group; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return Transaction + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns internetProtocolAddress. + * + * The Internet Protocol (IP) address identifies the device of the buyer. + * + * @return string + */ + public function getInternetProtocolAddress() { + return $this->internetProtocolAddress; + } + + /** + * Sets internetProtocolAddress. + * + * @param string $internetProtocolAddress + * @return Transaction + */ + protected function setInternetProtocolAddress($internetProtocolAddress) { + $this->internetProtocolAddress = $internetProtocolAddress; + + return $this; + } + + /** + * Returns internetProtocolAddressCountry. + * + * + * + * @return string + */ + public function getInternetProtocolAddressCountry() { + return $this->internetProtocolAddressCountry; + } + + /** + * Sets internetProtocolAddressCountry. + * + * @param string $internetProtocolAddressCountry + * @return Transaction + */ + protected function setInternetProtocolAddressCountry($internetProtocolAddressCountry) { + $this->internetProtocolAddressCountry = $internetProtocolAddressCountry; + + return $this; + } + + /** + * Returns invoiceMerchantReference. + * + * + * + * @return string + */ + public function getInvoiceMerchantReference() { + return $this->invoiceMerchantReference; + } + + /** + * Sets invoiceMerchantReference. + * + * @param string $invoiceMerchantReference + * @return Transaction + */ + protected function setInvoiceMerchantReference($invoiceMerchantReference) { + $this->invoiceMerchantReference = $invoiceMerchantReference; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return Transaction + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns lineItems. + * + * + * + * @return \Wallee\Sdk\Model\LineItem[] + */ + public function getLineItems() { + return $this->lineItems; + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItem[] $lineItems + * @return Transaction + */ + public function setLineItems($lineItems) { + $this->lineItems = $lineItems; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return Transaction + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns merchantReference. + * + * + * + * @return string + */ + public function getMerchantReference() { + return $this->merchantReference; + } + + /** + * Sets merchantReference. + * + * @param string $merchantReference + * @return Transaction + */ + protected function setMerchantReference($merchantReference) { + $this->merchantReference = $merchantReference; + + return $this; + } + + /** + * Returns metaData. + * + * Meta data allow to store additional data along the object. + * + * @return map[string,string] + */ + public function getMetaData() { + return $this->metaData; + } + + /** + * Sets metaData. + * + * @param map[string,string] $metaData + * @return Transaction + */ + public function setMetaData($metaData) { + $this->metaData = $metaData; + + return $this; + } + + /** + * Returns paymentConnectorConfiguration. + * + * + * + * @return \Wallee\Sdk\Model\PaymentConnectorConfiguration + */ + public function getPaymentConnectorConfiguration() { + return $this->paymentConnectorConfiguration; + } + + /** + * Sets paymentConnectorConfiguration. + * + * @param \Wallee\Sdk\Model\PaymentConnectorConfiguration $paymentConnectorConfiguration + * @return Transaction + */ + public function setPaymentConnectorConfiguration($paymentConnectorConfiguration) { + $this->paymentConnectorConfiguration = $paymentConnectorConfiguration; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return Transaction + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns processingOn. + * + * + * + * @return \DateTime + */ + public function getProcessingOn() { + return $this->processingOn; + } + + /** + * Sets processingOn. + * + * @param \DateTime $processingOn + * @return Transaction + */ + protected function setProcessingOn($processingOn) { + $this->processingOn = $processingOn; + + return $this; + } + + /** + * Returns refundedAmount. + * + * The refunded amount is the total amount which has been refunded so far. + * + * @return float + */ + public function getRefundedAmount() { + return $this->refundedAmount; + } + + /** + * Sets refundedAmount. + * + * @param float $refundedAmount + * @return Transaction + */ + protected function setRefundedAmount($refundedAmount) { + $this->refundedAmount = $refundedAmount; + + return $this; + } + + /** + * Returns shippingAddress. + * + * + * + * @return \Wallee\Sdk\Model\Address + */ + public function getShippingAddress() { + return $this->shippingAddress; + } + + /** + * Sets shippingAddress. + * + * @param \Wallee\Sdk\Model\Address $shippingAddress + * @return Transaction + */ + public function setShippingAddress($shippingAddress) { + $this->shippingAddress = $shippingAddress; + + return $this; + } + + /** + * Returns shippingMethod. + * + * + * + * @return string + */ + public function getShippingMethod() { + return $this->shippingMethod; + } + + /** + * Sets shippingMethod. + * + * @param string $shippingMethod + * @return Transaction + */ + protected function setShippingMethod($shippingMethod) { + $this->shippingMethod = $shippingMethod; + + return $this; + } + + /** + * Returns spaceViewId. + * + * + * + * @return int + */ + public function getSpaceViewId() { + return $this->spaceViewId; + } + + /** + * Sets spaceViewId. + * + * @param int $spaceViewId + * @return Transaction + */ + protected function setSpaceViewId($spaceViewId) { + $this->spaceViewId = $spaceViewId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\TransactionState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\TransactionState $state + * @return Transaction + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns successUrl. + * + * The user will be redirected to success URL when the transaction could be authorized or completed. In case no success URL is specified a default success page will be displayed. + * + * @return string + */ + public function getSuccessUrl() { + return $this->successUrl; + } + + /** + * Sets successUrl. + * + * @param string $successUrl + * @return Transaction + */ + protected function setSuccessUrl($successUrl) { + $this->successUrl = $successUrl; + + return $this; + } + + /** + * Returns timeZone. + * + * The time zone defines in which time zone the customer is located in. The time zone may affects how dates are formatted when interacting with the customer. + * + * @return string + */ + public function getTimeZone() { + return $this->timeZone; + } + + /** + * Sets timeZone. + * + * @param string $timeZone + * @return Transaction + */ + protected function setTimeZone($timeZone) { + $this->timeZone = $timeZone; + + return $this; + } + + /** + * Returns token. + * + * + * + * @return \Wallee\Sdk\Model\Token + */ + public function getToken() { + return $this->token; + } + + /** + * Sets token. + * + * @param \Wallee\Sdk\Model\Token $token + * @return Transaction + */ + public function setToken($token) { + $this->token = $token; + + return $this; + } + + /** + * Returns tokenizationMode. + * + * The tokenization mode controls if and how a token is automatically applied to the transaction. When a token is directly assigned to the transaction the mode will have no effect at all. Obmitting the mode will disable the automatic application of a token. + * + * @return \Wallee\Sdk\Model\TokenizationnMode + */ + public function getTokenizationMode() { + return $this->tokenizationMode; + } + + /** + * Sets tokenizationMode. + * + * @param \Wallee\Sdk\Model\TokenizationnMode $tokenizationMode + * @return Transaction + */ + public function setTokenizationMode($tokenizationMode) { + $this->tokenizationMode = $tokenizationMode; + + return $this; + } + + /** + * Returns userAgentHeader. + * + * The user agent header provides the exact string which contains the user agent of the buyer. + * + * @return string + */ + public function getUserAgentHeader() { + return $this->userAgentHeader; + } + + /** + * Sets userAgentHeader. + * + * @param string $userAgentHeader + * @return Transaction + */ + protected function setUserAgentHeader($userAgentHeader) { + $this->userAgentHeader = $userAgentHeader; + + return $this; + } + + /** + * Returns userFailureMessage. + * + * The failure message describes for an end user why the transaction is failed in the language of the user. This is only provided when the transaction is marked as failed. + * + * @return string + */ + public function getUserFailureMessage() { + return $this->userFailureMessage; + } + + /** + * Sets userFailureMessage. + * + * @param string $userFailureMessage + * @return Transaction + */ + protected function setUserFailureMessage($userFailureMessage) { + $this->userFailureMessage = $userFailureMessage; + + return $this; + } + + /** + * Returns userInterfaceType. + * + * The user interface type defines through which user interface the transaction has been processed resp. created. + * + * @return \Wallee\Sdk\Model\TransactionUserInterfaceType + */ + public function getUserInterfaceType() { + return $this->userInterfaceType; + } + + /** + * Sets userInterfaceType. + * + * @param \Wallee\Sdk\Model\TransactionUserInterfaceType $userInterfaceType + * @return Transaction + */ + public function setUserInterfaceType($userInterfaceType) { + $this->userInterfaceType = $userInterfaceType; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return Transaction + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionAwareEntity.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionAwareEntity.php new file mode 100644 index 0000000..3420cc8 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionAwareEntity.php @@ -0,0 +1,205 @@ + 'int', + 'linkedSpaceId' => 'int', + 'linkedTransaction' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * + * + * @var int + */ + private $linkedTransaction; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return TransactionAwareEntity + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return TransactionAwareEntity + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns linkedTransaction. + * + * + * + * @return int + */ + public function getLinkedTransaction() { + return $this->linkedTransaction; + } + + /** + * Sets linkedTransaction. + * + * @param int $linkedTransaction + * @return TransactionAwareEntity + */ + protected function setLinkedTransaction($linkedTransaction) { + $this->linkedTransaction = $linkedTransaction; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionCompletion.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionCompletion.php new file mode 100644 index 0000000..c5957a4 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionCompletion.php @@ -0,0 +1,654 @@ + 'int', + 'createdOn' => '\DateTime', + 'failedOn' => '\DateTime', + 'failureReason' => '\Wallee\Sdk\Model\FailureReason', + 'labels' => '\Wallee\Sdk\Model\Label[]', + 'language' => 'string', + 'lineItemVersion' => '\Wallee\Sdk\Model\TransactionLineItemVersion', + 'mode' => '\Wallee\Sdk\Model\TransactionCompletionMode', + 'nextUpdateOn' => '\DateTime', + 'paymentInformation' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'processorReference' => 'string', + 'spaceViewId' => 'int', + 'state' => '\Wallee\Sdk\Model\TransactionCompletionState', + 'succeededOn' => '\DateTime', + 'timeoutOn' => '\DateTime', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var int + */ + private $createdBy; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var \DateTime + */ + private $failedOn; + + /** + * + * + * @var \Wallee\Sdk\Model\FailureReason + */ + private $failureReason; + + /** + * + * + * @var \Wallee\Sdk\Model\Label[] + */ + private $labels; + + /** + * + * + * @var string + */ + private $language; + + /** + * + * + * @var \Wallee\Sdk\Model\TransactionLineItemVersion + */ + private $lineItemVersion; + + /** + * + * + * @var \Wallee\Sdk\Model\TransactionCompletionMode + */ + private $mode; + + /** + * + * + * @var \DateTime + */ + private $nextUpdateOn; + + /** + * + * + * @var string + */ + private $paymentInformation; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var string + */ + private $processorReference; + + /** + * + * + * @var int + */ + private $spaceViewId; + + /** + * + * + * @var \Wallee\Sdk\Model\TransactionCompletionState + */ + private $state; + + /** + * + * + * @var \DateTime + */ + private $succeededOn; + + /** + * + * + * @var \DateTime + */ + private $timeoutOn; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['failureReason'])) { + $this->setFailureReason($data['failureReason']); + } + if (isset($data['labels'])) { + $this->setLabels($data['labels']); + } + if (isset($data['lineItemVersion'])) { + $this->setLineItemVersion($data['lineItemVersion']); + } + if (isset($data['mode'])) { + $this->setMode($data['mode']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + } + + + /** + * Returns createdBy. + * + * + * + * @return int + */ + public function getCreatedBy() { + return $this->createdBy; + } + + /** + * Sets createdBy. + * + * @param int $createdBy + * @return TransactionCompletion + */ + protected function setCreatedBy($createdBy) { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return TransactionCompletion + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns failedOn. + * + * + * + * @return \DateTime + */ + public function getFailedOn() { + return $this->failedOn; + } + + /** + * Sets failedOn. + * + * @param \DateTime $failedOn + * @return TransactionCompletion + */ + protected function setFailedOn($failedOn) { + $this->failedOn = $failedOn; + + return $this; + } + + /** + * Returns failureReason. + * + * + * + * @return \Wallee\Sdk\Model\FailureReason + */ + public function getFailureReason() { + return $this->failureReason; + } + + /** + * Sets failureReason. + * + * @param \Wallee\Sdk\Model\FailureReason $failureReason + * @return TransactionCompletion + */ + public function setFailureReason($failureReason) { + $this->failureReason = $failureReason; + + return $this; + } + + /** + * Returns labels. + * + * + * + * @return \Wallee\Sdk\Model\Label[] + */ + public function getLabels() { + return $this->labels; + } + + /** + * Sets labels. + * + * @param \Wallee\Sdk\Model\Label[] $labels + * @return TransactionCompletion + */ + public function setLabels($labels) { + $this->labels = $labels; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return TransactionCompletion + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns lineItemVersion. + * + * + * + * @return \Wallee\Sdk\Model\TransactionLineItemVersion + */ + public function getLineItemVersion() { + return $this->lineItemVersion; + } + + /** + * Sets lineItemVersion. + * + * @param \Wallee\Sdk\Model\TransactionLineItemVersion $lineItemVersion + * @return TransactionCompletion + */ + public function setLineItemVersion($lineItemVersion) { + $this->lineItemVersion = $lineItemVersion; + + return $this; + } + + /** + * Returns mode. + * + * + * + * @return \Wallee\Sdk\Model\TransactionCompletionMode + */ + public function getMode() { + return $this->mode; + } + + /** + * Sets mode. + * + * @param \Wallee\Sdk\Model\TransactionCompletionMode $mode + * @return TransactionCompletion + */ + public function setMode($mode) { + $this->mode = $mode; + + return $this; + } + + /** + * Returns nextUpdateOn. + * + * + * + * @return \DateTime + */ + public function getNextUpdateOn() { + return $this->nextUpdateOn; + } + + /** + * Sets nextUpdateOn. + * + * @param \DateTime $nextUpdateOn + * @return TransactionCompletion + */ + protected function setNextUpdateOn($nextUpdateOn) { + $this->nextUpdateOn = $nextUpdateOn; + + return $this; + } + + /** + * Returns paymentInformation. + * + * + * + * @return string + */ + public function getPaymentInformation() { + return $this->paymentInformation; + } + + /** + * Sets paymentInformation. + * + * @param string $paymentInformation + * @return TransactionCompletion + */ + protected function setPaymentInformation($paymentInformation) { + $this->paymentInformation = $paymentInformation; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return TransactionCompletion + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns processorReference. + * + * + * + * @return string + */ + public function getProcessorReference() { + return $this->processorReference; + } + + /** + * Sets processorReference. + * + * @param string $processorReference + * @return TransactionCompletion + */ + protected function setProcessorReference($processorReference) { + $this->processorReference = $processorReference; + + return $this; + } + + /** + * Returns spaceViewId. + * + * + * + * @return int + */ + public function getSpaceViewId() { + return $this->spaceViewId; + } + + /** + * Sets spaceViewId. + * + * @param int $spaceViewId + * @return TransactionCompletion + */ + protected function setSpaceViewId($spaceViewId) { + $this->spaceViewId = $spaceViewId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\TransactionCompletionState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\TransactionCompletionState $state + * @return TransactionCompletion + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns succeededOn. + * + * + * + * @return \DateTime + */ + public function getSucceededOn() { + return $this->succeededOn; + } + + /** + * Sets succeededOn. + * + * @param \DateTime $succeededOn + * @return TransactionCompletion + */ + protected function setSucceededOn($succeededOn) { + $this->succeededOn = $succeededOn; + + return $this; + } + + /** + * Returns timeoutOn. + * + * + * + * @return \DateTime + */ + public function getTimeoutOn() { + return $this->timeoutOn; + } + + /** + * Sets timeoutOn. + * + * @param \DateTime $timeoutOn + * @return TransactionCompletion + */ + protected function setTimeoutOn($timeoutOn) { + $this->timeoutOn = $timeoutOn; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return TransactionCompletion + */ + protected function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionCompletionMode.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionCompletionMode.php new file mode 100644 index 0000000..919a0ad --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionCompletionMode.php @@ -0,0 +1,44 @@ + 'bool', + 'chargeRetryEnabled' => 'bool', + 'customersPresence' => '\Wallee\Sdk\Model\CustomersPresence', + 'deviceSessionIdentifier' => 'string', + 'environment' => '\Wallee\Sdk\Model\Environment', + 'environmentSelectionStrategy' => '\Wallee\Sdk\Model\TransactionEnvironmentSelectionStrategy', + 'spaceViewId' => 'int', + ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * When auto confirmation is enabled the transaction can be confirmed by the user and does not require an explicit confirmation through the web service API. + * + * @var bool + */ + private $autoConfirmationEnabled; + + /** + * When the charging of the customer fails we can retry the charging. This implies that we redirect the user back to the payment page which allows the customer to retry. By default we will retry. + * + * @var bool + */ + private $chargeRetryEnabled; + + /** + * The customer's presence indicates what kind of authentication methods can be used during the authorization of the transaction. If no value is provided, 'Virtually Present' is used by default. + * + * @var \Wallee\Sdk\Model\CustomersPresence + */ + private $customersPresence; + + /** + * The device session identifier links the transaction with the session identifier provided in the URL of the device data JavaScript. This allows to link the transaction with the collected device data of the buyer. + * + * @var string + */ + private $deviceSessionIdentifier; + + /** + * + * + * @var \Wallee\Sdk\Model\Environment + */ + private $environment; + + /** + * The environment selection strategy determines how the environment (test or production) for processing the transaction is selected. + * + * @var \Wallee\Sdk\Model\TransactionEnvironmentSelectionStrategy + */ + private $environmentSelectionStrategy; + + /** + * + * + * @var int + */ + private $spaceViewId; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['autoConfirmationEnabled'])) { + $this->setAutoConfirmationEnabled($data['autoConfirmationEnabled']); + } + if (isset($data['billingAddress'])) { + $this->setBillingAddress($data['billingAddress']); + } + if (isset($data['chargeRetryEnabled'])) { + $this->setChargeRetryEnabled($data['chargeRetryEnabled']); + } + if (isset($data['customersPresence'])) { + $this->setCustomersPresence($data['customersPresence']); + } + if (isset($data['deviceSessionIdentifier'])) { + $this->setDeviceSessionIdentifier($data['deviceSessionIdentifier']); + } + if (isset($data['environment'])) { + $this->setEnvironment($data['environment']); + } + if (isset($data['environmentSelectionStrategy'])) { + $this->setEnvironmentSelectionStrategy($data['environmentSelectionStrategy']); + } + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + if (isset($data['shippingAddress'])) { + $this->setShippingAddress($data['shippingAddress']); + } + if (isset($data['spaceViewId'])) { + $this->setSpaceViewId($data['spaceViewId']); + } + if (isset($data['token'])) { + $this->setToken($data['token']); + } + } + + + /** + * Returns autoConfirmationEnabled. + * + * When auto confirmation is enabled the transaction can be confirmed by the user and does not require an explicit confirmation through the web service API. + * + * @return bool + */ + public function getAutoConfirmationEnabled() { + return $this->autoConfirmationEnabled; + } + + /** + * Sets autoConfirmationEnabled. + * + * @param bool $autoConfirmationEnabled + * @return TransactionCreate + */ + public function setAutoConfirmationEnabled($autoConfirmationEnabled) { + $this->autoConfirmationEnabled = $autoConfirmationEnabled; + + return $this; + } + + /** + * Returns billingAddress. + * + * + * + * @return \Wallee\Sdk\Model\AddressCreate + */ + public function getBillingAddress() { + return parent::getBillingAddress(); + } + + /** + * Sets billingAddress. + * + * @param \Wallee\Sdk\Model\AddressCreate $billingAddress + * @return TransactionCreate + */ + public function setBillingAddress($billingAddress) { + return parent::setBillingAddress($billingAddress); + } + + /** + * Returns chargeRetryEnabled. + * + * When the charging of the customer fails we can retry the charging. This implies that we redirect the user back to the payment page which allows the customer to retry. By default we will retry. + * + * @return bool + */ + public function getChargeRetryEnabled() { + return $this->chargeRetryEnabled; + } + + /** + * Sets chargeRetryEnabled. + * + * @param bool $chargeRetryEnabled + * @return TransactionCreate + */ + public function setChargeRetryEnabled($chargeRetryEnabled) { + $this->chargeRetryEnabled = $chargeRetryEnabled; + + return $this; + } + + /** + * Returns customersPresence. + * + * The customer's presence indicates what kind of authentication methods can be used during the authorization of the transaction. If no value is provided, 'Virtually Present' is used by default. + * + * @return \Wallee\Sdk\Model\CustomersPresence + */ + public function getCustomersPresence() { + return $this->customersPresence; + } + + /** + * Sets customersPresence. + * + * @param \Wallee\Sdk\Model\CustomersPresence $customersPresence + * @return TransactionCreate + */ + public function setCustomersPresence($customersPresence) { + $this->customersPresence = $customersPresence; + + return $this; + } + + /** + * Returns deviceSessionIdentifier. + * + * The device session identifier links the transaction with the session identifier provided in the URL of the device data JavaScript. This allows to link the transaction with the collected device data of the buyer. + * + * @return string + */ + public function getDeviceSessionIdentifier() { + return $this->deviceSessionIdentifier; + } + + /** + * Sets deviceSessionIdentifier. + * + * @param string $deviceSessionIdentifier + * @return TransactionCreate + */ + public function setDeviceSessionIdentifier($deviceSessionIdentifier) { + $this->deviceSessionIdentifier = $deviceSessionIdentifier; + + return $this; + } + + /** + * Returns environment. + * + * + * + * @return \Wallee\Sdk\Model\Environment + */ + public function getEnvironment() { + return $this->environment; + } + + /** + * Sets environment. + * + * @param \Wallee\Sdk\Model\Environment $environment + * @return TransactionCreate + */ + public function setEnvironment($environment) { + $this->environment = $environment; + + return $this; + } + + /** + * Returns environmentSelectionStrategy. + * + * The environment selection strategy determines how the environment (test or production) for processing the transaction is selected. + * + * @return \Wallee\Sdk\Model\TransactionEnvironmentSelectionStrategy + */ + public function getEnvironmentSelectionStrategy() { + return $this->environmentSelectionStrategy; + } + + /** + * Sets environmentSelectionStrategy. + * + * @param \Wallee\Sdk\Model\TransactionEnvironmentSelectionStrategy $environmentSelectionStrategy + * @return TransactionCreate + */ + public function setEnvironmentSelectionStrategy($environmentSelectionStrategy) { + $this->environmentSelectionStrategy = $environmentSelectionStrategy; + + return $this; + } + + /** + * Returns lineItems. + * + * + * + * @return \Wallee\Sdk\Model\LineItemCreate[] + */ + public function getLineItems() { + return parent::getLineItems(); + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItemCreate[] $lineItems + * @return TransactionCreate + */ + public function setLineItems($lineItems) { + return parent::setLineItems($lineItems); + } + + /** + * Returns shippingAddress. + * + * + * + * @return \Wallee\Sdk\Model\AddressCreate + */ + public function getShippingAddress() { + return parent::getShippingAddress(); + } + + /** + * Sets shippingAddress. + * + * @param \Wallee\Sdk\Model\AddressCreate $shippingAddress + * @return TransactionCreate + */ + public function setShippingAddress($shippingAddress) { + return parent::setShippingAddress($shippingAddress); + } + + /** + * Returns spaceViewId. + * + * + * + * @return int + */ + public function getSpaceViewId() { + return $this->spaceViewId; + } + + /** + * Sets spaceViewId. + * + * @param int $spaceViewId + * @return TransactionCreate + */ + public function setSpaceViewId($spaceViewId) { + $this->spaceViewId = $spaceViewId; + + return $this; + } + + /** + * Returns token. + * + * + * + * @return int + */ + public function getToken() { + return parent::getToken(); + } + + /** + * Sets token. + * + * @param int $token + * @return TransactionCreate + */ + public function setToken($token) { + return parent::setToken($token); + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getLineItems() === null) { + throw new ValidationException("'lineItems' can't be null", 'lineItems', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionEnvironmentSelectionStrategy.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionEnvironmentSelectionStrategy.php new file mode 100644 index 0000000..ade7df6 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionEnvironmentSelectionStrategy.php @@ -0,0 +1,43 @@ + '\DateTime', + 'customerId' => 'string', + 'endDate' => '\DateTime', + 'id' => 'int', + 'linkedSpaceId' => 'int', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\TransactionGroupState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \DateTime + */ + private $beginDate; + + /** + * + * + * @var string + */ + private $customerId; + + /** + * + * + * @var \DateTime + */ + private $endDate; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\TransactionGroupState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns beginDate. + * + * + * + * @return \DateTime + */ + public function getBeginDate() { + return $this->beginDate; + } + + /** + * Sets beginDate. + * + * @param \DateTime $beginDate + * @return TransactionGroup + */ + protected function setBeginDate($beginDate) { + $this->beginDate = $beginDate; + + return $this; + } + + /** + * Returns customerId. + * + * + * + * @return string + */ + public function getCustomerId() { + return $this->customerId; + } + + /** + * Sets customerId. + * + * @param string $customerId + * @return TransactionGroup + */ + protected function setCustomerId($customerId) { + $this->customerId = $customerId; + + return $this; + } + + /** + * Returns endDate. + * + * + * + * @return \DateTime + */ + public function getEndDate() { + return $this->endDate; + } + + /** + * Sets endDate. + * + * @param \DateTime $endDate + * @return TransactionGroup + */ + protected function setEndDate($endDate) { + $this->endDate = $endDate; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return TransactionGroup + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return TransactionGroup + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return TransactionGroup + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\TransactionGroupState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\TransactionGroupState $state + * @return TransactionGroup + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return TransactionGroup + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionGroupState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionGroupState.php new file mode 100644 index 0000000..a7675ac --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionGroupState.php @@ -0,0 +1,44 @@ + 'float', + 'completion' => '\Wallee\Sdk\Model\TransactionCompletion', + 'createdOn' => '\DateTime', + 'derecognizedOn' => '\DateTime', + 'dueOn' => '\DateTime', + 'environment' => '\Wallee\Sdk\Model\Environment', + 'externalId' => 'string', + 'language' => 'string', + 'lineItems' => '\Wallee\Sdk\Model\LineItem[]', + 'merchantReference' => 'string', + 'outstandingAmount' => 'float', + 'paidOn' => '\DateTime', + 'plannedPurgeDate' => '\DateTime', + 'spaceViewId' => 'int', + 'state' => '\Wallee\Sdk\Model\TransactionInvoiceState', + 'taxAmount' => 'float', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var float + */ + private $amount; + + /** + * + * + * @var \Wallee\Sdk\Model\TransactionCompletion + */ + private $completion; + + /** + * The date on which the invoice is created on. + * + * @var \DateTime + */ + private $createdOn; + + /** + * The date on which the invoice is marked as derecognized. + * + * @var \DateTime + */ + private $derecognizedOn; + + /** + * The date on which the invoice should be paid on. + * + * @var \DateTime + */ + private $dueOn; + + /** + * + * + * @var \Wallee\Sdk\Model\Environment + */ + private $environment; + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * + * + * @var string + */ + private $language; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItem[] + */ + private $lineItems; + + /** + * + * + * @var string + */ + private $merchantReference; + + /** + * The outstanding amount indicates how much the buyer owes the merchant. A negative amount indicates that the invoice is overpaid. + * + * @var float + */ + private $outstandingAmount; + + /** + * The date on which the invoice is marked as paid. Eventually this date lags behind of the actual paid date. + * + * @var \DateTime + */ + private $paidOn; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var int + */ + private $spaceViewId; + + /** + * + * + * @var \Wallee\Sdk\Model\TransactionInvoiceState + */ + private $state; + + /** + * + * + * @var float + */ + private $taxAmount; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['completion'])) { + $this->setCompletion($data['completion']); + } + if (isset($data['environment'])) { + $this->setEnvironment($data['environment']); + } + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + } + + + /** + * Returns amount. + * + * + * + * @return float + */ + public function getAmount() { + return $this->amount; + } + + /** + * Sets amount. + * + * @param float $amount + * @return TransactionInvoice + */ + protected function setAmount($amount) { + $this->amount = $amount; + + return $this; + } + + /** + * Returns completion. + * + * + * + * @return \Wallee\Sdk\Model\TransactionCompletion + */ + public function getCompletion() { + return $this->completion; + } + + /** + * Sets completion. + * + * @param \Wallee\Sdk\Model\TransactionCompletion $completion + * @return TransactionInvoice + */ + public function setCompletion($completion) { + $this->completion = $completion; + + return $this; + } + + /** + * Returns createdOn. + * + * The date on which the invoice is created on. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return TransactionInvoice + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns derecognizedOn. + * + * The date on which the invoice is marked as derecognized. + * + * @return \DateTime + */ + public function getDerecognizedOn() { + return $this->derecognizedOn; + } + + /** + * Sets derecognizedOn. + * + * @param \DateTime $derecognizedOn + * @return TransactionInvoice + */ + protected function setDerecognizedOn($derecognizedOn) { + $this->derecognizedOn = $derecognizedOn; + + return $this; + } + + /** + * Returns dueOn. + * + * The date on which the invoice should be paid on. + * + * @return \DateTime + */ + public function getDueOn() { + return $this->dueOn; + } + + /** + * Sets dueOn. + * + * @param \DateTime $dueOn + * @return TransactionInvoice + */ + protected function setDueOn($dueOn) { + $this->dueOn = $dueOn; + + return $this; + } + + /** + * Returns environment. + * + * + * + * @return \Wallee\Sdk\Model\Environment + */ + public function getEnvironment() { + return $this->environment; + } + + /** + * Sets environment. + * + * @param \Wallee\Sdk\Model\Environment $environment + * @return TransactionInvoice + */ + public function setEnvironment($environment) { + $this->environment = $environment; + + return $this; + } + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return TransactionInvoice + */ + protected function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return TransactionInvoice + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns lineItems. + * + * + * + * @return \Wallee\Sdk\Model\LineItem[] + */ + public function getLineItems() { + return $this->lineItems; + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItem[] $lineItems + * @return TransactionInvoice + */ + public function setLineItems($lineItems) { + $this->lineItems = $lineItems; + + return $this; + } + + /** + * Returns merchantReference. + * + * + * + * @return string + */ + public function getMerchantReference() { + return $this->merchantReference; + } + + /** + * Sets merchantReference. + * + * @param string $merchantReference + * @return TransactionInvoice + */ + protected function setMerchantReference($merchantReference) { + $this->merchantReference = $merchantReference; + + return $this; + } + + /** + * Returns outstandingAmount. + * + * The outstanding amount indicates how much the buyer owes the merchant. A negative amount indicates that the invoice is overpaid. + * + * @return float + */ + public function getOutstandingAmount() { + return $this->outstandingAmount; + } + + /** + * Sets outstandingAmount. + * + * @param float $outstandingAmount + * @return TransactionInvoice + */ + protected function setOutstandingAmount($outstandingAmount) { + $this->outstandingAmount = $outstandingAmount; + + return $this; + } + + /** + * Returns paidOn. + * + * The date on which the invoice is marked as paid. Eventually this date lags behind of the actual paid date. + * + * @return \DateTime + */ + public function getPaidOn() { + return $this->paidOn; + } + + /** + * Sets paidOn. + * + * @param \DateTime $paidOn + * @return TransactionInvoice + */ + protected function setPaidOn($paidOn) { + $this->paidOn = $paidOn; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return TransactionInvoice + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns spaceViewId. + * + * + * + * @return int + */ + public function getSpaceViewId() { + return $this->spaceViewId; + } + + /** + * Sets spaceViewId. + * + * @param int $spaceViewId + * @return TransactionInvoice + */ + protected function setSpaceViewId($spaceViewId) { + $this->spaceViewId = $spaceViewId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\TransactionInvoiceState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\TransactionInvoiceState $state + * @return TransactionInvoice + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns taxAmount. + * + * + * + * @return float + */ + public function getTaxAmount() { + return $this->taxAmount; + } + + /** + * Sets taxAmount. + * + * @param float $taxAmount + * @return TransactionInvoice + */ + protected function setTaxAmount($taxAmount) { + $this->taxAmount = $taxAmount; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return TransactionInvoice + */ + protected function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionInvoiceReplacement.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionInvoiceReplacement.php new file mode 100644 index 0000000..2255ebf --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionInvoiceReplacement.php @@ -0,0 +1,285 @@ + '\DateTime', + 'externalId' => 'string', + 'lineItems' => '\Wallee\Sdk\Model\LineItemCreate[]', + 'merchantReference' => 'string', + 'sentToCustomer' => 'bool' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The date on which the invoice should be paid on. + * + * @var \DateTime + */ + private $dueOn; + + /** + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @var string + */ + private $externalId; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItemCreate[] + */ + private $lineItems; + + /** + * + * + * @var string + */ + private $merchantReference; + + /** + * When the connector is configured to send the invoice to the customer and this property is true the customer will receive an email with the updated invoice. When this property is false no invoice is sent. + * + * @var bool + */ + private $sentToCustomer; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['dueOn'])) { + $this->setDueOn($data['dueOn']); + } + if (isset($data['externalId'])) { + $this->setExternalId($data['externalId']); + } + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + if (isset($data['merchantReference'])) { + $this->setMerchantReference($data['merchantReference']); + } + if (isset($data['sentToCustomer'])) { + $this->setSentToCustomer($data['sentToCustomer']); + } + } + + + /** + * Returns dueOn. + * + * The date on which the invoice should be paid on. + * + * @return \DateTime + */ + public function getDueOn() { + return $this->dueOn; + } + + /** + * Sets dueOn. + * + * @param \DateTime $dueOn + * @return TransactionInvoiceReplacement + */ + public function setDueOn($dueOn) { + $this->dueOn = $dueOn; + + return $this; + } + + /** + * Returns externalId. + * + * The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity. + * + * @return string + */ + public function getExternalId() { + return $this->externalId; + } + + /** + * Sets externalId. + * + * @param string $externalId + * @return TransactionInvoiceReplacement + */ + public function setExternalId($externalId) { + $this->externalId = $externalId; + + return $this; + } + + /** + * Returns lineItems. + * + * + * + * @return \Wallee\Sdk\Model\LineItemCreate[] + */ + public function getLineItems() { + return $this->lineItems; + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItemCreate[] $lineItems + * @return TransactionInvoiceReplacement + */ + public function setLineItems($lineItems) { + $this->lineItems = $lineItems; + + return $this; + } + + /** + * Returns merchantReference. + * + * + * + * @return string + */ + public function getMerchantReference() { + return $this->merchantReference; + } + + /** + * Sets merchantReference. + * + * @param string $merchantReference + * @return TransactionInvoiceReplacement + */ + public function setMerchantReference($merchantReference) { + $this->merchantReference = $merchantReference; + + return $this; + } + + /** + * Returns sentToCustomer. + * + * When the connector is configured to send the invoice to the customer and this property is true the customer will receive an email with the updated invoice. When this property is false no invoice is sent. + * + * @return bool + */ + public function getSentToCustomer() { + return $this->sentToCustomer; + } + + /** + * Sets sentToCustomer. + * + * @param bool $sentToCustomer + * @return TransactionInvoiceReplacement + */ + public function setSentToCustomer($sentToCustomer) { + $this->sentToCustomer = $sentToCustomer; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getExternalId() === null) { + throw new ValidationException("'externalId' can't be null", 'externalId', $this); + } + if ($this->getLineItems() === null) { + throw new ValidationException("'lineItems' can't be null", 'lineItems', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionInvoiceState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionInvoiceState.php new file mode 100644 index 0000000..82050ac --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionInvoiceState.php @@ -0,0 +1,48 @@ + '\Wallee\Sdk\Model\LineItemCreate[]', + 'transactionId' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var \Wallee\Sdk\Model\LineItemCreate[] + */ + private $newLineItems; + + /** + * + * + * @var int + */ + private $transactionId; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['newLineItems'])) { + $this->setNewLineItems($data['newLineItems']); + } + if (isset($data['transactionId'])) { + $this->setTransactionId($data['transactionId']); + } + } + + + /** + * Returns newLineItems. + * + * + * + * @return \Wallee\Sdk\Model\LineItemCreate[] + */ + public function getNewLineItems() { + return $this->newLineItems; + } + + /** + * Sets newLineItems. + * + * @param \Wallee\Sdk\Model\LineItemCreate[] $newLineItems + * @return TransactionLineItemUpdateRequest + */ + public function setNewLineItems($newLineItems) { + $this->newLineItems = $newLineItems; + + return $this; + } + + /** + * Returns transactionId. + * + * + * + * @return int + */ + public function getTransactionId() { + return $this->transactionId; + } + + /** + * Sets transactionId. + * + * @param int $transactionId + * @return TransactionLineItemUpdateRequest + */ + public function setTransactionId($transactionId) { + $this->transactionId = $transactionId; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getTransactionId() === null) { + throw new ValidationException("'transactionId' can't be null", 'transactionId', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionLineItemVersion.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionLineItemVersion.php new file mode 100644 index 0000000..d2d3d13 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionLineItemVersion.php @@ -0,0 +1,428 @@ + 'float', + 'createdBy' => 'int', + 'createdOn' => '\DateTime', + 'language' => 'string', + 'lineItems' => '\Wallee\Sdk\Model\LineItem[]', + 'plannedPurgeDate' => '\DateTime', + 'spaceViewId' => 'int', + 'taxAmount' => 'float', + 'transaction' => '\Wallee\Sdk\Model\Transaction', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var float + */ + private $amount; + + /** + * + * + * @var int + */ + private $createdBy; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var string + */ + private $language; + + /** + * + * + * @var \Wallee\Sdk\Model\LineItem[] + */ + private $lineItems; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var int + */ + private $spaceViewId; + + /** + * + * + * @var float + */ + private $taxAmount; + + /** + * + * + * @var \Wallee\Sdk\Model\Transaction + */ + private $transaction; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['lineItems'])) { + $this->setLineItems($data['lineItems']); + } + if (isset($data['transaction'])) { + $this->setTransaction($data['transaction']); + } + } + + + /** + * Returns amount. + * + * + * + * @return float + */ + public function getAmount() { + return $this->amount; + } + + /** + * Sets amount. + * + * @param float $amount + * @return TransactionLineItemVersion + */ + protected function setAmount($amount) { + $this->amount = $amount; + + return $this; + } + + /** + * Returns createdBy. + * + * + * + * @return int + */ + public function getCreatedBy() { + return $this->createdBy; + } + + /** + * Sets createdBy. + * + * @param int $createdBy + * @return TransactionLineItemVersion + */ + protected function setCreatedBy($createdBy) { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return TransactionLineItemVersion + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return TransactionLineItemVersion + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns lineItems. + * + * + * + * @return \Wallee\Sdk\Model\LineItem[] + */ + public function getLineItems() { + return $this->lineItems; + } + + /** + * Sets lineItems. + * + * @param \Wallee\Sdk\Model\LineItem[] $lineItems + * @return TransactionLineItemVersion + */ + public function setLineItems($lineItems) { + $this->lineItems = $lineItems; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return TransactionLineItemVersion + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns spaceViewId. + * + * + * + * @return int + */ + public function getSpaceViewId() { + return $this->spaceViewId; + } + + /** + * Sets spaceViewId. + * + * @param int $spaceViewId + * @return TransactionLineItemVersion + */ + protected function setSpaceViewId($spaceViewId) { + $this->spaceViewId = $spaceViewId; + + return $this; + } + + /** + * Returns taxAmount. + * + * + * + * @return float + */ + public function getTaxAmount() { + return $this->taxAmount; + } + + /** + * Sets taxAmount. + * + * @param float $taxAmount + * @return TransactionLineItemVersion + */ + protected function setTaxAmount($taxAmount) { + $this->taxAmount = $taxAmount; + + return $this; + } + + /** + * Returns transaction. + * + * + * + * @return \Wallee\Sdk\Model\Transaction + */ + public function getTransaction() { + return $this->transaction; + } + + /** + * Sets transaction. + * + * @param \Wallee\Sdk\Model\Transaction $transaction + * @return TransactionLineItemVersion + */ + public function setTransaction($transaction) { + $this->transaction = $transaction; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return TransactionLineItemVersion + */ + protected function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionPending.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionPending.php new file mode 100644 index 0000000..c06f73d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionPending.php @@ -0,0 +1,186 @@ + 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return TransactionPending + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return TransactionPending + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionState.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionState.php new file mode 100644 index 0000000..5419c30 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionState.php @@ -0,0 +1,51 @@ + 'int', + 'createdOn' => '\DateTime', + 'failedOn' => '\DateTime', + 'failureReason' => '\Wallee\Sdk\Model\FailureReason', + 'labels' => '\Wallee\Sdk\Model\Label[]', + 'language' => 'string', + 'mode' => '\Wallee\Sdk\Model\TransactionVoidMode', + 'nextUpdateOn' => '\DateTime', + 'plannedPurgeDate' => '\DateTime', + 'processorReference' => 'string', + 'spaceViewId' => 'int', + 'state' => '\Wallee\Sdk\Model\TransactionVoidState', + 'succeededOn' => '\DateTime', + 'timeoutOn' => '\DateTime', + 'transaction' => '\Wallee\Sdk\Model\Transaction', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * + * + * @var int + */ + private $createdBy; + + /** + * The created on date indicates the date on which the entity was stored into the database. + * + * @var \DateTime + */ + private $createdOn; + + /** + * + * + * @var \DateTime + */ + private $failedOn; + + /** + * + * + * @var \Wallee\Sdk\Model\FailureReason + */ + private $failureReason; + + /** + * + * + * @var \Wallee\Sdk\Model\Label[] + */ + private $labels; + + /** + * + * + * @var string + */ + private $language; + + /** + * + * + * @var \Wallee\Sdk\Model\TransactionVoidMode + */ + private $mode; + + /** + * + * + * @var \DateTime + */ + private $nextUpdateOn; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var string + */ + private $processorReference; + + /** + * + * + * @var int + */ + private $spaceViewId; + + /** + * + * + * @var \Wallee\Sdk\Model\TransactionVoidState + */ + private $state; + + /** + * + * + * @var \DateTime + */ + private $succeededOn; + + /** + * + * + * @var \DateTime + */ + private $timeoutOn; + + /** + * + * + * @var \Wallee\Sdk\Model\Transaction + */ + private $transaction; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['failureReason'])) { + $this->setFailureReason($data['failureReason']); + } + if (isset($data['labels'])) { + $this->setLabels($data['labels']); + } + if (isset($data['mode'])) { + $this->setMode($data['mode']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['transaction'])) { + $this->setTransaction($data['transaction']); + } + } + + + /** + * Returns createdBy. + * + * + * + * @return int + */ + public function getCreatedBy() { + return $this->createdBy; + } + + /** + * Sets createdBy. + * + * @param int $createdBy + * @return TransactionVoid + */ + protected function setCreatedBy($createdBy) { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * Returns createdOn. + * + * The created on date indicates the date on which the entity was stored into the database. + * + * @return \DateTime + */ + public function getCreatedOn() { + return $this->createdOn; + } + + /** + * Sets createdOn. + * + * @param \DateTime $createdOn + * @return TransactionVoid + */ + protected function setCreatedOn($createdOn) { + $this->createdOn = $createdOn; + + return $this; + } + + /** + * Returns failedOn. + * + * + * + * @return \DateTime + */ + public function getFailedOn() { + return $this->failedOn; + } + + /** + * Sets failedOn. + * + * @param \DateTime $failedOn + * @return TransactionVoid + */ + protected function setFailedOn($failedOn) { + $this->failedOn = $failedOn; + + return $this; + } + + /** + * Returns failureReason. + * + * + * + * @return \Wallee\Sdk\Model\FailureReason + */ + public function getFailureReason() { + return $this->failureReason; + } + + /** + * Sets failureReason. + * + * @param \Wallee\Sdk\Model\FailureReason $failureReason + * @return TransactionVoid + */ + public function setFailureReason($failureReason) { + $this->failureReason = $failureReason; + + return $this; + } + + /** + * Returns labels. + * + * + * + * @return \Wallee\Sdk\Model\Label[] + */ + public function getLabels() { + return $this->labels; + } + + /** + * Sets labels. + * + * @param \Wallee\Sdk\Model\Label[] $labels + * @return TransactionVoid + */ + public function setLabels($labels) { + $this->labels = $labels; + + return $this; + } + + /** + * Returns language. + * + * + * + * @return string + */ + public function getLanguage() { + return $this->language; + } + + /** + * Sets language. + * + * @param string $language + * @return TransactionVoid + */ + protected function setLanguage($language) { + $this->language = $language; + + return $this; + } + + /** + * Returns mode. + * + * + * + * @return \Wallee\Sdk\Model\TransactionVoidMode + */ + public function getMode() { + return $this->mode; + } + + /** + * Sets mode. + * + * @param \Wallee\Sdk\Model\TransactionVoidMode $mode + * @return TransactionVoid + */ + public function setMode($mode) { + $this->mode = $mode; + + return $this; + } + + /** + * Returns nextUpdateOn. + * + * + * + * @return \DateTime + */ + public function getNextUpdateOn() { + return $this->nextUpdateOn; + } + + /** + * Sets nextUpdateOn. + * + * @param \DateTime $nextUpdateOn + * @return TransactionVoid + */ + protected function setNextUpdateOn($nextUpdateOn) { + $this->nextUpdateOn = $nextUpdateOn; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return TransactionVoid + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns processorReference. + * + * + * + * @return string + */ + public function getProcessorReference() { + return $this->processorReference; + } + + /** + * Sets processorReference. + * + * @param string $processorReference + * @return TransactionVoid + */ + protected function setProcessorReference($processorReference) { + $this->processorReference = $processorReference; + + return $this; + } + + /** + * Returns spaceViewId. + * + * + * + * @return int + */ + public function getSpaceViewId() { + return $this->spaceViewId; + } + + /** + * Sets spaceViewId. + * + * @param int $spaceViewId + * @return TransactionVoid + */ + protected function setSpaceViewId($spaceViewId) { + $this->spaceViewId = $spaceViewId; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\TransactionVoidState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\TransactionVoidState $state + * @return TransactionVoid + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns succeededOn. + * + * + * + * @return \DateTime + */ + public function getSucceededOn() { + return $this->succeededOn; + } + + /** + * Sets succeededOn. + * + * @param \DateTime $succeededOn + * @return TransactionVoid + */ + protected function setSucceededOn($succeededOn) { + $this->succeededOn = $succeededOn; + + return $this; + } + + /** + * Returns timeoutOn. + * + * + * + * @return \DateTime + */ + public function getTimeoutOn() { + return $this->timeoutOn; + } + + /** + * Sets timeoutOn. + * + * @param \DateTime $timeoutOn + * @return TransactionVoid + */ + protected function setTimeoutOn($timeoutOn) { + $this->timeoutOn = $timeoutOn; + + return $this; + } + + /** + * Returns transaction. + * + * + * + * @return \Wallee\Sdk\Model\Transaction + */ + public function getTransaction() { + return $this->transaction; + } + + /** + * Sets transaction. + * + * @param \Wallee\Sdk\Model\Transaction $transaction + * @return TransactionVoid + */ + public function setTransaction($transaction) { + $this->transaction = $transaction; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return TransactionVoid + */ + protected function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionVoidMode.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionVoidMode.php new file mode 100644 index 0000000..78eb1e0 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/TransactionVoidMode.php @@ -0,0 +1,43 @@ + 'string', + 'cardVerificationCode' => 'string', + 'expiryDate' => 'string', + 'primaryAccountNumber' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The card holder name is the name printed onto the card. It identifies the person who owns the card. + * + * @var string + */ + private $cardHolderName; + + /** + * The card verification code (CVC) is a 3 to 4 digit code typically printed on the back of the card. It helps to ensure that the card holder is authorizing the transaction. For card not-present transactions this field is optional. + * + * @var string + */ + private $cardVerificationCode; + + /** + * The card expiry date indicates when the card expires. The format is the format yyyy-mm where yyyy is the year (e.g. 2019) and the mm is the month (e.g. 09). + * + * @var string + */ + private $expiryDate; + + /** + * The primary account number (PAN) identifies the card. The number is numeric and typically printed on the front of the card. + * + * @var string + */ + private $primaryAccountNumber; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + } + + + /** + * Returns cardHolderName. + * + * The card holder name is the name printed onto the card. It identifies the person who owns the card. + * + * @return string + */ + public function getCardHolderName() { + return $this->cardHolderName; + } + + /** + * Sets cardHolderName. + * + * @param string $cardHolderName + * @return UnencryptedCardData + */ + protected function setCardHolderName($cardHolderName) { + $this->cardHolderName = $cardHolderName; + + return $this; + } + + /** + * Returns cardVerificationCode. + * + * The card verification code (CVC) is a 3 to 4 digit code typically printed on the back of the card. It helps to ensure that the card holder is authorizing the transaction. For card not-present transactions this field is optional. + * + * @return string + */ + public function getCardVerificationCode() { + return $this->cardVerificationCode; + } + + /** + * Sets cardVerificationCode. + * + * @param string $cardVerificationCode + * @return UnencryptedCardData + */ + protected function setCardVerificationCode($cardVerificationCode) { + $this->cardVerificationCode = $cardVerificationCode; + + return $this; + } + + /** + * Returns expiryDate. + * + * The card expiry date indicates when the card expires. The format is the format yyyy-mm where yyyy is the year (e.g. 2019) and the mm is the month (e.g. 09). + * + * @return string + */ + public function getExpiryDate() { + return $this->expiryDate; + } + + /** + * Sets expiryDate. + * + * @param string $expiryDate + * @return UnencryptedCardData + */ + protected function setExpiryDate($expiryDate) { + $this->expiryDate = $expiryDate; + + return $this; + } + + /** + * Returns primaryAccountNumber. + * + * The primary account number (PAN) identifies the card. The number is numeric and typically printed on the front of the card. + * + * @return string + */ + public function getPrimaryAccountNumber() { + return $this->primaryAccountNumber; + } + + /** + * Sets primaryAccountNumber. + * + * @param string $primaryAccountNumber + * @return UnencryptedCardData + */ + protected function setPrimaryAccountNumber($primaryAccountNumber) { + $this->primaryAccountNumber = $primaryAccountNumber; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UnencryptedCardDataCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UnencryptedCardDataCreate.php new file mode 100644 index 0000000..131a90c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UnencryptedCardDataCreate.php @@ -0,0 +1,248 @@ + 'string', + 'cardVerificationCode' => 'string', + 'expiryDate' => 'string', + 'primaryAccountNumber' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The card holder name is the name printed onto the card. It identifies the person who owns the card. + * + * @var string + */ + private $cardHolderName; + + /** + * The card verification code (CVC) is a 3 to 4 digit code typically printed on the back of the card. It helps to ensure that the card holder is authorizing the transaction. For card not-present transactions this field is optional. + * + * @var string + */ + private $cardVerificationCode; + + /** + * The card expiry date indicates when the card expires. The format is the format yyyy-mm where yyyy is the year (e.g. 2019) and the mm is the month (e.g. 09). + * + * @var string + */ + private $expiryDate; + + /** + * The primary account number (PAN) identifies the card. The number is numeric and typically printed on the front of the card. + * + * @var string + */ + private $primaryAccountNumber; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['cardHolderName'])) { + $this->setCardHolderName($data['cardHolderName']); + } + if (isset($data['cardVerificationCode'])) { + $this->setCardVerificationCode($data['cardVerificationCode']); + } + if (isset($data['expiryDate'])) { + $this->setExpiryDate($data['expiryDate']); + } + if (isset($data['primaryAccountNumber'])) { + $this->setPrimaryAccountNumber($data['primaryAccountNumber']); + } + } + + + /** + * Returns cardHolderName. + * + * The card holder name is the name printed onto the card. It identifies the person who owns the card. + * + * @return string + */ + public function getCardHolderName() { + return $this->cardHolderName; + } + + /** + * Sets cardHolderName. + * + * @param string $cardHolderName + * @return UnencryptedCardDataCreate + */ + public function setCardHolderName($cardHolderName) { + $this->cardHolderName = $cardHolderName; + + return $this; + } + + /** + * Returns cardVerificationCode. + * + * The card verification code (CVC) is a 3 to 4 digit code typically printed on the back of the card. It helps to ensure that the card holder is authorizing the transaction. For card not-present transactions this field is optional. + * + * @return string + */ + public function getCardVerificationCode() { + return $this->cardVerificationCode; + } + + /** + * Sets cardVerificationCode. + * + * @param string $cardVerificationCode + * @return UnencryptedCardDataCreate + */ + public function setCardVerificationCode($cardVerificationCode) { + $this->cardVerificationCode = $cardVerificationCode; + + return $this; + } + + /** + * Returns expiryDate. + * + * The card expiry date indicates when the card expires. The format is the format yyyy-mm where yyyy is the year (e.g. 2019) and the mm is the month (e.g. 09). + * + * @return string + */ + public function getExpiryDate() { + return $this->expiryDate; + } + + /** + * Sets expiryDate. + * + * @param string $expiryDate + * @return UnencryptedCardDataCreate + */ + public function setExpiryDate($expiryDate) { + $this->expiryDate = $expiryDate; + + return $this; + } + + /** + * Returns primaryAccountNumber. + * + * The primary account number (PAN) identifies the card. The number is numeric and typically printed on the front of the card. + * + * @return string + */ + public function getPrimaryAccountNumber() { + return $this->primaryAccountNumber; + } + + /** + * Sets primaryAccountNumber. + * + * @param string $primaryAccountNumber + * @return UnencryptedCardDataCreate + */ + public function setPrimaryAccountNumber($primaryAccountNumber) { + $this->primaryAccountNumber = $primaryAccountNumber; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + if ($this->getPrimaryAccountNumber() === null) { + throw new ValidationException("'primaryAccountNumber' can't be null", 'primaryAccountNumber', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/User.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/User.php new file mode 100644 index 0000000..acaf7cd --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/User.php @@ -0,0 +1,310 @@ + 'int', + 'plannedPurgeDate' => '\DateTime', + 'scope' => '\Wallee\Sdk\Model\Scope', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'userType' => '\Wallee\Sdk\Model\UserType', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\Scope + */ + private $scope; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * + * + * @var \Wallee\Sdk\Model\UserType + */ + private $userType; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['scope'])) { + $this->setScope($data['scope']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['userType'])) { + $this->setUserType($data['userType']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return User + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return User + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns scope. + * + * + * + * @return \Wallee\Sdk\Model\Scope + */ + public function getScope() { + return $this->scope; + } + + /** + * Sets scope. + * + * @param \Wallee\Sdk\Model\Scope $scope + * @return User + */ + public function setScope($scope) { + $this->scope = $scope; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return User + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns userType. + * + * + * + * @return \Wallee\Sdk\Model\UserType + */ + public function getUserType() { + return $this->userType; + } + + /** + * Sets userType. + * + * @param \Wallee\Sdk\Model\UserType $userType + * @return User + */ + public function setUserType($userType) { + $this->userType = $userType; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return User + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UserAccountRole.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UserAccountRole.php new file mode 100644 index 0000000..e6098ec --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UserAccountRole.php @@ -0,0 +1,301 @@ + 'int', + 'appliesOnSubAccount' => 'bool', + 'id' => 'int', + 'role' => 'int', + 'user' => 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * + * + * @var int + */ + private $account; + + /** + * + * + * @var bool + */ + private $appliesOnSubAccount; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var int + */ + private $role; + + /** + * + * + * @var int + */ + private $user; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns account. + * + * + * + * @return int + */ + public function getAccount() { + return $this->account; + } + + /** + * Sets account. + * + * @param int $account + * @return UserAccountRole + */ + protected function setAccount($account) { + $this->account = $account; + + return $this; + } + + /** + * Returns appliesOnSubAccount. + * + * + * + * @return bool + */ + public function getAppliesOnSubAccount() { + return $this->appliesOnSubAccount; + } + + /** + * Sets appliesOnSubAccount. + * + * @param bool $appliesOnSubAccount + * @return UserAccountRole + */ + protected function setAppliesOnSubAccount($appliesOnSubAccount) { + $this->appliesOnSubAccount = $appliesOnSubAccount; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return UserAccountRole + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns role. + * + * + * + * @return int + */ + public function getRole() { + return $this->role; + } + + /** + * Sets role. + * + * @param int $role + * @return UserAccountRole + */ + protected function setRole($role) { + $this->role = $role; + + return $this; + } + + /** + * Returns user. + * + * + * + * @return int + */ + public function getUser() { + return $this->user; + } + + /** + * Sets user. + * + * @param int $user + * @return UserAccountRole + */ + protected function setUser($user) { + $this->user = $user; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return UserAccountRole + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UserSpaceRole.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UserSpaceRole.php new file mode 100644 index 0000000..5db904d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UserSpaceRole.php @@ -0,0 +1,270 @@ + 'int', + 'role' => 'int', + 'space' => 'int', + 'user' => 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var int + */ + private $role; + + /** + * + * + * @var int + */ + private $space; + + /** + * + * + * @var int + */ + private $user; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return UserSpaceRole + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns role. + * + * + * + * @return int + */ + public function getRole() { + return $this->role; + } + + /** + * Sets role. + * + * @param int $role + * @return UserSpaceRole + */ + protected function setRole($role) { + $this->role = $role; + + return $this; + } + + /** + * Returns space. + * + * + * + * @return int + */ + public function getSpace() { + return $this->space; + } + + /** + * Sets space. + * + * @param int $space + * @return UserSpaceRole + */ + protected function setSpace($space) { + $this->space = $space; + + return $this; + } + + /** + * Returns user. + * + * + * + * @return int + */ + public function getUser() { + return $this->user; + } + + /** + * Sets user. + * + * @param int $user + * @return UserSpaceRole + */ + protected function setUser($user) { + $this->user = $user; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return UserSpaceRole + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UserType.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UserType.php new file mode 100644 index 0000000..b2be53a --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/UserType.php @@ -0,0 +1,46 @@ + 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The identity name is used internally to identify the webhook identity in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return WebhookIdentity + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return WebhookIdentity + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The identity name is used internally to identify the webhook identity in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return WebhookIdentity + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return WebhookIdentity + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return WebhookIdentity + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return WebhookIdentity + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListener.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListener.php new file mode 100644 index 0000000..b3ca6f8 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListener.php @@ -0,0 +1,468 @@ + 'int', + 'entityStates' => 'string[]', + 'id' => 'int', + 'identity' => '\Wallee\Sdk\Model\WebhookIdentity', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'notifyEveryChange' => 'bool', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'url' => '\Wallee\Sdk\Model\WebhookUrl', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The listener listens on state changes of the entity linked with the listener. + * + * @var int + */ + private $entity; + + /** + * The target state identifies the state into which entities need to move into to trigger the webhook listener. + * + * @var string[] + */ + private $entityStates; + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The identity which will be used to sign messages sent by this listener. + * + * @var \Wallee\Sdk\Model\WebhookIdentity + */ + private $identity; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The webhook listener name is used internally to identify the webhook listener in administrative interfaces.For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * Defines whether the webhook listener is to be informed about every change made to the entity in contrast to state transitions only. + * + * @var bool + */ + private $notifyEveryChange; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The URL which is invoked by the listener to notify the application about the event. + * + * @var \Wallee\Sdk\Model\WebhookUrl + */ + private $url; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['entityStates'])) { + $this->setEntityStates($data['entityStates']); + } + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['identity'])) { + $this->setIdentity($data['identity']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['url'])) { + $this->setUrl($data['url']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns entity. + * + * The listener listens on state changes of the entity linked with the listener. + * + * @return int + */ + public function getEntity() { + return $this->entity; + } + + /** + * Sets entity. + * + * @param int $entity + * @return WebhookListener + */ + protected function setEntity($entity) { + $this->entity = $entity; + + return $this; + } + + /** + * Returns entityStates. + * + * The target state identifies the state into which entities need to move into to trigger the webhook listener. + * + * @return string[] + */ + public function getEntityStates() { + return $this->entityStates; + } + + /** + * Sets entityStates. + * + * @param string[] $entityStates + * @return WebhookListener + */ + public function setEntityStates($entityStates) { + $this->entityStates = $entityStates; + + return $this; + } + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return WebhookListener + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns identity. + * + * The identity which will be used to sign messages sent by this listener. + * + * @return \Wallee\Sdk\Model\WebhookIdentity + */ + public function getIdentity() { + return $this->identity; + } + + /** + * Sets identity. + * + * @param \Wallee\Sdk\Model\WebhookIdentity $identity + * @return WebhookListener + */ + public function setIdentity($identity) { + $this->identity = $identity; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return WebhookListener + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The webhook listener name is used internally to identify the webhook listener in administrative interfaces.For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return WebhookListener + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns notifyEveryChange. + * + * Defines whether the webhook listener is to be informed about every change made to the entity in contrast to state transitions only. + * + * @return bool + */ + public function getNotifyEveryChange() { + return $this->notifyEveryChange; + } + + /** + * Sets notifyEveryChange. + * + * @param bool $notifyEveryChange + * @return WebhookListener + */ + protected function setNotifyEveryChange($notifyEveryChange) { + $this->notifyEveryChange = $notifyEveryChange; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return WebhookListener + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return WebhookListener + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns url. + * + * The URL which is invoked by the listener to notify the application about the event. + * + * @return \Wallee\Sdk\Model\WebhookUrl + */ + public function getUrl() { + return $this->url; + } + + /** + * Sets url. + * + * @param \Wallee\Sdk\Model\WebhookUrl $url + * @return WebhookListener + */ + public function setUrl($url) { + $this->url = $url; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return WebhookListener + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListenerCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListenerCreate.php new file mode 100644 index 0000000..3c1744d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListenerCreate.php @@ -0,0 +1,291 @@ + 'int', + 'entityStates' => 'string[]', + 'identity' => 'int', + 'notifyEveryChange' => 'bool', + 'url' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The listener listens on state changes of the entity linked with the listener. + * + * @var int + */ + private $entity; + + /** + * The target state identifies the state into which entities need to move into to trigger the webhook listener. + * + * @var string[] + */ + private $entityStates; + + /** + * The identity which will be used to sign messages sent by this listener. + * + * @var int + */ + private $identity; + + /** + * Defines whether the webhook listener is to be informed about every change made to the entity in contrast to state transitions only. + * + * @var bool + */ + private $notifyEveryChange; + + /** + * The URL which is invoked by the listener to notify the application about the event. + * + * @var int + */ + private $url; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['entity'])) { + $this->setEntity($data['entity']); + } + if (isset($data['entityStates'])) { + $this->setEntityStates($data['entityStates']); + } + if (isset($data['identity'])) { + $this->setIdentity($data['identity']); + } + if (isset($data['notifyEveryChange'])) { + $this->setNotifyEveryChange($data['notifyEveryChange']); + } + if (isset($data['url'])) { + $this->setUrl($data['url']); + } + } + + + /** + * Returns entity. + * + * The listener listens on state changes of the entity linked with the listener. + * + * @return int + */ + public function getEntity() { + return $this->entity; + } + + /** + * Sets entity. + * + * @param int $entity + * @return WebhookListenerCreate + */ + public function setEntity($entity) { + $this->entity = $entity; + + return $this; + } + + /** + * Returns entityStates. + * + * The target state identifies the state into which entities need to move into to trigger the webhook listener. + * + * @return string[] + */ + public function getEntityStates() { + return $this->entityStates; + } + + /** + * Sets entityStates. + * + * @param string[] $entityStates + * @return WebhookListenerCreate + */ + public function setEntityStates($entityStates) { + $this->entityStates = $entityStates; + + return $this; + } + + /** + * Returns identity. + * + * The identity which will be used to sign messages sent by this listener. + * + * @return int + */ + public function getIdentity() { + return $this->identity; + } + + /** + * Sets identity. + * + * @param int $identity + * @return WebhookListenerCreate + */ + public function setIdentity($identity) { + $this->identity = $identity; + + return $this; + } + + /** + * Returns notifyEveryChange. + * + * Defines whether the webhook listener is to be informed about every change made to the entity in contrast to state transitions only. + * + * @return bool + */ + public function getNotifyEveryChange() { + return $this->notifyEveryChange; + } + + /** + * Sets notifyEveryChange. + * + * @param bool $notifyEveryChange + * @return WebhookListenerCreate + */ + public function setNotifyEveryChange($notifyEveryChange) { + $this->notifyEveryChange = $notifyEveryChange; + + return $this; + } + + /** + * Returns url. + * + * The URL which is invoked by the listener to notify the application about the event. + * + * @return int + */ + public function getUrl() { + return $this->url; + } + + /** + * Sets url. + * + * @param int $url + * @return WebhookListenerCreate + */ + public function setUrl($url) { + $this->url = $url; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getEntity() === null) { + throw new ValidationException("'entity' can't be null", 'entity', $this); + } + if ($this->getEntityStates() === null) { + throw new ValidationException("'entityStates' can't be null", 'entityStates', $this); + } + if ($this->getUrl() === null) { + throw new ValidationException("'url' can't be null", 'url', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListenerEntity.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListenerEntity.php new file mode 100644 index 0000000..2c0ceca --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListenerEntity.php @@ -0,0 +1,205 @@ + 'int', + 'name' => 'map[string,string]', + 'technicalName' => 'string' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * + * + * @var map[string,string] + */ + private $name; + + /** + * + * + * @var string + */ + private $technicalName; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['name'])) { + $this->setName($data['name']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return WebhookListenerEntity + */ + protected function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns name. + * + * + * + * @return map[string,string] + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param map[string,string] $name + * @return WebhookListenerEntity + */ + public function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns technicalName. + * + * + * + * @return string + */ + public function getTechnicalName() { + return $this->technicalName; + } + + /** + * Sets technicalName. + * + * @param string $technicalName + * @return WebhookListenerEntity + */ + protected function setTechnicalName($technicalName) { + $this->technicalName = $technicalName; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListenerUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListenerUpdate.php new file mode 100644 index 0000000..3799660 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookListenerUpdate.php @@ -0,0 +1,186 @@ + 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return WebhookListenerUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return WebhookListenerUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookUrl.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookUrl.php new file mode 100644 index 0000000..df68584 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookUrl.php @@ -0,0 +1,335 @@ + 'int', + 'linkedSpaceId' => 'int', + 'name' => 'string', + 'plannedPurgeDate' => '\DateTime', + 'state' => '\Wallee\Sdk\Model\CreationEntityState', + 'url' => 'string', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes; + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @var int + */ + private $linkedSpaceId; + + /** + * The URL name is used internally to identify the URL in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @var string + */ + private $name; + + /** + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @var \DateTime + */ + private $plannedPurgeDate; + + /** + * + * + * @var \Wallee\Sdk\Model\CreationEntityState + */ + private $state; + + /** + * The URL to which the HTTP requests are sent to. An example URL could look like https://www.example.com/some/path?some-query-parameter=value. + * + * @var string + */ + private $url; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['state'])) { + $this->setState($data['state']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return WebhookUrl + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns linkedSpaceId. + * + * The linked space id holds the ID of the space to which the entity belongs to. + * + * @return int + */ + public function getLinkedSpaceId() { + return $this->linkedSpaceId; + } + + /** + * Sets linkedSpaceId. + * + * @param int $linkedSpaceId + * @return WebhookUrl + */ + protected function setLinkedSpaceId($linkedSpaceId) { + $this->linkedSpaceId = $linkedSpaceId; + + return $this; + } + + /** + * Returns name. + * + * The URL name is used internally to identify the URL in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Sets name. + * + * @param string $name + * @return WebhookUrl + */ + protected function setName($name) { + $this->name = $name; + + return $this; + } + + /** + * Returns plannedPurgeDate. + * + * The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed. + * + * @return \DateTime + */ + public function getPlannedPurgeDate() { + return $this->plannedPurgeDate; + } + + /** + * Sets plannedPurgeDate. + * + * @param \DateTime $plannedPurgeDate + * @return WebhookUrl + */ + protected function setPlannedPurgeDate($plannedPurgeDate) { + $this->plannedPurgeDate = $plannedPurgeDate; + + return $this; + } + + /** + * Returns state. + * + * + * + * @return \Wallee\Sdk\Model\CreationEntityState + */ + public function getState() { + return $this->state; + } + + /** + * Sets state. + * + * @param \Wallee\Sdk\Model\CreationEntityState $state + * @return WebhookUrl + */ + public function setState($state) { + $this->state = $state; + + return $this; + } + + /** + * Returns url. + * + * The URL to which the HTTP requests are sent to. An example URL could look like https://www.example.com/some/path?some-query-parameter=value. + * + * @return string + */ + public function getUrl() { + return $this->url; + } + + /** + * Sets url. + * + * @param string $url + * @return WebhookUrl + */ + protected function setUrl($url) { + $this->url = $url; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return WebhookUrl + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookUrlCreate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookUrlCreate.php new file mode 100644 index 0000000..ebaf159 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookUrlCreate.php @@ -0,0 +1,113 @@ +validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookUrlUpdate.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookUrlUpdate.php new file mode 100644 index 0000000..e0628e7 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Model/WebhookUrlUpdate.php @@ -0,0 +1,186 @@ + 'int', + 'version' => 'int' ); + + /** + * Returns an array of property to type mappings. + * + * @return string[] + */ + public static function swaggerTypes() { + return self::$swaggerTypes + parent::swaggerTypes(); + } + + + + /** + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @var int + */ + private $id; + + /** + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @var int + */ + private $version; + + + /** + * Constructor. + * + * @param mixed[] $data an associated array of property values initializing the model + */ + public function __construct(array $data = null) { + parent::__construct($data); + + if (isset($data['id'])) { + $this->setId($data['id']); + } + if (isset($data['version'])) { + $this->setVersion($data['version']); + } + } + + + /** + * Returns id. + * + * The ID is the primary key of the entity. The ID identifies the entity uniquely. + * + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * Sets id. + * + * @param int $id + * @return WebhookUrlUpdate + */ + public function setId($id) { + $this->id = $id; + + return $this; + } + + /** + * Returns version. + * + * The version number indicates the version of the entity. The version is incremented whenever the entity is changed. + * + * @return int + */ + public function getVersion() { + return $this->version; + } + + /** + * Sets version. + * + * @param int $version + * @return WebhookUrlUpdate + */ + public function setVersion($version) { + $this->version = $version; + + return $this; + } + + /** + * Validates the model's properties and throws a ValidationException if the validation fails. + * + * @throws ValidationException + */ + public function validate() { + parent::validate(); + + if ($this->getId() === null) { + throw new ValidationException("'id' can't be null", 'id', $this); + } + if ($this->getVersion() === null) { + throw new ValidationException("'version' can't be null", 'version', $this); + } + } + + /** + * Returns true if all the properties in the model are valid. + * + * @return boolean + */ + public function isValid() { + try { + $this->validate(); + return true; + } catch (ValidationException $e) { + return false; + } + } + + /** + * Returns the string presentation of the object. + * + * @return string + */ + public function __toString() { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this)); + } + +} + diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/ObjectSerializer.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/ObjectSerializer.php new file mode 100644 index 0000000..9095fe1 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/ObjectSerializer.php @@ -0,0 +1,368 @@ +tempFolderPath = sys_get_temp_dir(); + } + + /** + * Return the path of the temporary folder used to store downloaded files from endpoints with file response. By + * default the system's default temporary folder is used. + * + * @return string + */ + public function getTempFolderPath() { + return $this->tempFolderPath; + } + + /** + * Sets the path to the temporary folder (for downloading files). + * + * @param string $tempFolderPath the temporary folder path + * @return ObjectSerializer + */ + public function setTempFolderPath($tempFolderPath) { + $this->tempFolderPath = $tempFolderPath; + return $this; + } + + /** + * Returns true, when debugging is enabled. + * + * @return boolean + */ + public function isDebuggingEnabled() { + return $this->enableDebugging; + } + + /** + * Enables debugging. + * + * @return ObjectSerializer + */ + public function enableDebugging() { + $this->enableDebugging = true; + return $this; + } + + /** + * Disables debugging. + * + * @return ObjectSerializer + */ + public function disableDebugging() { + $this->enableDebugging = false; + return $this; + } + + /** + * Returns the path to the debug file. + * + * @return string + */ + public function getDebugFile() { + return $this->debugFile; + } + + /** + * Sets the path to the debug file. + * + * @param string $debugFile the debug file + * @return ObjectSerializer + */ + public function setDebugFile($debugFile) { + $this->debugFile = $debugFile; + return $this; + } + + /** + * Prepare data for serialization. + * + * @param mixed $data the data to serialize + * @return string|object + */ + public static function sanitizeForSerialization($data) { + if (is_scalar($data) || null === $data) { + return $data; + } elseif ($data instanceof \DateTime) { + return $data->format(\DateTime::ATOM); + } elseif (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } elseif (is_object($data)) { + $values = array(); + foreach (array_keys($data::swaggerTypes()) as $property) { + $getter = 'get' . ucfirst($property); + $values[$property] = self::sanitizeForSerialization($data->$getter()); + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitizes a filename by removing the path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename the filename to be sanitized + * @return string + */ + public function sanitizeFilename($filename) { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Takes a value and turns it into a string suitable for inclusion in the path, by url-encoding. + * + * @param string $value a string which will be part of the path + * @return string + */ + public function toPathValue($value) { + return rawurlencode($this->toString($value)); + } + + /** + * Takes a value and turns it into a string suitable for inclusion in the query, by imploding comma-separated if + * it's an object. If it's a string, pass through unchanged. It will be url-encoded later. + * + * @param string[]|string|\DateTime $object an object to be serialized to a string + * @return string + */ + public function toQueryValue($object) { + if (is_array($object)) { + return implode(',', $object); + } else { + return $this->toString($object); + } + } + + /** + * Takes a value and turns it into a string suitable for inclusion in the header. If it's a string, pass through + * unchanged. If it's a datetime object, format it in ISO8601 + * + * @param string $value a string which will be part of the header + * @return string + */ + public function toHeaderValue($value) { + return $this->toString($value); + } + + /** + * Takes a value and turns it into a string suitable for inclusion in the http body (form parameter). If it's a + * string, pass through unchanged. If it's a datetime object, format it in ISO8601 + * + * @param string|\SplFileObject $value the value of the form parameter + * @return string + */ + public function toFormValue($value) { + if ($value instanceof \SplFileObject) { + return $value->getRealPath(); + } else { + return $this->toString($value); + } + } + + /** + * Takes a value and turns it into a string suitable for inclusion in the parameter. If it's a string, pass through + * unchanged. If it's a datetime object, format it in ISO8601 + * + * @param string|\DateTime $value the value of the parameter + * @return string + */ + public function toString($value) { + if ($value instanceof \DateTime) { // datetime in ISO8601 format + return $value->format(\DateTime::ATOM); + } else { + return $value; + } + } + + /** + * Serializes an array to a string. + * + * @param array $collection the collection to serialize to a string + * @param string $collectionFormat the format used for serialization (csv, ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * @return string + */ + public function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false) { + if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($collectionFormat) { + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'ssv': + return implode(' ', $collection); + + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object. + * + * @param mixed $data the data to be deserialized + * @param string $class the class name to convert the data to + * @param string[] $httpHeaders the HTTP headers + * @param string $discriminator the discriminator if polymorphism is used + * + * @return object|array|null an single or an array of $class instances + */ + public function deserialize($data, $class, $httpHeaders = null, $discriminator = null) { + if (null === $data) { + return null; + } elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int] + $inner = substr($class, 4, -1); + $deserialized = array(); + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null, $discriminator); + } + } + return $deserialized; + } elseif (strcasecmp(substr($class, -2), '[]') === 0) { + $subClass = substr($class, 0, -2); + $values = array(); + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null, $discriminator); + } + return $values; + } elseif ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === '\DateTime') { + // Some API's return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + return new \DateTime($data); + } else { + return null; + } + } elseif (in_array($class, array('void', 'bool', 'string', 'double', 'byte', 'mixed', 'integer', 'float', 'int', 'DateTime', 'number', 'boolean', 'object'), true)) { + settype($data, $class); + return $data; + } elseif ($class === '\SplFileObject') { + // determine file name + if (array_key_exists('Content-Disposition', $httpHeaders) && + preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { + $filename = $this->getTempFolderPath() . sanitizeFilename($match[1]); + } else { + $filename = tempnam($this->getTempFolderPath(), ''); + } + $deserialized = new \SplFileObject($filename, "w"); + $byte_written = $deserialized->fwrite($data); + if ($this->isDebuggingEnabled()) { + error_log("[DEBUG] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.".PHP_EOL, 3, $this->getDebugFile()); + } + + return $deserialized; + } else { + // If a discriminator is defined and points to a valid subclass, use it. + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\Wallee\Sdk\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + if (is_subclass_of($class, '\Wallee\Sdk\Model\IEnum')) { + return (string) $data; + } + + $instance = new $class(); + foreach ($instance::swaggerTypes() as $property => $type) { + $propertySetter = 'set' . ucfirst($property); + + if (!isset($propertySetter) || !isset($data->{$property})) { + continue; + } + + $propertyValue = $data->{$property}; + if (isset($propertyValue)) { + $method = new \ReflectionMethod($class, $propertySetter); + $method->setAccessible(true); + $method->invoke($instance, self::deserialize($propertyValue, $type, null, $discriminator)); + } + } + return $instance; + } + } + +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/AccountService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/AccountService.php new file mode 100644 index 0000000..e7188e0 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/AccountService.php @@ -0,0 +1,631 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($filter = null) { + return $this->countWithHttpInfo($filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($filter = null) { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/account/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/account/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param \Wallee\Sdk\Model\AccountCreate $entity The account object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Account + */ + public function create($entity) { + return $this->createWithHttpInfo($entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param \Wallee\Sdk\Model\AccountCreate $entity The account object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($entity) { + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/account/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Account', + '/account/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Account', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Account', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($id) { + return $this->deleteWithHttpInfo($id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/account/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/account/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the account which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Account + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the account which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/account/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Account', + '/account/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Account', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Account', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the accounts which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Account[] + */ + public function search($query) { + return $this->searchWithHttpInfo($query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the accounts which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($query) { + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/account/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Account[]', + '/account/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Account[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Account[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param \Wallee\Sdk\Model\AccountUpdate $entity The account object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Account + */ + public function update($entity) { + return $this->updateWithHttpInfo($entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param \Wallee\Sdk\Model\AccountUpdate $entity The account object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($entity) { + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/account/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Account', + '/account/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Account', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Account', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ApplicationUserService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ApplicationUserService.php new file mode 100644 index 0000000..45d1052 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ApplicationUserService.php @@ -0,0 +1,631 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($filter = null) { + return $this->countWithHttpInfo($filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($filter = null) { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/application-user/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/application-user/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param \Wallee\Sdk\Model\ApplicationUserCreate $entity The user object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ApplicationUserCreateWithMacKey + */ + public function create($entity) { + return $this->createWithHttpInfo($entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param \Wallee\Sdk\Model\ApplicationUserCreate $entity The user object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($entity) { + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/application-user/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ApplicationUserCreateWithMacKey', + '/application-user/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ApplicationUserCreateWithMacKey', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ApplicationUserCreateWithMacKey', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($id) { + return $this->deleteWithHttpInfo($id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/application-user/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/application-user/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the application user which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ApplicationUser + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the application user which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/application-user/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ApplicationUser', + '/application-user/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ApplicationUser', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ApplicationUser', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the application users which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ApplicationUser[] + */ + public function search($query) { + return $this->searchWithHttpInfo($query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the application users which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($query) { + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/application-user/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ApplicationUser[]', + '/application-user/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ApplicationUser[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ApplicationUser[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param \Wallee\Sdk\Model\ApplicationUserUpdate $entity The application user entity with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ApplicationUser + */ + public function update($entity) { + return $this->updateWithHttpInfo($entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param \Wallee\Sdk\Model\ApplicationUserUpdate $entity The application user entity with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($entity) { + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/application-user/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ApplicationUser', + '/application-user/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ApplicationUser', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ApplicationUser', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CardProcessingService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CardProcessingService.php new file mode 100644 index 0000000..3793716 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CardProcessingService.php @@ -0,0 +1,319 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation process + * + * Process + * + * @param int $spaceId (required) + * @param int $transactionId The ID of the transaction which should be processed. (required) + * @param int $paymentMethodConfigurationId The payment method configuration ID which is applied to the transaction. (required) + * @param \Wallee\Sdk\Model\UnencryptedCardDataCreate $cardData The card details as JSON in plain which should be used to authorize the payment. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Transaction + */ + public function process($spaceId, $transactionId, $paymentMethodConfigurationId, $cardData) { + return $this->processWithHttpInfo($spaceId, $transactionId, $paymentMethodConfigurationId, $cardData)->getData(); + } + + /** + * Operation processWithHttpInfo + * + * Process + * + * @param int $spaceId (required) + * @param int $transactionId The ID of the transaction which should be processed. (required) + * @param int $paymentMethodConfigurationId The payment method configuration ID which is applied to the transaction. (required) + * @param \Wallee\Sdk\Model\UnencryptedCardDataCreate $cardData The card details as JSON in plain which should be used to authorize the payment. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function processWithHttpInfo($spaceId, $transactionId, $paymentMethodConfigurationId, $cardData) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling process'); + } + // verify the required parameter 'transactionId' is set + if ($transactionId === null) { + throw new \InvalidArgumentException('Missing the required parameter $transactionId when calling process'); + } + // verify the required parameter 'paymentMethodConfigurationId' is set + if ($paymentMethodConfigurationId === null) { + throw new \InvalidArgumentException('Missing the required parameter $paymentMethodConfigurationId when calling process'); + } + // verify the required parameter 'cardData' is set + if ($cardData === null) { + throw new \InvalidArgumentException('Missing the required parameter $cardData when calling process'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($transactionId !== null) { + $queryParams['transactionId'] = $this->apiClient->getSerializer()->toQueryValue($transactionId); + } + if ($paymentMethodConfigurationId !== null) { + $queryParams['paymentMethodConfigurationId'] = $this->apiClient->getSerializer()->toQueryValue($paymentMethodConfigurationId); + } + + // path params + $resourcePath = "/card-processing/process"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($cardData)) { + $tempBody = $cardData; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Transaction', + '/card-processing/process' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Transaction', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Transaction', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation processWith3DSecure + * + * Process With 3-D Secure + * + * @param int $spaceId (required) + * @param int $transactionId The ID of the transaction which should be processed. (required) + * @param int $paymentMethodConfigurationId The payment method configuration ID which is applied to the transaction. (required) + * @param \Wallee\Sdk\Model\UnencryptedCardDataCreate $cardData The card details as JSON in plain which should be used to authorize the payment. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return string + */ + public function processWith3DSecure($spaceId, $transactionId, $paymentMethodConfigurationId, $cardData) { + return $this->processWith3DSecureWithHttpInfo($spaceId, $transactionId, $paymentMethodConfigurationId, $cardData)->getData(); + } + + /** + * Operation processWith3DSecureWithHttpInfo + * + * Process With 3-D Secure + * + * @param int $spaceId (required) + * @param int $transactionId The ID of the transaction which should be processed. (required) + * @param int $paymentMethodConfigurationId The payment method configuration ID which is applied to the transaction. (required) + * @param \Wallee\Sdk\Model\UnencryptedCardDataCreate $cardData The card details as JSON in plain which should be used to authorize the payment. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function processWith3DSecureWithHttpInfo($spaceId, $transactionId, $paymentMethodConfigurationId, $cardData) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling processWith3DSecure'); + } + // verify the required parameter 'transactionId' is set + if ($transactionId === null) { + throw new \InvalidArgumentException('Missing the required parameter $transactionId when calling processWith3DSecure'); + } + // verify the required parameter 'paymentMethodConfigurationId' is set + if ($paymentMethodConfigurationId === null) { + throw new \InvalidArgumentException('Missing the required parameter $paymentMethodConfigurationId when calling processWith3DSecure'); + } + // verify the required parameter 'cardData' is set + if ($cardData === null) { + throw new \InvalidArgumentException('Missing the required parameter $cardData when calling processWith3DSecure'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($transactionId !== null) { + $queryParams['transactionId'] = $this->apiClient->getSerializer()->toQueryValue($transactionId); + } + if ($paymentMethodConfigurationId !== null) { + $queryParams['paymentMethodConfigurationId'] = $this->apiClient->getSerializer()->toQueryValue($paymentMethodConfigurationId); + } + + // path params + $resourcePath = "/card-processing/processWith3DSecure"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($cardData)) { + $tempBody = $cardData; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/card-processing/processWith3DSecure' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'string', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ChargeAttemptService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ChargeAttemptService.php new file mode 100644 index 0000000..ab3f2c0 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ChargeAttemptService.php @@ -0,0 +1,372 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/charge-attempt/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/charge-attempt/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the charge attempt which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ChargeAttempt + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the charge attempt which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/charge-attempt/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ChargeAttempt', + '/charge-attempt/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ChargeAttempt', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ChargeAttempt', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the charge attempts which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ChargeAttempt[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the charge attempts which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/charge-attempt/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ChargeAttempt[]', + '/charge-attempt/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ChargeAttempt[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ChargeAttempt[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ChargeFlowLevelService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ChargeFlowLevelService.php new file mode 100644 index 0000000..6cb323a --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ChargeFlowLevelService.php @@ -0,0 +1,473 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/charge-flow-level/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/charge-flow-level/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the payment flow level which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ChargeFlowLevel + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the payment flow level which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/charge-flow-level/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ChargeFlowLevel', + '/charge-flow-level/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ChargeFlowLevel', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ChargeFlowLevel', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the payment flow levels which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ChargeFlowLevel[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the payment flow levels which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/charge-flow-level/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ChargeFlowLevel[]', + '/charge-flow-level/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ChargeFlowLevel[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ChargeFlowLevel[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation sendMessage + * + * Send Payment Link + * + * @param int $spaceId (required) + * @param int $id The id of the charge flow level whose payment link should be sent. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ChargeFlowLevel + */ + public function sendMessage($spaceId, $id) { + return $this->sendMessageWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation sendMessageWithHttpInfo + * + * Send Payment Link + * + * @param int $spaceId (required) + * @param int $id The id of the charge flow level whose payment link should be sent. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function sendMessageWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling sendMessage'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling sendMessage'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/charge-flow-level/sendMessage"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ChargeFlowLevel', + '/charge-flow-level/sendMessage' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ChargeFlowLevel', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ChargeFlowLevel', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ChargeFlowService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ChargeFlowService.php new file mode 100644 index 0000000..f06e88e --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ChargeFlowService.php @@ -0,0 +1,592 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation applyFlow + * + * applyFlow + * + * @param int $spaceId (required) + * @param int $id The transaction id of the transaction which should be process asynchronously. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Transaction + */ + public function applyFlow($spaceId, $id) { + return $this->applyFlowWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation applyFlowWithHttpInfo + * + * applyFlow + * + * @param int $spaceId (required) + * @param int $id The transaction id of the transaction which should be process asynchronously. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function applyFlowWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling applyFlow'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling applyFlow'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/charge-flow/applyFlow"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Transaction', + '/charge-flow/applyFlow' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Transaction', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Transaction', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/charge-flow/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/charge-flow/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the charge flow which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ChargeFlow + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the charge flow which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/charge-flow/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ChargeFlow', + '/charge-flow/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ChargeFlow', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ChargeFlow', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the charge flows which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ChargeFlow[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the charge flows which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/charge-flow/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ChargeFlow[]', + '/charge-flow/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ChargeFlow[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ChargeFlow[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation updateRecipient + * + * updateRecipient + * + * @param int $spaceId (required) + * @param int $transactionId The transaction id of the transaction whose recipient should be updated. (required) + * @param int $type The id of the charge flow configuration type to recipient should be updated for. (required) + * @param string $recipient The recipient address that should be used to send the payment URL. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function updateRecipient($spaceId, $transactionId, $type, $recipient) { + return $this->updateRecipientWithHttpInfo($spaceId, $transactionId, $type, $recipient)->getData(); + } + + /** + * Operation updateRecipientWithHttpInfo + * + * updateRecipient + * + * @param int $spaceId (required) + * @param int $transactionId The transaction id of the transaction whose recipient should be updated. (required) + * @param int $type The id of the charge flow configuration type to recipient should be updated for. (required) + * @param string $recipient The recipient address that should be used to send the payment URL. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateRecipientWithHttpInfo($spaceId, $transactionId, $type, $recipient) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling updateRecipient'); + } + // verify the required parameter 'transactionId' is set + if ($transactionId === null) { + throw new \InvalidArgumentException('Missing the required parameter $transactionId when calling updateRecipient'); + } + // verify the required parameter 'type' is set + if ($type === null) { + throw new \InvalidArgumentException('Missing the required parameter $type when calling updateRecipient'); + } + // verify the required parameter 'recipient' is set + if ($recipient === null) { + throw new \InvalidArgumentException('Missing the required parameter $recipient when calling updateRecipient'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($transactionId !== null) { + $queryParams['transactionId'] = $this->apiClient->getSerializer()->toQueryValue($transactionId); + } + if ($type !== null) { + $queryParams['type'] = $this->apiClient->getSerializer()->toQueryValue($type); + } + if ($recipient !== null) { + $queryParams['recipient'] = $this->apiClient->getSerializer()->toQueryValue($recipient); + } + + // path params + $resourcePath = "/charge-flow/updateRecipient"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/charge-flow/updateRecipient' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ConditionTypeService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ConditionTypeService.php new file mode 100644 index 0000000..d62872d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ConditionTypeService.php @@ -0,0 +1,244 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ConditionType[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/condition-type/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ConditionType[]', + '/condition-type/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ConditionType[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ConditionType[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the condition type which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ConditionType + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the condition type which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/condition-type/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ConditionType', + '/condition-type/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ConditionType', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ConditionType', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CountryService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CountryService.php new file mode 100644 index 0000000..1f62124 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CountryService.php @@ -0,0 +1,152 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\RestCountry[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/country/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\RestCountry[]', + '/country/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\RestCountry[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\RestCountry[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CountryStateService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CountryStateService.php new file mode 100644 index 0000000..d22a122 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CountryStateService.php @@ -0,0 +1,244 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\RestCountryState[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/country-state/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\RestCountryState[]', + '/country-state/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\RestCountryState[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\RestCountryState[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation country + * + * Find by Country + * + * @param string $code The country code in ISO code two letter format for which all states should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\RestCountryState[] + */ + public function country($code) { + return $this->countryWithHttpInfo($code)->getData(); + } + + /** + * Operation countryWithHttpInfo + * + * Find by Country + * + * @param string $code The country code in ISO code two letter format for which all states should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countryWithHttpInfo($code) { + // verify the required parameter 'code' is set + if ($code === null) { + throw new \InvalidArgumentException('Missing the required parameter $code when calling country'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($code !== null) { + $queryParams['code'] = $this->apiClient->getSerializer()->toQueryValue($code); + } + + // path params + $resourcePath = "/country-state/country"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\RestCountryState[]', + '/country-state/country' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\RestCountryState[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\RestCountryState[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CurrencyService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CurrencyService.php new file mode 100644 index 0000000..a2e52ba --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/CurrencyService.php @@ -0,0 +1,152 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\RestCurrency[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/currency/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\RestCurrency[]', + '/currency/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\RestCurrency[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\RestCurrency[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DebtCollectionCaseService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DebtCollectionCaseService.php new file mode 100644 index 0000000..bce8aed --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DebtCollectionCaseService.php @@ -0,0 +1,1351 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation addCollectedAmount + * + * Add Collected Amount + * + * @param int $spaceId (required) + * @param int $id The id of the debt collection case for which the amount should be added. (required) + * @param float $collectedAmount The amount that has been collected. (required) + * @param string $externalId The unique external id of this payment receipt. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DebtCollectionReceipt + */ + public function addCollectedAmount($spaceId, $id, $collectedAmount, $externalId) { + return $this->addCollectedAmountWithHttpInfo($spaceId, $id, $collectedAmount, $externalId)->getData(); + } + + /** + * Operation addCollectedAmountWithHttpInfo + * + * Add Collected Amount + * + * @param int $spaceId (required) + * @param int $id The id of the debt collection case for which the amount should be added. (required) + * @param float $collectedAmount The amount that has been collected. (required) + * @param string $externalId The unique external id of this payment receipt. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function addCollectedAmountWithHttpInfo($spaceId, $id, $collectedAmount, $externalId) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling addCollectedAmount'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling addCollectedAmount'); + } + // verify the required parameter 'collectedAmount' is set + if ($collectedAmount === null) { + throw new \InvalidArgumentException('Missing the required parameter $collectedAmount when calling addCollectedAmount'); + } + // verify the required parameter 'externalId' is set + if ($externalId === null) { + throw new \InvalidArgumentException('Missing the required parameter $externalId when calling addCollectedAmount'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + if ($collectedAmount !== null) { + $queryParams['collectedAmount'] = $this->apiClient->getSerializer()->toQueryValue($collectedAmount); + } + if ($externalId !== null) { + $queryParams['externalId'] = $this->apiClient->getSerializer()->toQueryValue($externalId); + } + + // path params + $resourcePath = "/debt-collection-case/addCollectedAmount"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DebtCollectionReceipt', + '/debt-collection-case/addCollectedAmount' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DebtCollectionReceipt', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DebtCollectionReceipt', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation attachDocument + * + * Attach Document + * + * @param int $spaceId (required) + * @param int $id The id of the debt collection case. (required) + * @param string $fileName The file name of the document that is uploaded. (required) + * @param string $contentBase64 The BASE64 encoded contents of the document. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DebtCollectionCaseDocument + */ + public function attachDocument($spaceId, $id, $fileName, $contentBase64) { + return $this->attachDocumentWithHttpInfo($spaceId, $id, $fileName, $contentBase64)->getData(); + } + + /** + * Operation attachDocumentWithHttpInfo + * + * Attach Document + * + * @param int $spaceId (required) + * @param int $id The id of the debt collection case. (required) + * @param string $fileName The file name of the document that is uploaded. (required) + * @param string $contentBase64 The BASE64 encoded contents of the document. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function attachDocumentWithHttpInfo($spaceId, $id, $fileName, $contentBase64) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling attachDocument'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling attachDocument'); + } + // verify the required parameter 'fileName' is set + if ($fileName === null) { + throw new \InvalidArgumentException('Missing the required parameter $fileName when calling attachDocument'); + } + // verify the required parameter 'contentBase64' is set + if ($contentBase64 === null) { + throw new \InvalidArgumentException('Missing the required parameter $contentBase64 when calling attachDocument'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + if ($fileName !== null) { + $queryParams['fileName'] = $this->apiClient->getSerializer()->toQueryValue($fileName); + } + if ($contentBase64 !== null) { + $queryParams['contentBase64'] = $this->apiClient->getSerializer()->toQueryValue($contentBase64); + } + + // path params + $resourcePath = "/debt-collection-case/attachDocument"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DebtCollectionCaseDocument', + '/debt-collection-case/attachDocument' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DebtCollectionCaseDocument', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DebtCollectionCaseDocument', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation close + * + * Close + * + * @param int $spaceId (required) + * @param int $id The id of the debt collection case which should be closed. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DebtCollectionCase + */ + public function close($spaceId, $id) { + return $this->closeWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation closeWithHttpInfo + * + * Close + * + * @param int $spaceId (required) + * @param int $id The id of the debt collection case which should be closed. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function closeWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling close'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling close'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/debt-collection-case/close"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DebtCollectionCase', + '/debt-collection-case/close' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DebtCollectionCase', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DebtCollectionCase', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/debt-collection-case/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/debt-collection-case/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\DebtCollectionCaseCreate $entity The debt collection case object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DebtCollectionCase + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\DebtCollectionCaseCreate $entity The debt collection case object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/debt-collection-case/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DebtCollectionCase', + '/debt-collection-case/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DebtCollectionCase', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DebtCollectionCase', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($spaceId, $id) { + return $this->deleteWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling delete'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/debt-collection-case/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/debt-collection-case/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation documents + * + * Documents + * + * @param int $spaceId (required) + * @param int $id The id of the debt collection case for which the attached documents are returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DebtCollectionCaseDocument[] + */ + public function documents($spaceId, $id) { + return $this->documentsWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation documentsWithHttpInfo + * + * Documents + * + * @param int $spaceId (required) + * @param int $id The id of the debt collection case for which the attached documents are returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function documentsWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling documents'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling documents'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/debt-collection-case/documents"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DebtCollectionCaseDocument[]', + '/debt-collection-case/documents' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DebtCollectionCaseDocument[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DebtCollectionCaseDocument[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation markAsPrepared + * + * Mark Case As Prepared + * + * @param int $spaceId (required) + * @param int $id The id of the debt collection case which should be marked as prepared. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DebtCollectionCase + */ + public function markAsPrepared($spaceId, $id) { + return $this->markAsPreparedWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation markAsPreparedWithHttpInfo + * + * Mark Case As Prepared + * + * @param int $spaceId (required) + * @param int $id The id of the debt collection case which should be marked as prepared. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function markAsPreparedWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling markAsPrepared'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling markAsPrepared'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/debt-collection-case/markAsPrepared"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DebtCollectionCase', + '/debt-collection-case/markAsPrepared' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DebtCollectionCase', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DebtCollectionCase', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation markAsReviewed + * + * Mark Case As Reviewed + * + * @param int $spaceId (required) + * @param int $id The id of the debt collection case which should be reviewed. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DebtCollectionCase + */ + public function markAsReviewed($spaceId, $id) { + return $this->markAsReviewedWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation markAsReviewedWithHttpInfo + * + * Mark Case As Reviewed + * + * @param int $spaceId (required) + * @param int $id The id of the debt collection case which should be reviewed. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function markAsReviewedWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling markAsReviewed'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling markAsReviewed'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/debt-collection-case/markAsReviewed"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DebtCollectionCase', + '/debt-collection-case/markAsReviewed' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DebtCollectionCase', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DebtCollectionCase', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the debt collection case which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DebtCollectionCase + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the debt collection case which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/debt-collection-case/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DebtCollectionCase', + '/debt-collection-case/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DebtCollectionCase', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DebtCollectionCase', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the cases which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DebtCollectionCase[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the cases which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/debt-collection-case/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DebtCollectionCase[]', + '/debt-collection-case/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DebtCollectionCase[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DebtCollectionCase[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\DebtCollectionCaseUpdate $entity The object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DebtCollectionCase + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\DebtCollectionCaseUpdate $entity The object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/debt-collection-case/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DebtCollectionCase', + '/debt-collection-case/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DebtCollectionCase', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DebtCollectionCase', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DebtCollectorConfigurationService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DebtCollectorConfigurationService.php new file mode 100644 index 0000000..eb5ca1a --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DebtCollectorConfigurationService.php @@ -0,0 +1,372 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/debt-collector-configuration/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/debt-collector-configuration/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the debt collector configuration which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DebtCollectorConfiguration + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the debt collector configuration which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/debt-collector-configuration/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DebtCollectorConfiguration', + '/debt-collector-configuration/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DebtCollectorConfiguration', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DebtCollectorConfiguration', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the debt collector configuration which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DebtCollectorConfiguration[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the debt collector configuration which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/debt-collector-configuration/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DebtCollectorConfiguration[]', + '/debt-collector-configuration/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DebtCollectorConfiguration[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DebtCollectorConfiguration[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DebtCollectorService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DebtCollectorService.php new file mode 100644 index 0000000..2e5a32c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DebtCollectorService.php @@ -0,0 +1,244 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DebtCollector[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/debt-collector/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DebtCollector[]', + '/debt-collector/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DebtCollector[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DebtCollector[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the collector which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DebtCollector + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the collector which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/debt-collector/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DebtCollector', + '/debt-collector/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DebtCollector', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DebtCollector', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DeliveryIndicationService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DeliveryIndicationService.php new file mode 100644 index 0000000..f9309bd --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DeliveryIndicationService.php @@ -0,0 +1,578 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/delivery-indication/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/delivery-indication/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation markAsNotSuitable + * + * markAsNotSuitable + * + * @param int $spaceId (required) + * @param int $deliveryIndicationId The delivery indication id which should be marked as not suitable. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DeliveryIndication + */ + public function markAsNotSuitable($spaceId, $deliveryIndicationId) { + return $this->markAsNotSuitableWithHttpInfo($spaceId, $deliveryIndicationId)->getData(); + } + + /** + * Operation markAsNotSuitableWithHttpInfo + * + * markAsNotSuitable + * + * @param int $spaceId (required) + * @param int $deliveryIndicationId The delivery indication id which should be marked as not suitable. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function markAsNotSuitableWithHttpInfo($spaceId, $deliveryIndicationId) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling markAsNotSuitable'); + } + // verify the required parameter 'deliveryIndicationId' is set + if ($deliveryIndicationId === null) { + throw new \InvalidArgumentException('Missing the required parameter $deliveryIndicationId when calling markAsNotSuitable'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/delivery-indication/markAsNotSuitable"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($deliveryIndicationId)) { + $tempBody = $deliveryIndicationId; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DeliveryIndication', + '/delivery-indication/markAsNotSuitable' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DeliveryIndication', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DeliveryIndication', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation markAsSuitable + * + * markAsSuitable + * + * @param int $spaceId (required) + * @param int $deliveryIndicationId The delivery indication id which should be marked as suitable. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DeliveryIndication + */ + public function markAsSuitable($spaceId, $deliveryIndicationId) { + return $this->markAsSuitableWithHttpInfo($spaceId, $deliveryIndicationId)->getData(); + } + + /** + * Operation markAsSuitableWithHttpInfo + * + * markAsSuitable + * + * @param int $spaceId (required) + * @param int $deliveryIndicationId The delivery indication id which should be marked as suitable. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function markAsSuitableWithHttpInfo($spaceId, $deliveryIndicationId) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling markAsSuitable'); + } + // verify the required parameter 'deliveryIndicationId' is set + if ($deliveryIndicationId === null) { + throw new \InvalidArgumentException('Missing the required parameter $deliveryIndicationId when calling markAsSuitable'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/delivery-indication/markAsSuitable"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($deliveryIndicationId)) { + $tempBody = $deliveryIndicationId; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DeliveryIndication', + '/delivery-indication/markAsSuitable' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DeliveryIndication', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DeliveryIndication', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the delivery indication which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DeliveryIndication + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the delivery indication which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/delivery-indication/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DeliveryIndication', + '/delivery-indication/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DeliveryIndication', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DeliveryIndication', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the delivery indications which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DeliveryIndication[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the delivery indications which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/delivery-indication/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DeliveryIndication[]', + '/delivery-indication/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DeliveryIndication[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DeliveryIndication[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DocumentTemplateService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DocumentTemplateService.php new file mode 100644 index 0000000..ddf090c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DocumentTemplateService.php @@ -0,0 +1,372 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/document-template/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/document-template/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the document template which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DocumentTemplate + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the document template which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/document-template/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DocumentTemplate', + '/document-template/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DocumentTemplate', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DocumentTemplate', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the document templates which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DocumentTemplate[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the document templates which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/document-template/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DocumentTemplate[]', + '/document-template/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DocumentTemplate[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DocumentTemplate[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DocumentTemplateTypeService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DocumentTemplateTypeService.php new file mode 100644 index 0000000..c80fee7 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/DocumentTemplateTypeService.php @@ -0,0 +1,244 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DocumentTemplateType[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/document-template-type/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DocumentTemplateType[]', + '/document-template-type/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DocumentTemplateType[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DocumentTemplateType[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the document template type which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\DocumentTemplateType + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the document template type which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/document-template-type/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\DocumentTemplateType', + '/document-template-type/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\DocumentTemplateType', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\DocumentTemplateType', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailSenderService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailSenderService.php new file mode 100644 index 0000000..dce1c3b --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailSenderService.php @@ -0,0 +1,365 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the email senders which are used to calculate the count. (required) + * @throws \Wallee\Sdk\ApiException + * @return int + */ + public function count($spaceId, $filter) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the email senders which are used to calculate the count. (required) + * @throws \Wallee\Sdk\ApiException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // verify the required parameter 'filter' is set + if ($filter === null) { + throw new \InvalidArgumentException('Missing the required parameter $filter when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/email-sender/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/email-sender/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the email sender which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @return \Wallee\Sdk\Model\EmailSender + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the email sender which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('*/*')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/email-sender/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\EmailSender', + '/email-sender/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\EmailSender', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\EmailSender', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the email senders which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @return \Wallee\Sdk\Model\EmailSender[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the email senders which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/email-sender/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\EmailSender[]', + '/email-sender/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\EmailSender[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\EmailSender[]', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailSenderTypeService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailSenderTypeService.php new file mode 100644 index 0000000..2f6cd2c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailSenderTypeService.php @@ -0,0 +1,237 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @return \Wallee\Sdk\Model\EmailSenderType[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('*/*')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/email-sender-type/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\EmailSenderType[]', + '/email-sender-type/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\EmailSenderType[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\EmailSenderType[]', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the email sender type which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @return \Wallee\Sdk\Model\EmailSenderType + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the email sender type which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('*/*')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/email-sender-type/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\EmailSenderType', + '/email-sender-type/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\EmailSenderType', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\EmailSenderType', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailTemplateService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailTemplateService.php new file mode 100644 index 0000000..577edb1 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailTemplateService.php @@ -0,0 +1,361 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/email-template/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/email-template/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the email template which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @return \Wallee\Sdk\Model\EmailTemplate + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the email template which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('*/*')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/email-template/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\EmailTemplate', + '/email-template/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\EmailTemplate', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\EmailTemplate', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the email templates which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @return \Wallee\Sdk\Model\EmailTemplate[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the email templates which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/email-template/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\EmailTemplate[]', + '/email-template/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\EmailTemplate[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\EmailTemplate[]', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailTemplateTypeService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailTemplateTypeService.php new file mode 100644 index 0000000..91bda57 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/EmailTemplateTypeService.php @@ -0,0 +1,237 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @return \Wallee\Sdk\Model\EmailTemplateType[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('*/*')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/email-template-type/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\EmailTemplateType[]', + '/email-template-type/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\EmailTemplateType[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\EmailTemplateType[]', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the email template type which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @return \Wallee\Sdk\Model\EmailTemplateType + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the email template type which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('*/*')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/email-template-type/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\EmailTemplateType', + '/email-template-type/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\EmailTemplateType', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\EmailTemplateType', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/HumanUserService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/HumanUserService.php new file mode 100644 index 0000000..52e50b0 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/HumanUserService.php @@ -0,0 +1,725 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($filter = null) { + return $this->countWithHttpInfo($filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($filter = null) { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/human-user/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/human-user/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param \Wallee\Sdk\Model\HumanUserCreate $entity The human user object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\HumanUser + */ + public function create($entity) { + return $this->createWithHttpInfo($entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param \Wallee\Sdk\Model\HumanUserCreate $entity The human user object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($entity) { + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/human-user/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\HumanUser', + '/human-user/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\HumanUser', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\HumanUser', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($id) { + return $this->deleteWithHttpInfo($id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/human-user/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/human-user/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation export + * + * Export + * + * @param \Wallee\Sdk\Model\EntityExportRequest $request The request controls the entries which are exported. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return string + */ + public function export($request) { + return $this->exportWithHttpInfo($request)->getData(); + } + + /** + * Operation exportWithHttpInfo + * + * Export + * + * @param \Wallee\Sdk\Model\EntityExportRequest $request The request controls the entries which are exported. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function exportWithHttpInfo($request) { + // verify the required parameter 'request' is set + if ($request === null) { + throw new \InvalidArgumentException('Missing the required parameter $request when calling export'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8', 'text/csv')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/human-user/export"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($request)) { + $tempBody = $request; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/human-user/export' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'string', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the human user which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\HumanUser + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the human user which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/human-user/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\HumanUser', + '/human-user/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\HumanUser', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\HumanUser', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the human users which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\HumanUser[] + */ + public function search($query) { + return $this->searchWithHttpInfo($query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the human users which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($query) { + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/human-user/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\HumanUser[]', + '/human-user/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\HumanUser[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\HumanUser[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param \Wallee\Sdk\Model\HumanUserUpdate $entity The object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\HumanUser + */ + public function update($entity) { + return $this->updateWithHttpInfo($entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param \Wallee\Sdk\Model\HumanUserUpdate $entity The object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($entity) { + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/human-user/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\HumanUser', + '/human-user/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\HumanUser', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\HumanUser', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPaymentService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPaymentService.php new file mode 100644 index 0000000..bf2a28d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPaymentService.php @@ -0,0 +1,486 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the installment payment which are used to calculate the count. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the installment payment which are used to calculate the count. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // verify the required parameter 'filter' is set + if ($filter === null) { + throw new \InvalidArgumentException('Missing the required parameter $filter when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/installment-payment/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/installment-payment/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation createInstallmentPayment + * + * Create Installment Payment + * + * @param int $spaceId (required) + * @param int $transactionId The transaction which should be converted into an installment payment. (required) + * @param int $installmentPlanConfiguration The installment plan configuration ID which should be applied on the transaction. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\InstallmentPayment + */ + public function createInstallmentPayment($spaceId, $transactionId, $installmentPlanConfiguration) { + return $this->createInstallmentPaymentWithHttpInfo($spaceId, $transactionId, $installmentPlanConfiguration)->getData(); + } + + /** + * Operation createInstallmentPaymentWithHttpInfo + * + * Create Installment Payment + * + * @param int $spaceId (required) + * @param int $transactionId The transaction which should be converted into an installment payment. (required) + * @param int $installmentPlanConfiguration The installment plan configuration ID which should be applied on the transaction. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createInstallmentPaymentWithHttpInfo($spaceId, $transactionId, $installmentPlanConfiguration) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling createInstallmentPayment'); + } + // verify the required parameter 'transactionId' is set + if ($transactionId === null) { + throw new \InvalidArgumentException('Missing the required parameter $transactionId when calling createInstallmentPayment'); + } + // verify the required parameter 'installmentPlanConfiguration' is set + if ($installmentPlanConfiguration === null) { + throw new \InvalidArgumentException('Missing the required parameter $installmentPlanConfiguration when calling createInstallmentPayment'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($transactionId !== null) { + $queryParams['transactionId'] = $this->apiClient->getSerializer()->toQueryValue($transactionId); + } + if ($installmentPlanConfiguration !== null) { + $queryParams['installmentPlanConfiguration'] = $this->apiClient->getSerializer()->toQueryValue($installmentPlanConfiguration); + } + + // path params + $resourcePath = "/installment-payment/createInstallmentPayment"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\InstallmentPayment', + '/installment-payment/createInstallmentPayment' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\InstallmentPayment', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\InstallmentPayment', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the installment payment which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\InstallmentPayment + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the installment payment which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/installment-payment/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\InstallmentPayment', + '/installment-payment/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\InstallmentPayment', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\InstallmentPayment', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the installment payments which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\InstallmentPayment[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the installment payments which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/installment-payment/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\InstallmentPayment[]', + '/installment-payment/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\InstallmentPayment[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\InstallmentPayment[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPaymentSliceService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPaymentSliceService.php new file mode 100644 index 0000000..ccd8e39 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPaymentSliceService.php @@ -0,0 +1,376 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the installment payment slices which are used to calculate the count. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the installment payment slices which are used to calculate the count. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // verify the required parameter 'filter' is set + if ($filter === null) { + throw new \InvalidArgumentException('Missing the required parameter $filter when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/installment-payment-slice/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/installment-payment-slice/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the installment payment slice which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\InstallmentPaymentSlice + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the installment payment slice which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/installment-payment-slice/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\InstallmentPaymentSlice', + '/installment-payment-slice/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\InstallmentPaymentSlice', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\InstallmentPaymentSlice', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the installment payment slices which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\InstallmentPaymentSlice[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the installment payment slices which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/installment-payment-slice/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\InstallmentPaymentSlice[]', + '/installment-payment-slice/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\InstallmentPaymentSlice[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\InstallmentPaymentSlice[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPlanCalculationService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPlanCalculationService.php new file mode 100644 index 0000000..5de42e3 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPlanCalculationService.php @@ -0,0 +1,170 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation calculatePlans + * + * Calculate Plans + * + * @param int $spaceId (required) + * @param int $transactionId The transaction for which the plans should be calculated for. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\InstallmentCalculatedPlan[] + */ + public function calculatePlans($spaceId, $transactionId) { + return $this->calculatePlansWithHttpInfo($spaceId, $transactionId)->getData(); + } + + /** + * Operation calculatePlansWithHttpInfo + * + * Calculate Plans + * + * @param int $spaceId (required) + * @param int $transactionId The transaction for which the plans should be calculated for. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function calculatePlansWithHttpInfo($spaceId, $transactionId) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling calculatePlans'); + } + // verify the required parameter 'transactionId' is set + if ($transactionId === null) { + throw new \InvalidArgumentException('Missing the required parameter $transactionId when calling calculatePlans'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($transactionId !== null) { + $queryParams['transactionId'] = $this->apiClient->getSerializer()->toQueryValue($transactionId); + } + + // path params + $resourcePath = "/installment-plan-calculation/calculatePlans"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\InstallmentCalculatedPlan[]', + '/installment-plan-calculation/calculatePlans' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\InstallmentCalculatedPlan[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\InstallmentCalculatedPlan[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPlanConfigurationService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPlanConfigurationService.php new file mode 100644 index 0000000..74d561c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPlanConfigurationService.php @@ -0,0 +1,376 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the installment plan configurations which are used to calculate the count. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the installment plan configurations which are used to calculate the count. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // verify the required parameter 'filter' is set + if ($filter === null) { + throw new \InvalidArgumentException('Missing the required parameter $filter when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/installment-plan-configuration/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/installment-plan-configuration/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the installment plan configuration which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\InstallmentPlanConfiguration + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the installment plan configuration which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/installment-plan-configuration/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\InstallmentPlanConfiguration', + '/installment-plan-configuration/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\InstallmentPlanConfiguration', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\InstallmentPlanConfiguration', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the installment plan configurations which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\InstallmentPlanConfiguration[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the installment plan configurations which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/installment-plan-configuration/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\InstallmentPlanConfiguration[]', + '/installment-plan-configuration/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\InstallmentPlanConfiguration[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\InstallmentPlanConfiguration[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPlanSliceConfigurationService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPlanSliceConfigurationService.php new file mode 100644 index 0000000..f019c1d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/InstallmentPlanSliceConfigurationService.php @@ -0,0 +1,376 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the installment plan slice configurations which are used to calculate the count. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the installment plan slice configurations which are used to calculate the count. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // verify the required parameter 'filter' is set + if ($filter === null) { + throw new \InvalidArgumentException('Missing the required parameter $filter when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/installment-plan-slice-configuration/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/installment-plan-slice-configuration/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the installment plan slice configuration which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\InstallmentPlanSliceConfiguration + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the installment plan slice configuration which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/installment-plan-slice-configuration/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\InstallmentPlanSliceConfiguration', + '/installment-plan-slice-configuration/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\InstallmentPlanSliceConfiguration', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\InstallmentPlanSliceConfiguration', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the installment plan slice configurations which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\InstallmentPlanSliceConfiguration[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the installment plan slice configurations which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/installment-plan-slice-configuration/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\InstallmentPlanSliceConfiguration[]', + '/installment-plan-slice-configuration/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\InstallmentPlanSliceConfiguration[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\InstallmentPlanSliceConfiguration[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LabelDescriptionGroupService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LabelDescriptionGroupService.php new file mode 100644 index 0000000..2e1a913 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LabelDescriptionGroupService.php @@ -0,0 +1,244 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\LabelDescriptorGroup[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/label-description-group-service/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\LabelDescriptorGroup[]', + '/label-description-group-service/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\LabelDescriptorGroup[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\LabelDescriptorGroup[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the label descriptor group which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\LabelDescriptorGroup + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the label descriptor group which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/label-description-group-service/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\LabelDescriptorGroup', + '/label-description-group-service/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\LabelDescriptorGroup', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\LabelDescriptorGroup', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LabelDescriptionService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LabelDescriptionService.php new file mode 100644 index 0000000..68e7bb4 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LabelDescriptionService.php @@ -0,0 +1,244 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\LabelDescriptor[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/label-description-service/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\LabelDescriptor[]', + '/label-description-service/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\LabelDescriptor[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\LabelDescriptor[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the label descriptor which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\LabelDescriptor + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the label descriptor which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/label-description-service/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\LabelDescriptor', + '/label-description-service/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\LabelDescriptor', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\LabelDescriptor', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LanguageService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LanguageService.php new file mode 100644 index 0000000..8b6ca4d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LanguageService.php @@ -0,0 +1,152 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\RestLanguage[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/language/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\RestLanguage[]', + '/language/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\RestLanguage[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\RestLanguage[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LegalOrganizationFormService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LegalOrganizationFormService.php new file mode 100644 index 0000000..b8b9eca --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/LegalOrganizationFormService.php @@ -0,0 +1,336 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\LegalOrganizationForm[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/legal-organization-form/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\LegalOrganizationForm[]', + '/legal-organization-form/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\LegalOrganizationForm[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\LegalOrganizationForm[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation country + * + * Find by Country + * + * @param string $code The country in ISO 3166-1 alpha-2 format, for which all legal organization forms should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\LegalOrganizationForm[] + */ + public function country($code) { + return $this->countryWithHttpInfo($code)->getData(); + } + + /** + * Operation countryWithHttpInfo + * + * Find by Country + * + * @param string $code The country in ISO 3166-1 alpha-2 format, for which all legal organization forms should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countryWithHttpInfo($code) { + // verify the required parameter 'code' is set + if ($code === null) { + throw new \InvalidArgumentException('Missing the required parameter $code when calling country'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($code !== null) { + $queryParams['code'] = $this->apiClient->getSerializer()->toQueryValue($code); + } + + // path params + $resourcePath = "/legal-organization-form/country"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\LegalOrganizationForm[]', + '/legal-organization-form/country' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\LegalOrganizationForm[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\LegalOrganizationForm[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the legal organization form which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\LegalOrganizationForm + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the legal organization form which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/legal-organization-form/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\LegalOrganizationForm', + '/legal-organization-form/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\LegalOrganizationForm', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\LegalOrganizationForm', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ManualTaskService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ManualTaskService.php new file mode 100644 index 0000000..2343f89 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/ManualTaskService.php @@ -0,0 +1,372 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/manual-task/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/manual-task/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the manual task which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ManualTask + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the manual task which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/manual-task/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ManualTask', + '/manual-task/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ManualTask', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ManualTask', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the manual tasks which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ManualTask[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the manual tasks which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/manual-task/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ManualTask[]', + '/manual-task/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ManualTask[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ManualTask[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/MerticUsageService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/MerticUsageService.php new file mode 100644 index 0000000..a54490c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/MerticUsageService.php @@ -0,0 +1,179 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation calculate + * + * Calculate + * + * @param int $spaceId (required) + * @param \DateTime $start The start date from which on the consumed units should be returned from. (required) + * @param \DateTime $end The end date to which the consumed units should be returned to. The end date is not included in the result. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\MetricUsage[] + */ + public function calculate($spaceId, $start, $end) { + return $this->calculateWithHttpInfo($spaceId, $start, $end)->getData(); + } + + /** + * Operation calculateWithHttpInfo + * + * Calculate + * + * @param int $spaceId (required) + * @param \DateTime $start The start date from which on the consumed units should be returned from. (required) + * @param \DateTime $end The end date to which the consumed units should be returned to. The end date is not included in the result. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function calculateWithHttpInfo($spaceId, $start, $end) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling calculate'); + } + // verify the required parameter 'start' is set + if ($start === null) { + throw new \InvalidArgumentException('Missing the required parameter $start when calling calculate'); + } + // verify the required parameter 'end' is set + if ($end === null) { + throw new \InvalidArgumentException('Missing the required parameter $end when calling calculate'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($start !== null) { + $queryParams['start'] = $this->apiClient->getSerializer()->toQueryValue($start); + } + if ($end !== null) { + $queryParams['end'] = $this->apiClient->getSerializer()->toQueryValue($end); + } + + // path params + $resourcePath = "/mertic-usage/calculate"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\MetricUsage[]', + '/mertic-usage/calculate' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\MetricUsage[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\MetricUsage[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentConnectorConfigurationService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentConnectorConfigurationService.php new file mode 100644 index 0000000..e05224d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentConnectorConfigurationService.php @@ -0,0 +1,372 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/payment-connector-configuration/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/payment-connector-configuration/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the payment connector configuration which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentConnectorConfiguration + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the payment connector configuration which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/payment-connector-configuration/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentConnectorConfiguration', + '/payment-connector-configuration/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentConnectorConfiguration', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentConnectorConfiguration', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the payment connector configuration which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentConnectorConfiguration[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the payment connector configuration which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/payment-connector-configuration/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentConnectorConfiguration[]', + '/payment-connector-configuration/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentConnectorConfiguration[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentConnectorConfiguration[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentConnectorService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentConnectorService.php new file mode 100644 index 0000000..e3f6e1c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentConnectorService.php @@ -0,0 +1,244 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentConnector[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/payment-connector/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentConnector[]', + '/payment-connector/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentConnector[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentConnector[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the connector which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentConnector + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the connector which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/payment-connector/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentConnector', + '/payment-connector/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentConnector', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentConnector', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentLinkService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentLinkService.php new file mode 100644 index 0000000..750b517 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentLinkService.php @@ -0,0 +1,685 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/payment-link/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/payment-link/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\PaymentLinkCreate $entity The payment link object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentLink + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\PaymentLinkCreate $entity The payment link object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/payment-link/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentLink', + '/payment-link/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentLink', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentLink', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($spaceId, $id) { + return $this->deleteWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling delete'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/payment-link/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/payment-link/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the payment links which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentLink + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the payment links which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/payment-link/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentLink', + '/payment-link/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentLink', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentLink', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the payment links which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentLink[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the payment links which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/payment-link/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentLink[]', + '/payment-link/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentLink[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentLink[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\PaymentLinkUpdate $entity The object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentLink + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\PaymentLinkUpdate $entity The object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/payment-link/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentLink', + '/payment-link/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentLink', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentLink', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentMethodConfigurationService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentMethodConfigurationService.php new file mode 100644 index 0000000..11a8eba --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentMethodConfigurationService.php @@ -0,0 +1,372 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/payment-method-configuration/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/payment-method-configuration/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the payment method configuration which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentMethodConfiguration + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the payment method configuration which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/payment-method-configuration/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentMethodConfiguration', + '/payment-method-configuration/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentMethodConfiguration', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentMethodConfiguration', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the payment method configuration which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentMethodConfiguration[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the payment method configuration which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/payment-method-configuration/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentMethodConfiguration[]', + '/payment-method-configuration/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentMethodConfiguration[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentMethodConfiguration[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentMethodService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentMethodService.php new file mode 100644 index 0000000..a2e8a1a --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentMethodService.php @@ -0,0 +1,244 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentMethod[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/payment-method/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentMethod[]', + '/payment-method/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentMethod[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentMethod[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the payment method which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentMethod + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the payment method which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/payment-method/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentMethod', + '/payment-method/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentMethod', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentMethod', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentProcessorConfigurationService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentProcessorConfigurationService.php new file mode 100644 index 0000000..0a9e5d2 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentProcessorConfigurationService.php @@ -0,0 +1,372 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/payment-processor-configuration/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/payment-processor-configuration/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the payment processor configuration which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentProcessorConfiguration + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the payment processor configuration which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/payment-processor-configuration/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentProcessorConfiguration', + '/payment-processor-configuration/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentProcessorConfiguration', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentProcessorConfiguration', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the payment processor configuration which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentProcessorConfiguration[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the payment processor configuration which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/payment-processor-configuration/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentProcessorConfiguration[]', + '/payment-processor-configuration/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentProcessorConfiguration[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentProcessorConfiguration[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentProcessorService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentProcessorService.php new file mode 100644 index 0000000..b162023 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PaymentProcessorService.php @@ -0,0 +1,244 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentProcessor[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/payment-processor/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentProcessor[]', + '/payment-processor/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentProcessor[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentProcessor[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the processor which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentProcessor + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the processor which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/payment-processor/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentProcessor', + '/payment-processor/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentProcessor', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentProcessor', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PermissionService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PermissionService.php new file mode 100644 index 0000000..00abb5f --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/PermissionService.php @@ -0,0 +1,244 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Permission[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/permission/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Permission[]', + '/permission/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Permission[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Permission[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the permission which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Permission + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the permission which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/permission/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Permission', + '/permission/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Permission', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Permission', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/RefundService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/RefundService.php new file mode 100644 index 0000000..c59e7fa --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/RefundService.php @@ -0,0 +1,778 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/refund/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/refund/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation fail + * + * fail + * + * @param int $spaceId (required) + * @param int $refundId The id of the refund which should be marked as failed. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Refund + */ + public function fail($spaceId, $refundId) { + return $this->failWithHttpInfo($spaceId, $refundId)->getData(); + } + + /** + * Operation failWithHttpInfo + * + * fail + * + * @param int $spaceId (required) + * @param int $refundId The id of the refund which should be marked as failed. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function failWithHttpInfo($spaceId, $refundId) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling fail'); + } + // verify the required parameter 'refundId' is set + if ($refundId === null) { + throw new \InvalidArgumentException('Missing the required parameter $refundId when calling fail'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($refundId !== null) { + $queryParams['refundId'] = $this->apiClient->getSerializer()->toQueryValue($refundId); + } + + // path params + $resourcePath = "/refund/fail"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Refund', + '/refund/fail' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Refund', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Refund', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation getRefundDocument + * + * getRefundDocument + * + * @param int $spaceId (required) + * @param int $id The id of the refund to get the document for. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\RenderedDocument + */ + public function getRefundDocument($spaceId, $id) { + return $this->getRefundDocumentWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation getRefundDocumentWithHttpInfo + * + * getRefundDocument + * + * @param int $spaceId (required) + * @param int $id The id of the refund to get the document for. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function getRefundDocumentWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling getRefundDocument'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling getRefundDocument'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/refund/getRefundDocument"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\RenderedDocument', + '/refund/getRefundDocument' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\RenderedDocument', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\RenderedDocument', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the refund which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Refund + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the refund which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/refund/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Refund', + '/refund/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Refund', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Refund', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation refund + * + * create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\RefundCreate $refund The refund object which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Refund + */ + public function refund($spaceId, $refund) { + return $this->refundWithHttpInfo($spaceId, $refund)->getData(); + } + + /** + * Operation refundWithHttpInfo + * + * create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\RefundCreate $refund The refund object which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function refundWithHttpInfo($spaceId, $refund) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling refund'); + } + // verify the required parameter 'refund' is set + if ($refund === null) { + throw new \InvalidArgumentException('Missing the required parameter $refund when calling refund'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/refund/refund"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($refund)) { + $tempBody = $refund; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Refund', + '/refund/refund' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Refund', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Refund', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the refunds which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Refund[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the refunds which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/refund/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Refund[]', + '/refund/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Refund[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Refund[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation succeed + * + * succeed + * + * @param int $spaceId (required) + * @param int $refundId The id of the refund which should be marked as successful. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Refund + */ + public function succeed($spaceId, $refundId) { + return $this->succeedWithHttpInfo($spaceId, $refundId)->getData(); + } + + /** + * Operation succeedWithHttpInfo + * + * succeed + * + * @param int $spaceId (required) + * @param int $refundId The id of the refund which should be marked as successful. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function succeedWithHttpInfo($spaceId, $refundId) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling succeed'); + } + // verify the required parameter 'refundId' is set + if ($refundId === null) { + throw new \InvalidArgumentException('Missing the required parameter $refundId when calling succeed'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($refundId !== null) { + $queryParams['refundId'] = $this->apiClient->getSerializer()->toQueryValue($refundId); + } + + // path params + $resourcePath = "/refund/succeed"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Refund', + '/refund/succeed' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Refund', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Refund', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SpaceService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SpaceService.php new file mode 100644 index 0000000..68ba97d --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SpaceService.php @@ -0,0 +1,631 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($filter = null) { + return $this->countWithHttpInfo($filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($filter = null) { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/space/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/space/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param \Wallee\Sdk\Model\SpaceCreate $entity The space object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Space + */ + public function create($entity) { + return $this->createWithHttpInfo($entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param \Wallee\Sdk\Model\SpaceCreate $entity The space object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($entity) { + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/space/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Space', + '/space/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Space', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Space', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($id) { + return $this->deleteWithHttpInfo($id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/space/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/space/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the space which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Space + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the space which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/space/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Space', + '/space/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Space', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Space', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the spaces which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Space[] + */ + public function search($query) { + return $this->searchWithHttpInfo($query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the spaces which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($query) { + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/space/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Space[]', + '/space/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Space[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Space[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param \Wallee\Sdk\Model\SpaceUpdate $entity The space object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Space + */ + public function update($entity) { + return $this->updateWithHttpInfo($entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param \Wallee\Sdk\Model\SpaceUpdate $entity The space object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($entity) { + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/space/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Space', + '/space/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Space', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Space', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/StaticValueService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/StaticValueService.php new file mode 100644 index 0000000..51653ae --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/StaticValueService.php @@ -0,0 +1,244 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation all + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\StaticValue[] + */ + public function all() { + return $this->allWithHttpInfo()->getData(); + } + + /** + * Operation allWithHttpInfo + * + * All + * + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function allWithHttpInfo() { + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + + // path params + $resourcePath = "/static-value-service/all"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\StaticValue[]', + '/static-value-service/all' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\StaticValue[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\StaticValue[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $id The id of the static value which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\StaticValue + */ + public function read($id) { + return $this->readWithHttpInfo($id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $id The id of the static value which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/static-value-service/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\StaticValue', + '/static-value-service/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\StaticValue', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\StaticValue', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriberService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriberService.php new file mode 100644 index 0000000..2ecd5ca --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriberService.php @@ -0,0 +1,685 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscriber/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscriber/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriberCreate $entity The customer object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriberCreate + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriberCreate $entity The customer object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscriber/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriberCreate', + '/subscriber/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriberCreate', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriberCreate', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($spaceId, $id) { + return $this->deleteWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling delete'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscriber/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/subscriber/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the customer which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Subscriber + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the customer which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscriber/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Subscriber', + '/subscriber/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Subscriber', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Subscriber', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the customer which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Subscriber[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the customer which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscriber/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Subscriber[]', + '/subscriber/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Subscriber[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Subscriber[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriberUpdate $entity The customer with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Subscriber + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriberUpdate $entity The customer with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscriber/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Subscriber', + '/subscriber/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Subscriber', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Subscriber', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionAffiliateService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionAffiliateService.php new file mode 100644 index 0000000..48f5121 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionAffiliateService.php @@ -0,0 +1,685 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-affiliate/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-affiliate/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionAffiliateCreate $entity The subscription affiliate object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionAffiliate + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionAffiliateCreate $entity The subscription affiliate object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-affiliate/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionAffiliate', + '/subscription-affiliate/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionAffiliate', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionAffiliate', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($spaceId, $id) { + return $this->deleteWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling delete'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-affiliate/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/subscription-affiliate/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the subscription affiliate case which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionAffiliate + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the subscription affiliate case which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-affiliate/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionAffiliate', + '/subscription-affiliate/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionAffiliate', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionAffiliate', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the affiliates which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionAffiliate[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the affiliates which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-affiliate/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionAffiliate[]', + '/subscription-affiliate/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionAffiliate[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionAffiliate[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionAffiliateUpdate $entity The object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionAffiliate + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionAffiliateUpdate $entity The object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-affiliate/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionAffiliate', + '/subscription-affiliate/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionAffiliate', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionAffiliate', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionChargeService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionChargeService.php new file mode 100644 index 0000000..23d0d2e --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionChargeService.php @@ -0,0 +1,576 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-charge/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-charge/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionChargeCreate $charge (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionCharge + */ + public function create($spaceId, $charge) { + return $this->createWithHttpInfo($spaceId, $charge)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionChargeCreate $charge (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $charge) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'charge' is set + if ($charge === null) { + throw new \InvalidArgumentException('Missing the required parameter $charge when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-charge/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($charge)) { + $tempBody = $charge; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionCharge', + '/subscription-charge/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionCharge', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionCharge', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation discard + * + * discard + * + * @param int $spaceId (required) + * @param int $chargeId (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionCharge + */ + public function discard($spaceId, $chargeId) { + return $this->discardWithHttpInfo($spaceId, $chargeId)->getData(); + } + + /** + * Operation discardWithHttpInfo + * + * discard + * + * @param int $spaceId (required) + * @param int $chargeId (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function discardWithHttpInfo($spaceId, $chargeId) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling discard'); + } + // verify the required parameter 'chargeId' is set + if ($chargeId === null) { + throw new \InvalidArgumentException('Missing the required parameter $chargeId when calling discard'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($chargeId !== null) { + $queryParams['chargeId'] = $this->apiClient->getSerializer()->toQueryValue($chargeId); + } + + // path params + $resourcePath = "/subscription-charge/discard"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionCharge', + '/subscription-charge/discard' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionCharge', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionCharge', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the subscription charge which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionCharge + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the subscription charge which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-charge/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionCharge', + '/subscription-charge/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionCharge', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionCharge', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the subscription charges which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionCharge[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the subscription charges which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-charge/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionCharge[]', + '/subscription-charge/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionCharge[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionCharge[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionLedgerEntryService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionLedgerEntryService.php new file mode 100644 index 0000000..f6f4c11 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionLedgerEntryService.php @@ -0,0 +1,475 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-ledger-entry/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-ledger-entry/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionLedgerEntryCreate $entry (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionLedgerEntry + */ + public function create($spaceId, $entry) { + return $this->createWithHttpInfo($spaceId, $entry)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionLedgerEntryCreate $entry (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entry) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entry' is set + if ($entry === null) { + throw new \InvalidArgumentException('Missing the required parameter $entry when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-ledger-entry/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entry)) { + $tempBody = $entry; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionLedgerEntry', + '/subscription-ledger-entry/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionLedgerEntry', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionLedgerEntry', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the subscription charge which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionLedgerEntry + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the subscription charge which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-ledger-entry/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionLedgerEntry', + '/subscription-ledger-entry/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionLedgerEntry', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionLedgerEntry', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the subscription charges which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionLedgerEntry[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the subscription charges which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-ledger-entry/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionLedgerEntry[]', + '/subscription-ledger-entry/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionLedgerEntry[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionLedgerEntry[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionMetricService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionMetricService.php new file mode 100644 index 0000000..a2ce968 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionMetricService.php @@ -0,0 +1,685 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-metric/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-metric/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionMetricCreate $entity The metric object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionMetric + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionMetricCreate $entity The metric object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-metric/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionMetric', + '/subscription-metric/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionMetric', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionMetric', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $spaceId (required) + * @param int $id The id of the metric which should be deleted. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($spaceId, $id) { + return $this->deleteWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $spaceId (required) + * @param int $id The id of the metric which should be deleted. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling delete'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-metric/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/subscription-metric/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the metric which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionMetric + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the metric which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-metric/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionMetric', + '/subscription-metric/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionMetric', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionMetric', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the metric which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionMetric[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the metric which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-metric/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionMetric[]', + '/subscription-metric/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionMetric[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionMetric[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionMetricActive $entity The products metric with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionMetric + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionMetricActive $entity The products metric with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-metric/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionMetric', + '/subscription-metric/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionMetric', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionMetric', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionMetricUsageService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionMetricUsageService.php new file mode 100644 index 0000000..f9db67c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionMetricUsageService.php @@ -0,0 +1,475 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-metric-usage/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-metric-usage/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionMetricUsageReportCreate $usageReport The usage report which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionMetricUsageReport + */ + public function create($spaceId, $usageReport) { + return $this->createWithHttpInfo($spaceId, $usageReport)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionMetricUsageReportCreate $usageReport The usage report which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $usageReport) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'usageReport' is set + if ($usageReport === null) { + throw new \InvalidArgumentException('Missing the required parameter $usageReport when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-metric-usage/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($usageReport)) { + $tempBody = $usageReport; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionMetricUsageReport', + '/subscription-metric-usage/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionMetricUsageReport', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionMetricUsageReport', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the usage report which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionMetricUsageReport + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the usage report which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-metric-usage/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionMetricUsageReport', + '/subscription-metric-usage/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionMetricUsageReport', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionMetricUsageReport', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the usage reports which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionMetricUsageReport[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the usage reports which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-metric-usage/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionMetricUsageReport[]', + '/subscription-metric-usage/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionMetricUsageReport[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionMetricUsageReport[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionPeriodBillService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionPeriodBillService.php new file mode 100644 index 0000000..5a7cb20 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionPeriodBillService.php @@ -0,0 +1,372 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-period-bill/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-period-bill/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the subscription period bill which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionVersion + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the subscription period bill which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-period-bill/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionVersion', + '/subscription-period-bill/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionVersion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionVersion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the subscription period bills which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionVersion[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the subscription period bills which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-period-bill/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionVersion[]', + '/subscription-period-bill/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionVersion[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionVersion[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductComponentGroupService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductComponentGroupService.php new file mode 100644 index 0000000..56b88ae --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductComponentGroupService.php @@ -0,0 +1,685 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-component-group/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-product-component-group/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductComponentGroupUpdate $entity The product component group object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductComponentGroup + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductComponentGroupUpdate $entity The product component group object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-component-group/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductComponentGroup', + '/subscription-product-component-group/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductComponentGroup', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductComponentGroup', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($spaceId, $id) { + return $this->deleteWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling delete'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-component-group/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/subscription-product-component-group/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the product component group which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductComponentGroup + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the product component group which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-product-component-group/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductComponentGroup', + '/subscription-product-component-group/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductComponentGroup', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductComponentGroup', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the product component groups which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductComponentGroup[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the product component groups which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-component-group/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductComponentGroup[]', + '/subscription-product-component-group/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductComponentGroup[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductComponentGroup[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductComponentGroupUpdate $entity The product component group object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductComponentGroup + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductComponentGroupUpdate $entity The product component group object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-component-group/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductComponentGroup', + '/subscription-product-component-group/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductComponentGroup', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductComponentGroup', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductComponentService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductComponentService.php new file mode 100644 index 0000000..6927b38 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductComponentService.php @@ -0,0 +1,685 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-component/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-product-component/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductComponentUpdate $entity The product component object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductComponent + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductComponentUpdate $entity The product component object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-component/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductComponent', + '/subscription-product-component/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductComponent', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductComponent', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($spaceId, $id) { + return $this->deleteWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling delete'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-component/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/subscription-product-component/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the product component which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductComponent + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the product component which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-product-component/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductComponent', + '/subscription-product-component/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductComponent', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductComponent', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the product component which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductComponent[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the product component which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-component/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductComponent[]', + '/subscription-product-component/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductComponent[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductComponent[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductComponentUpdate $entity The product component object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductComponent + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductComponentUpdate $entity The product component object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-component/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductComponent', + '/subscription-product-component/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductComponent', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductComponent', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductFeeTierService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductFeeTierService.php new file mode 100644 index 0000000..25ce4a3 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductFeeTierService.php @@ -0,0 +1,685 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-fee-tier/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-product-fee-tier/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductMeteredTierFeeUpdate $entity The metered fee tier object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductMeteredTierFee + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductMeteredTierFeeUpdate $entity The metered fee tier object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-fee-tier/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductMeteredTierFee', + '/subscription-product-fee-tier/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductMeteredTierFee', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductMeteredTierFee', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($spaceId, $id) { + return $this->deleteWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling delete'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-fee-tier/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/subscription-product-fee-tier/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the metered fee tier which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductMeteredTierFee + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the metered fee tier which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-product-fee-tier/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductMeteredTierFee', + '/subscription-product-fee-tier/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductMeteredTierFee', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductMeteredTierFee', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the metered fee tiers which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductMeteredTierFee[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the metered fee tiers which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-fee-tier/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductMeteredTierFee[]', + '/subscription-product-fee-tier/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductMeteredTierFee[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductMeteredTierFee[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductMeteredTierFeeUpdate $entity The metered fee tier object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductMeteredTierFee + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductMeteredTierFeeUpdate $entity The metered fee tier object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-fee-tier/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductMeteredTierFee', + '/subscription-product-fee-tier/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductMeteredTierFee', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductMeteredTierFee', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductMeteredFeeService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductMeteredFeeService.php new file mode 100644 index 0000000..aa43fda --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductMeteredFeeService.php @@ -0,0 +1,685 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-metered-fee/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-product-metered-fee/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductMeteredFeeUpdate $entity The metered fee object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductMeteredFee + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductMeteredFeeUpdate $entity The metered fee object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-metered-fee/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductMeteredFee', + '/subscription-product-metered-fee/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductMeteredFee', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductMeteredFee', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($spaceId, $id) { + return $this->deleteWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling delete'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-metered-fee/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/subscription-product-metered-fee/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the metered fee which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductMeteredFee + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the metered fee which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-product-metered-fee/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductMeteredFee', + '/subscription-product-metered-fee/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductMeteredFee', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductMeteredFee', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the metered fees which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductMeteredFee[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the metered fees which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-metered-fee/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductMeteredFee[]', + '/subscription-product-metered-fee/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductMeteredFee[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductMeteredFee[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductMeteredFeeUpdate $entity The metered fee object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductMeteredFee + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductMeteredFeeUpdate $entity The metered fee object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-metered-fee/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductMeteredFee', + '/subscription-product-metered-fee/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductMeteredFee', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductMeteredFee', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductPeriodFeeService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductPeriodFeeService.php new file mode 100644 index 0000000..834e1e4 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductPeriodFeeService.php @@ -0,0 +1,685 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-period-fee/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-product-period-fee/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductPeriodFeeUpdate $entity The period fee object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductPeriodFee + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductPeriodFeeUpdate $entity The period fee object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-period-fee/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductPeriodFee', + '/subscription-product-period-fee/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductPeriodFee', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductPeriodFee', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($spaceId, $id) { + return $this->deleteWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling delete'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-period-fee/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/subscription-product-period-fee/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the period fee which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductPeriodFee + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the period fee which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-product-period-fee/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductPeriodFee', + '/subscription-product-period-fee/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductPeriodFee', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductPeriodFee', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the period fees which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductPeriodFee[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the period fees which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-period-fee/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductPeriodFee[]', + '/subscription-product-period-fee/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductPeriodFee[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductPeriodFee[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductPeriodFeeUpdate $entity The period fee object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductPeriodFee + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductPeriodFeeUpdate $entity The period fee object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-period-fee/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductPeriodFee', + '/subscription-product-period-fee/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductPeriodFee', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductPeriodFee', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductRetirementService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductRetirementService.php new file mode 100644 index 0000000..0d64914 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductRetirementService.php @@ -0,0 +1,475 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-retirement/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-product-retirement/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductRetirementCreate $retirement (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductRetirement + */ + public function create($spaceId, $retirement) { + return $this->createWithHttpInfo($spaceId, $retirement)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductRetirementCreate $retirement (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $retirement) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'retirement' is set + if ($retirement === null) { + throw new \InvalidArgumentException('Missing the required parameter $retirement when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-retirement/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($retirement)) { + $tempBody = $retirement; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductRetirement', + '/subscription-product-retirement/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductRetirement', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductRetirement', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the retirement which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductRetirement + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the retirement which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-product-retirement/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductRetirement', + '/subscription-product-retirement/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductRetirement', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductRetirement', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the product retirements which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductRetirement[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the product retirements which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-retirement/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductRetirement[]', + '/subscription-product-retirement/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductRetirement[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductRetirement[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductService.php new file mode 100644 index 0000000..3b80ade --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductService.php @@ -0,0 +1,582 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-product/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductCreate $entity The product object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProduct + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductCreate $entity The product object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProduct', + '/subscription-product/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProduct', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProduct', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the product which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProduct + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the product which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-product/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProduct', + '/subscription-product/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProduct', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProduct', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the products which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProduct[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the products which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProduct[]', + '/subscription-product/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProduct[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProduct[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductActive $entity The products object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProduct + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductActive $entity The products object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProduct', + '/subscription-product/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProduct', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProduct', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductSetupFeeService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductSetupFeeService.php new file mode 100644 index 0000000..f52b617 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductSetupFeeService.php @@ -0,0 +1,685 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-setup-fee/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-product-setup-fee/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductSetupFeeUpdate $entity The setup fee object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductSetupFee + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductSetupFeeUpdate $entity The setup fee object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-setup-fee/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductSetupFee', + '/subscription-product-setup-fee/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductSetupFee', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductSetupFee', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($spaceId, $id) { + return $this->deleteWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling delete'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-setup-fee/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/subscription-product-setup-fee/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the setup fee which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductSetupFee + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the setup fee which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-product-setup-fee/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductSetupFee', + '/subscription-product-setup-fee/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductSetupFee', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductSetupFee', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the setup fees which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductSetupFee[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the setup fees which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-setup-fee/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductSetupFee[]', + '/subscription-product-setup-fee/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductSetupFee[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductSetupFee[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductSetupFeeUpdate $entity The setup fee object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\ProductSetupFee + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\ProductSetupFeeUpdate $entity The setup fee object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-setup-fee/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\ProductSetupFee', + '/subscription-product-setup-fee/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\ProductSetupFee', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ProductSetupFee', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductVersionRetirementService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductVersionRetirementService.php new file mode 100644 index 0000000..dc6996e --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductVersionRetirementService.php @@ -0,0 +1,475 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-version-retirement/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-product-version-retirement/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductVersionRetirementCreate $retirement (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductVersionRetirement + */ + public function create($spaceId, $retirement) { + return $this->createWithHttpInfo($spaceId, $retirement)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductVersionRetirementCreate $retirement (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $retirement) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'retirement' is set + if ($retirement === null) { + throw new \InvalidArgumentException('Missing the required parameter $retirement when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-version-retirement/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($retirement)) { + $tempBody = $retirement; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductVersionRetirement', + '/subscription-product-version-retirement/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductVersionRetirement', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductVersionRetirement', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the retirement which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductVersionRetirement + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the retirement which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-product-version-retirement/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductVersionRetirement', + '/subscription-product-version-retirement/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductVersionRetirement', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductVersionRetirement', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the product version retirements which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductVersionRetirement[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the product version retirements which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-version-retirement/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductVersionRetirement[]', + '/subscription-product-version-retirement/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductVersionRetirement[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductVersionRetirement[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductVersionService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductVersionService.php new file mode 100644 index 0000000..21493cb --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionProductVersionService.php @@ -0,0 +1,683 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation activate + * + * activate + * + * @param int $spaceId (required) + * @param int $productVersionId The product version id identifies the product version which should be activated. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductVersion + */ + public function activate($spaceId, $productVersionId) { + return $this->activateWithHttpInfo($spaceId, $productVersionId)->getData(); + } + + /** + * Operation activateWithHttpInfo + * + * activate + * + * @param int $spaceId (required) + * @param int $productVersionId The product version id identifies the product version which should be activated. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function activateWithHttpInfo($spaceId, $productVersionId) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling activate'); + } + // verify the required parameter 'productVersionId' is set + if ($productVersionId === null) { + throw new \InvalidArgumentException('Missing the required parameter $productVersionId when calling activate'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($productVersionId !== null) { + $queryParams['productVersionId'] = $this->apiClient->getSerializer()->toQueryValue($productVersionId); + } + + // path params + $resourcePath = "/subscription-product-version/activate"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductVersion', + '/subscription-product-version/activate' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductVersion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductVersion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-version/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-product-version/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductVersionPending $entity The product version object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductVersion + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductVersionPending $entity The product version object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-version/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductVersion', + '/subscription-product-version/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductVersion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductVersion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the product version which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductVersion + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the product version which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-product-version/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductVersion', + '/subscription-product-version/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductVersion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductVersion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the product versions which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductVersion[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the product versions which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-version/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductVersion[]', + '/subscription-product-version/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductVersion[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductVersion[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductVersionPending $entity The product version object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionProductVersion + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionProductVersionPending $entity The product version object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-product-version/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionProductVersion', + '/subscription-product-version/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionProductVersion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionProductVersion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionService.php new file mode 100644 index 0000000..7fce516 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionService.php @@ -0,0 +1,1018 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation applyChanges + * + * apply changes + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionChangeRequest $request (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionVersion + */ + public function applyChanges($spaceId, $request) { + return $this->applyChangesWithHttpInfo($spaceId, $request)->getData(); + } + + /** + * Operation applyChangesWithHttpInfo + * + * apply changes + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionChangeRequest $request (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function applyChangesWithHttpInfo($spaceId, $request) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling applyChanges'); + } + // verify the required parameter 'request' is set + if ($request === null) { + throw new \InvalidArgumentException('Missing the required parameter $request when calling applyChanges'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription/applyChanges"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($request)) { + $tempBody = $request; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionVersion', + '/subscription/applyChanges' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionVersion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionVersion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionCreateRequest $createRequest (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionVersion + */ + public function create($spaceId, $createRequest) { + return $this->createWithHttpInfo($spaceId, $createRequest)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionCreateRequest $createRequest (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $createRequest) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'createRequest' is set + if ($createRequest === null) { + throw new \InvalidArgumentException('Missing the required parameter $createRequest when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($createRequest)) { + $tempBody = $createRequest; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionVersion', + '/subscription/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionVersion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionVersion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation initialize + * + * initialize + * + * @param int $spaceId (required) + * @param int $subscriptionId The provided subscription id will be used to lookup the subscription which should be initialized. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionCharge + */ + public function initialize($spaceId, $subscriptionId) { + return $this->initializeWithHttpInfo($spaceId, $subscriptionId)->getData(); + } + + /** + * Operation initializeWithHttpInfo + * + * initialize + * + * @param int $spaceId (required) + * @param int $subscriptionId The provided subscription id will be used to lookup the subscription which should be initialized. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function initializeWithHttpInfo($spaceId, $subscriptionId) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling initialize'); + } + // verify the required parameter 'subscriptionId' is set + if ($subscriptionId === null) { + throw new \InvalidArgumentException('Missing the required parameter $subscriptionId when calling initialize'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($subscriptionId !== null) { + $queryParams['subscriptionId'] = $this->apiClient->getSerializer()->toQueryValue($subscriptionId); + } + + // path params + $resourcePath = "/subscription/initialize"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionCharge', + '/subscription/initialize' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionCharge', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionCharge', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation initializeSubscriberPresent + * + * initializeSubscriberPresent + * + * @param int $spaceId (required) + * @param int $subscriptionId (required) + * @param string $successUrl The subscriber will be redirected to the success URL when the transaction is successful. (optional) + * @param string $failedUrl The subscriber will be redirected to the fail URL when the transaction fails. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionCharge + */ + public function initializeSubscriberPresent($spaceId, $subscriptionId, $successUrl = null, $failedUrl = null) { + return $this->initializeSubscriberPresentWithHttpInfo($spaceId, $subscriptionId, $successUrl, $failedUrl)->getData(); + } + + /** + * Operation initializeSubscriberPresentWithHttpInfo + * + * initializeSubscriberPresent + * + * @param int $spaceId (required) + * @param int $subscriptionId (required) + * @param string $successUrl The subscriber will be redirected to the success URL when the transaction is successful. (optional) + * @param string $failedUrl The subscriber will be redirected to the fail URL when the transaction fails. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function initializeSubscriberPresentWithHttpInfo($spaceId, $subscriptionId, $successUrl = null, $failedUrl = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling initializeSubscriberPresent'); + } + // verify the required parameter 'subscriptionId' is set + if ($subscriptionId === null) { + throw new \InvalidArgumentException('Missing the required parameter $subscriptionId when calling initializeSubscriberPresent'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($subscriptionId !== null) { + $queryParams['subscriptionId'] = $this->apiClient->getSerializer()->toQueryValue($subscriptionId); + } + if ($successUrl !== null) { + $queryParams['successUrl'] = $this->apiClient->getSerializer()->toQueryValue($successUrl); + } + if ($failedUrl !== null) { + $queryParams['failedUrl'] = $this->apiClient->getSerializer()->toQueryValue($failedUrl); + } + + // path params + $resourcePath = "/subscription/initializeSubscriberPresent"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionCharge', + '/subscription/initializeSubscriberPresent' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionCharge', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionCharge', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the subscription which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Subscription + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the subscription which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Subscription', + '/subscription/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Subscription', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Subscription', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the subscriptions which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Subscription[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the subscriptions which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Subscription[]', + '/subscription/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Subscription[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Subscription[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation terminate + * + * terminate + * + * @param int $spaceId (required) + * @param int $subscriptionId The subscription id identifies the subscription which should be terminated. (required) + * @param bool $respectTerminationPeriod The respect termination period controls whether the termination period configured on the product version should be respected or if the operation should take effect immediately. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function terminate($spaceId, $subscriptionId, $respectTerminationPeriod) { + return $this->terminateWithHttpInfo($spaceId, $subscriptionId, $respectTerminationPeriod)->getData(); + } + + /** + * Operation terminateWithHttpInfo + * + * terminate + * + * @param int $spaceId (required) + * @param int $subscriptionId The subscription id identifies the subscription which should be terminated. (required) + * @param bool $respectTerminationPeriod The respect termination period controls whether the termination period configured on the product version should be respected or if the operation should take effect immediately. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function terminateWithHttpInfo($spaceId, $subscriptionId, $respectTerminationPeriod) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling terminate'); + } + // verify the required parameter 'subscriptionId' is set + if ($subscriptionId === null) { + throw new \InvalidArgumentException('Missing the required parameter $subscriptionId when calling terminate'); + } + // verify the required parameter 'respectTerminationPeriod' is set + if ($respectTerminationPeriod === null) { + throw new \InvalidArgumentException('Missing the required parameter $respectTerminationPeriod when calling terminate'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($subscriptionId !== null) { + $queryParams['subscriptionId'] = $this->apiClient->getSerializer()->toQueryValue($subscriptionId); + } + if ($respectTerminationPeriod !== null) { + $queryParams['respectTerminationPeriod'] = $this->apiClient->getSerializer()->toQueryValue($respectTerminationPeriod); + } + + // path params + $resourcePath = "/subscription/terminate"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/subscription/terminate' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation updateProductVersion + * + * update product version + * + * @param int $spaceId (required) + * @param int $subscriptionId The subscription id identifies the subscription which should be updated to the latest version. (required) + * @param bool $respectTerminationPeriod The subscription version may be retired. The respect termination period controls whether the termination period configured on the product version should be respected or if the operation should take effect immediately. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionVersion + */ + public function updateProductVersion($spaceId, $subscriptionId, $respectTerminationPeriod) { + return $this->updateProductVersionWithHttpInfo($spaceId, $subscriptionId, $respectTerminationPeriod)->getData(); + } + + /** + * Operation updateProductVersionWithHttpInfo + * + * update product version + * + * @param int $spaceId (required) + * @param int $subscriptionId The subscription id identifies the subscription which should be updated to the latest version. (required) + * @param bool $respectTerminationPeriod The subscription version may be retired. The respect termination period controls whether the termination period configured on the product version should be respected or if the operation should take effect immediately. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateProductVersionWithHttpInfo($spaceId, $subscriptionId, $respectTerminationPeriod) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling updateProductVersion'); + } + // verify the required parameter 'subscriptionId' is set + if ($subscriptionId === null) { + throw new \InvalidArgumentException('Missing the required parameter $subscriptionId when calling updateProductVersion'); + } + // verify the required parameter 'respectTerminationPeriod' is set + if ($respectTerminationPeriod === null) { + throw new \InvalidArgumentException('Missing the required parameter $respectTerminationPeriod when calling updateProductVersion'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($subscriptionId !== null) { + $queryParams['subscriptionId'] = $this->apiClient->getSerializer()->toQueryValue($subscriptionId); + } + if ($respectTerminationPeriod !== null) { + $queryParams['respectTerminationPeriod'] = $this->apiClient->getSerializer()->toQueryValue($respectTerminationPeriod); + } + + // path params + $resourcePath = "/subscription/updateProductVersion"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionVersion', + '/subscription/updateProductVersion' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionVersion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionVersion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionSuspensionService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionSuspensionService.php new file mode 100644 index 0000000..5f78355 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionSuspensionService.php @@ -0,0 +1,576 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-suspension/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-suspension/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionSuspensionCreate $suspension (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionSuspension + */ + public function create($spaceId, $suspension) { + return $this->createWithHttpInfo($spaceId, $suspension)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\SubscriptionSuspensionCreate $suspension (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $suspension) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'suspension' is set + if ($suspension === null) { + throw new \InvalidArgumentException('Missing the required parameter $suspension when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-suspension/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($suspension)) { + $tempBody = $suspension; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionSuspension', + '/subscription-suspension/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionSuspension', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionSuspension', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the suspension which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionSuspension + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the suspension which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-suspension/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionSuspension', + '/subscription-suspension/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionSuspension', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionSuspension', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the subscription suspensions which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionSuspension[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the subscription suspensions which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-suspension/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionSuspension[]', + '/subscription-suspension/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionSuspension[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionSuspension[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation terminate + * + * terminate + * + * @param int $spaceId (required) + * @param int $suspensionId (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionSuspension + */ + public function terminate($spaceId, $suspensionId) { + return $this->terminateWithHttpInfo($spaceId, $suspensionId)->getData(); + } + + /** + * Operation terminateWithHttpInfo + * + * terminate + * + * @param int $spaceId (required) + * @param int $suspensionId (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function terminateWithHttpInfo($spaceId, $suspensionId) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling terminate'); + } + // verify the required parameter 'suspensionId' is set + if ($suspensionId === null) { + throw new \InvalidArgumentException('Missing the required parameter $suspensionId when calling terminate'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($suspensionId !== null) { + $queryParams['suspensionId'] = $this->apiClient->getSerializer()->toQueryValue($suspensionId); + } + + // path params + $resourcePath = "/subscription-suspension/terminate"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionSuspension', + '/subscription-suspension/terminate' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionSuspension', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionSuspension', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionVersionService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionVersionService.php new file mode 100644 index 0000000..44c25be --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/SubscriptionVersionService.php @@ -0,0 +1,372 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-version/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/subscription-version/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the subscription which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionVersion + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the subscription which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/subscription-version/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionVersion', + '/subscription-version/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionVersion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionVersion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the subscriptions which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\SubscriptionVersion[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the subscriptions which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/subscription-version/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\SubscriptionVersion[]', + '/subscription-version/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\SubscriptionVersion[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\SubscriptionVersion[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TokenService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TokenService.php new file mode 100644 index 0000000..3661ef6 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TokenService.php @@ -0,0 +1,685 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/token/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/token/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\TokenCreate $entity The token object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Token + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\TokenCreate $entity The token object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/token/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Token', + '/token/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Token', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Token', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($spaceId, $id) { + return $this->deleteWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling delete'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/token/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/token/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the token which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Token + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the token which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/token/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Token', + '/token/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Token', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Token', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the tokens which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Token[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the tokens which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/token/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Token[]', + '/token/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Token[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Token[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\TokenUpdate $entity The object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Token + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\TokenUpdate $entity The object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/token/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Token', + '/token/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Token', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Token', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TokenVersionService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TokenVersionService.php new file mode 100644 index 0000000..dbaeb36 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TokenVersionService.php @@ -0,0 +1,473 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation activeVersion + * + * Active Version + * + * @param int $spaceId (required) + * @param int $id The id of a token for which you want to look up the current active token version. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TokenVersion + */ + public function activeVersion($spaceId, $id) { + return $this->activeVersionWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation activeVersionWithHttpInfo + * + * Active Version + * + * @param int $spaceId (required) + * @param int $id The id of a token for which you want to look up the current active token version. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function activeVersionWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling activeVersion'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling activeVersion'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/token-version/active-version"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TokenVersion', + '/token-version/active-version' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TokenVersion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TokenVersion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/token-version/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/token-version/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the token version which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TokenVersion + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the token version which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/token-version/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TokenVersion', + '/token-version/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TokenVersion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TokenVersion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the token versions which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TokenVersion[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the token versions which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/token-version/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TokenVersion[]', + '/token-version/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TokenVersion[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TokenVersion[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionCompletionService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionCompletionService.php new file mode 100644 index 0000000..02fecb1 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionCompletionService.php @@ -0,0 +1,574 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation completeOffline + * + * completeOffline + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be completed. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TransactionCompletion + */ + public function completeOffline($spaceId, $id) { + return $this->completeOfflineWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation completeOfflineWithHttpInfo + * + * completeOffline + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be completed. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function completeOfflineWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling completeOffline'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling completeOffline'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction-completion/completeOffline"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TransactionCompletion', + '/transaction-completion/completeOffline' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TransactionCompletion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TransactionCompletion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation completeOnline + * + * completeOnline + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be completed. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TransactionCompletion + */ + public function completeOnline($spaceId, $id) { + return $this->completeOnlineWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation completeOnlineWithHttpInfo + * + * completeOnline + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be completed. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function completeOnlineWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling completeOnline'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling completeOnline'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction-completion/completeOnline"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TransactionCompletion', + '/transaction-completion/completeOnline' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TransactionCompletion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TransactionCompletion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/transaction-completion/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/transaction-completion/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the transaction completions which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TransactionCompletion + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the transaction completions which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction-completion/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TransactionCompletion', + '/transaction-completion/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TransactionCompletion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TransactionCompletion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the transaction completions which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TransactionCompletion[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the transaction completions which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/transaction-completion/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TransactionCompletion[]', + '/transaction-completion/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TransactionCompletion[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TransactionCompletion[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionInvoiceService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionInvoiceService.php new file mode 100644 index 0000000..0430dbc --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionInvoiceService.php @@ -0,0 +1,787 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/transaction-invoice/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/transaction-invoice/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation getInvoiceDocument + * + * getInvoiceDocument + * + * @param int $spaceId (required) + * @param int $id The id of the transaction invoice to get the document for. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\RenderedDocument + */ + public function getInvoiceDocument($spaceId, $id) { + return $this->getInvoiceDocumentWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation getInvoiceDocumentWithHttpInfo + * + * getInvoiceDocument + * + * @param int $spaceId (required) + * @param int $id The id of the transaction invoice to get the document for. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function getInvoiceDocumentWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling getInvoiceDocument'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling getInvoiceDocument'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction-invoice/getInvoiceDocument"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\RenderedDocument', + '/transaction-invoice/getInvoiceDocument' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\RenderedDocument', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\RenderedDocument', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation isReplacementPossible + * + * isReplacementPossible + * + * @param int $spaceId (required) + * @param int $id The invoice which should be checked if a replacement is possible. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return bool + */ + public function isReplacementPossible($spaceId, $id) { + return $this->isReplacementPossibleWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation isReplacementPossibleWithHttpInfo + * + * isReplacementPossible + * + * @param int $spaceId (required) + * @param int $id The invoice which should be checked if a replacement is possible. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function isReplacementPossibleWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling isReplacementPossible'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling isReplacementPossible'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction-invoice/isReplacementPossible"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + 'bool', + '/transaction-invoice/isReplacementPossible' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'bool', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'bool', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation markAsPaid + * + * Mark as Paid + * + * @param int $spaceId (required) + * @param int $id The id of the transaction invoice which should be marked as paid. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TransactionInvoice + */ + public function markAsPaid($spaceId, $id) { + return $this->markAsPaidWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation markAsPaidWithHttpInfo + * + * Mark as Paid + * + * @param int $spaceId (required) + * @param int $id The id of the transaction invoice which should be marked as paid. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function markAsPaidWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling markAsPaid'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling markAsPaid'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction-invoice/markAsPaid"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TransactionInvoice', + '/transaction-invoice/markAsPaid' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TransactionInvoice', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TransactionInvoice', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the transaction invoices which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TransactionInvoice + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the transaction invoices which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction-invoice/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TransactionInvoice', + '/transaction-invoice/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TransactionInvoice', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TransactionInvoice', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation replace + * + * replace + * + * @param int $spaceId (required) + * @param int $id The id of the transaction invoices which should be replaced. (required) + * @param \Wallee\Sdk\Model\TransactionInvoiceReplacement $replacement (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TransactionInvoice + */ + public function replace($spaceId, $id, $replacement) { + return $this->replaceWithHttpInfo($spaceId, $id, $replacement)->getData(); + } + + /** + * Operation replaceWithHttpInfo + * + * replace + * + * @param int $spaceId (required) + * @param int $id The id of the transaction invoices which should be replaced. (required) + * @param \Wallee\Sdk\Model\TransactionInvoiceReplacement $replacement (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function replaceWithHttpInfo($spaceId, $id, $replacement) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling replace'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling replace'); + } + // verify the required parameter 'replacement' is set + if ($replacement === null) { + throw new \InvalidArgumentException('Missing the required parameter $replacement when calling replace'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction-invoice/replace"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($replacement)) { + $tempBody = $replacement; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TransactionInvoice', + '/transaction-invoice/replace' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TransactionInvoice', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TransactionInvoice', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the transaction invoices which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TransactionInvoice[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the transaction invoices which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/transaction-invoice/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TransactionInvoice[]', + '/transaction-invoice/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TransactionInvoice[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TransactionInvoice[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionService.php new file mode 100644 index 0000000..b9aee78 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionService.php @@ -0,0 +1,2285 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation buildJavaScriptUrl + * + * Build JavaScript URL + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return string + */ + public function buildJavaScriptUrl($spaceId, $id) { + return $this->buildJavaScriptUrlWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation buildJavaScriptUrlWithHttpInfo + * + * Build JavaScript URL + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function buildJavaScriptUrlWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling buildJavaScriptUrl'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling buildJavaScriptUrl'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction/buildJavaScriptUrl"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/transaction/buildJavaScriptUrl' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'string', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation buildMobileSdkUrlWithCredentials + * + * Build Mobile SDK URL with Credentials + * + * @param string $credentials The credentials identifies the transaction and contains the security details which grants the access this operation. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return string + */ + public function buildMobileSdkUrlWithCredentials($credentials) { + return $this->buildMobileSdkUrlWithCredentialsWithHttpInfo($credentials)->getData(); + } + + /** + * Operation buildMobileSdkUrlWithCredentialsWithHttpInfo + * + * Build Mobile SDK URL with Credentials + * + * @param string $credentials The credentials identifies the transaction and contains the security details which grants the access this operation. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function buildMobileSdkUrlWithCredentialsWithHttpInfo($credentials) { + // verify the required parameter 'credentials' is set + if ($credentials === null) { + throw new \InvalidArgumentException('Missing the required parameter $credentials when calling buildMobileSdkUrlWithCredentials'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($credentials !== null) { + $queryParams['credentials'] = $this->apiClient->getSerializer()->toQueryValue($credentials); + } + + // path params + $resourcePath = "/transaction/buildMobileSdkUrlWithCredentials"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/transaction/buildMobileSdkUrlWithCredentials' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'string', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation buildPaymentPageUrl + * + * Build Payment Page URL + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return string + */ + public function buildPaymentPageUrl($spaceId, $id) { + return $this->buildPaymentPageUrlWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation buildPaymentPageUrlWithHttpInfo + * + * Build Payment Page URL + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function buildPaymentPageUrlWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling buildPaymentPageUrl'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling buildPaymentPageUrl'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction/buildPaymentPageUrl"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/transaction/buildPaymentPageUrl' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'string', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation confirm + * + * Confirm + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\TransactionPending $transactionModel The transaction JSON object to update and confirm. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Transaction + */ + public function confirm($spaceId, $transactionModel) { + return $this->confirmWithHttpInfo($spaceId, $transactionModel)->getData(); + } + + /** + * Operation confirmWithHttpInfo + * + * Confirm + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\TransactionPending $transactionModel The transaction JSON object to update and confirm. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function confirmWithHttpInfo($spaceId, $transactionModel) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling confirm'); + } + // verify the required parameter 'transactionModel' is set + if ($transactionModel === null) { + throw new \InvalidArgumentException('Missing the required parameter $transactionModel when calling confirm'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/transaction/confirm"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($transactionModel)) { + $tempBody = $transactionModel; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Transaction', + '/transaction/confirm' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Transaction', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Transaction', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/transaction/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/transaction/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\TransactionCreate $transaction The transaction object which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Transaction + */ + public function create($spaceId, $transaction) { + return $this->createWithHttpInfo($spaceId, $transaction)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\TransactionCreate $transaction The transaction object which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $transaction) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'transaction' is set + if ($transaction === null) { + throw new \InvalidArgumentException('Missing the required parameter $transaction when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/transaction/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($transaction)) { + $tempBody = $transaction; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Transaction', + '/transaction/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Transaction', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Transaction', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation createTransactionCredentials + * + * Create Transaction Credentials + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return string + */ + public function createTransactionCredentials($spaceId, $id) { + return $this->createTransactionCredentialsWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation createTransactionCredentialsWithHttpInfo + * + * Create Transaction Credentials + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createTransactionCredentialsWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling createTransactionCredentials'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling createTransactionCredentials'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction/createTransactionCredentials"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/transaction/createTransactionCredentials' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'string', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation deleteOneClickTokenWithCredentials + * + * Delete One-Click Token with Credentials + * + * @param string $credentials The credentials identifies the transaction and contains the security details which grants the access this operation. (required) + * @param int $tokenId The token ID will be used to find the token which should be removed. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function deleteOneClickTokenWithCredentials($credentials, $tokenId) { + return $this->deleteOneClickTokenWithCredentialsWithHttpInfo($credentials, $tokenId)->getData(); + } + + /** + * Operation deleteOneClickTokenWithCredentialsWithHttpInfo + * + * Delete One-Click Token with Credentials + * + * @param string $credentials The credentials identifies the transaction and contains the security details which grants the access this operation. (required) + * @param int $tokenId The token ID will be used to find the token which should be removed. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteOneClickTokenWithCredentialsWithHttpInfo($credentials, $tokenId) { + // verify the required parameter 'credentials' is set + if ($credentials === null) { + throw new \InvalidArgumentException('Missing the required parameter $credentials when calling deleteOneClickTokenWithCredentials'); + } + // verify the required parameter 'tokenId' is set + if ($tokenId === null) { + throw new \InvalidArgumentException('Missing the required parameter $tokenId when calling deleteOneClickTokenWithCredentials'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($credentials !== null) { + $queryParams['credentials'] = $this->apiClient->getSerializer()->toQueryValue($credentials); + } + if ($tokenId !== null) { + $queryParams['tokenId'] = $this->apiClient->getSerializer()->toQueryValue($tokenId); + } + + // path params + $resourcePath = "/transaction/deleteOneClickTokenWithCredentials"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/transaction/deleteOneClickTokenWithCredentials' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation export + * + * Export + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityExportRequest $request The request controls the entries which are exported. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return string + */ + public function export($spaceId, $request) { + return $this->exportWithHttpInfo($spaceId, $request)->getData(); + } + + /** + * Operation exportWithHttpInfo + * + * Export + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityExportRequest $request The request controls the entries which are exported. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function exportWithHttpInfo($spaceId, $request) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling export'); + } + // verify the required parameter 'request' is set + if ($request === null) { + throw new \InvalidArgumentException('Missing the required parameter $request when calling export'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8', 'text/csv')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/transaction/export"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($request)) { + $tempBody = $request; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'string', + '/transaction/export' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'string', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation fetchOneClickTokensWithCredentials + * + * Fetch One Click Tokens with Credentials + * + * @param string $credentials The credentials identifies the transaction and contains the security details which grants the access this operation. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TokenVersion[] + */ + public function fetchOneClickTokensWithCredentials($credentials) { + return $this->fetchOneClickTokensWithCredentialsWithHttpInfo($credentials)->getData(); + } + + /** + * Operation fetchOneClickTokensWithCredentialsWithHttpInfo + * + * Fetch One Click Tokens with Credentials + * + * @param string $credentials The credentials identifies the transaction and contains the security details which grants the access this operation. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function fetchOneClickTokensWithCredentialsWithHttpInfo($credentials) { + // verify the required parameter 'credentials' is set + if ($credentials === null) { + throw new \InvalidArgumentException('Missing the required parameter $credentials when calling fetchOneClickTokensWithCredentials'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($credentials !== null) { + $queryParams['credentials'] = $this->apiClient->getSerializer()->toQueryValue($credentials); + } + + // path params + $resourcePath = "/transaction/fetchOneClickTokensWithCredentials"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TokenVersion[]', + '/transaction/fetchOneClickTokensWithCredentials' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TokenVersion[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TokenVersion[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation fetchPossiblePaymentMethods + * + * Fetch Possible Payment Methods + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentMethodConfiguration[] + */ + public function fetchPossiblePaymentMethods($spaceId, $id) { + return $this->fetchPossiblePaymentMethodsWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation fetchPossiblePaymentMethodsWithHttpInfo + * + * Fetch Possible Payment Methods + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function fetchPossiblePaymentMethodsWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling fetchPossiblePaymentMethods'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling fetchPossiblePaymentMethods'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction/fetchPossiblePaymentMethods"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentMethodConfiguration[]', + '/transaction/fetchPossiblePaymentMethods' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentMethodConfiguration[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentMethodConfiguration[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation fetchPossiblePaymentMethodsWithCredentials + * + * Fetch Possible Payment Methods with Credentials + * + * @param string $credentials The credentials identifies the transaction and contains the security details which grants the access this operation. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\PaymentMethodConfiguration[] + */ + public function fetchPossiblePaymentMethodsWithCredentials($credentials) { + return $this->fetchPossiblePaymentMethodsWithCredentialsWithHttpInfo($credentials)->getData(); + } + + /** + * Operation fetchPossiblePaymentMethodsWithCredentialsWithHttpInfo + * + * Fetch Possible Payment Methods with Credentials + * + * @param string $credentials The credentials identifies the transaction and contains the security details which grants the access this operation. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function fetchPossiblePaymentMethodsWithCredentialsWithHttpInfo($credentials) { + // verify the required parameter 'credentials' is set + if ($credentials === null) { + throw new \InvalidArgumentException('Missing the required parameter $credentials when calling fetchPossiblePaymentMethodsWithCredentials'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($credentials !== null) { + $queryParams['credentials'] = $this->apiClient->getSerializer()->toQueryValue($credentials); + } + + // path params + $resourcePath = "/transaction/fetchPossiblePaymentMethodsWithCredentials"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\PaymentMethodConfiguration[]', + '/transaction/fetchPossiblePaymentMethodsWithCredentials' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\PaymentMethodConfiguration[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\PaymentMethodConfiguration[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation getInvoiceDocument + * + * getInvoiceDocument + * + * @param int $spaceId (required) + * @param int $id The id of the transaction to get the invoice document for. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\RenderedDocument + */ + public function getInvoiceDocument($spaceId, $id) { + return $this->getInvoiceDocumentWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation getInvoiceDocumentWithHttpInfo + * + * getInvoiceDocument + * + * @param int $spaceId (required) + * @param int $id The id of the transaction to get the invoice document for. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function getInvoiceDocumentWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling getInvoiceDocument'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling getInvoiceDocument'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction/getInvoiceDocument"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\RenderedDocument', + '/transaction/getInvoiceDocument' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\RenderedDocument', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\RenderedDocument', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation getLatestTransactionLineItemVersion + * + * getLatestTransactionLineItemVersion + * + * @param int $spaceId (required) + * @param int $id The id of the transaction to get the latest line item version for. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TransactionLineItemVersion + */ + public function getLatestTransactionLineItemVersion($spaceId, $id) { + return $this->getLatestTransactionLineItemVersionWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation getLatestTransactionLineItemVersionWithHttpInfo + * + * getLatestTransactionLineItemVersion + * + * @param int $spaceId (required) + * @param int $id The id of the transaction to get the latest line item version for. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function getLatestTransactionLineItemVersionWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling getLatestTransactionLineItemVersion'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling getLatestTransactionLineItemVersion'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction/getLatestTransactionLineItemVersion"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TransactionLineItemVersion', + '/transaction/getLatestTransactionLineItemVersion' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TransactionLineItemVersion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TransactionLineItemVersion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation getPackingSlip + * + * getPackingSlip + * + * @param int $spaceId (required) + * @param int $id The id of the transaction to get the packing slip for. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\RenderedDocument + */ + public function getPackingSlip($spaceId, $id) { + return $this->getPackingSlipWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation getPackingSlipWithHttpInfo + * + * getPackingSlip + * + * @param int $spaceId (required) + * @param int $id The id of the transaction to get the packing slip for. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function getPackingSlipWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling getPackingSlip'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling getPackingSlip'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction/getPackingSlip"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\RenderedDocument', + '/transaction/getPackingSlip' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\RenderedDocument', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\RenderedDocument', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation processOneClickTokenWithCredentials + * + * Process One-Click Token with Credentials + * + * @param string $credentials The credentials identifies the transaction and contains the security details which grants the access this operation. (required) + * @param int $tokenId The token ID is used to load the corresponding token and to process the transaction with it. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Transaction + */ + public function processOneClickTokenWithCredentials($credentials, $tokenId) { + return $this->processOneClickTokenWithCredentialsWithHttpInfo($credentials, $tokenId)->getData(); + } + + /** + * Operation processOneClickTokenWithCredentialsWithHttpInfo + * + * Process One-Click Token with Credentials + * + * @param string $credentials The credentials identifies the transaction and contains the security details which grants the access this operation. (required) + * @param int $tokenId The token ID is used to load the corresponding token and to process the transaction with it. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function processOneClickTokenWithCredentialsWithHttpInfo($credentials, $tokenId) { + // verify the required parameter 'credentials' is set + if ($credentials === null) { + throw new \InvalidArgumentException('Missing the required parameter $credentials when calling processOneClickTokenWithCredentials'); + } + // verify the required parameter 'tokenId' is set + if ($tokenId === null) { + throw new \InvalidArgumentException('Missing the required parameter $tokenId when calling processOneClickTokenWithCredentials'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($credentials !== null) { + $queryParams['credentials'] = $this->apiClient->getSerializer()->toQueryValue($credentials); + } + if ($tokenId !== null) { + $queryParams['tokenId'] = $this->apiClient->getSerializer()->toQueryValue($tokenId); + } + + // path params + $resourcePath = "/transaction/processOneClickTokenWithCredentials"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Transaction', + '/transaction/processOneClickTokenWithCredentials' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Transaction', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Transaction', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation processWithoutUserInteraction + * + * Process Without User Interaction + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be processed. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Transaction + */ + public function processWithoutUserInteraction($spaceId, $id) { + return $this->processWithoutUserInteractionWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation processWithoutUserInteractionWithHttpInfo + * + * Process Without User Interaction + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be processed. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function processWithoutUserInteractionWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling processWithoutUserInteraction'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling processWithoutUserInteraction'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array()); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction/processWithoutUserInteraction"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Transaction', + '/transaction/processWithoutUserInteraction' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Transaction', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Transaction', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Transaction + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Transaction', + '/transaction/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Transaction', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Transaction', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation readWithCredentials + * + * Read With Credentials + * + * @param string $credentials The credentials identifies the transaction and contains the security details which grants the access this operation. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Transaction + */ + public function readWithCredentials($credentials) { + return $this->readWithCredentialsWithHttpInfo($credentials)->getData(); + } + + /** + * Operation readWithCredentialsWithHttpInfo + * + * Read With Credentials + * + * @param string $credentials The credentials identifies the transaction and contains the security details which grants the access this operation. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithCredentialsWithHttpInfo($credentials) { + // verify the required parameter 'credentials' is set + if ($credentials === null) { + throw new \InvalidArgumentException('Missing the required parameter $credentials when calling readWithCredentials'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($credentials !== null) { + $queryParams['credentials'] = $this->apiClient->getSerializer()->toQueryValue($credentials); + } + + // path params + $resourcePath = "/transaction/readWithCredentials"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Transaction', + '/transaction/readWithCredentials' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Transaction', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Transaction', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the transactions which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Transaction[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the transactions which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/transaction/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Transaction[]', + '/transaction/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Transaction[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Transaction[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\TransactionPending $entity The transaction object with the properties which should be updated. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\Transaction + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\TransactionPending $entity The transaction object with the properties which should be updated. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/transaction/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\Transaction', + '/transaction/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\Transaction', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\Transaction', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation updateTransactionLineItems + * + * updateTransactionLineItems + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\TransactionLineItemUpdateRequest $updateRequest (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TransactionLineItemVersion + */ + public function updateTransactionLineItems($spaceId, $updateRequest) { + return $this->updateTransactionLineItemsWithHttpInfo($spaceId, $updateRequest)->getData(); + } + + /** + * Operation updateTransactionLineItemsWithHttpInfo + * + * updateTransactionLineItems + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\TransactionLineItemUpdateRequest $updateRequest (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateTransactionLineItemsWithHttpInfo($spaceId, $updateRequest) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling updateTransactionLineItems'); + } + // verify the required parameter 'updateRequest' is set + if ($updateRequest === null) { + throw new \InvalidArgumentException('Missing the required parameter $updateRequest when calling updateTransactionLineItems'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/transaction/updateTransactionLineItems"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($updateRequest)) { + $tempBody = $updateRequest; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TransactionLineItemVersion', + '/transaction/updateTransactionLineItems' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TransactionLineItemVersion', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TransactionLineItemVersion', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionVoidService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionVoidService.php new file mode 100644 index 0000000..51279c9 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/TransactionVoidService.php @@ -0,0 +1,574 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/transaction-void/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/transaction-void/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the transaction voids which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TransactionVoid + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the transaction voids which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction-void/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TransactionVoid', + '/transaction-void/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TransactionVoid', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TransactionVoid', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the transaction voids which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TransactionVoid[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the transaction voids which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/transaction-void/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TransactionVoid[]', + '/transaction-void/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TransactionVoid[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TransactionVoid[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation voidOffline + * + * voidOffline + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be voided. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TransactionVoid + */ + public function voidOffline($spaceId, $id) { + return $this->voidOfflineWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation voidOfflineWithHttpInfo + * + * voidOffline + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be voided. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function voidOfflineWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling voidOffline'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling voidOffline'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction-void/voidOffline"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TransactionVoid', + '/transaction-void/voidOffline' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TransactionVoid', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TransactionVoid', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation voidOnline + * + * voidOnline + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be voided. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\TransactionVoid + */ + public function voidOnline($spaceId, $id) { + return $this->voidOnlineWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation voidOnlineWithHttpInfo + * + * voidOnline + * + * @param int $spaceId (required) + * @param int $id The id of the transaction which should be voided. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function voidOnlineWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling voidOnline'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling voidOnline'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/transaction-void/voidOnline"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\TransactionVoid', + '/transaction-void/voidOnline' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\TransactionVoid', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\TransactionVoid', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/UserAccountRoleService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/UserAccountRoleService.php new file mode 100644 index 0000000..2ca77bf --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/UserAccountRoleService.php @@ -0,0 +1,373 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation addRole + * + * Add Role + * + * @param int $userId The id of the user to whom the role is assigned. (required) + * @param int $accountId The account to which the role is mapped. (required) + * @param int $roleId The role which is mapped to the user and account. (required) + * @param bool $appliesOnSubaccount Whether the role applies only on subaccount. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\UserAccountRole + */ + public function addRole($userId, $accountId, $roleId, $appliesOnSubaccount = null) { + return $this->addRoleWithHttpInfo($userId, $accountId, $roleId, $appliesOnSubaccount)->getData(); + } + + /** + * Operation addRoleWithHttpInfo + * + * Add Role + * + * @param int $userId The id of the user to whom the role is assigned. (required) + * @param int $accountId The account to which the role is mapped. (required) + * @param int $roleId The role which is mapped to the user and account. (required) + * @param bool $appliesOnSubaccount Whether the role applies only on subaccount. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function addRoleWithHttpInfo($userId, $accountId, $roleId, $appliesOnSubaccount = null) { + // verify the required parameter 'userId' is set + if ($userId === null) { + throw new \InvalidArgumentException('Missing the required parameter $userId when calling addRole'); + } + // verify the required parameter 'accountId' is set + if ($accountId === null) { + throw new \InvalidArgumentException('Missing the required parameter $accountId when calling addRole'); + } + // verify the required parameter 'roleId' is set + if ($roleId === null) { + throw new \InvalidArgumentException('Missing the required parameter $roleId when calling addRole'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($userId !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($userId); + } + if ($accountId !== null) { + $queryParams['accountId'] = $this->apiClient->getSerializer()->toQueryValue($accountId); + } + if ($roleId !== null) { + $queryParams['roleId'] = $this->apiClient->getSerializer()->toQueryValue($roleId); + } + if ($appliesOnSubaccount !== null) { + $queryParams['appliesOnSubaccount'] = $this->apiClient->getSerializer()->toQueryValue($appliesOnSubaccount); + } + + // path params + $resourcePath = "/user-account-role/addRole"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\UserAccountRole', + '/user-account-role/addRole' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\UserAccountRole', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\UserAccountRole', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation callList + * + * List Roles + * + * @param int $userId The id of the user to whom the role is assigned. (required) + * @param int $accountId The account to which the role is mapped. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\UserAccountRole[] + */ + public function callList($userId, $accountId) { + return $this->callListWithHttpInfo($userId, $accountId)->getData(); + } + + /** + * Operation callListWithHttpInfo + * + * List Roles + * + * @param int $userId The id of the user to whom the role is assigned. (required) + * @param int $accountId The account to which the role is mapped. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function callListWithHttpInfo($userId, $accountId) { + // verify the required parameter 'userId' is set + if ($userId === null) { + throw new \InvalidArgumentException('Missing the required parameter $userId when calling callList'); + } + // verify the required parameter 'accountId' is set + if ($accountId === null) { + throw new \InvalidArgumentException('Missing the required parameter $accountId when calling callList'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($userId !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($userId); + } + if ($accountId !== null) { + $queryParams['accountId'] = $this->apiClient->getSerializer()->toQueryValue($accountId); + } + + // path params + $resourcePath = "/user-account-role/list"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\UserAccountRole[]', + '/user-account-role/list' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\UserAccountRole[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\UserAccountRole[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation removeRole + * + * Remove Role + * + * @param int $id The id of user account role which should be removed (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function removeRole($id) { + return $this->removeRoleWithHttpInfo($id)->getData(); + } + + /** + * Operation removeRoleWithHttpInfo + * + * Remove Role + * + * @param int $id The id of user account role which should be removed (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function removeRoleWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling removeRole'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/user-account-role/removeRole"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/user-account-role/removeRole' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/UserSpaceRoleService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/UserSpaceRoleService.php new file mode 100644 index 0000000..fcca8af --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/UserSpaceRoleService.php @@ -0,0 +1,372 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation addRole + * + * Add Role + * + * @param int $userId The id of the user to whom the role is assigned. (required) + * @param int $spaceId The space to which the role is mapped. (required) + * @param int $roleId The role which is mapped to the user and space. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\UserSpaceRole + */ + public function addRole($userId, $spaceId, $roleId) { + return $this->addRoleWithHttpInfo($userId, $spaceId, $roleId)->getData(); + } + + /** + * Operation addRoleWithHttpInfo + * + * Add Role + * + * @param int $userId The id of the user to whom the role is assigned. (required) + * @param int $spaceId The space to which the role is mapped. (required) + * @param int $roleId The role which is mapped to the user and space. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function addRoleWithHttpInfo($userId, $spaceId, $roleId) { + // verify the required parameter 'userId' is set + if ($userId === null) { + throw new \InvalidArgumentException('Missing the required parameter $userId when calling addRole'); + } + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling addRole'); + } + // verify the required parameter 'roleId' is set + if ($roleId === null) { + throw new \InvalidArgumentException('Missing the required parameter $roleId when calling addRole'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($userId !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($userId); + } + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($roleId !== null) { + $queryParams['roleId'] = $this->apiClient->getSerializer()->toQueryValue($roleId); + } + + // path params + $resourcePath = "/user-space-role/addRole"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\UserSpaceRole', + '/user-space-role/addRole' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\UserSpaceRole', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\UserSpaceRole', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation callList + * + * List Roles + * + * @param int $userId The id of the user to whom the role is assigned. (required) + * @param int $spaceId The space to which the role is mapped. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\UserSpaceRole[] + */ + public function callList($userId, $spaceId) { + return $this->callListWithHttpInfo($userId, $spaceId)->getData(); + } + + /** + * Operation callListWithHttpInfo + * + * List Roles + * + * @param int $userId The id of the user to whom the role is assigned. (required) + * @param int $spaceId The space to which the role is mapped. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function callListWithHttpInfo($userId, $spaceId) { + // verify the required parameter 'userId' is set + if ($userId === null) { + throw new \InvalidArgumentException('Missing the required parameter $userId when calling callList'); + } + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling callList'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($userId !== null) { + $queryParams['userId'] = $this->apiClient->getSerializer()->toQueryValue($userId); + } + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/user-space-role/list"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\UserSpaceRole[]', + '/user-space-role/list' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\UserSpaceRole[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\UserSpaceRole[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation removeRole + * + * Remove Role + * + * @param int $id The id of user space role which should be removed (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function removeRole($id) { + return $this->removeRoleWithHttpInfo($id)->getData(); + } + + /** + * Operation removeRoleWithHttpInfo + * + * Remove Role + * + * @param int $id The id of user space role which should be removed (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function removeRoleWithHttpInfo($id) { + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling removeRole'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array()); + + // query params + $queryParams = array(); + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/user-space-role/removeRole"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/user-space-role/removeRole' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/WebhookListenerService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/WebhookListenerService.php new file mode 100644 index 0000000..d80508a --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/WebhookListenerService.php @@ -0,0 +1,685 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/webhook-listener/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/webhook-listener/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\WebhookListenerCreate $entity The webhook listener object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\WebhookListener + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\WebhookListenerCreate $entity The webhook listener object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/webhook-listener/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\WebhookListener', + '/webhook-listener/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\WebhookListener', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\WebhookListener', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($spaceId, $id) { + return $this->deleteWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling delete'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/webhook-listener/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/webhook-listener/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the webhook listener which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\WebhookListener + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the webhook listener which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/webhook-listener/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\WebhookListener', + '/webhook-listener/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\WebhookListener', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\WebhookListener', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the webhook listeners which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\WebhookListener[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the webhook listeners which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/webhook-listener/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\WebhookListener[]', + '/webhook-listener/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\WebhookListener[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\WebhookListener[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\WebhookListenerUpdate $entity The webhook listener object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\WebhookListener + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\WebhookListenerUpdate $entity The webhook listener object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/webhook-listener/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\WebhookListener', + '/webhook-listener/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\WebhookListener', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\WebhookListener', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/WebhookUrlService.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/WebhookUrlService.php new file mode 100644 index 0000000..867a1f4 --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/Service/WebhookUrlService.php @@ -0,0 +1,685 @@ +apiClient = $apiClient; + } + + /** + * Returns the API client instance. + * + * @return ApiClient + */ + public function getApiClient() { + return $this->apiClient; + } + + + /** + * Operation count + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return int + */ + public function count($spaceId, $filter = null) { + return $this->countWithHttpInfo($spaceId, $filter)->getData(); + } + + /** + * Operation countWithHttpInfo + * + * Count + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQueryFilter $filter The filter which restricts the entities which are used to calculate the count. (optional) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function countWithHttpInfo($spaceId, $filter = null) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling count'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/webhook-url/count"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($filter)) { + $tempBody = $filter; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + 'int', + '/webhook-url/count' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), 'int', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'int', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation create + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\WebhookUrlCreate $entity The webhook url object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\WebhookUrl + */ + public function create($spaceId, $entity) { + return $this->createWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation createWithHttpInfo + * + * Create + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\WebhookUrlCreate $entity The webhook url object with the properties which should be created. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function createWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling create'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling create'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/webhook-url/create"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\WebhookUrl', + '/webhook-url/create' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\WebhookUrl', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\WebhookUrl', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation delete + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return void + */ + public function delete($spaceId, $id) { + return $this->deleteWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation deleteWithHttpInfo + * + * Delete + * + * @param int $spaceId (required) + * @param int $id (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function deleteWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling delete'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling delete'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/webhook-url/delete"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($id)) { + $tempBody = $id; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/webhook-url/delete' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders()); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation read + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the webhook url which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\WebhookUrl + */ + public function read($spaceId, $id) { + return $this->readWithHttpInfo($spaceId, $id)->getData(); + } + + /** + * Operation readWithHttpInfo + * + * Read + * + * @param int $spaceId (required) + * @param int $id The id of the webhook url which should be returned. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function readWithHttpInfo($spaceId, $id) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling read'); + } + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling read'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('*/*')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + if ($id !== null) { + $queryParams['id'] = $this->apiClient->getSerializer()->toQueryValue($id); + } + + // path params + $resourcePath = "/webhook-url/read"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\WebhookUrl', + '/webhook-url/read' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\WebhookUrl', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\WebhookUrl', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation search + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the webhook urls which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\WebhookUrl[] + */ + public function search($spaceId, $query) { + return $this->searchWithHttpInfo($spaceId, $query)->getData(); + } + + /** + * Operation searchWithHttpInfo + * + * Search + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\EntityQuery $query The query restricts the webhook urls which are returned by the search. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function searchWithHttpInfo($spaceId, $query) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling search'); + } + // verify the required parameter 'query' is set + if ($query === null) { + throw new \InvalidArgumentException('Missing the required parameter $query when calling search'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/webhook-url/search"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($query)) { + $tempBody = $query; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\WebhookUrl[]', + '/webhook-url/search' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\WebhookUrl[]', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\WebhookUrl[]', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + + /** + * Operation update + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\WebhookUrlUpdate $entity The webhook url object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return \Wallee\Sdk\Model\WebhookUrl + */ + public function update($spaceId, $entity) { + return $this->updateWithHttpInfo($spaceId, $entity)->getData(); + } + + /** + * Operation updateWithHttpInfo + * + * Update + * + * @param int $spaceId (required) + * @param \Wallee\Sdk\Model\WebhookUrlUpdate $entity The webhook url object with all the properties which should be updated. The id and the version are required properties. (required) + * @throws \Wallee\Sdk\ApiException + * @throws \Wallee\Sdk\VersioningException + * @throws \Wallee\Sdk\Http\ConnectionException + * @return ApiResponse + */ + public function updateWithHttpInfo($spaceId, $entity) { + // verify the required parameter 'spaceId' is set + if ($spaceId === null) { + throw new \InvalidArgumentException('Missing the required parameter $spaceId when calling update'); + } + // verify the required parameter 'entity' is set + if ($entity === null) { + throw new \InvalidArgumentException('Missing the required parameter $entity when calling update'); + } + // header params + $headerParams = array(); + $headerAccept = $this->apiClient->selectHeaderAccept(array('application/json;charset=utf-8')); + if (!is_null($headerAccept)) { + $headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept; + } + $headerParams[HttpRequest::HEADER_KEY_CONTENT_TYPE] = $this->apiClient->selectHeaderContentType(array('application/json;charset=utf-8')); + + // query params + $queryParams = array(); + if ($spaceId !== null) { + $queryParams['spaceId'] = $this->apiClient->getSerializer()->toQueryValue($spaceId); + } + + // path params + $resourcePath = "/webhook-url/update"; + // default format to json + $resourcePath = str_replace("{format}", "json", $resourcePath); + + // form params + $formParams = array(); + // body params + $tempBody = null; + if (isset($entity)) { + $tempBody = $entity; + } + + // for model (json/xml) + $httpBody = ''; + if (isset($tempBody)) { + $httpBody = $tempBody; // $tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + $response = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\Wallee\Sdk\Model\WebhookUrl', + '/webhook-url/update' + ); + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $this->apiClient->getSerializer()->deserialize($response->getData(), '\Wallee\Sdk\Model\WebhookUrl', $response->getHeaders())); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\WebhookUrl', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 409: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 442: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ClientError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + case 542: + $responseObject = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Wallee\Sdk\Model\ServerError', $e->getResponseHeaders()); + $e = new ApiException($e->getLogToken(), $responseObject->getMessage(), $e->getCode(), $e->getResponseHeaders(), $e->getResponseBody(), $responseObject); + break; + } + + throw $e; + } + } + +} diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/ValidationException.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/ValidationException.php new file mode 100644 index 0000000..427835c --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/ValidationException.php @@ -0,0 +1,80 @@ +property = $property; + } + + /** + * Returns the name of the invalid property. + * + * @return string + */ + public function getProperty() { + return $this->property; + } + + /** + * Returns the instance of the validated model. + * + * @return object + */ + public function getModel() { + return $this->model; + } + +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/wallee-sdk/lib/VersioningException.php b/upload/system/library/postfinancecheckout/wallee-sdk/lib/VersioningException.php new file mode 100644 index 0000000..6e0d3be --- /dev/null +++ b/upload/system/library/postfinancecheckout/wallee-sdk/lib/VersioningException.php @@ -0,0 +1,36 @@ +callApi(HttpClientFactory::TYPE_CURL); + } + + /** + * Test the cURL HTTP client. + */ + public function testCurlHttpClient() { + $this->callApi(HttpClientFactory::TYPE_CURL); + } + + /** + * Test the socket HTTP client. + */ + public function testSocketHttpClient() { + $this->callApi(HttpClientFactory::TYPE_SOCKET); + } + + /** + * Send an API request with the given http client. + * + * @param string $httpClientType the http type to use for the request + */ + private function callApi($httpClientType = null) { + $apiClient = new ApiClient(getenv('APPLICATION_USER_ID'), getenv('APPLICATION_USER_KEY')); + $apiClient->setBasePath(getenv('API_BASE_PATH')); + $apiClient->setHttpClientType($httpClientType); + $service = new \Wallee\Sdk\Service\WebhookUrlService($apiClient); + $response = $service->readWithHttpInfo(23, 7); + $this->assertEquals(200, $response->getStatusCode()); + $this->assertInstanceOf('\Wallee\Sdk\Model\WebhookUrl', $response->getData()); + $this->assertTrue($response->getData()->isValid()); + $this->assertEquals(7, $response->getData()->getId()); + $this->assertEquals('SDK Test Webhook Url', $response->getData()->getName()); + } + +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/webhook/abstract_order_related.php b/upload/system/library/postfinancecheckout/webhook/abstract_order_related.php new file mode 100644 index 0000000..a19dbaf --- /dev/null +++ b/upload/system/library/postfinancecheckout/webhook/abstract_order_related.php @@ -0,0 +1,78 @@ +getSpaceId() != $this->registry->get('config')->get('postfinancecheckout_space_id')) { + throw new \Exception("Received webhook with space id {$request->getSpaceId()} in store for space id {$this->registry->get('config')->get('postfinancecheckout_space_id')}."); + } + + $entity = $this->loadEntity($request); + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionStart(); + try { + $order_id = $this->getOrderId($entity); + $this->registry->get('load')->model('checkout/order'); + $order_info = $this->registry->get('model_checkout_order')->getOrder($order_id); + if ($order_info) { + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $order_id); + if ($transaction_info->getTransactionId() !== $this->getTransactionId($entity)) { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionCommit(); + return; + } + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionLock($transaction_info->getSpaceId(), $transaction_info->getTransactionId()); + $this->processOrderRelatedInner($order_info, $entity); + } + + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionCommit(); + } + catch (\Exception $e) { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionRollback(); + throw $e; + } + } + + /** + * Loads and returns the entity for the webhook request. + * + * @param Request $request + * @return object + */ + abstract protected function loadEntity(Request $request); + + /** + * Returns the order id linked to the entity. + * + * @param object $entity + * @return string + */ + abstract protected function getOrderId($entity); + + /** + * Returns the transaction id linked to the entity + * + * + * @param object $entity + * @return int + */ + abstract protected function getTransactionId($entity); + + /** + * Actually processes the order related webhook request. + * + * This must be implemented + * + * @param array $order_info + * @param object $entity + */ + abstract protected function processOrderRelatedInner(array $order_info, $entity); +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/webhook/abstract_webhook.php b/upload/system/library/postfinancecheckout/webhook/abstract_webhook.php new file mode 100644 index 0000000..ec2c6ba --- /dev/null +++ b/upload/system/library/postfinancecheckout/webhook/abstract_webhook.php @@ -0,0 +1,32 @@ +registry = $registry; + } + + /** + * @return static + */ + public static function instance(\Registry $registry){ + $class = get_called_class(); + if (!isset(self::$instances[$class])) { + self::$instances[$class] = new $class($registry); + } + return self::$instances[$class]; + } + + /** + * Processes the received webhook request. + * + * @param \PostFinanceCheckout\Webhook\Request $request + */ + abstract public function process(Request $request); +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/webhook/delivery_indication.php b/upload/system/library/postfinancecheckout/webhook/delivery_indication.php new file mode 100644 index 0000000..5350a47 --- /dev/null +++ b/upload/system/library/postfinancecheckout/webhook/delivery_indication.php @@ -0,0 +1,46 @@ +registry)->getApiClient()); + return $delivery_indication_service->read($request->getSpaceId(), $request->getEntityId()); + } + + protected function getOrderId($delivery_indication){ + /* @var \Wallee\Sdk\Model\DeliveryIndication $delivery_indication */ + return $delivery_indication->getTransaction()->getMerchantReference(); + } + + protected function getTransactionId($delivery_indication){ + /* @var $delivery_indication \Wallee\Sdk\Model\DeliveryIndication */ + return $delivery_indication->getLinkedTransaction(); + } + + protected function processOrderRelatedInner(array $order_info, $delivery_indication){ + /* @var \Wallee\Sdk\Model\DeliveryIndication $delivery_indication */ + switch ($delivery_indication->getState()) { + case \Wallee\Sdk\Model\DeliveryIndicationState::MANUAL_CHECK_REQUIRED: + $this->review($order_info); + break; + default: + // Nothing to do. + break; + } + } + + protected function review(array $order_info){ + \PostFinanceCheckoutHelper::instance($this->registry)->addOrderHistory($order_info['order_id'], $order_info['order_status_id'], + \PostFinanceCheckoutHelper::instance($this->registry)->getTranslation('message_webhook_manual')); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/webhook/entity.php b/upload/system/library/postfinancecheckout/webhook/entity.php new file mode 100644 index 0000000..5cc3dce --- /dev/null +++ b/upload/system/library/postfinancecheckout/webhook/entity.php @@ -0,0 +1,38 @@ +id = $id; + $this->name = $name; + $this->states = $states; + $this->notify_every_change = $notify_every_change; + $this->handler_class_name = $handler_class_name; + } + + public function getId(){ + return $this->id; + } + + public function getName(){ + return $this->name; + } + + public function getStates(){ + return $this->states; + } + + public function isNotifyEveryChange(){ + return $this->notify_every_change; + } + + public function getHandlerClassName(){ + return $this->handler_class_name; + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/webhook/manual_task.php b/upload/system/library/postfinancecheckout/webhook/manual_task.php new file mode 100644 index 0000000..00139ad --- /dev/null +++ b/upload/system/library/postfinancecheckout/webhook/manual_task.php @@ -0,0 +1,19 @@ +registry); + $manual_task_service->update(); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/webhook/method_configuration.php b/upload/system/library/postfinancecheckout/webhook/method_configuration.php new file mode 100644 index 0000000..b3a3db8 --- /dev/null +++ b/upload/system/library/postfinancecheckout/webhook/method_configuration.php @@ -0,0 +1,19 @@ +registry); + $space_id = $this->registry->get('config')->get('postfinancecheckout_space_id'); + $payment_method_configuration_service->synchronize($space_id); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/webhook/request.php b/upload/system/library/postfinancecheckout/webhook/request.php new file mode 100644 index 0000000..aa41524 --- /dev/null +++ b/upload/system/library/postfinancecheckout/webhook/request.php @@ -0,0 +1,94 @@ +event_id = $model->eventId; + $this->entity_id = $model->entityId; + $this->listener_entity_id = $model->listenerEntityId; + $this->listener_entity_technical_name = $model->listenerEntityTechnicalName; + $this->space_id = $model->spaceId; + $this->webhook_listener_id = $model->webhookListenerId; + $this->timestamp = $model->timestamp; + } + + /** + * Returns the webhook event's id. + * + * @return int + */ + public function getEventId(){ + return $this->event_id; + } + + /** + * Returns the id of the webhook event's entity. + * + * @return int + */ + public function getEntityId(){ + return $this->entity_id; + } + + /** + * Returns the id of the webhook's listener entity. + * + * @return int + */ + public function getListenerEntityId(){ + return $this->listener_entity_id; + } + + /** + * Returns the technical name of the webhook's listener entity. + * + * @return string + */ + public function getListenerEntityTechnicalName(){ + return $this->listener_entity_technical_name; + } + + /** + * Returns the space id. + * + * @return int + */ + public function getSpaceId(){ + return $this->space_id; + } + + /** + * Returns the id of the webhook listener. + * + * @return int + */ + public function getWebhookListenerId(){ + return $this->webhook_listener_id; + } + + /** + * Returns the webhook's timestamp. + * + * @return string + */ + public function getTimestamp(){ + return $this->timestamp; + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/webhook/token.php b/upload/system/library/postfinancecheckout/webhook/token.php new file mode 100644 index 0000000..591d78b --- /dev/null +++ b/upload/system/library/postfinancecheckout/webhook/token.php @@ -0,0 +1,14 @@ +registry); + $token_service->updateToken($request->getSpaceId(), $request->getEntityId()); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/webhook/token_version.php b/upload/system/library/postfinancecheckout/webhook/token_version.php new file mode 100644 index 0000000..d7d656f --- /dev/null +++ b/upload/system/library/postfinancecheckout/webhook/token_version.php @@ -0,0 +1,13 @@ +registry); + $token_service->updateTokenVersion($request->getSpaceId(), $request->getEntityId()); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/webhook/transaction.php b/upload/system/library/postfinancecheckout/webhook/transaction.php new file mode 100644 index 0000000..3ebafed --- /dev/null +++ b/upload/system/library/postfinancecheckout/webhook/transaction.php @@ -0,0 +1,112 @@ +registry)->getApiClient()); + return $transaction_service->read($request->getSpaceId(), $request->getEntityId()); + } + + protected function getOrderId($transaction){ + /* @var \Wallee\Sdk\Model\Transaction $transaction */ + return $transaction->getMerchantReference(); + } + + protected function getTransactionId($transaction){ + /* @var \Wallee\Sdk\Model\Transaction $transaction */ + return $transaction->getId(); + } + + protected function processOrderRelatedInner(array $order_info, $transaction){ + $oid = $order_info['order_id']; + $tid = $transaction->getId(); + /* @var \Wallee\Sdk\Model\Transaction $transaction */ + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $order_info['order_id']); + if ($transaction->getState() != $transaction_info->getState()) { + switch ($transaction->getState()) { + case \Wallee\Sdk\Model\TransactionState::CONFIRMED: + $this->processing($transaction, $order_info); + break; + case \Wallee\Sdk\Model\TransactionState::PROCESSING: + $this->confirm($transaction, $order_info); + break; + case \Wallee\Sdk\Model\TransactionState::AUTHORIZED: + $this->authorize($transaction, $order_info); + break; + case \Wallee\Sdk\Model\TransactionState::DECLINE: + $this->decline($transaction, $order_info); + break; + case \Wallee\Sdk\Model\TransactionState::FAILED: + $this->failed($transaction, $order_info); + break; + case \Wallee\Sdk\Model\TransactionState::FULFILL: + if ($transaction_info->getState() != 'AUTHORIZED' && $transaction_info->getState() != 'COMPLETED') { + $this->authorize($transaction, $order_info); + } + $this->fulfill($transaction, $order_info); + break; + case \Wallee\Sdk\Model\TransactionState::VOIDED: + $this->voided($transaction, $order_info); + break; + case \Wallee\Sdk\Model\TransactionState::COMPLETED: + $this->waiting($transaction, $order_info); + break; + default: + // Nothing to do. + break; + } + } + + \PostFinanceCheckout\Service\Transaction::instance($this->registry)->updateTransactionInfo($transaction, $order_info['order_id']); + } + + protected function processing(\Wallee\Sdk\Model\Transaction $transaction, array $order_info){ + \PostFinanceCheckoutHelper::instance($this->registry)->addOrderHistory($order_info['order_id'], 'postfinancecheckout_processing_status_id', + \PostFinanceCheckoutHelper::instance($this->registry)->getTranslation('message_webhook_processing')); + } + + protected function confirm(\Wallee\Sdk\Model\Transaction $transaction, array $order_info){ + \PostFinanceCheckoutHelper::instance($this->registry)->addOrderHistory($order_info['order_id'], 'postfinancecheckout_confirmed_status_id', + \PostFinanceCheckoutHelper::instance($this->registry)->getTranslation('message_webhook_confirm')); + } + + protected function authorize(\Wallee\Sdk\Model\Transaction $transaction, array $order_info){ + \PostFinanceCheckoutHelper::instance($this->registry)->addOrderHistory($order_info['order_id'], 'postfinancecheckout_authorized_status_id', + \PostFinanceCheckoutHelper::instance($this->registry)->getTranslation('message_webhook_authorize')); + } + + protected function waiting(\Wallee\Sdk\Model\Transaction $transaction, array $order_info){ + \PostFinanceCheckoutHelper::instance($this->registry)->addOrderHistory($order_info['order_id'], 'postfinancecheckout_completed_status_id', + \PostFinanceCheckoutHelper::instance($this->registry)->getTranslation('message_webhook_waiting')); + } + + protected function decline(\Wallee\Sdk\Model\Transaction $transaction, array $order_info){ + \PostFinanceCheckoutHelper::instance($this->registry)->addOrderHistory($order_info['order_id'], 'postfinancecheckout_decline_status_id', + \PostFinanceCheckoutHelper::instance($this->registry)->getTranslation('message_webhook_decline')); + } + + protected function failed(\Wallee\Sdk\Model\Transaction $transaction, array $order_info){ + \PostFinanceCheckoutHelper::instance($this->registry)->addOrderHistory($order_info['order_id'], 'postfinancecheckout_failed_status_id', + \PostFinanceCheckoutHelper::instance($this->registry)->getTranslation('message_webhook_failed')); + } + + protected function fulfill(\Wallee\Sdk\Model\Transaction $transaction, array $order_info){ + \PostFinanceCheckoutHelper::instance($this->registry)->addOrderHistory($order_info['order_id'], 'postfinancecheckout_fulfill_status_id', + \PostFinanceCheckoutHelper::instance($this->registry)->getTranslation('message_webhook_fulfill')); + } + + protected function voided(\Wallee\Sdk\Model\Transaction $transaction, array $order_info){ + \PostFinanceCheckoutHelper::instance($this->registry)->addOrderHistory($order_info['order_id'], 'postfinancecheckout_voided_status_id', + \PostFinanceCheckoutHelper::instance($this->registry)->getTranslation('message_webhook_voided')); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/webhook/transaction_completion.php b/upload/system/library/postfinancecheckout/webhook/transaction_completion.php new file mode 100644 index 0000000..004232e --- /dev/null +++ b/upload/system/library/postfinancecheckout/webhook/transaction_completion.php @@ -0,0 +1,85 @@ +registry)->getApiClient()); + return $completion_service->read($request->getSpaceId(), $request->getEntityId()); + } + + protected function getOrderId($completion){ + /* @var \Wallee\Sdk\Model\TransactionCompletion $completion */ + return $completion->getLineItemVersion()->getTransaction()->getMerchantReference(); + } + + protected function getTransactionId($entity){ + /* @var $entity \Wallee\Sdk\Model\TransactionCompletion */ + return $entity->getLinkedTransaction(); + } + + protected function processOrderRelatedInner(array $order_info, $completion){ + /* @var \Wallee\Sdk\Model\TransactionCompletion $completion */ + switch ($completion->getState()) { + case \Wallee\Sdk\Model\TransactionCompletionState::FAILED: + $this->failed($completion, $order_info); + break; + case \Wallee\Sdk\Model\TransactionCompletionState::SUCCESSFUL: + $this->success($completion, $order_info); + break; + default: + // Ignore PENDING & CREATE + // Nothing to do. + break; + } + } + + protected function success(\Wallee\Sdk\Model\TransactionCompletion $completion, array $order_info){ + $completion_job = \PostFinanceCheckout\Entity\CompletionJob::loadByJob($this->registry, $completion->getLinkedSpaceId(), $completion->getId()); + if (!$completion_job->getId()) { + //We have no completion job with this id -> the server could not store the id of the completion after sending the request. (e.g. connection issue or crash) + //We only have on running completion which was not yet processed successfully and use it as it should be the one the webhook is for. + $completion_job = \PostFinanceCheckout\Entity\CompletionJob::loadRunningForOrder($this->registry, $order_info['order_id']); + if (!$completion_job->getId()) { + //completion not initated in shop backend ignore + return; + } + $completion_job->setJobId($completion->getId()); + } + $completion_job->setAmount($completion->getPaymentInformation()); + $completion_job->setState(\PostFinanceCheckout\Entity\CompletionJob::STATE_SUCCESS); + + $completion_job->save(); + } + + protected function failed(\Wallee\Sdk\Model\TransactionCompletion $completion, array $order_info){ + $completion_job = \PostFinanceCheckout\Entity\CompletionJob::loadByJob($this->registry, $completion->getLinkedSpaceId(), $completion->getId()); + if (!$completion_job->getId()) { + //We have no completion job with this id -> the server could not store the id of the completion after sending the request. (e.g. connection issue or crash) + //We only have on running completion which was not yet processed successfully and use it as it should be the one the webhook is for. + $completion_job = \PostFinanceCheckout\Entity\CompletionJob::loadRunningForOrder($this->registry, $order_info['order_id']); + if (!$completion_job->getId()) { + return; + } + $completion_job->setJobId($completion->getId()); + } + if ($completion->getFailureReason() != null) { + $completion_job->setFailureReason($completion->getFailureReason()->getDescription()); + } + + $completion_job->setAmount($completion->getPaymentInformation()); + $completion_job->setState(\PostFinanceCheckout\Entity\CompletionJob::STATE_FAILED_CHECK); + \PostFinanceCheckout\Entity\Alert::loadFailedJobs($this->registry)->modifyCount(1); + + $completion_job->save(); + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/webhook/transaction_refund.php b/upload/system/library/postfinancecheckout/webhook/transaction_refund.php new file mode 100644 index 0000000..bab5ab3 --- /dev/null +++ b/upload/system/library/postfinancecheckout/webhook/transaction_refund.php @@ -0,0 +1,97 @@ +registry)->getApiClient()); + return $refund_service->read($request->getSpaceId(), $request->getEntityId()); + } + + protected function getOrderId($refund){ + /* @var \Wallee\Sdk\Model\Refund $refund */ + return $refund->getTransaction()->getMerchantReference(); + } + + protected function getTransactionId($entity){ + /* @var $entity \Wallee\Sdk\Model\Refund */ + return $entity->getTransaction()->getId(); + } + + protected function processOrderRelatedInner(array $order_info, $refund){ + /* @var \Wallee\Sdk\Model\Refund $refund */ + switch ($refund->getState()) { + case \Wallee\Sdk\Model\RefundState::FAILED: + $this->failed($refund, $order_info); + break; + case \Wallee\Sdk\Model\RefundState::SUCCESSFUL: + $this->refunded($refund, $order_info); + default: + // Nothing to do. + break; + } + } + + protected function failed(\Wallee\Sdk\Model\Refund $refund, array $order_info){ + $refund_job = \PostFinanceCheckout\Entity\RefundJob::loadByExternalId($this->registry, $refund->getLinkedSpaceId(), $refund->getExternalId()); + + if ($refund_job->getId()) { + if ($refund->getFailureReason() != null) { + $refund_job->setFailureReason($refund->getFailureReason()->getDescription()); + } + + $refund_job->setState(\PostFinanceCheckout\Entity\RefundJob::STATE_FAILED_CHECK); + \PostFinanceCheckout\Entity\Alert::loadFailedJobs($this->registry)->modifyCount(1); + + $refund_job->save(); + } + } + + protected function refunded(\Wallee\Sdk\Model\Refund $refund, array $order_info){ + $refund_job = \PostFinanceCheckout\Entity\RefundJob::loadByExternalId($this->registry, $refund->getLinkedSpaceId(), $refund->getExternalId()); + if ($refund_job->getId()) { + $refund_job->setState(\PostFinanceCheckout\Entity\RefundJob::STATE_SUCCESS); + $already_refunded = \PostFinanceCheckout\Entity\RefundJob::sumRefundedAmount($this->registry, $order_info['order_id']); + + if (\PostFinanceCheckoutHelper::instance($this->registry)->areAmountsEqual($already_refunded + $refund->getAmount(), $order_info['total'], + $order_info['currency_code'])) { + $status = 'postfinancecheckout_refund_status_id'; + } + else { + $status = $order_info['order_status_id']; + } + + \PostFinanceCheckoutHelper::instance($this->registry)->addOrderHistory($order_info['order_id'], $status, + sprintf(\PostFinanceCheckoutHelper::instance($this->registry)->getTranslation('message_refund_successful'), $refund->getId(), + $refund->getAmount())); + + if ($refund_job->getRestock()) { + $this->restock($refund); + } + + $refund_job->save(); + } + } + + protected function restock(\Wallee\Sdk\Model\Refund $refund){ + $db = $this->registry->get('db'); + $table = DB_PREFIX . 'product'; + foreach ($refund->getLineItems() as $line_item) { + if ($line_item->getType() == \Wallee\Sdk\Model\LineItemType::PRODUCT) { + $quantity = $db->escape($line_item->getQuantity()); + $id = $db->escape($line_item->getUniqueId()); + $query = "UPDATE $table SET quantity=quantity+$quantity WHERE product_id='$id';"; + $db->query($query); + } + } + } +} \ No newline at end of file diff --git a/upload/system/library/postfinancecheckout/webhook/transaction_void.php b/upload/system/library/postfinancecheckout/webhook/transaction_void.php new file mode 100644 index 0000000..a7c5039 --- /dev/null +++ b/upload/system/library/postfinancecheckout/webhook/transaction_void.php @@ -0,0 +1,82 @@ +registry)->getApiClient()); + return $void_service->read($request->getSpaceId(), $request->getEntityId()); + } + + protected function getOrderId($void){ + /* @var \Wallee\Sdk\Model\TransactionVoid $void */ + return $void->getTransaction()->getMerchantReference(); + } + + protected function getTransactionId($entity){ + /* @var $entity \Wallee\Sdk\Model\TransactionVoid */ + return $entity->getTransaction()->getId(); + } + + protected function processOrderRelatedInner(array $order_info, $void){ + /* @var \Wallee\Sdk\Model\TransactionVoid $void */ + switch ($void->getState()) { + case \Wallee\Sdk\Model\TransactionVoidState::FAILED: + $this->failed($void, $order_info); + break; + case \Wallee\Sdk\Model\TransactionVoidState::SUCCESSFUL: + $this->success($void, $order_info); + break; + default: + // Nothing to do. + break; + } + } + + protected function success(\Wallee\Sdk\Model\TransactionVoid $void, array $order_info){ + $void_job = \PostFinanceCheckout\Entity\VoidJob::loadByJob($this->registry, $void->getLinkedSpaceId(), $void->getId()); + if (!$void_job->getId()) { + //We have no void job with this id -> the server could not store the id of the void after sending the request. (e.g. connection issue or crash) + //We only have on running void which was not yet processed successfully and use it as it should be the one the webhook is for. + $void_job = \PostFinanceCheckout\Entity\VoidJob::loadRunningForOrder($this->registry, $order_info['order_id']); + if (!$void_job->getId()) { + //void not initated in shop backend ignore + return; + } + $void_job->setJobId($void->getId()); + } + $void_job->setState(\PostFinanceCheckout\Entity\VoidJob::STATE_SUCCESS); + + $void_job->save(); + } + + protected function failed(\Wallee\Sdk\Model\TransactionVoid $void, array $order_info){ + $void_job = \PostFinanceCheckout\Entity\VoidJob::loadByJob($this->registry, $void->getLinkedSpaceId(), $void->getId()); + if (!$void_job->getId()) { + //We have no void job with this id -> the server could not store the id of the void after sending the request. (e.g. connection issue or crash) + //We only have on running void which was not yet processed successfully and use it as it should be the one the webhook is for. + $void_job = \PostFinanceCheckout\Entity\VoidJob::loadRunningForOrder($this->registry, $order_info['order_id']); + if (!$void_job->getId()) { + //void not initated in shop backend ignore + return; + } + $void_job->setJobId($void->getId()); + } + if ($void->getFailureReason() != null) { + $void_job->setFailureReason($void->getFailureReason()->getDescription()); + } + $void_job->setState(\PostFinanceCheckout\Entity\VoidJob::STATE_FAILED_CHECK); + \PostFinanceCheckout\Entity\Alert::loadFailedJobs($this->registry)->modifyCount(1); + + $void_job->save(); + } +} \ No newline at end of file

    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 K&t;ucLK6VQGY41z literal 0 HcmV?d00001 diff --git a/docs/en/resource/settings.png b/docs/en/resource/settings.png new file mode 100644 index 0000000000000000000000000000000000000000..19f4f08dd7bff5c967f866984204bde7bbba0480 GIT binary patch literal 61236 zcmdSB2UJySmNklA11bsz6h%M;1&K-&B#DUR93&fvk|bv^U_?YfKtO^d2?B!TD59W% zA|N7JBuma2-rU@(>aPClRd;pw`^R`^+&fe_XP>>lu-2S&&GkJ{Qn;{l`=RY5BqTef zr6g2HNH%RHA=&%~=|=p7OROUoe{8!hrDaD#vg-A8vOM zqwHO+oG|%vS=mwPs#A^nlT%@kx0U|( zJIq;rueI4|=yeL+i)~`3hp+d|Rod6~-lN`1`pTtr^@%{O&{U1nU0@;p`1VC^fuY*=^Y;z-M|7BUKpfk%6D~)1d9x*lh#x7n z>+0#p8P{OIfrrarcwl$weyw=efr&4|)0 z<-5&&;Z&rWiJqgi_%VKd_yvQpvDdJ9*DWQ*+PiZj`4-Jg9!oP8-@h%n%7ndm|8sOy zBXpAZ!lxHLsNO8QblPKaIaMe34u$CQ^&eHqvx)v?D6>RU#9^yN&Z=bWP>r*P3 zrxlh4Bec`HQIBd0GwwaEpb^ctYg#p1d;YVpPbK3h@wiVfoL9NIXPd3<6wjg0FR61L z(eY>AbX(~vkK$Y-{qW(KY{>bd$*O_xsoDef(supq+lR-qY%D9^nkYmHE!i(It*o@F zM+*^;bNrM5nYUf5b#Q^VGMp;#nW z?%r0R&!l*>SR;3r$L0f^6&Rlym#OUKBB9HVHaX@{{z$oZ&&^R|_Rfyd9rSxRnbua_ z+(UQe@O^Jef2nb4eeoo4b!p#Zt3KfAQ@SsGNHluRpP^Fz;ihmt>!qW=&5agPbB+0D zr=P91yjN_p{_?rn`p0X}mkJw<7Uza%ES%>n?|D567a0lKTHHq5wph>;TU%SQE$3Wa z3&L9&^mkFvMdjHxy3%_G26opR3}kT(BHs44`^d3lADWxBV(X*=48_;?&v>q~Amy{` z2E^RmC_VP~OIB(#@zWN6B0`X4|NXxEr)$0Dk?e^RCwMO+oRHiIn=DoP+1smr+kv=D zqJm(=m%JLXqxien$bb7A{`C)1%5A>jM;jqvXRM_3q_os4O2i{UA;R_N+YLtQ_V&}! zXK&LAh^wfm6grO7H#Eq%J75dUjzP=tyv#CEuk4Y#0xa&n}^5yxbj~|)a_w3)V zaV{I5Ael3nB#WsPU2`A*Sr*SwR=zS`PF{YGoSc+&pfN?$+1c6C({nKU)2C0}m40Ji zU!21;eoxh5s?MzU9QvO6!RLVJT$>$@pgk3r;m3|*H@f`TfPespq3=7XPQLBzEcIGj z#nbN*m$-1@-rc*$85tiP5KN4GZorq*%jJ39~0G$vw> zR@2pWaVWjCBld#dW12I&sQHHRFOGhGa*WK=K(nUp#O?J~1?AiI2fy*Muo!O3w_}of zMnOgOEI2sl%7=$TP3fElC2c=0*TtOQdtA=B+n3*SX(X3ibouL-FC2`F5?VnK5i5P+ z)&+Ta@87>KTA6J{B(?e)U3PAE<`YvC#zirdD_%PAxMsTk%=ENc3)YCB`S({Z&fQ~4 z@uqlV{JE;O)}X{apHUi%!n$;2_8y%lvv;27$|A-j%560N_3PI)H8q$lgF?qt*$|GZ z)0h~a$B#XyKJ&M?x5viBU{MyBH*v_y%F;{d>vt?;+`dE%_4hk1O!k^JBnVHu-^*~} z@o;-#Zhrp4nX#g&mATFx^lWTwqbnkXPGhSWqM@0^J39`fX=nfLVBKb2JQJLqJ@dOU z<#SC99+&^Zg-Tn`1&o=PKxpvxr{T9{qas3{K4lgimko$(yjDGJkZaYB?NH%M&E#$R z{gu|r;*5d�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 F`d_&?&@KP~ literal 0 HcmV?d00001 diff --git a/upload/admin/controller/extension/payment/postfinancecheckout.php b/upload/admin/controller/extension/payment/postfinancecheckout.php new file mode 100644 index 0000000..929886c --- /dev/null +++ b/upload/admin/controller/extension/payment/postfinancecheckout.php @@ -0,0 +1,498 @@ +load->model("extension/postfinancecheckout/setup"); + $this->model_extension_postfinancecheckout_setup->install(); + } + + /** + * + * @param bool $purge Set to false to skip purgin database. + * @return void + */ + public function uninstall($purge = true){ + $this->load->model("extension/postfinancecheckout/setup"); + $this->model_extension_postfinancecheckout_setup->uninstall($purge); + } + + /** + * Render the payment method's settings page. + */ + public function index(){ + // Load essential models + $this->load->language("extension/payment/postfinancecheckout"); + $this->load->model("setting/setting"); + $this->load->model("setting/store"); + $this->load->model("localisation/order_status"); + $this->load->model("extension/postfinancecheckout/setup"); + + \PostFinanceCheckoutHelper::instance($this->registry); + + $this->document->setTitle($this->language->get("heading_title")); + + $shops = $this->getMultiStores(); + $this->processPostData($shops); + + $storeConfigs = $this->retrieveMultiStoreConfigs($shops); + + $pageVariables = $this->getSettingPageVariables($shops); + + $this->response->setOutput($this->loadView("extension/payment/postfinancecheckout", array_merge($storeConfigs, $pageVariables))); + } + + /** + * Synchronizes webhooks and payment methods for the given space id. + * + * @param int $space_id + */ + private function synchronize($space_id){ + try { + $this->load->model("extension/postfinancecheckout/setup"); + $this->model_extension_postfinancecheckout_setup->synchronize($space_id); + } + catch (Exception $e) { + $this->error['warning'] = $e->getMessage(); + } + } + + private function validateGlobalSettings(array $global){ + if (!isset($global['postfinancecheckout_application_key']) || empty($global['postfinancecheckout_application_key'])) { + throw new Exception($this->language->get('error_application_key_unset')); + } + if (isset($global['postfinancecheckout_user_id']) && !empty($global['postfinancecheckout_user_id'])) { + if (!ctype_digit($global['postfinancecheckout_user_id'])) { + throw new Exception($this->language->get('error_user_id_numeric')); + } + } + else { + throw new Exception($this->language->get('error_user_id_unset')); + } + } + + private function validateStoreSettings(array $store){ + if (isset($store['postfinancecheckout_space_id']) && !empty($store['postfinancecheckout_space_id'])) { + if (!ctype_digit($store['postfinancecheckout_space_id'])) { + throw new Exception($this->language->get('error_space_id_numeric')); + } + } + else { + throw new Exception($this->language->get('error_space_id_unset')); + } + if (isset($store['postfinancecheckout_space_view_id']) && !empty($store['postfinancecheckout_space_view_id'])) { + if (!ctype_digit($store['postfinancecheckout_space_view_id'])) { + throw new Exception($this->language->get('error_space_view_id_numeric')); + } + } + } + + private function persistStoreSettings(array $global, array $store){ + $newSettings = array_merge($global, $store); + + // preserve migration state + $newSettings['postfinancecheckout_migration_version'] = $this->config->get('postfinancecheckout_migration_version'); + $newSettings['postfinancecheckout_migration_name'] = $this->config->get('postfinancecheckout_migration_name'); + // preserve manual tasks + $newSettings[\PostFinanceCheckout\Service\ManualTask::CONFIG_KEY] = PostFinanceCheckoutVersionHelper::getPersistableSetting( + $this->model_setting_setting->getSetting(\PostFinanceCheckout\Service\ManualTask::CONFIG_KEY, $store['id']), 0); + // preserve notification url + $newSettings['postfinancecheckout_notification_url'] = PostFinanceCheckoutVersionHelper::getPersistableSetting( + $this->model_setting_setting->getSetting('postfinancecheckout_notification_url', $store['id']), null); + + // set directly accessible settings required for synchronization, reload according to new settings + if ($store['postfinancecheckout_status']) { + $this->config->set('postfinancecheckout_application_key', $global['postfinancecheckout_application_key']); + $this->config->set('postfinancecheckout_user_id', $global['postfinancecheckout_user_id']); + $this->synchronize($store['postfinancecheckout_space_id']); + } + + $newSettings['postfinancecheckout_download_invoice'] = isset($store['postfinancecheckout_download_invoice']); + $newSettings['postfinancecheckout_download_packaging'] = isset($store['postfinancecheckout_download_packaging']); + + PostFinanceCheckoutVersionHelper::persistPluginStatus($this->registry, $newSettings); + + $this->model_setting_setting->editSetting('postfinancecheckout', $newSettings, $store['id']); + + return true; + } + + /** + * Processes post data to settings. + * + * @param array $shops + */ + private function processPostData($shops){ + if ($this->request->server['REQUEST_METHOD'] !== "POST") { + return; + } + + try { + $this->validateGlobalSettings($this->request->post); + } + catch (Exception $e) { + $this->error['warning'] = $e->getMessage(); + return; + } + + $this->model_extension_postfinancecheckout_setup->uninstall(false); + + foreach ($shops as $store) { + $storeSettings = $this->request->post['stores'][$store['id']]; + $storeSettings['id'] = $store['id']; + if ($this->validateStore($store['id'])) { + if (isset($storeSettings['postfinancecheckout_status']) && $storeSettings['postfinancecheckout_status']) { + try { + $this->validateStoreSettings($storeSettings); + } + catch (Exception $e) { + $this->error['warning'] = $e->getMessage(); + continue; + } + } + $this->persistStoreSettings($this->request->post, $storeSettings); + } + } + + $this->install(); + + if (!isset($this->error['warning'])) { + $this->session->data['success'] = $this->language->get("message_saved_settings"); + + $this->response->redirect( + $this->createUrl("extension/payment", + array( + \PostFinanceCheckoutVersionHelper::TOKEN => $this->session->data[\PostFinanceCheckoutVersionHelper::TOKEN] + ))); + } + } + + /** + * Returns all variables used in the settigns page template. + * + * @param array $shops + * @return array + */ + private function getSettingPageVariables($shops){ + $data = array(); + + $data['shops'] = $shops; + + // Form action url + $data['action'] = $this->createUrl("extension/payment/postfinancecheckout", + array( + \PostFinanceCheckoutVersionHelper::TOKEN => $this->session->data[\PostFinanceCheckoutVersionHelper::TOKEN] + )); + $data['cancel'] = $this->createUrl("extension/payment", + array( + \PostFinanceCheckoutVersionHelper::TOKEN => $this->session->data[\PostFinanceCheckoutVersionHelper::TOKEN] + )); + + return array_merge($this->getSettingsPageTranslatedVariables(), $data, $this->getAlertTemplateVariables(), $this->getSettingsPageBreadcrumbs(), + $this->getSettingPageStoreVariables($shops), $this->getAdminSurroundingTemplates()); + } + + private function getSettingsPageTranslatedVariables(){ + $data = array(); + // Set data for template + $data['heading_title'] = $this->language->get("heading_title"); + $data['title_payment_status'] = $this->language->get("title_payment_status"); + $data['title_modifications'] = $this->language->get("title_modifications"); + $data['footer_text'] = $this->language->get("footer_text"); + + $data['title_global_settings'] = $this->language->get("title_global_settings"); + $data['title_store_settings'] = $this->language->get("title_store_settings"); + $data['entry_user_id'] = $this->language->get("entry_user_id"); + $data['help_user_id'] = $this->language->get("help_user_id"); + $data['entry_application_key'] = $this->language->get("entry_application_key"); + $data['help_application_key'] = $this->language->get("help_application_key"); + + $data['entry_space_id'] = $this->language->get("entry_space_id"); + $data['help_space_id'] = $this->language->get("help_space_id"); + $data['entry_space_view_id'] = $this->language->get("entry_space_view_id"); + $data['help_space_view_id'] = $this->language->get("help_space_view_id"); + + $data['order_statuses'] = $this->model_localisation_order_status->getOrderStatuses(); + $data['postfinancecheckout_statuses'] = $this->getOrderStatusTemplateVariables(); + + $data['title_debug'] = $this->language->get('title_debug'); + $data['entry_log_level'] = $this->language->get('entry_log_level'); + $data['help_log_level'] = $this->language->get('help_log_level'); + $data['log_levels'] = $this->getLogLevels(); + + $data['entry_email'] = $this->language->get("entry_email"); + $data['description_email'] = $this->language->get("description_email"); + $data['entry_alerts'] = $this->language->get("entry_alerts"); + $data['description_alerts'] = $this->language->get("description_alerts"); + $data['entry_core'] = $this->language->get("entry_core"); + $data['description_core'] = $this->language->get("description_core"); + $data['entry_administration'] = $this->language->get("entry_administration"); + $data['description_administration'] = $this->language->get("description_administration"); + $data['entry_pdf'] = $this->language->get("entry_pdf"); + $data['description_pdf'] = $this->language->get("description_pdf"); + $data['entry_checkout'] = $this->language->get("entry_checkout"); + $data['description_checkout'] = $this->language->get("description_checkout"); + $data['description_events'] = $this->language->get("description_events"); + + $data['title_downloads'] = $this->language->get("title_downloads"); + $data['entry_download_invoice'] = $this->language->get("entry_download_invoice"); + $data['entry_download_packaging'] = $this->language->get("entry_download_packaging"); + $data['description_download_invoice'] = $this->language->get("description_download_invoice"); + $data['description_download_packaging'] = $this->language->get("description_download_packaging"); + + $data['title_migration'] = $this->language->get('title_migration'); + $data['entry_migration_name'] = $this->language->get('entry_migration_name'); + $data['entry_migration_version'] = $this->language->get('entry_migration_version'); + + $data['text_edit'] = $this->language->get("text_edit"); + $data['text_information'] = $this->language->get('text_information'); + + $data['button_save'] = $this->language->get("button_save"); + $data['button_cancel'] = $this->language->get("button_cancel"); + + $data['text_enabled'] = $this->language->get("text_enabled"); + $data['text_disabled'] = $this->language->get('text_disabled'); + $data['entry_status'] = $this->language->get('entry_status'); + + $data['tab_general'] = $this->language->get("tab_general"); + + return $data; + } + + private function getLogLevels(){ + return array( + \PostFinanceCheckoutHelper::LOG_ERROR => $this->language->get('log_level_error'), + \PostFinanceCheckoutHelper::LOG_DEBUG => $this->language->get('log_level_debug') + ); + } + + private function getOrderStatusTemplateVariables(){ + $data = array(); + $statuses = array( + 'processing_status', + 'authorized_status', + 'completed_status', + 'fulfill_status', + 'failed_status', + 'voided_status', + 'decline_status', + 'refund_status' + ); + + foreach ($statuses as $status) { + $data[] = array( + 'entry' => $this->language->get('entry_' . $status), + 'description' => $this->language->get('description_' . $status), + 'key' => 'postfinancecheckout_' . $status . '_id' + ); + } + + return $data; + } + + private function getAlertTemplateVariables(){ + $data = array(); + if (isset($this->session->data['success'])) { + $data['success'] = $this->session->data['success']; + } + else { + $data['success'] = false; + } + + // If there are errors, show the error. + if (isset($this->error['warning'])) { + $data['error_warning'] = $this->error['warning']; + } + else { + $data['error_warning'] = ''; + } + + return $data; + } + + private function getSettingsPageBreadcrumbs(){ + return array( + 'breadcrumbs' => array( + array( + "href" => $this->createUrl("common/home", + array( + \PostFinanceCheckoutVersionHelper::TOKEN => $this->session->data[\PostFinanceCheckoutVersionHelper::TOKEN] + )), + "text" => $this->language->get("text_home"), + "separator" => false + ), + array( + "href" => $this->createUrl("extension/payment", + array( + \PostFinanceCheckoutVersionHelper::TOKEN => $this->session->data[\PostFinanceCheckoutVersionHelper::TOKEN] + )), + "text" => $this->language->get("text_payment"), + "separator" => ' :: ' + ), + array( + "href" => $this->createUrl("extension/payment/postfinancecheckout", + array( + \PostFinanceCheckoutVersionHelper::TOKEN => $this->session->data[\PostFinanceCheckoutVersionHelper::TOKEN] + )), + "text" => $this->language->get("heading_title"), + "separator" => " :: " + ) + ) + ); + } + + private function getSettingPageStoreVariables($shops){ + $this->load->model('setting/setting'); + $data = array(); + + // Load defaults. + $defaults = $this->getSettingsDefaults(); + + foreach ($defaults['global'] as $setting_name => $default_value) { + // Attempt to read from post + if (isset($this->request->post[$setting_name])) { + $data[$setting_name] = $this->request->post[$setting_name]; + } + + // Otherwise, attempt to get the setting from the database + else if ($this->config->has($setting_name)) { + $data[$setting_name] = $this->config->get($setting_name); + } + else { + $data[$setting_name] = $default_value; + } + } + + foreach ($shops as $store) { + $savedSettings = $this->model_setting_setting->getSetting('postfinancecheckout', $store['id']); + foreach ($defaults['multistore'] as $setting_name => $default_value) { + // Attempt to read from post + if (isset($this->request->post['stores'][$store['id']][$setting_name])) { + $setting = $this->request->post['stores'][$store['id']][$setting_name]; + } + // then database + else if (isset($savedSettings[$setting_name])) { + $setting = $savedSettings[$setting_name]; + } + // then default + else { + $setting = $default_value; + } + $data['stores'][$store['id']][$setting_name] = $setting; + } + } + + return $data; + } + + /** + * Returns all settings, and their respective default values. + * Global settings are returned in 'global', multistore settings returned in 'multistore' + * + * @return string[][] + */ + private function getSettingsDefaults(){ + $multiStoreSettings = array( + "postfinancecheckout_status" => 1, + + "postfinancecheckout_space_id" => null, + "postfinancecheckout_space_view_id" => null, + + "postfinancecheckout_processing_status_id" => 1, + "postfinancecheckout_failed_status_id" => 10, + "postfinancecheckout_voided_status_id" => 16, + "postfinancecheckout_decline_status_id" => 8, + "postfinancecheckout_fulfill_status_id" => 5, + "postfinancecheckout_authorized_status_id" => 15, + "postfinancecheckout_refund_status_id" => 11, + "postfinancecheckout_completed_status_id" => 2, + + "postfinancecheckout_log_level" => \PostFinanceCheckoutHelper::LOG_ERROR, + + "postfinancecheckout_notification_url" => null, + + "postfinancecheckout_download_packaging" => 1, + "postfinancecheckout_download_invoice" => 1, + \PostFinanceCheckout\Service\ManualTask::CONFIG_KEY => 0 + ); + + $globalSettings = array( + "postfinancecheckout_application_key" => null, + "postfinancecheckout_user_id" => null, + "postfinancecheckout_migration_name" => 'uninitialized', + "postfinancecheckout_migration_version" => "0.0.0" + ); + + return array( + 'multistore' => $multiStoreSettings, + 'global' => $globalSettings + ); + } + + /** + * Check the post and check if the user has permission to edit the module settings + * + * @param int $store The store id + * @return bool + */ + private function validateStore($store){ + if (!$this->user->hasPermission("modify", "extension/payment/postfinancecheckout")) { + $this->error['warning'] = $this->language->get("error_permission"); + } + + return (count($this->error) == 0); + } + + /** + * Retrieve additional store id's from store table. + * Will not include default store. Only the additional stores. So we inject the default store here. + * + * @return array + */ + protected function getMultiStores(){ + $sql = $this->db->query(sprintf("SELECT store_id as id, name FROM %sstore", DB_PREFIX)); + $rows = $sql->rows; + $default = array( + array( + 'id' => 0, + 'name' => $this->config->get('config_name') + ) + ); + $allStores = array_merge($default, $rows); + + return $allStores; + } + + protected function retrieveMultiStoreConfigs($shops){ + $data = array(); + foreach ($shops as $store) { + $sql = $this->db->query(sprintf("SELECT * FROM %ssetting WHERE store_id = %s", DB_PREFIX, $store['id'])); + $rows = $sql->rows; + $newArrray = array(); + foreach ($rows as $setting) { + $newArrray[$setting['key']] = $setting['value']; + } + $data['stores'][$store['id']] = $newArrray; + } + return $data; + } + + protected function getRequiredPermission(){ + return 'extension/payment/postfinancecheckout'; + } +} \ No newline at end of file diff --git a/upload/admin/controller/extension/postfinancecheckout/alert.php b/upload/admin/controller/extension/postfinancecheckout/alert.php new file mode 100644 index 0000000..5d9fb2f --- /dev/null +++ b/upload/admin/controller/extension/postfinancecheckout/alert.php @@ -0,0 +1,52 @@ +validate(); + $this->response->redirect(\PostFinanceCheckoutHelper::getBaseUrl() . '/s/' . $this->config->get('postfinancecheckout_space_id') . '/manual-task/list'); + } + catch (Exception $e) { + $this->displayError($e->getMessage()); + } + } + + /** + * Redirect the user to the order with the oldest checkable failed job. + */ + public function failed(){ + try { + $oldest_failed = \PostFinanceCheckout\Entity\RefundJob::loadOldestCheckable($this->registry); + if (!$oldest_failed->getId()) { + $oldest_failed = \PostFinanceCheckout\Entity\CompletionJob::loadOldestCheckable($this->registry); + } + if (!$oldest_failed->getId()) { + $oldest_failed = \PostFinanceCheckout\Entity\VoidJob::loadOldestCheckable($this->registry); + } + $this->response->redirect( + $this->createUrl('sale/order/info', + array( + \PostFinanceCheckoutVersionHelper::TOKEN => $this->session->data[\PostFinanceCheckoutVersionHelper::TOKEN], + 'order_id' => $oldest_failed->getOrderId() + ))); + } + catch (Exception $e) { + $this->displayError($e->getMessage()); + } + } + + protected function getRequiredPermission(){ + return 'extension/postfinancecheckout/alert'; + } +} \ No newline at end of file diff --git a/upload/admin/controller/extension/postfinancecheckout/completion.php b/upload/admin/controller/extension/postfinancecheckout/completion.php new file mode 100644 index 0000000..e4fbf6d --- /dev/null +++ b/upload/admin/controller/extension/postfinancecheckout/completion.php @@ -0,0 +1,49 @@ +response->addHeader('Content-Type: application/json'); + try { + $this->validate(); + + $completion_job = \PostFinanceCheckout\Entity\CompletionJob::loadRunningForOrder($this->registry, $this->request->get['order_id']); + + if ($completion_job->getId() !== null) { + throw new Exception($this->language->get('error_already_running')); + } + + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $this->request->get['order_id']); + + if (!\PostFinanceCheckoutHelper::instance($this->registry)->isCompletionPossible($transaction_info)) { + throw new \Exception($this->language->get('error_cannot_create_job')); + } + + // ensure line items are current (e.g. events were skipped when order is edited) + \PostFinanceCheckout\Service\Transaction::instance($this->registry)->updateLineItemsFromOrder($this->request->get['order_id']); + + $job = \PostFinanceCheckout\Service\Completion::instance($this->registry)->create($transaction_info); + \PostFinanceCheckout\Service\Completion::instance($this->registry)->send($job); + + $this->load->model('extension/postfinancecheckout/order'); + $new_buttons = $this->model_extension_postfinancecheckout_order->getButtons($this->request->get['order_id']); + + $this->response->setOutput( + json_encode( + array( + 'success' => sprintf($this->language->get('message_completion_success'), $transaction_info->getTransactionId()), + 'buttons' => $new_buttons + ))); + } + catch (Exception $e) { + $this->response->setOutput(json_encode(array( + 'error' => $e->getMessage() + ))); + } + } + + protected function getRequiredPermission(){ + return 'extension/postfinancecheckout/completion'; + } +} \ No newline at end of file diff --git a/upload/admin/controller/extension/postfinancecheckout/event.php b/upload/admin/controller/extension/postfinancecheckout/event.php new file mode 100644 index 0000000..f2988da --- /dev/null +++ b/upload/admin/controller/extension/postfinancecheckout/event.php @@ -0,0 +1,24 @@ +validate(); + $this->load->model('extension/postfinancecheckout/dynamic'); + $this->model_extension_postfinancecheckout_dynamic->install(); + } + catch (Exception $e) { + // ensure that permissions etc. do not cause page loads to fail + return; + } + } + + protected function getRequiredPermission(){ + return 'extension/postfinancecheckout/event'; + } +} \ No newline at end of file diff --git a/upload/admin/controller/extension/postfinancecheckout/pdf.php b/upload/admin/controller/extension/postfinancecheckout/pdf.php new file mode 100644 index 0000000..0f61952 --- /dev/null +++ b/upload/admin/controller/extension/postfinancecheckout/pdf.php @@ -0,0 +1,19 @@ +validate(); + $this->downloadPackingSlip($this->request->get['order_id']); + } + + public function invoice(){ + $this->validate(); + $this->downloadInvoice($this->request->get['order_id']); + } + + protected function getRequiredPermission(){ + return 'extension/postfinancecheckout/pdf'; + } +} \ No newline at end of file diff --git a/upload/admin/controller/extension/postfinancecheckout/refund.php b/upload/admin/controller/extension/postfinancecheckout/refund.php new file mode 100644 index 0000000..b6d27c0 --- /dev/null +++ b/upload/admin/controller/extension/postfinancecheckout/refund.php @@ -0,0 +1,184 @@ +language->load('extension/payment/postfinancecheckout'); + $this->response->addHeader('Content-Type: application/json'); + try { + $this->validate(); + + $this->response->setOutput( + json_encode( + array( + 'redirect' => $this->createUrl('extension/postfinancecheckout/refund', + array( + \PostFinanceCheckoutVersionHelper::TOKEN => $this->request->get[\PostFinanceCheckoutVersionHelper::TOKEN], + 'order_id' => $this->request->get['order_id'] + )) + ))); + } + catch (Exception $e) { + $this->response->setOutput(json_encode(array( + 'error' => $e->getMessage() + ))); + } + } + + public function index(){ + try { + $this->validate(); + } + catch (Exception $e) { + $this->displayError($e->getMessage()); + return; + } + + $variables = array(); + $variables['error_warning'] = ''; + $variables['success'] = ''; + + $this->load->model('sale/order'); + $order_info = $this->model_sale_order->getOrder($this->request->get['order_id']); + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $this->request->get['order_id']); + + $line_items = \PostFinanceCheckout\Service\LineItem::instance($this->registry)->getReducedItemsFromOrder($order_info, $transaction_info->getTransactionId(), + $transaction_info->getSpaceId()); + $this->document->setTitle($this->language->get('heading_refund')); + $this->document->addScript('view/javascript/postfinancecheckout/refund.js'); + + $variables += $this->loadLanguageVariables(); + $variables += $this->getAdminSurroundingTemplates(); + $variables += $this->getBreadcrumbs(); + + $variables['line_items'] = $line_items; + $variables['fixed_tax'] = false; + foreach ($line_items as $line_item) { + if (strpos($line_item->getUniqueId(), 'fixed_tax_') === 0) { + $variables['fixed_tax'] = $this->language->get('description_fixed_tax'); + break; + } + } + + $currency_info = \PostFinanceCheckout\Provider\Currency::instance($this->registry)->find($order_info['currency_code']); + if(!$currency_info) { + $this->displayError($this->language->get('error_currency')); + return; + } + + $variables['currency_step'] = pow(10, -$currency_info->getFractionDigits()); + $variables['currency_decimals'] = $currency_info->getFractionDigits(); + $variables['cancel'] = $this->createUrl('sale/order/info', + array( + \PostFinanceCheckoutVersionHelper::TOKEN => $this->session->data[\PostFinanceCheckoutVersionHelper::TOKEN], + 'order_id' => $this->request->get['order_id'] + )); + $variables['refund_action'] = $this->createUrl('extension/postfinancecheckout/refund/process', + array( + \PostFinanceCheckoutVersionHelper::TOKEN => $this->session->data[\PostFinanceCheckoutVersionHelper::TOKEN], + 'order_id' => $this->request->get['order_id'] + )); + + $this->response->setOutput($this->loadView("extension/postfinancecheckout/refund", $variables)); + } + + public function process(){ + try { + $this->validate(); + + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $this->request->get['order_id']); + + $running = \PostFinanceCheckout\Entity\RefundJob::loadRunningForOrder($this->registry, $transaction_info->getOrderId()); + if ($running->getId()) { + throw new \Exception($this->language->get('error_already_running')); + } + + if (!\PostFinanceCheckoutHelper::instance($this->registry)->isRefundPossible($transaction_info)) { + throw new \Exception($this->language->get('error_cannot_create_job')); + } + + $job = \PostFinanceCheckout\Service\Refund::instance($this->registry)->create($transaction_info, $this->request->post['item'], + isset($this->request->post['restock'])); + \PostFinanceCheckout\Service\Refund::instance($this->registry)->send($job); + + $this->response->redirect( + $this->createUrl('sale/order/info', + array( + \PostFinanceCheckoutVersionHelper::TOKEN => $this->request->get[\PostFinanceCheckoutVersionHelper::TOKEN], + 'order_id' => $this->request->get['order_id'] + ))); + } + catch (Exception $e) { + $this->displayError($e->getMessage()); + } + } + + private function getBreadcrumbs(){ + return array( + 'breadcrumbs' => array( + array( + 'href' => $this->createUrl('common/dashboard', + array( + \PostFinanceCheckoutVersionHelper::TOKEN => $this->session->data[\PostFinanceCheckoutVersionHelper::TOKEN] + )), + 'text' => $this->language->get('text_home'), + 'separator' => false + ), + array( + 'href' => $this->createUrl('sale/order/info', + array( + \PostFinanceCheckoutVersionHelper::TOKEN => $this->session->data[\PostFinanceCheckoutVersionHelper::TOKEN], + 'order_id' => $this->request->get['order_id'] + )), + 'text' => $this->language->get('entry_order'), + 'separator' => false + ), + array( + 'href' => '#', + 'text' => $this->language->get('entry_refund'), + 'separator' => false + ) + ) + ); + } + + private function loadLanguageVariables(){ + $this->load->language('extension/payment/postfinancecheckout'); + $variables = array( + 'heading_refund', + 'entry_refund', + 'description_refund', + 'entry_name', + 'entry_sku', + 'entry_type', + 'entry_tax', + 'entry_quantity', + 'entry_amount', + 'entry_total', + 'entry_item', + 'entry_id', + 'entry_unit_amount', + 'button_refund', + 'button_reset', + 'button_full', + 'button_cancel', + 'type_fee', + 'type_product', + 'type_discount', + 'entry_order', + 'entry_restock', + 'error_empty_refund', + 'type_shipping' + ); + $data = array(); + foreach ($variables as $key) { + $data[$key] = $this->language->get($key); + } + return $data; + } + + protected function getRequiredPermission(){ + return 'extension/postfinancecheckout/refund'; + } +} \ No newline at end of file diff --git a/upload/admin/controller/extension/postfinancecheckout/update.php b/upload/admin/controller/extension/postfinancecheckout/update.php new file mode 100644 index 0000000..768283d --- /dev/null +++ b/upload/admin/controller/extension/postfinancecheckout/update.php @@ -0,0 +1,56 @@ +response->addHeader('Content-Type: application/json'); + + try { + $this->validate(); + + $message = $this->language->get('message_refresh_success'); + + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $this->request->get['order_id']); + if ($transaction_info->getId() === null) { + throw new Exception($this->language->get('error_not_postfinancecheckout')); + } + + $completion_job = \PostFinanceCheckout\Entity\CompletionJob::loadNotSentForOrder($this->registry, $this->request->get['order_id']); + if ($completion_job->getId()) { + \PostFinanceCheckout\Service\Completion::instance($this->registry)->send($completion_job); + $message .= '
    ' . sprintf($this->language->get('message_resend_completion'), $completion_job->getId()); + } + + $void_job = \PostFinanceCheckout\Entity\VoidJob::loadNotSentForOrder($this->registry, $this->request->get['order_id']); + if ($void_job->getId()) { + \PostFinanceCheckout\Service\VoidJob::instance($this->registry)->send($void_job); + $message .= '
    ' . sprintf($this->language->get('message_resend_void'), $void_job->getId()); + } + + $refund_job = \PostFinanceCheckout\Entity\RefundJob::loadNotSentForOrder($this->registry, $this->request->get['order_id']); + if ($refund_job->getId()) { + \PostFinanceCheckout\Service\Refund::instance($this->registry)->send($refund_job); + $message .= '
    ' . sprintf($this->language->get('message_resend_refund'), $refund_job->getId()); + } + + $this->load->model('extension/postfinancecheckout/order'); + $new_buttons = $this->model_extension_postfinancecheckout_order->getButtons($this->request->get['order_id']); + + $this->response->setOutput(json_encode([ + 'success' => $message, + 'buttons' => $new_buttons + ])); + return; + } + catch (Exception $e) { + $this->response->setOutput(json_encode([ + 'error' => $e->getMessage() + ])); + } + } + + protected function getRequiredPermission(){ + return 'extension/postfinancecheckout/update'; + } +} \ No newline at end of file diff --git a/upload/admin/controller/extension/postfinancecheckout/void.php b/upload/admin/controller/extension/postfinancecheckout/void.php new file mode 100644 index 0000000..bb8b8a4 --- /dev/null +++ b/upload/admin/controller/extension/postfinancecheckout/void.php @@ -0,0 +1,45 @@ +response->addHeader('Content-Type: application/json'); + try { + $this->validate(); + + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $this->request->get['order_id']); + + $running = \PostFinanceCheckout\Entity\VoidJob::loadRunningForOrder($this->registry, $transaction_info->getOrderId()); + if ($running->getId()) { + throw new \Exception($this->language->get('error_already_running')); + } + + if (!\PostFinanceCheckoutHelper::instance($this->registry)->isCompletionPossible($transaction_info)) { + throw new \Exception($this->language->get('error_cannot_create_job')); + } + + $job = \PostFinanceCheckout\Service\VoidJob::instance($this->registry)->create($transaction_info); + \PostFinanceCheckout\Service\VoidJob::instance($this->registry)->send($job); + + $this->load->model('extension/postfinancecheckout/order'); + $new_buttons = $this->model_extension_postfinancecheckout_order->getButtons($this->request->get['order_id']); + + $this->response->setOutput( + json_encode( + array( + 'success' => sprintf($this->language->get('message_void_success'), $transaction_info->getTransactionId()), + 'buttons' => $new_buttons + ))); + } + catch (Exception $e) { + $this->response->setOutput(json_encode(array( + 'error' => $e->getMessage() + ))); + } + } + + protected function getRequiredPermission(){ + return 'extension/postfinancecheckout/void'; + } +} \ No newline at end of file diff --git a/upload/admin/language/en-gb/extension/payment/postfinancecheckout.php b/upload/admin/language/en-gb/extension/payment/postfinancecheckout.php new file mode 100644 index 0000000..86a56b1 --- /dev/null +++ b/upload/admin/language/en-gb/extension/payment/postfinancecheckout.php @@ -0,0 +1,247 @@ +PostFinance Checkout Website
    '; +// Wallee Configurations (user id, application key, spaces) +$_['title_global_settings'] = "Global credentials"; +$_['title_store_settings'] = "Store settings"; +$_['entry_user_id'] = "User Id"; +$_['help_user_id'] = "You can find your User ID in your PostFinance Checkout account. This setting is shared across all stores"; +$_['entry_application_key'] = "Application key"; +$_['help_application_key'] = "Your application key is displayed once when setting up PostFinance Checkout. This setting is shared across all stores."; +$_['entry_space_id'] = "Space Id"; +$_['help_space_id'] = "You can find your Space Id in your PostFinance Checkout account."; +$_['entry_space_view_id'] = "Space View Id"; +$_['help_space_view_id'] = "You can find your Space View Id in your PostFinance Checkout account."; + +// downloads +$_['title_downloads'] = "Documents"; +$_['entry_download_invoice'] = "Invoice download"; +$_['entry_download_packaging'] = "Packaging download"; +$_['description_download_invoice'] = "Allow customers to download their invoice"; +$_['description_download_packaging'] = "Allow customers to download their packaging slip"; + +// Debug +$_['title_debug'] = 'Debug'; +$_['entry_log_level'] = 'Log level'; +$_['help_log_level'] = 'Here you can set what sort of information should be logged, errors are always logged.'; +$_['log_level_error'] = 'Error'; +$_['log_level_debug'] = 'Debug'; + +// Status +$_['title_payment_status'] = "Status mapping"; +$_['entry_processing_status'] = "Processing status"; +$_['description_processing_status'] = "Status the order enters when the transaction is in the PostFinance Checkout processing or confirmed status. Here the user is entering their payment details, or the details are being processed."; +$_['entry_failed_status'] = "Failed status"; +$_['description_failed_status'] = "Status the order enters when the transaction is in the PostFinance Checkout failed status."; +$_['entry_authorized_status'] = "Authorized status"; +$_['description_authorized_status'] = "Status the order enters when the transaction is in the PostFinance Checkout authorized status. Here the amount has been reserved from the customers account, and must manually be completed."; +$_['entry_voided_status'] = "Voided status"; +$_['description_voided_status'] = "Status the order enters when the transaction is in the PostFinance Checkout voided status."; +$_['entry_completed_status'] = "Completed status"; +$_['description_completed_status'] = "Status the order enters when the transaction is in the PostFinance Checkout completed status. This status is only set if a manual decision for the fulfillment is required."; +$_['entry_fulfill_status'] = "Fulfill status"; +$_['description_fulfill_status'] = "Status the order enters when the transaction is in the PostFinance Checkout fulfill status."; +$_['entry_decline_status'] = "Decline status"; +$_['description_decline_status'] = "Status the order enters when the transaction is in the PostFinance Checkout declined status."; +$_['entry_refund_status'] = "Refund status"; +$_['description_refund_status'] = "Status the order enters when the transaction has been fully refunded."; + +// Modifications +$_['title_modifications'] = "Modifications"; +$_['entry_core'] = "Core"; +$_['description_core'] = "This modification helps create all required files, and modifies others so the dynamically created files can be correctly utilized."; +$_['entry_administration'] = "Administration"; +$_['description_administration'] = "This modification adds PostFinance Checkout information to the order view in the admin area, and allows completions, refunds and voids to be initiated through Opencart."; +$_['entry_email'] = "Email confirmation"; +$_['description_email'] = "You can deactivate or activate order confirmation emails by usage of our modification, 'Prevent confirmation email'. This modification affects only orders created using the PostFinance Checkout payment plugin."; +$_['entry_alerts'] = "Alerts / Notifications"; +$_['description_alerts'] = "This modification will add alerts to the top of the Opencart admin area which displays failed jobs and open manual tasks."; +$_['entry_pdf'] = "Frontend PDF"; +$_['description_pdf'] = "This modification allows customers to download invoices and packing slips in their order view. Can be restricted in the configurations."; +$_['entry_checkout'] = "QuickCheckout Compatibility"; +$_['description_checkout'] = "This modification adds compatibility to the Ajax QuickCheckout plugin. Does not affect core files."; + +// Migration +$_['title_migration'] = "Migration (current state)"; +$_['entry_migration_name'] = "Name"; +$_['entry_migration_version'] = "Version"; + +// other +$_['text_edit'] = "Edit"; +$_['text_payment'] = "Payment"; +$_['text_information'] = "Information"; + +$_['text_enabled'] = "Enabled"; +$_['text_disabled'] = "Disabled"; +$_['entry_status'] = "Status"; + +$_['message_saved_settings'] = "The settings have been saved successfully. Don't forget to refresh the modifications!"; + +// errors +$_['error_application_key_unset'] = "Application key must not be empty."; +$_['error_space_id_unset'] = "Space ID must not be empty."; +$_['error_space_id_numeric'] = "Space ID must be numeric."; +$_['error_space_view_id_numeric'] = "Space view ID must be numeric."; +$_['error_user_id_unset'] = "User ID must not be empty."; +$_['error_user_id_numeric'] = "User ID must be numeric."; + +/** + * =========================================================================================== + * Alerts + * =========================================================================================== + */ +$_['title_notifications'] = 'PostFinance Checkout notifications'; +$_['manual_task'] = 'Manual tasks'; +$_['failed_jobs'] = 'Failed operations'; +/** + * =========================================================================================== + * Update + * =========================================================================================== + */ +$_['message_refresh_success'] = 'Refresh succesfull'; +$_['message_resend_completion'] = 'Re-sent completion %s'; +$_['message_resend_void'] = 'Re-sent void %s'; +$_['message_resend_refund'] = 'Re-sent refund %s'; + +/** + * =========================================================================================== + * Labels (order info + * =========================================================================================== + */ + +// Labels +$_['label_default'] = 'Default'; +$_['label_postfinancecheckout_id'] = 'PostFinance Checkout ID'; +$_['description_postfinancecheckout_id'] = 'Internal ID used by PostFinance Checkout to identify resource'; +$_['label_postfinancecheckout_link'] = 'PostFinance Checkout Link'; +$_['description_postfinancecheckout_link'] = 'Open the resource in the PostFinance Checkout application'; +$_['label_status'] = 'Status'; +$_['label_amount'] = 'Amount'; +$_['label_failure'] = 'Failure reason'; +$_['description_failure'] = 'The reason why the operation failed.'; +$_['yes'] = 'Yes'; +$_['no'] = 'No'; + +// downloads +$_['description_downloads'] = 'Download documents generated by PostFinance Checkout directly in the store backend. These available documents depends on the settings of the plugin, as well as the state of the transaction.'; +$_['link_download'] = 'Download'; +$_['label_invoice'] = 'Invoice'; +$_['description_invoice'] = 'Here you may download the invoice document created by PostFinance Checkout for this transaction.'; +$_['label_packing'] = 'Packing slip'; +$_['description_packing'] = 'Here you may download the packing slip created by PostFinance Checkout for this transaction.'; + +// Transaction information +$_['title_transaction_information'] = 'Transaction information'; +$_['description_default_transaction_information'] = 'Default transaction information'; +$_['link_transaction'] = 'Open transaction'; + +// Completion +$_['title_completion'] = 'Completion information'; +$_['label_completion'] = 'Completion %s'; +$_['description_default_completion'] = 'Default completion information'; +$_['link_completion'] = 'Open completion'; +$_['description_refund_amount'] = 'Amount which was authorized by this operation'; + +// Refund +$_['title_refund'] = 'Refund information'; +$_['label_refund'] = 'Refund %s'; +$_['description_default_refund'] = 'Default refund information'; +$_['link_refund'] = 'Open refund'; +$_['label_external'] = 'External ID'; +$_['description_external'] = 'External ID transmitted to PostFinance Checkout. Will usually be r-{order id}-{refund number}'; +$_['description_refund_amount'] = 'Amount which was refunded by this operation'; +$_['label_restock'] = 'Restock'; +$_['description_restock'] = 'If this refund automatically restocked the available quantities in the store. This can be set when initiating the refund.'; + +// Void +$_['title_void'] = 'Void information'; +$_['label_void'] = 'Void %s'; +$_['description_default_void'] = 'Default void information'; +$_['link_void'] = 'Open void'; + + +/** + * =========================================================================================== + * Completion + * =========================================================================================== + */ +// errors +$_['error_permission'] = 'You do not have permission to access this page.'; +$_['error_already_running'] = 'A job is already running, please wait for it to complete.'; +$_['error_cannot_create_job'] = 'The job could not be created. The transaction may be in an invalid state.'; + +// success +$_['message_completion_success'] = 'Transaction %s: Completion has been created successfully.'; + + +/** + * =========================================================================================== + * Void + * =========================================================================================== + */ +// success +$_['message_void_success'] = 'Transaction %s: Void has been created successfully.'; + +/** + * =========================================================================================== + * Order info (buttons) + * =========================================================================================== + */ +$_['button_refund'] = 'Refund'; +$_['button_complete'] = 'Complete'; +$_['button_void'] = 'Void'; +$_['button_update'] = 'Update'; + +/** + * =========================================================================================== + * Refund page + * =========================================================================================== + */ +$_['heading_refund'] = 'PostFinance Checkout Refund'; + +// Description +$_['entry_refund'] = 'Refund'; +$_['description_refund'] = 'Here you can refund the transaction.'; +$_['description_fixed_tax'] = 'This transaction contains items with fixed taxes. These must refunded separately to their respective items.'; + +// breadcrumb +$_['entry_order'] = 'Order info'; + +// table headers +$_['entry_item'] = 'Line Item'; +$_['entry_type'] = 'Type'; +$_['entry_quantity'] = 'Quantity'; +$_['entry_tax'] = 'Taxes'; +$_['entry_amount'] = 'Amount incl. tax'; +$_['entry_unit_amount'] = 'Unit Price'; +$_['entry_total'] = 'Total'; + +// item labels +$_['entry_name'] = 'Name'; +$_['entry_sku'] = 'SKU'; +$_['entry_id'] = 'Unique ID'; + +$_['entry_restock'] = 'Restock products'; +$_['button_reset'] = 'Reset'; +$_['button_full'] = 'Full order'; +$_['button_refund'] = 'Refund'; +$_['button_cancel'] = 'Cancel'; + +// tooltip +$_['type_shipping'] = 'Shipping'; +$_['type_product'] = 'Product'; +$_['type_discount'] = 'Discount'; +$_['type_fee'] = 'Fee'; + +// errors +$_['error_order_id'] = 'No order id set.'; +$_['error_not_postfinancecheckout'] = 'The order id could not be matched to a PostFinance Checkout transaction.'; +$_['error_empty_refund'] = 'An empty refund is not permitted.'; +$_['error_currency'] = 'Could not retrieve currency information.'; diff --git a/upload/admin/model/extension/postfinancecheckout/alert.php b/upload/admin/model/extension/postfinancecheckout/alert.php new file mode 100644 index 0000000..12597cd --- /dev/null +++ b/upload/admin/model/extension/postfinancecheckout/alert.php @@ -0,0 +1,47 @@ +load->language('extension/payment/postfinancecheckout'); + return $this->language->get('title_notifications'); + } + + public function getAlerts(){ + if ($this->alerts == null) { + $this->load->language('extension/payment/postfinancecheckout'); + $this->alerts = array(); + $alert_entities = \PostFinanceCheckout\Entity\Alert::loadAll($this->registry); + + foreach ($alert_entities as $alert_entity) { + $this->alerts[] = array( + 'url' => $this->createUrl($alert_entity->getRoute(), + array( + \PostFinanceCheckoutVersionHelper::TOKEN => $this->session->data[\PostFinanceCheckoutVersionHelper::TOKEN] + )), + 'text' => $this->language->get($alert_entity->getKey()), + 'level' => $alert_entity->getLevel(), + 'count' => $alert_entity->getCount() + ); + } + } + return $this->alerts; + } + + public function getAlertCount(){ + $count = 0; + foreach ($this->getAlerts() as $alert) { + $count += $alert['count']; + } + return $count; + } +} \ No newline at end of file diff --git a/upload/admin/model/extension/postfinancecheckout/dynamic.php b/upload/admin/model/extension/postfinancecheckout/dynamic.php new file mode 100644 index 0000000..6c4e981 --- /dev/null +++ b/upload/admin/model/extension/postfinancecheckout/dynamic.php @@ -0,0 +1,241 @@ +load->model("user/user_group"); + $this->load->model("setting/setting"); + + $this->load->model("setting/store"); + $stores = $this->model_setting_store->getStores(); + $stores[] = array( + 'store_id' => 0 + ); // Add default store + foreach ($stores as $store) { + $configurations = $this->loadConfigurations($store['store_id']); + + foreach ($configurations as $configuration) { + $this->getExtensionModel()->install("payment", $configuration['code']); + + // Set permissions. + $this->model_user_user_group->addPermission($this->user->getGroupId(), "access", "extension/payment/" . $configuration['code']); + $this->model_user_user_group->addPermission($this->user->getGroupId(), "modify", "extension/payment/" . $configuration['code']); + + $settings = array(); + foreach ($configuration as $partialKey => $value) { + $settings[PostFinanceCheckoutVersionHelper::extractPaymentSettingCode($configuration['code']) . '_' . $partialKey] = $value; + } + $this->model_setting_setting->editSetting(PostFinanceCheckoutVersionHelper::extractPaymentSettingCode($configuration['code']), $settings, $store['store_id']); + + $this->createModel($configuration); + $this->createController($configuration); + $this->createAdminController($configuration); + $this->createLanguageFiles($configuration, 'admin'); + $this->createLanguageFiles($configuration, 'catalog'); + } + } + } + + /** + * Clears database data for given configurations - does not delete files (auto remove on next modification refresh) + */ + public function uninstall(){ + $this->load->model("user/user_group"); + $this->load->model("setting/setting"); + + $this->load->model("setting/store"); + $stores = $this->model_setting_store->getStores(); + $stores[] = array( + 'store_id' => 0 + ); // Add default store + + $configurations = $this->loadConfigurations(); + + foreach ($configurations as $configuration) { + $code = $configuration['code']; + + $this->getExtensionModel()->uninstall("payment", $code); + $this->model_user_user_group->removePermission($this->user->getGroupId(), "access", "extension/payment/" . $code); + $this->model_user_user_group->removePermission($this->user->getGroupId(), "modify", "extension/payment/" . $code); + + foreach ($stores as $store) { + $this->model_setting_setting->deleteSetting($code, $store['store_id']); + } + } + } + + private function loadConfigurations($store_id = null){ + $configurations = array(); + if ($store_id !== null) { + $space_id = \PostFinanceCheckoutHelper::instance($this->registry)->getSpaceId($store_id); + $methods = \PostFinanceCheckout\Entity\MethodConfiguration::loadBySpaceId($this->registry, $space_id); + } + else { + $methods = \PostFinanceCheckout\Entity\MethodConfiguration::loadAll($this->registry); + } + foreach ($methods as $method) { + $configurations[] = array( + 'code' => 'postfinancecheckout_' . $method->getConfigurationId(), + 'title' => $method->getTitle(), + 'sort_order' => $method->getSortOrder(), + 'terms' => '', + 'status' => $method->getState() == \PostFinanceCheckout\Entity\MethodConfiguration::STATE_ACTIVE + ); + } + return $configurations; + } + + /** + * + * @param array $configuration + * @param string $type admin or catalog + * @throws Exception + */ + private function createLanguageFiles(array $configuration, $type){ + $source = DIR_SYSTEM . 'library/postfinancecheckout/dynamic/' . $type . '/language.mock'; + + $target_base = DIR_MODIFICATION . $type . '/language/#code#/extension/payment/' . $configuration['code'] . '.php'; + + $this->load->model('localisation/language'); + $languages = $this->model_localisation_language->getLanguages(); + foreach ($languages as $code => $language) { + if (!$language['status']) { + continue; + } + $primary_language = \PostFinanceCheckout\Provider\Language::instance($this->registry)->findPrimary($code); + if ($primary_language === false) { + continue; + } + if (!isset($configuration['title'][$primary_language->getIetfCode()])) { + continue; + } + $target = str_replace('#code#', PostFinanceCheckoutVersionHelper::extractLanguageDirectory($language), $target_base); + + $content = str_replace(array( + '#Title#' + ), array( + $configuration['title'][$primary_language->getIetfCode()] + ), $this->loadSource($source)); + + // create directories as required + $this->createRequiredDirectories($target); + + if (file_put_contents($target, $content) === false) { + throw new Exception("Could not write to $target file."); + } + } + } + + private function createModel(array $configuration){ + $source = DIR_SYSTEM . 'library/postfinancecheckout/dynamic/catalog/model.mock'; + $target = DIR_MODIFICATION . 'catalog/model/extension/payment/' . $configuration['code'] . '.php'; + + // replace dummy data + $content = str_replace(array( + '#PaymentMethod#', + '#title#', + '#code#', + '#sort_order#', + '#terms#' + ), + array( + $this->getClassName('ModelExtensionPayment', $configuration['code']), + base64_encode(serialize($configuration['title'])), + $configuration['code'], + $configuration['sort_order'], + $configuration['terms'] + ), $this->loadSource($source)); + + // create directories as required + $this->createRequiredDirectories($target); + + if (file_put_contents($target, $content) === false) { + throw new Exception("Could not write to $target file."); + } + } + + private function createAdminController(array $configuration){ + $source = DIR_SYSTEM . 'library/postfinancecheckout/dynamic/admin/controller.mock'; + $target = DIR_MODIFICATION . 'admin/controller/extension/payment/' . $configuration['code'] . '.php'; + + // replace dummy data + $content = str_replace(array( + '#classname#', + '#code#' + ), array( + $this->getClassName('ControllerExtensionPayment', $configuration['code']), + $configuration['code'] + ), $this->loadSource($source)); + + // create directories as required + $this->createRequiredDirectories($target); + + if (file_put_contents($target, $content) === false) { + throw new Exception("Could not write to $target file."); + } + } + + private function createController(array $configuration){ + $source = DIR_SYSTEM . 'library/postfinancecheckout/dynamic/catalog/controller.mock'; + $target = DIR_MODIFICATION . 'catalog/controller/extension/payment/' . $configuration['code'] . '.php'; + + // replace dummy data + $content = str_replace(array( + '#classname#', + '#code#' + ), array( + $this->getClassName('ControllerExtensionPayment', $configuration['code']), + $configuration['code'] + ), $this->loadSource($source)); + + // create directories as required + $this->createRequiredDirectories($target); + + if (file_put_contents($target, $content) === false) { + throw new Exception("Could not write to $target file."); + } + } + + private function createRequiredDirectories($path){ + $path = substr($path, strlen(DIR_MODIFICATION)); + $required = explode(DIRECTORY_SEPARATOR, $path); + array_pop($required); // remove filename + $existing = rtrim(DIR_MODIFICATION, DIRECTORY_SEPARATOR); + + foreach ($required as $dir) { + if (!is_dir($existing . DIRECTORY_SEPARATOR . $dir)) { + if (!mkdir($existing . DIRECTORY_SEPARATOR . $dir)) { + throw new Exception("Could not create folder '$existing/$dir'."); + } + } + $existing .= DIRECTORY_SEPARATOR . $dir; + } + } + + private function loadSource($source){ + static $prototype = array(); + if (!isset($prototype[$source])) { + $prototype[$source] = $check = file_get_contents($source); + if (!$check) { + throw new Exception("Could not load prototype file. Please check the following file exists, and has read permissions set: '$source'."); + } + } + return $prototype[$source]; + } + + private function getClassName($base, $code){ + $class_name = $base; + foreach (explode('_', $code) as $part) { + $class_name .= ucfirst($part); + } + return $class_name; + } +} diff --git a/upload/admin/model/extension/postfinancecheckout/migration.php b/upload/admin/model/extension/postfinancecheckout/migration.php new file mode 100644 index 0000000..f753c78 --- /dev/null +++ b/upload/admin/model/extension/postfinancecheckout/migration.php @@ -0,0 +1,233 @@ + array( + 'name' => 'initialize', + 'version' => '1.0.0', + 'function' => 'oc_postfinancecheckout_update_1_0_0_initialize' + ) + ); + + public function migrate(){ + $currentVersion = '0.0.0'; + if ($this->config->has('postfinancecheckout_migration_version')) { + $currentVersion = $this->config->get('postfinancecheckout_migration_version'); + } + $startingVersion = $currentVersion; + + foreach (self::$migrations as $migration) { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionStart(); + try { + if (version_compare($currentVersion, $migration['version']) === -1) { + $this->{$migration['function']}(); + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionCommit(); + $currentVersion = $migration['version']; + } + } + catch (Exception $e) { + \PostFinanceCheckoutHelper::instance($this->registry)->dbTransactionRollback(); + break; + } + } + + // update version if required + if (version_compare($startingVersion, $currentVersion) !== 0) { + $this->load->model('setting/setting'); + $settings = $this->model_setting_setting->getSetting('postfinancecheckout'); + $settings['postfinancecheckout_migration_version'] = self::$migrations[$currentVersion]['version']; + $settings['postfinancecheckout_migration_name'] = self::$migrations[$currentVersion]['name']; + $this->model_setting_setting->editSetting('postfinancecheckout', $settings); + } + } + + /** + * Purges database & removes all postfinancecheckout related settings. + * Currently leaves modifications alone.. + */ + public function purge(){ + $this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "postfinancecheckout_transaction_info` CASCADE;"); + $this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "postfinancecheckout_method_configuration` CASCADE;"); + $this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "postfinancecheckout_completion_job` CASCADE;"); + $this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "postfinancecheckout_refund_job` CASCADE;"); + $this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "postfinancecheckout_void_job` CASCADE;"); + $this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "postfinancecheckout_alert` CASCADE;"); + $this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "postfinancecheckout_shipping_info` CASCADE;"); + $this->db->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "postfinancecheckout_token_info` CASCADE;"); + $this->load->model('setting/setting'); + $settings = $this->model_setting_setting->deleteSetting('postfinancecheckout'); + } + + private function oc_postfinancecheckout_update_1_0_0_initialize(){ + $this->db->query( + "CREATE TABLE `" . DB_PREFIX . "postfinancecheckout_transaction_info` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `transaction_id` bigint(20) unsigned NOT NULL, + `state` varchar(255) NOT NULL, + `space_id` bigint(20) unsigned NOT NULL, + `space_view_id` bigint(20) unsigned DEFAULT NULL, + `language` varchar(255) NOT NULL, + `currency` varchar(255) NOT NULL, + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + `authorization_amount` decimal(19,8) NOT NULL, + `image` varchar(512) DEFAULT NULL, + `labels` longtext, + `payment_method_id` bigint(20) unsigned DEFAULT NULL, + `connector_id` bigint(20) unsigned DEFAULT NULL, + `coupon_code` varchar(20) DEFAULT NULL, + `order_id` int(11) unsigned NOT NULL, + `failure_reason` longtext, + `locked_at` datetime, + PRIMARY KEY (`id`), + UNIQUE KEY `unq_transaction_id_space_id` (`transaction_id`,`space_id`), + UNIQUE KEY `unq_order_id` (`order_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); + + $this->db->query( + "CREATE TABLE `" . DB_PREFIX . "postfinancecheckout_token_info` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `token_id` bigint(20) unsigned NOT NULL, + `state` varchar(255) NOT NULL, + `space_id` bigint(20) unsigned NOT NULL, + `space_view_id` bigint(20) unsigned DEFAULT NULL, + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + `payment_method_id` bigint(20) unsigned DEFAULT NULL, + `connector_id` bigint(20) unsigned DEFAULT NULL, + `customer_id` bigint(20) unsigned DEFAULT NULL, + `name` varchar(255) NOT NULL, + `failure_reason` longtext, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); + + $this->db->query( + "CREATE TABLE `" . DB_PREFIX . "postfinancecheckout_method_configuration` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `state` varchar(255) NOT NULL, + `space_id` bigint(20) unsigned NOT NULL, + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + `configuration_id` bigint(20) unsigned NOT NULL, + `configuration_name` varchar(150) NOT NULL, + `title` longtext, + `description` longtext, + `image` varchar(512) DEFAULT NULL, + `sort_order` int(10), + PRIMARY KEY (`id`), + UNIQUE KEY `unq_space_id_configuration_id` (`space_id`,`configuration_id`), + KEY `idx_space_id` (`space_id`), + KEY `idx_configuration_id` (`configuration_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"); + + $this->db->query( + "CREATE TABLE `" . DB_PREFIX . "postfinancecheckout_completion_job` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `state` varchar(255) NOT NULL, + `job_id` bigint(20) unsigned, + `transaction_id` int(10) unsigned NOT NULL, + `space_id` bigint(20) unsigned NOT NULL, + `order_id` int(11) unsigned NOT NULL, + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + `amount` decimal(19,8), + `labels` longtext, + `failure_reason` longtext, + PRIMARY KEY (`id`), + KEY (`order_id`), + KEY (`state`), + KEY `idx_transaction_id_space_id` (`transaction_id`,`space_id`), + UNIQUE KEY `idx_job_id_space_id_transaction_id` (`job_id`,`space_id`, `transaction_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"); + + $this->db->query( + "CREATE TABLE `" . DB_PREFIX . "postfinancecheckout_refund_job` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `job_id` bigint(20) unsigned, + `state` varchar(255) NOT NULL, + `external_id` varchar(20) NOT NULL, + `transaction_id` int(10) unsigned NOT NULL, + `space_id` bigint(20) unsigned NOT NULL, + `order_id` int(11) unsigned NOT NULL, + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + `restock` varchar(1), + `reduction_items` longtext, + `amount` decimal(19,8), + `labels` longtext, + `failure_reason` longtext, + PRIMARY KEY (`id`), + KEY (`order_id`), + KEY (`state`), + KEY `idx_transaction_id_space_id` (`transaction_id`,`space_id`), + UNIQUE KEY `idx_job_id_space_id_transaction_id` (`job_id`,`space_id`, `transaction_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"); + + $this->db->query( + "CREATE TABLE `" . DB_PREFIX . "postfinancecheckout_void_job` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `state` varchar(255) NOT NULL, + `job_id` bigint(20) unsigned, + `transaction_id` int(10) unsigned NOT NULL, + `space_id` bigint(20) unsigned NOT NULL, + `order_id` int(11) unsigned NOT NULL, + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + `failure_reason` longtext, + `labels` longtext, + PRIMARY KEY (`id`), + KEY (`order_id`), + KEY (`state`), + KEY `idx_transaction_id_space_id` (`transaction_id`,`space_id`), + UNIQUE KEY `idx_job_id_space_id_transaction_id` (`job_id`,`space_id`, `transaction_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"); + + $this->db->query( + "CREATE TABLE `" . DB_PREFIX . "postfinancecheckout_shipping_info` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `transaction_id` int(10) unsigned NOT NULL, + `space_id` bigint(20) unsigned NOT NULL, + `tax_class_id` int(11) unsigned NOT NULL, + `cost` decimal(19,8) NOT NULL, + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `idx_transaction_id_space_id` (`transaction_id`,`space_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"); + + $this->db->query( + "CREATE TABLE `" . DB_PREFIX . "postfinancecheckout_alert` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `key` varchar(20) NOT NULL, + `count` int unsigned NOT NULL, + `route` varchar(50) NOT NULL, + `level` varchar(10) NOT NULL, + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY (`key`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"); + + $this->db->query( + "INSERT INTO `" . DB_PREFIX . "postfinancecheckout_alert` + (`key`, `count`, `route`, `level`, `created_at`, `updated_at`) VALUES + ('manual_task', 0, 'extension/postfinancecheckout/alert/manual', 'danger', NOW(), NOW()), + ('failed_jobs', 0, 'extension/postfinancecheckout/alert/failed', 'danger', NOW(), NOW());"); + + $this->db->query( + "CREATE TABLE `" . DB_PREFIX . "postfinancecheckout_cron` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `security_token` varchar(36) NOT NULL, + `error_message` varchar(255) NOT NULL, + `state` varchar(10) NOT NULL, + `date_scheduled` datetime NOT NULL, + `date_started` datetime NOT NULL, + `date_completed` datetime NOT NULL, + `constraint_key` smallint NOT NULL, + PRIMARY KEY (`id`), + KEY (`security_token`), + UNIQUE KEY (`constraint_key`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"); + } +} diff --git a/upload/admin/model/extension/postfinancecheckout/modification.php b/upload/admin/model/extension/postfinancecheckout/modification.php new file mode 100644 index 0000000..e572159 --- /dev/null +++ b/upload/admin/model/extension/postfinancecheckout/modification.php @@ -0,0 +1,109 @@ + $modification) { + $this->importModification($path . $modification['file'], $modification['default_status']); + } + } + + public function uninstall(){ + foreach (PostFinanceCheckoutVersionHelper::getModifications() as $code => $modification) { + $modification_info = $this->getModificationModel()->getModificationByCode($code); + + if ($modification_info) { + $this->getModificationModel()->deleteModification($modification_info['modification_id']); + } + } + } + + private function importModification($file, $status){ + $currentVersion = '0.0.0'; + $xml = file_get_contents($file); + + if ($xml) { + $dom = new DOMDocument('1.0', 'UTF-8'); + $dom->loadXml($xml); + + $name = $dom->getElementsByTagName('name')->item(0); + + if ($name) { + $name = $name->nodeValue; + } + else { + $name = ''; + } + + $code = $dom->getElementsByTagName('code')->item(0); + + if ($code) { + $code = $code->nodeValue; + + // Check to see if the modification is already installed or not. + $modification_info = $this->getModificationModel()->getModificationByCode($code); + + if ($modification_info) { + $currentVersion = $modification_info['version']; + } + } + else { + throw new Exception("Could not extract code from modification xml."); + } + + $author = $dom->getElementsByTagName('author')->item(0); + + if ($author) { + $author = $author->nodeValue; + } + else { + $author = ''; + } + + $version = $dom->getElementsByTagName('version')->item(0); + + if ($version) { + $version = $version->nodeValue; + } + else { + $version = ''; + } + + $link = $dom->getElementsByTagName('link')->item(0); + + if ($link) { + $link = $link->nodeValue; + } + else { + $link = ''; + } + + $modification_data = array( + 'name' => $name, + 'code' => $code, + 'author' => $author, + 'version' => $version, + 'link' => $link, + 'xml' => $xml, + 'status' => $status, + 'extension_install_id' => null + ); + + switch (version_compare($currentVersion, $version)) { + case -1: + if ($modification_info) { + $this->getModificationModel()->deleteModification($modification_info['modification_id']); + } + case 1: + $this->getModificationModel()->addModification($modification_data); + break; + case 0: + default: + break; + } + } + } +} \ No newline at end of file diff --git a/upload/admin/model/extension/postfinancecheckout/order.php b/upload/admin/model/extension/postfinancecheckout/order.php new file mode 100644 index 0000000..b989232 --- /dev/null +++ b/upload/admin/model/extension/postfinancecheckout/order.php @@ -0,0 +1,114 @@ +language->load('extension/payment/postfinancecheckout'); + $jobs = array_merge($this->getJobMessages(\PostFinanceCheckout\Entity\VoidJob::loadFailedCheckedForOrder($this->registry, $order_id)), + $this->getJobMessages(\PostFinanceCheckout\Entity\CompletionJob::loadFailedCheckedForOrder($this->registry, $order_id)), + $this->getJobMessages(\PostFinanceCheckout\Entity\RefundJob::loadFailedCheckedForOrder($this->registry, $order_id))); + \PostFinanceCheckout\Entity\VoidJob::markFailedAsDone($this->registry, $order_id); + \PostFinanceCheckout\Entity\CompletionJob::markFailedAsDone($this->registry, $order_id); + \PostFinanceCheckout\Entity\RefundJob::markFailedAsDone($this->registry, $order_id); + return $jobs; + } + + public function getButtons($order_id){ + $this->language->load('extension/payment/postfinancecheckout'); + if (!isset($this->request->get['order_id'])) { + return array(); + } + $transaction_info = \PostFinanceCheckout\Entity\TransactionInfo::loadByOrderId($this->registry, $order_id); + if ($transaction_info->getId() == null) { + return array(); + } + + $buttons = array(); + + if (\PostFinanceCheckoutHelper::instance($this->registry)->isCompletionPossible($transaction_info)) { + $buttons[] = $this->getCompletionButton(); + $buttons[] = $this->getVoidButton(); + } + + if (\PostFinanceCheckoutHelper::instance($this->registry)->isRefundPossible($transaction_info)) { + $buttons[] = $this->getRefundButton(); + } + + if (\PostFinanceCheckoutHelper::instance($this->registry)->hasRunningJobs($transaction_info)) { + $buttons[] = $this->getUpdateButton(); + } + + return $buttons; + } + + /** + * + * @param \PostFinanceCheckout\Entity\AbstractJob[] $jobs + */ + private function getJobMessages($jobs){ + $job_messages = array(); + foreach ($jobs as $job) { + $format = $this->language->get('postfinancecheckout_failed_job_message'); + + if ($job instanceof \PostFinanceCheckout\Entity\CompletionJob) { + $type = $this->language->get('completion_job'); + } + else if ($job instanceof \PostFinanceCheckout\Entity\RefundJob) { + $type = $this->language->get('refund_job'); + } + else if ($job instanceof \PostFinanceCheckout\Entity\VoidJob) { + $type = $this->language->get('void_job'); + } + else { + $type = get_class($job); + } + + $format = '%s %s: %s'; + $job_messages[] = sprintf($format, $type, $job->getJobId(), $job->getFailureReason()); + } + return $job_messages; + } + + private function getVoidButton(){ + return array( + 'text' => $this->language->get('button_void'), + 'icon' => 'ban', + 'route' => 'extension/postfinancecheckout/void' + ); + } + + private function getCompletionButton(){ + return array( + 'text' => $this->language->get('button_complete'), + 'icon' => 'check', + 'route' => 'extension/postfinancecheckout/completion' + ); + } + + private function getRefundButton(){ + return array( + 'text' => $this->language->get('button_refund'), + 'icon' => 'reply', + 'route' => 'extension/postfinancecheckout/refund/page' + ); + } + + private function getUpdateButton(){ + return array( + 'text' => $this->language->get('button_update'), + 'icon' => 'refresh', + 'route' => 'extension/postfinancecheckout/update' + ); + } +} \ No newline at end of file diff --git a/upload/admin/model/extension/postfinancecheckout/setup.php b/upload/admin/model/extension/postfinancecheckout/setup.php new file mode 100644 index 0000000..3ae1111 --- /dev/null +++ b/upload/admin/model/extension/postfinancecheckout/setup.php @@ -0,0 +1,88 @@ +load->model("extension/postfinancecheckout/migration"); + $this->load->model('extension/postfinancecheckout/modification'); + $this->load->model('extension/postfinancecheckout/dynamic'); + + $this->model_extension_postfinancecheckout_migration->migrate(); + + try { + $this->model_extension_postfinancecheckout_modification->install(); + $this->model_extension_postfinancecheckout_dynamic->install(); + } + catch (Exception $e) { + } + + $this->addPermissions(); + $this->addEvents(); + } + + public function synchronize($space_id){ + \PostFinanceCheckoutHelper::instance($this->registry)->refreshApiClient(); + \PostFinanceCheckoutHelper::instance($this->registry)->refreshWebhook(); + \PostFinanceCheckout\Service\MethodConfiguration::instance($this->registry)->synchronize($space_id); + } + + public function uninstall($purge = true){ + $this->load->model("extension/postfinancecheckout/migration"); + $this->load->model('extension/postfinancecheckout/modification'); + $this->load->model('extension/postfinancecheckout/dynamic'); + + $this->model_extension_postfinancecheckout_dynamic->uninstall(); + if ($purge) { + $this->model_extension_postfinancecheckout_migration->purge(); + } + $this->model_extension_postfinancecheckout_modification->uninstall(); + + $this->removeEvents(); + $this->removePermissions(); + } + + private function addEvents(){ + $this->getEventModel()->addEvent('postfinancecheckout_create_dynamic_files', 'admin/controller/extension/modification/refresh/after', + 'extension/postfinancecheckout/event/createMethodConfigurationFiles'); + $this->getEventModel()->addEvent('postfinancecheckout_can_save_order', 'catalog/model/checkout/order/editOrder/before', + 'extension/postfinancecheckout/event/canSaveOrder'); + $this->getEventModel()->addEvent('postfinancecheckout_update_items_after_edit', 'catalog/controller/api/order/edit/after', 'extension/postfinancecheckout/event/update'); + $this->getEventModel()->addEvent('postfinancecheckout_include_scripts', 'catalog/controller/common/header/before', + 'extension/postfinancecheckout/event/includeScripts'); + } + + private function removeEvents(){ + $this->getEventModel()->deleteEvent('postfinancecheckout_create_dynamic_files'); + $this->getEventModel()->deleteEvent('postfinancecheckout_can_save_order'); + $this->getEventModel()->deleteEvent('postfinancecheckout_update_items_after_edit'); + $this->getEventModel()->deleteEvent('postfinancecheckout_include_scripts'); + } + + /** + * Adds basic permissions. + * Permissions per payment method are added while creating the dynamic files. + */ + private function addPermissions(){ + $this->load->model("user/user_group"); + $this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'extension/postfinancecheckout/event'); + $this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'extension/postfinancecheckout/completion'); + $this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'extension/postfinancecheckout/void'); + $this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'extension/postfinancecheckout/refund'); + $this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'extension/postfinancecheckout/update'); + $this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'extension/postfinancecheckout/pdf'); + $this->model_user_user_group->addPermission($this->user->getGroupId(), 'access', 'extension/postfinancecheckout/alert'); + } + + private function removePermissions(){ + $this->load->model("user/user_group"); + $this->model_user_user_group->removePermission($this->user->getGroupId(), 'access', 'extension/postfinancecheckout/event'); + $this->model_user_user_group->removePermission($this->user->getGroupId(), 'access', 'extension/postfinancecheckout/completion'); + $this->model_user_user_group->removePermission($this->user->getGroupId(), 'access', 'extension/postfinancecheckout/void'); + $this->model_user_user_group->removePermission($this->user->getGroupId(), 'access', 'extension/postfinancecheckout/refund'); + $this->model_user_user_group->removePermission($this->user->getGroupId(), 'access', 'extension/postfinancecheckout/update'); + $this->model_user_user_group->removePermission($this->user->getGroupId(), 'access', 'extension/postfinancecheckout/pdf'); + $this->model_user_user_group->removePermission($this->user->getGroupId(), 'access', 'extension/postfinancecheckout/alert'); + } +} \ No newline at end of file diff --git a/upload/admin/view/image/extension/payment/postfinancecheckout.png b/upload/admin/view/image/extension/payment/postfinancecheckout.png new file mode 100644 index 0000000000000000000000000000000000000000..04a065bb14b4794a5058b131ce5e695dcad449c1 GIT binary patch literal 517 zcmV+g0{Z=lP)ChppFGU*K&gm{Iw5a;MX=Gun&j|q6d38{vTV)^Z)J+PPo{olk8w|82;2K z^8dYoB0@e+^8W`n+5bP5@WS!0gB;i`sL2rhuPmeTL zyutT<79Ti%K=FiO!B?Ol$c5`B@qsM?x%j|B-v5SLa{trACH}9T!2kc|Hcq@2fFk^Z zqa5})0J$1usEMvDm`(_k_eDMFzc{X@b{63u@ zk{{M{6R_Z#?EimX4iLnDUo?RYLr#vM6a%t!v@{*HfOZ%FLNF@#PRZum00000NkvXX Hu0mjfoI?YW literal 0 HcmV?d00001 diff --git a/upload/admin/view/javascript/postfinancecheckout/order.js b/upload/admin/view/javascript/postfinancecheckout/order.js new file mode 100644 index 0000000..7487a6d --- /dev/null +++ b/upload/admin/view/javascript/postfinancecheckout/order.js @@ -0,0 +1,43 @@ +function onPostFinanceCheckoutClick () { + var route = $(this).attr('data-route'); + $.ajax({ + dataType: "json", + url: 'index.php?route=' + route + '&token=' + document.adminToken + '&order_id=' + document.orderId, + success: function( json ) { + if (json['error']) { + $('#content > .container-fluid').prepend('