diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 8dd329a..8e61023 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -4,6 +4,8 @@ README.md api/openapi.yaml api_customers.go +api_default.go +api_disputes.go api_easy_split.go api_eligibility.go api_offers.go @@ -20,6 +22,7 @@ api_subscription.go api_token_vault.go client.go configuration.go +docs/AddressDetails.md docs/AdjustVendorBalanceRequest.md docs/AdjustVendorBalanceResponse.md docs/ApiError.md @@ -46,14 +49,19 @@ docs/CardlessEMI.md docs/CardlessEMIEntity.md docs/CardlessEMIPaymentMethod.md docs/CardlessEMIQueries.md +docs/CartDetails.md +docs/CartDetailsEntity.md +docs/CartItem.md docs/CashbackDetails.md docs/ChargesDetails.md +docs/ChargesEntity.md docs/CreateCustomerRequest.md docs/CreateLinkRequest.md docs/CreateOfferRequest.md docs/CreateOrderRequest.md docs/CreateOrderSettlementRequestBody.md docs/CreateOrderSettlementRequestBodyMetaData.md +docs/CreatePartnerVpaRequest.md docs/CreatePlanRequest.md docs/CreateSubscriptionPaymentRequest.md docs/CreateSubscriptionPaymentRequestCard.md @@ -75,10 +83,17 @@ docs/CreateVendorResponse.md docs/CryptogramEntity.md docs/CustomerDetails.md docs/CustomerDetailsCardlessEMI.md +docs/CustomerDetailsInDisputesEntity.md docs/CustomerDetailsResponse.md docs/CustomerEntity.md docs/CustomersAPI.md +docs/DefaultAPI.md +docs/DemapSoundboxVpaRequest.md docs/DiscountDetails.md +docs/DisputeEvidence.md +docs/DisputesAPI.md +docs/DisputesEntity.md +docs/DisputesEntityMerchantAccepted.md docs/EMIOffer.md docs/EMIPlansArray.md docs/ESOrderReconRequest.md @@ -105,6 +120,11 @@ docs/EligibilityPaymentMethodsEntityEntityDetails.md docs/EntitySimulationRequest.md docs/EntitySimulationResponse.md docs/ErrorDetailsInPaymentsEntity.md +docs/Evidence.md +docs/EvidenceSubmittedToContestDispute.md +docs/EvidencesToContestDispute.md +docs/ExtendedCartDetails.md +docs/ExtendedCustomerDetails.md docs/FetchReconRequest.md docs/FetchReconRequestFilters.md docs/FetchReconRequestPagination.md @@ -133,6 +153,7 @@ docs/OfferCard.md docs/OfferDetails.md docs/OfferEMI.md docs/OfferEntity.md +docs/OfferExtendedDetails.md docs/OfferFilters.md docs/OfferMeta.md docs/OfferNB.md @@ -146,10 +167,14 @@ docs/OfferValidations.md docs/OfferValidationsPaymentMethod.md docs/OfferWallet.md docs/OffersAPI.md +docs/OnboardSoundboxVpaRequest.md docs/OrderAuthenticateEntity.md docs/OrderAuthenticatePaymentRequest.md docs/OrderCreateRefundRequest.md +docs/OrderDeliveryStatus.md +docs/OrderDetailsInDisputesEntity.md docs/OrderEntity.md +docs/OrderExtendedDataEntity.md docs/OrderMeta.md docs/OrderPayData.md docs/OrdersAPI.md @@ -210,13 +235,19 @@ docs/SettlementReconciliationAPI.md docs/SettlementWebhook.md docs/SettlementWebhookDataEntity.md docs/SettlementsAPI.md +docs/ShipmentDetails.md docs/SimulateRequest.md docs/SimulationAPI.md docs/SimulationResponse.md docs/SoftPOSAPI.md +docs/SoundboxVpaEntity.md docs/SplitAfterPaymentRequest.md docs/SplitAfterPaymentRequestSplitInner.md docs/SplitAfterPaymentResponse.md +docs/SplitOrderReconSuccessResponse.md +docs/SplitOrderReconSuccessResponseSettlement.md +docs/SplitOrderReconSuccessResponseVendorsInner.md +docs/StaticQrResponseEntity.md docs/StaticSplitRequest.md docs/StaticSplitRequestSchemeInner.md docs/StaticSplitResponse.md @@ -244,6 +275,9 @@ docs/TransferDetails.md docs/TransferDetailsTagsInner.md docs/UPIAuthorizeDetails.md docs/UPIPaymentMethod.md +docs/UpdateOrderExtendedDataEntity.md +docs/UpdateOrderExtendedRequest.md +docs/UpdateSoundboxVpaRequest.md docs/UpdateTerminalEntity.md docs/UpdateTerminalRequest.md docs/UpdateTerminalRequestTerminalMeta.md @@ -256,6 +290,8 @@ docs/UploadPnachImageResponse.md docs/UploadTerminalDocs.md docs/UploadTerminalDocsEntity.md docs/UploadVendorDocumentsResponse.md +docs/VendorAdjustmentRequest.md +docs/VendorAdjustmentSuccessResponse.md docs/VendorBalance.md docs/VendorBalanceTransferCharges.md docs/VendorDocumentDownloadResponse.md @@ -267,6 +303,7 @@ docs/WalletOffer.md git_push.sh go.mod go.sum +model_address_details.go model_adjust_vendor_balance_request.go model_adjust_vendor_balance_response.go model_api_error.go @@ -293,14 +330,19 @@ model_cardless_emi.go model_cardless_emi_entity.go model_cardless_emi_payment_method.go model_cardless_emi_queries.go +model_cart_details.go +model_cart_details_entity.go +model_cart_item.go model_cashback_details.go model_charges_details.go +model_charges_entity.go model_create_customer_request.go model_create_link_request.go model_create_offer_request.go model_create_order_request.go model_create_order_settlement_request_body.go model_create_order_settlement_request_body_meta_data.go +model_create_partner_vpa_request.go model_create_plan_request.go model_create_subscription_payment_request.go model_create_subscription_payment_request_card.go @@ -322,9 +364,14 @@ model_create_vendor_response.go model_cryptogram_entity.go model_customer_details.go model_customer_details_cardless_emi.go +model_customer_details_in_disputes_entity.go model_customer_details_response.go model_customer_entity.go +model_demap_soundbox_vpa_request.go model_discount_details.go +model_dispute_evidence.go +model_disputes_entity.go +model_disputes_entity_merchant_accepted.go model_eligibility_cardless_emi_entity.go model_eligibility_fetch_cardless_emi_request.go model_eligibility_fetch_offers_request.go @@ -349,6 +396,11 @@ model_es_order_recon_response.go model_es_order_recon_response_data_inner.go model_es_order_recon_response_data_inner_order_splits_inner.go model_es_order_recon_response_data_inner_order_splits_inner_split_inner.go +model_evidence.go +model_evidence_submitted_to_contest_dispute.go +model_evidences_to_contest_dispute.go +model_extended_cart_details.go +model_extended_customer_details.go model_fetch_recon_request.go model_fetch_recon_request_filters.go model_fetch_recon_request_pagination.go @@ -377,6 +429,7 @@ model_offer_card.go model_offer_details.go model_offer_emi.go model_offer_entity.go +model_offer_extended_details.go model_offer_filters.go model_offer_meta.go model_offer_nb.go @@ -389,10 +442,14 @@ model_offer_upi.go model_offer_validations.go model_offer_validations_payment_method.go model_offer_wallet.go +model_onboard_soundbox_vpa_request.go model_order_authenticate_entity.go model_order_authenticate_payment_request.go model_order_create_refund_request.go +model_order_delivery_status.go +model_order_details_in_disputes_entity.go model_order_entity.go +model_order_extended_data_entity.go model_order_meta.go model_order_pay_data.go model_pay_order_entity.go @@ -446,11 +503,17 @@ model_settlement_recon_entity.go model_settlement_recon_entity_data_inner.go model_settlement_webhook.go model_settlement_webhook_data_entity.go +model_shipment_details.go model_simulate_request.go model_simulation_response.go +model_soundbox_vpa_entity.go model_split_after_payment_request.go model_split_after_payment_request_split_inner.go model_split_after_payment_response.go +model_split_order_recon_success_response.go +model_split_order_recon_success_response_settlement.go +model_split_order_recon_success_response_vendors_inner.go +model_static_qr_response_entity.go model_static_split_request.go model_static_split_request_scheme_inner.go model_static_split_response.go @@ -474,6 +537,9 @@ model_terminal_transaction_entity.go model_terminate_order_request.go model_transfer_details.go model_transfer_details_tags_inner.go +model_update_order_extended_data_entity.go +model_update_order_extended_request.go +model_update_soundbox_vpa_request.go model_update_terminal_entity.go model_update_terminal_request.go model_update_terminal_request_terminal_meta.go @@ -488,6 +554,8 @@ model_upload_pnach_image_response.go model_upload_terminal_docs.go model_upload_terminal_docs_entity.go model_upload_vendor_documents_response.go +model_vendor_adjustment_request.go +model_vendor_adjustment_success_response.go model_vendor_balance.go model_vendor_balance_transfer_charges.go model_vendor_document_download_response.go @@ -498,6 +566,8 @@ model_vendor_split.go model_wallet_offer.go response.go test/api_customers_test.go +test/api_default_test.go +test/api_disputes_test.go test/api_easy_split_test.go test/api_eligibility_test.go test/api_offers_test.go diff --git a/api_customers.go b/api_customers.go index 486a3ce..1549688 100644 --- a/api_customers.go +++ b/api_customers.go @@ -324,7 +324,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_default.go b/api_default.go new file mode 100644 index 0000000..505a0c6 --- /dev/null +++ b/api_default.go @@ -0,0 +1,920 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + +// Execute executes the request +// @return []StaticQrResponseEntity +func TerminalCreateQRCodes(xApiVersion *string, xRequestId *string, xIdempotencyKey *string, createPartnerVpaRequest *CreatePartnerVpaRequest, httpClient *http.Client) ([]StaticQrResponseEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []StaticQrResponseEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("TerminalCreateQRCodes") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/partners/merchant/qrcodes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + // body params + localVarPostBody = createPartnerVpaRequest + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context +// Execute executes the request +// @return []StaticQrResponseEntity +func TerminalCreateQRCodesWithContext(ctx context.Context, xApiVersion *string, xRequestId *string, xIdempotencyKey *string, createPartnerVpaRequest *CreatePartnerVpaRequest, httpClient *http.Client) ([]StaticQrResponseEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []StaticQrResponseEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("TerminalCreateQRCodes") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/partners/merchant/qrcodes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + // body params + localVarPostBody = createPartnerVpaRequest + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + + +// Execute executes the request +// @return []StaticQrResponseEntity +func TerminalGetQRCodes(xApiVersion *string, status *string, cfTerminalId *string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) ([]StaticQrResponseEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []StaticQrResponseEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("TerminalGetQRCodes") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/partners/merchant/qrcodes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + if status == nil { + return localVarReturnValue, nil, reportError("status is required and must be specified") + } + if cfTerminalId == nil { + return localVarReturnValue, nil, reportError("cfTerminalId is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "status", status, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "cf_terminal_id", cfTerminalId, "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context +// Execute executes the request +// @return []StaticQrResponseEntity +func TerminalGetQRCodesWithContext(ctx context.Context, xApiVersion *string, status *string, cfTerminalId *string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) ([]StaticQrResponseEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []StaticQrResponseEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("TerminalGetQRCodes") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/partners/merchant/qrcodes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + if status == nil { + return localVarReturnValue, nil, reportError("status is required and must be specified") + } + if cfTerminalId == nil { + return localVarReturnValue, nil, reportError("cfTerminalId is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "status", status, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "cf_terminal_id", cfTerminalId, "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + diff --git a/api_disputes.go b/api_disputes.go new file mode 100644 index 0000000..88e678e --- /dev/null +++ b/api_disputes.go @@ -0,0 +1,2253 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// Execute executes the request +// @return DisputesEntityMerchantAccepted +func PGAcceptDisputeByID(xApiVersion *string, disputeId int32, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*DisputesEntityMerchantAccepted, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DisputesEntityMerchantAccepted + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGAcceptDisputeByID") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/disputes/{dispute_id}/accept" + localVarPath = strings.Replace(localVarPath, "{"+"dispute_id"+"}", url.PathEscape(parameterValueToString(disputeId, "disputeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context +// Execute executes the request +// @return DisputesEntityMerchantAccepted +func PGAcceptDisputeByIDWithContext(ctx context.Context, xApiVersion *string, disputeId int32, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*DisputesEntityMerchantAccepted, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DisputesEntityMerchantAccepted + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGAcceptDisputeByID") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/disputes/{dispute_id}/accept" + localVarPath = strings.Replace(localVarPath, "{"+"dispute_id"+"}", url.PathEscape(parameterValueToString(disputeId, "disputeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + + +// Execute executes the request +// @return DisputesEntity +func PGFetchDisputeByID(xApiVersion *string, disputeId int32, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*DisputesEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DisputesEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGFetchDisputeByID") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/disputes/{dispute_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dispute_id"+"}", url.PathEscape(parameterValueToString(disputeId, "disputeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context +// Execute executes the request +// @return DisputesEntity +func PGFetchDisputeByIDWithContext(ctx context.Context, xApiVersion *string, disputeId int32, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*DisputesEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DisputesEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGFetchDisputeByID") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/disputes/{dispute_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dispute_id"+"}", url.PathEscape(parameterValueToString(disputeId, "disputeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + + +// Execute executes the request +// @return []DisputesEntity +func PGFetchOrderDisputes(xApiVersion *string, orderId string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) ([]DisputesEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []DisputesEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGFetchOrderDisputes") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/orders/{order_id}/disputes" + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterValueToString(orderId, "orderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context +// Execute executes the request +// @return []DisputesEntity +func PGFetchOrderDisputesWithContext(ctx context.Context, xApiVersion *string, orderId string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) ([]DisputesEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []DisputesEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGFetchOrderDisputes") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/orders/{order_id}/disputes" + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterValueToString(orderId, "orderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + + +// Execute executes the request +// @return []DisputesEntity +func PGFetchPaymentDisputes(xApiVersion *string, cfPaymentId int32, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) ([]DisputesEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []DisputesEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGFetchPaymentDisputes") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/payments/{cf_payment_id}/disputes" + localVarPath = strings.Replace(localVarPath, "{"+"cf_payment_id"+"}", url.PathEscape(parameterValueToString(cfPaymentId, "cfPaymentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context +// Execute executes the request +// @return []DisputesEntity +func PGFetchPaymentDisputesWithContext(ctx context.Context, xApiVersion *string, cfPaymentId int32, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) ([]DisputesEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []DisputesEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGFetchPaymentDisputes") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/payments/{cf_payment_id}/disputes" + localVarPath = strings.Replace(localVarPath, "{"+"cf_payment_id"+"}", url.PathEscape(parameterValueToString(cfPaymentId, "cfPaymentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + + +// Execute executes the request +// @return []DisputesEntity +func PGUploadDisputesDocuments(xApiVersion *string, disputeId int32, file *string, docType *string, xRequestId *string, xIdempotencyKey *string, note *string, httpClient *http.Client) ([]DisputesEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []DisputesEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGUploadDisputesDocuments") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/disputes/{dispute_id}/documents" + localVarPath = strings.Replace(localVarPath, "{"+"dispute_id"+"}", url.PathEscape(parameterValueToString(disputeId, "disputeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + if file == nil { + return localVarReturnValue, nil, reportError("file is required and must be specified") + } + if docType == nil { + return localVarReturnValue, nil, reportError("docType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + parameterAddToHeaderOrQuery(localVarFormParams, "file", file, "") + parameterAddToHeaderOrQuery(localVarFormParams, "doc_type", docType, "") + if note != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "note", note, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context +// Execute executes the request +// @return []DisputesEntity +func PGUploadDisputesDocumentsWithContext(ctx context.Context, xApiVersion *string, disputeId int32, file *string, docType *string, xRequestId *string, xIdempotencyKey *string, note *string, httpClient *http.Client) ([]DisputesEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []DisputesEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGUploadDisputesDocuments") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/disputes/{dispute_id}/documents" + localVarPath = strings.Replace(localVarPath, "{"+"dispute_id"+"}", url.PathEscape(parameterValueToString(disputeId, "disputeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + if file == nil { + return localVarReturnValue, nil, reportError("file is required and must be specified") + } + if docType == nil { + return localVarReturnValue, nil, reportError("docType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + parameterAddToHeaderOrQuery(localVarFormParams, "file", file, "") + parameterAddToHeaderOrQuery(localVarFormParams, "doc_type", docType, "") + if note != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "note", note, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + diff --git a/api_easy_split.go b/api_easy_split.go index f4a7e69..e39eead 100644 --- a/api_easy_split.go +++ b/api_easy_split.go @@ -21,6 +21,272 @@ import ( "os" ) +// Execute executes the request +// @return VendorAdjustmentSuccessResponse +func PGESCreateAdjustment(xApiVersion *string, vendorId string, xRequestId *string, xIdempotencyKey *string, vendorAdjustmentRequest *VendorAdjustmentRequest, httpClient *http.Client) (*VendorAdjustmentSuccessResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *VendorAdjustmentSuccessResponse + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGESCreateAdjustment") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/easy-split/vendors/{vendor_id}/adjustment" + localVarPath = strings.Replace(localVarPath, "{"+"vendor_id"+"}", url.PathEscape(parameterValueToString(vendorId, "vendorId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + // body params + localVarPostBody = vendorAdjustmentRequest + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context +// Execute executes the request +// @return VendorAdjustmentSuccessResponse +func PGESCreateAdjustmentWithContext(ctx context.Context, xApiVersion *string, vendorId string, xRequestId *string, xIdempotencyKey *string, vendorAdjustmentRequest *VendorAdjustmentRequest, httpClient *http.Client) (*VendorAdjustmentSuccessResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *VendorAdjustmentSuccessResponse + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGESCreateAdjustment") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/easy-split/vendors/{vendor_id}/adjustment" + localVarPath = strings.Replace(localVarPath, "{"+"vendor_id"+"}", url.PathEscape(parameterValueToString(vendorId, "vendorId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + // body params + localVarPostBody = vendorAdjustmentRequest + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + + // Execute executes the request // @return AdjustVendorBalanceResponse func PGESCreateOnDemandTransfer(xApiVersion *string, vendorId string, xRequestId *string, xIdempotencyKey *string, adjustVendorBalanceRequest *AdjustVendorBalanceRequest, httpClient *http.Client) (*AdjustVendorBalanceResponse, *http.Response, error) { @@ -232,7 +498,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -496,7 +762,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -746,7 +1012,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -994,7 +1260,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1256,7 +1522,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1526,7 +1792,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1788,7 +2054,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -2082,7 +2348,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -2378,7 +2644,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -2686,7 +2952,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -2982,7 +3248,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -3276,7 +3542,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -3330,3 +3596,265 @@ if XPartnerApiKey != nil { // With Context + +// Execute executes the request +// @return SplitOrderReconSuccessResponse +func PGSplitOrderRecon(xApiVersion *string, orderId string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*SplitOrderReconSuccessResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SplitOrderReconSuccessResponse + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGSplitOrderRecon") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/easy-split/orders/{order_id}" + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterValueToString(orderId, "orderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context +// Execute executes the request +// @return SplitOrderReconSuccessResponse +func PGSplitOrderReconWithContext(ctx context.Context, xApiVersion *string, orderId string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*SplitOrderReconSuccessResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SplitOrderReconSuccessResponse + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGSplitOrderRecon") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/easy-split/orders/{order_id}" + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterValueToString(orderId, "orderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + diff --git a/api_eligibility.go b/api_eligibility.go index 7eeccab..292d2bb 100644 --- a/api_eligibility.go +++ b/api_eligibility.go @@ -339,7 +339,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -804,7 +804,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1269,7 +1269,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1749,7 +1749,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_offers.go b/api_offers.go index 123a022..61c7c13 100644 --- a/api_offers.go +++ b/api_offers.go @@ -325,7 +325,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -767,7 +767,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_orders.go b/api_orders.go index 9f113d5..8d0c731 100644 --- a/api_orders.go +++ b/api_orders.go @@ -325,7 +325,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -767,7 +767,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -912,9 +912,676 @@ if XPartnerApiKey != nil { +// Execute executes the request +// @return OrderExtendedDataEntity +func PGFetchOrderExtendedData(xApiVersion *string, orderId string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*OrderExtendedDataEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrderExtendedDataEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGFetchOrderExtendedData") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/orders/{order_id}/extended" + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterValueToString(orderId, "orderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context +// Execute executes the request +// @return OrderExtendedDataEntity +func PGFetchOrderExtendedDataWithContext(ctx context.Context, xApiVersion *string, orderId string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*OrderExtendedDataEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrderExtendedDataEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGFetchOrderExtendedData") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/orders/{order_id}/extended" + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterValueToString(orderId, "orderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + + +// Execute executes the request +// @return OrderEntity +func PGTerminateOrder(xApiVersion *string, orderId string, terminateOrderRequest *TerminateOrderRequest, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*OrderEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OrderEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGTerminateOrder") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/orders/{order_id}" + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterValueToString(orderId, "orderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + if terminateOrderRequest == nil { + return localVarReturnValue, nil, reportError("terminateOrderRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + // body params + localVarPostBody = terminateOrderRequest + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context // Execute executes the request // @return OrderEntity -func PGTerminateOrder(xApiVersion *string, orderId string, terminateOrderRequest *TerminateOrderRequest, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*OrderEntity, *http.Response, error) { +func PGTerminateOrderWithContext(ctx context.Context, xApiVersion *string, orderId string, terminateOrderRequest *TerminateOrderRequest, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*OrderEntity, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} @@ -927,8 +1594,6 @@ func PGTerminateOrder(xApiVersion *string, orderId string, terminateOrderRequest defer CaptureError("PGTerminateOrder") } - ctx := context.Background() - client := NewAPIClient(NewConfiguration()) if httpClient != nil { client.cfg.HTTPClient = httpClient @@ -992,6 +1657,235 @@ if XClientSecret != nil { localVarHeaderParams["x-client-secret"] = *XClientSecret } +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + + +// Execute executes the request +// @return UpdateOrderExtendedDataEntity +func PGUpdateOrderExtendedData(xApiVersion *string, orderId string, updateOrderExtendedRequest *UpdateOrderExtendedRequest, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*UpdateOrderExtendedDataEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateOrderExtendedDataEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGUpdateOrderExtendedData") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/orders/{order_id}/extended" + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterValueToString(orderId, "orderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + if updateOrderExtendedRequest == nil { + return localVarReturnValue, nil, reportError("updateOrderExtendedRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + // body params + localVarPostBody = updateOrderExtendedRequest + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } @@ -1138,18 +2032,18 @@ if XPartnerApiKey != nil { // With Context // Execute executes the request -// @return OrderEntity -func PGTerminateOrderWithContext(ctx context.Context, xApiVersion *string, orderId string, terminateOrderRequest *TerminateOrderRequest, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*OrderEntity, *http.Response, error) { +// @return UpdateOrderExtendedDataEntity +func PGUpdateOrderExtendedDataWithContext(ctx context.Context, xApiVersion *string, orderId string, updateOrderExtendedRequest *UpdateOrderExtendedRequest, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*UpdateOrderExtendedDataEntity, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *OrderEntity + localVarReturnValue *UpdateOrderExtendedDataEntity ) if XEnableErrorAnalytics { SetupSentry(XEnvironment) - defer CaptureError("PGTerminateOrder") + defer CaptureError("PGUpdateOrderExtendedData") } client := NewAPIClient(NewConfiguration()) @@ -1159,7 +2053,7 @@ func PGTerminateOrderWithContext(ctx context.Context, xApiVersion *string, order localBasePath := client.cfg.Servers[int(XEnvironment)].URL - localVarPath := localBasePath + "/orders/{order_id}" + localVarPath := localBasePath + "/orders/{order_id}/extended" localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterValueToString(orderId, "orderId")), -1) localVarHeaderParams := make(map[string]string) @@ -1168,8 +2062,8 @@ func PGTerminateOrderWithContext(ctx context.Context, xApiVersion *string, order if xApiVersion == nil { return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") } - if terminateOrderRequest == nil { - return localVarReturnValue, nil, reportError("terminateOrderRequest is required and must be specified") + if updateOrderExtendedRequest == nil { + return localVarReturnValue, nil, reportError("updateOrderExtendedRequest is required and must be specified") } // to determine the Content-Type header @@ -1197,7 +2091,7 @@ func PGTerminateOrderWithContext(ctx context.Context, xApiVersion *string, order parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") } // body params - localVarPostBody = terminateOrderRequest + localVarPostBody = updateOrderExtendedRequest if XPartnerMerchantId != nil { localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId @@ -1219,7 +2113,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_payment_links.go b/api_payment_links.go index e6f94c3..464822a 100644 --- a/api_payment_links.go +++ b/api_payment_links.go @@ -317,7 +317,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -767,7 +767,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1224,7 +1224,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1687,7 +1687,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_payments.go b/api_payments.go index 8bbf7da..f2af317 100644 --- a/api_payments.go +++ b/api_payments.go @@ -342,7 +342,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -824,7 +824,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1298,7 +1298,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1770,7 +1770,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -2250,7 +2250,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_pg_reconciliation.go b/api_pg_reconciliation.go index 25f36f4..8531f35 100644 --- a/api_pg_reconciliation.go +++ b/api_pg_reconciliation.go @@ -336,7 +336,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_refunds.go b/api_refunds.go index 1af1f21..5d497ce 100644 --- a/api_refunds.go +++ b/api_refunds.go @@ -342,7 +342,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -816,7 +816,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1273,7 +1273,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_settlement_reconciliation.go b/api_settlement_reconciliation.go index f15bec3..15f806c 100644 --- a/api_settlement_reconciliation.go +++ b/api_settlement_reconciliation.go @@ -336,7 +336,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -798,7 +798,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_settlements.go b/api_settlements.go index a82e30c..8dd7284 100644 --- a/api_settlements.go +++ b/api_settlements.go @@ -274,7 +274,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -686,7 +686,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_simulation.go b/api_simulation.go index 4ef3b2f..8a69f80 100644 --- a/api_simulation.go +++ b/api_simulation.go @@ -287,7 +287,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -677,7 +677,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_soft_pos.go b/api_soft_pos.go index 6459a06..7729e2e 100644 --- a/api_soft_pos.go +++ b/api_soft_pos.go @@ -325,7 +325,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -775,7 +775,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -920,19 +920,1823 @@ if XPartnerApiKey != nil { +// Execute executes the request +// @return []SoundboxVpaEntity +func SposDemapSoundboxVpa(xApiVersion *string, demapSoundboxVpaRequest *DemapSoundboxVpaRequest, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) ([]SoundboxVpaEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []SoundboxVpaEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("SposDemapSoundboxVpa") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/terminal/demap/soundbox" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + if demapSoundboxVpaRequest == nil { + return localVarReturnValue, nil, reportError("demapSoundboxVpaRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + // body params + localVarPostBody = demapSoundboxVpaRequest + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context +// Execute executes the request +// @return []SoundboxVpaEntity +func SposDemapSoundboxVpaWithContext(ctx context.Context, xApiVersion *string, demapSoundboxVpaRequest *DemapSoundboxVpaRequest, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) ([]SoundboxVpaEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []SoundboxVpaEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("SposDemapSoundboxVpa") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/terminal/demap/soundbox" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + if demapSoundboxVpaRequest == nil { + return localVarReturnValue, nil, reportError("demapSoundboxVpaRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + // body params + localVarPostBody = demapSoundboxVpaRequest + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + + +// Execute executes the request +// @return TerminalEntity +func SposFetchTerminal(xApiVersion *string, terminalPhoneNo string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*TerminalEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TerminalEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("SposFetchTerminal") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/terminal/{terminal_phone_no}" + localVarPath = strings.Replace(localVarPath, "{"+"terminal_phone_no"+"}", url.PathEscape(parameterValueToString(terminalPhoneNo, "terminalPhoneNo")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context // Execute executes the request // @return TerminalEntity -func SposFetchTerminal(xApiVersion *string, terminalPhoneNo string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*TerminalEntity, *http.Response, error) { +func SposFetchTerminalWithContext(ctx context.Context, xApiVersion *string, terminalPhoneNo string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*TerminalEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TerminalEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("SposFetchTerminal") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/terminal/{terminal_phone_no}" + localVarPath = strings.Replace(localVarPath, "{"+"terminal_phone_no"+"}", url.PathEscape(parameterValueToString(terminalPhoneNo, "terminalPhoneNo")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + + +// Execute executes the request +// @return []FetchTerminalQRCodesEntity +func SposFetchTerminalQRCodes(xApiVersion *string, terminalPhoneNo *string, cfTerminalId *string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) ([]FetchTerminalQRCodesEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []FetchTerminalQRCodesEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("SposFetchTerminalQRCodes") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/terminal/qrcodes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + if terminalPhoneNo == nil { + return localVarReturnValue, nil, reportError("terminalPhoneNo is required and must be specified") + } + if cfTerminalId == nil { + return localVarReturnValue, nil, reportError("cfTerminalId is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "terminal_phone_no", terminalPhoneNo, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "cf_terminal_id", cfTerminalId, "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context +// Execute executes the request +// @return []FetchTerminalQRCodesEntity +func SposFetchTerminalQRCodesWithContext(ctx context.Context, xApiVersion *string, terminalPhoneNo *string, cfTerminalId *string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) ([]FetchTerminalQRCodesEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []FetchTerminalQRCodesEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("SposFetchTerminalQRCodes") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/terminal/qrcodes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + if terminalPhoneNo == nil { + return localVarReturnValue, nil, reportError("terminalPhoneNo is required and must be specified") + } + if cfTerminalId == nil { + return localVarReturnValue, nil, reportError("cfTerminalId is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "terminal_phone_no", terminalPhoneNo, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "cf_terminal_id", cfTerminalId, "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + + +// Execute executes the request +// @return []SoundboxVpaEntity +func SposFetchTerminalSoundboxVpa(xApiVersion *string, deviceSerialNo *string, cfTerminalId *string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) ([]SoundboxVpaEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []SoundboxVpaEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("SposFetchTerminalSoundboxVpa") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/terminal/soundbox/qrcodes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + if deviceSerialNo == nil { + return localVarReturnValue, nil, reportError("deviceSerialNo is required and must be specified") + } + if cfTerminalId == nil { + return localVarReturnValue, nil, reportError("cfTerminalId is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "device_serial_no", deviceSerialNo, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "cf_terminal_id", cfTerminalId, "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// With Context +// Execute executes the request +// @return []SoundboxVpaEntity +func SposFetchTerminalSoundboxVpaWithContext(ctx context.Context, xApiVersion *string, deviceSerialNo *string, cfTerminalId *string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) ([]SoundboxVpaEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []SoundboxVpaEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("SposFetchTerminalSoundboxVpa") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/terminal/soundbox/qrcodes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if xApiVersion == nil { + return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") + } + if deviceSerialNo == nil { + return localVarReturnValue, nil, reportError("deviceSerialNo is required and must be specified") + } + if cfTerminalId == nil { + return localVarReturnValue, nil, reportError("cfTerminalId is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "device_serial_no", deviceSerialNo, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "cf_terminal_id", cfTerminalId, "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-api-version", xApiVersion, "") + if xRequestId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-request-id", xRequestId, "") + } + if xIdempotencyKey != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") + } + +if XPartnerMerchantId != nil { + localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId +} + +if XClientId != nil { + localVarHeaderParams["x-client-id"] = *XClientId +} + +if XClientSignature != nil { + localVarHeaderParams["x-client-signature"] = *XClientSignature +} + +if XClientSecret != nil { + localVarHeaderParams["x-client-secret"] = *XClientSecret +} + +if XPartnerApiKey != nil { + localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" + req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequestError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AuthenticationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ApiError404 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ApiError409 + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v IdempotencyError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v RateLimitError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ApiError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + if v.Message != nil { + newErr.error = *v.Message + } else { + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} +// With Context + + + +// Execute executes the request +// @return TerminalPaymentEntity +func SposFetchTerminalTransaction(xApiVersion *string, utr *string, cfTerminalId string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*TerminalPaymentEntity, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *TerminalEntity + localVarReturnValue *TerminalPaymentEntity ) if XEnableErrorAnalytics { SetupSentry(XEnvironment) - defer CaptureError("SposFetchTerminal") + defer CaptureError("SposFetchTerminalTransaction") } ctx := context.Background() @@ -944,8 +2748,8 @@ func SposFetchTerminal(xApiVersion *string, terminalPhoneNo string, xRequestId localBasePath := client.cfg.Servers[int(XEnvironment)].URL - localVarPath := localBasePath + "/terminal/{terminal_phone_no}" - localVarPath = strings.Replace(localVarPath, "{"+"terminal_phone_no"+"}", url.PathEscape(parameterValueToString(terminalPhoneNo, "terminalPhoneNo")), -1) + localVarPath := localBasePath + "/terminal/{cf_terminal_id}/payments" + localVarPath = strings.Replace(localVarPath, "{"+"cf_terminal_id"+"}", url.PathEscape(parameterValueToString(cfTerminalId, "cfTerminalId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -953,7 +2757,11 @@ func SposFetchTerminal(xApiVersion *string, terminalPhoneNo string, xRequestId if xApiVersion == nil { return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") } + if utr == nil { + return localVarReturnValue, nil, reportError("utr is required and must be specified") + } + parameterAddToHeaderOrQuery(localVarQueryParams, "utr", utr, "") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1141,18 +2949,18 @@ if XPartnerApiKey != nil { // With Context // Execute executes the request -// @return TerminalEntity -func SposFetchTerminalWithContext(ctx context.Context, xApiVersion *string, terminalPhoneNo string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*TerminalEntity, *http.Response, error) { +// @return TerminalPaymentEntity +func SposFetchTerminalTransactionWithContext(ctx context.Context, xApiVersion *string, utr *string, cfTerminalId string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*TerminalPaymentEntity, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *TerminalEntity + localVarReturnValue *TerminalPaymentEntity ) if XEnableErrorAnalytics { SetupSentry(XEnvironment) - defer CaptureError("SposFetchTerminal") + defer CaptureError("SposFetchTerminalTransaction") } client := NewAPIClient(NewConfiguration()) @@ -1162,8 +2970,8 @@ func SposFetchTerminalWithContext(ctx context.Context, xApiVersion *string, term localBasePath := client.cfg.Servers[int(XEnvironment)].URL - localVarPath := localBasePath + "/terminal/{terminal_phone_no}" - localVarPath = strings.Replace(localVarPath, "{"+"terminal_phone_no"+"}", url.PathEscape(parameterValueToString(terminalPhoneNo, "terminalPhoneNo")), -1) + localVarPath := localBasePath + "/terminal/{cf_terminal_id}/payments" + localVarPath = strings.Replace(localVarPath, "{"+"cf_terminal_id"+"}", url.PathEscape(parameterValueToString(cfTerminalId, "cfTerminalId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1171,7 +2979,11 @@ func SposFetchTerminalWithContext(ctx context.Context, xApiVersion *string, term if xApiVersion == nil { return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") } + if utr == nil { + return localVarReturnValue, nil, reportError("utr is required and must be specified") + } + parameterAddToHeaderOrQuery(localVarQueryParams, "utr", utr, "") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1217,7 +3029,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1363,18 +3175,18 @@ if XPartnerApiKey != nil { // Execute executes the request -// @return []FetchTerminalQRCodesEntity -func SposFetchTerminalQRCodes(xApiVersion *string, terminalPhoneNo *string, cfTerminalId *string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) ([]FetchTerminalQRCodesEntity, *http.Response, error) { +// @return SoundboxVpaEntity +func SposOnboardSoundboxVpa(xApiVersion *string, onboardSoundboxVpaRequest *OnboardSoundboxVpaRequest, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*SoundboxVpaEntity, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue []FetchTerminalQRCodesEntity + localVarReturnValue *SoundboxVpaEntity ) if XEnableErrorAnalytics { SetupSentry(XEnvironment) - defer CaptureError("SposFetchTerminalQRCodes") + defer CaptureError("SposOnboardSoundboxVpa") } ctx := context.Background() @@ -1386,7 +3198,7 @@ func SposFetchTerminalQRCodes(xApiVersion *string, terminalPhoneNo *string, cfTe localBasePath := client.cfg.Servers[int(XEnvironment)].URL - localVarPath := localBasePath + "/terminal/qrcodes" + localVarPath := localBasePath + "/terminal/soundbox" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1394,17 +3206,12 @@ func SposFetchTerminalQRCodes(xApiVersion *string, terminalPhoneNo *string, cfTe if xApiVersion == nil { return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") } - if terminalPhoneNo == nil { - return localVarReturnValue, nil, reportError("terminalPhoneNo is required and must be specified") - } - if cfTerminalId == nil { - return localVarReturnValue, nil, reportError("cfTerminalId is required and must be specified") + if onboardSoundboxVpaRequest == nil { + return localVarReturnValue, nil, reportError("onboardSoundboxVpaRequest is required and must be specified") } - parameterAddToHeaderOrQuery(localVarQueryParams, "terminal_phone_no", terminalPhoneNo, "") - parameterAddToHeaderOrQuery(localVarQueryParams, "cf_terminal_id", cfTerminalId, "") // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -1427,6 +3234,8 @@ func SposFetchTerminalQRCodes(xApiVersion *string, terminalPhoneNo *string, cfTe if xIdempotencyKey != nil { parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") } + // body params + localVarPostBody = onboardSoundboxVpaRequest if XPartnerMerchantId != nil { localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId @@ -1590,18 +3399,18 @@ if XPartnerApiKey != nil { // With Context // Execute executes the request -// @return []FetchTerminalQRCodesEntity -func SposFetchTerminalQRCodesWithContext(ctx context.Context, xApiVersion *string, terminalPhoneNo *string, cfTerminalId *string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) ([]FetchTerminalQRCodesEntity, *http.Response, error) { +// @return SoundboxVpaEntity +func SposOnboardSoundboxVpaWithContext(ctx context.Context, xApiVersion *string, onboardSoundboxVpaRequest *OnboardSoundboxVpaRequest, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*SoundboxVpaEntity, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue []FetchTerminalQRCodesEntity + localVarReturnValue *SoundboxVpaEntity ) if XEnableErrorAnalytics { SetupSentry(XEnvironment) - defer CaptureError("SposFetchTerminalQRCodes") + defer CaptureError("SposOnboardSoundboxVpa") } client := NewAPIClient(NewConfiguration()) @@ -1611,7 +3420,7 @@ func SposFetchTerminalQRCodesWithContext(ctx context.Context, xApiVersion *strin localBasePath := client.cfg.Servers[int(XEnvironment)].URL - localVarPath := localBasePath + "/terminal/qrcodes" + localVarPath := localBasePath + "/terminal/soundbox" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1619,17 +3428,12 @@ func SposFetchTerminalQRCodesWithContext(ctx context.Context, xApiVersion *strin if xApiVersion == nil { return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") } - if terminalPhoneNo == nil { - return localVarReturnValue, nil, reportError("terminalPhoneNo is required and must be specified") - } - if cfTerminalId == nil { - return localVarReturnValue, nil, reportError("cfTerminalId is required and must be specified") + if onboardSoundboxVpaRequest == nil { + return localVarReturnValue, nil, reportError("onboardSoundboxVpaRequest is required and must be specified") } - parameterAddToHeaderOrQuery(localVarQueryParams, "terminal_phone_no", terminalPhoneNo, "") - parameterAddToHeaderOrQuery(localVarQueryParams, "cf_terminal_id", cfTerminalId, "") // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -1652,6 +3456,8 @@ func SposFetchTerminalQRCodesWithContext(ctx context.Context, xApiVersion *strin if xIdempotencyKey != nil { parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") } + // body params + localVarPostBody = onboardSoundboxVpaRequest if XPartnerMerchantId != nil { localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId @@ -1673,7 +3479,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1819,18 +3625,18 @@ if XPartnerApiKey != nil { // Execute executes the request -// @return TerminalPaymentEntity -func SposFetchTerminalTransaction(xApiVersion *string, utr *string, cfTerminalId string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*TerminalPaymentEntity, *http.Response, error) { +// @return SoundboxVpaEntity +func SposUpdateSoundboxVpa(xApiVersion *string, cfTerminalId string, updateSoundboxVpaRequest *UpdateSoundboxVpaRequest, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*SoundboxVpaEntity, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue *TerminalPaymentEntity + localVarReturnValue *SoundboxVpaEntity ) if XEnableErrorAnalytics { SetupSentry(XEnvironment) - defer CaptureError("SposFetchTerminalTransaction") + defer CaptureError("SposUpdateSoundboxVpa") } ctx := context.Background() @@ -1842,7 +3648,7 @@ func SposFetchTerminalTransaction(xApiVersion *string, utr *string, cfTerminalId localBasePath := client.cfg.Servers[int(XEnvironment)].URL - localVarPath := localBasePath + "/terminal/{cf_terminal_id}/payments" + localVarPath := localBasePath + "/terminal/{cf_terminal_id}/soundbox" localVarPath = strings.Replace(localVarPath, "{"+"cf_terminal_id"+"}", url.PathEscape(parameterValueToString(cfTerminalId, "cfTerminalId")), -1) localVarHeaderParams := make(map[string]string) @@ -1851,13 +3657,12 @@ func SposFetchTerminalTransaction(xApiVersion *string, utr *string, cfTerminalId if xApiVersion == nil { return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") } - if utr == nil { - return localVarReturnValue, nil, reportError("utr is required and must be specified") + if updateSoundboxVpaRequest == nil { + return localVarReturnValue, nil, reportError("updateSoundboxVpaRequest is required and must be specified") } - parameterAddToHeaderOrQuery(localVarQueryParams, "utr", utr, "") // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -1880,6 +3685,8 @@ func SposFetchTerminalTransaction(xApiVersion *string, utr *string, cfTerminalId if xIdempotencyKey != nil { parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") } + // body params + localVarPostBody = updateSoundboxVpaRequest if XPartnerMerchantId != nil { localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId @@ -2043,18 +3850,18 @@ if XPartnerApiKey != nil { // With Context // Execute executes the request -// @return TerminalPaymentEntity -func SposFetchTerminalTransactionWithContext(ctx context.Context, xApiVersion *string, utr *string, cfTerminalId string, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*TerminalPaymentEntity, *http.Response, error) { +// @return SoundboxVpaEntity +func SposUpdateSoundboxVpaWithContext(ctx context.Context, xApiVersion *string, cfTerminalId string, updateSoundboxVpaRequest *UpdateSoundboxVpaRequest, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*SoundboxVpaEntity, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile - localVarReturnValue *TerminalPaymentEntity + localVarReturnValue *SoundboxVpaEntity ) if XEnableErrorAnalytics { SetupSentry(XEnvironment) - defer CaptureError("SposFetchTerminalTransaction") + defer CaptureError("SposUpdateSoundboxVpa") } client := NewAPIClient(NewConfiguration()) @@ -2064,7 +3871,7 @@ func SposFetchTerminalTransactionWithContext(ctx context.Context, xApiVersion *s localBasePath := client.cfg.Servers[int(XEnvironment)].URL - localVarPath := localBasePath + "/terminal/{cf_terminal_id}/payments" + localVarPath := localBasePath + "/terminal/{cf_terminal_id}/soundbox" localVarPath = strings.Replace(localVarPath, "{"+"cf_terminal_id"+"}", url.PathEscape(parameterValueToString(cfTerminalId, "cfTerminalId")), -1) localVarHeaderParams := make(map[string]string) @@ -2073,13 +3880,12 @@ func SposFetchTerminalTransactionWithContext(ctx context.Context, xApiVersion *s if xApiVersion == nil { return localVarReturnValue, nil, reportError("xApiVersion is required and must be specified") } - if utr == nil { - return localVarReturnValue, nil, reportError("utr is required and must be specified") + if updateSoundboxVpaRequest == nil { + return localVarReturnValue, nil, reportError("updateSoundboxVpaRequest is required and must be specified") } - parameterAddToHeaderOrQuery(localVarQueryParams, "utr", utr, "") // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -2102,6 +3908,8 @@ func SposFetchTerminalTransactionWithContext(ctx context.Context, xApiVersion *s if xIdempotencyKey != nil { parameterAddToHeaderOrQuery(localVarHeaderParams, "x-idempotency-key", xIdempotencyKey, "") } + // body params + localVarPostBody = updateSoundboxVpaRequest if XPartnerMerchantId != nil { localVarHeaderParams["x-partner-merchantid"] = *XPartnerMerchantId @@ -2123,7 +3931,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -2575,7 +4383,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -3027,7 +4835,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -3479,7 +5287,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_subscription.go b/api_subscription.go index cfc0088..070ba9b 100644 --- a/api_subscription.go +++ b/api_subscription.go @@ -311,7 +311,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -731,7 +731,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1153,7 +1153,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1573,7 +1573,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1970,7 +1970,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -2352,7 +2352,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -2736,7 +2736,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -3133,7 +3133,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -3532,7 +3532,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -3939,7 +3939,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -4348,7 +4348,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -4801,7 +4801,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -5221,7 +5221,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api_token_vault.go b/api_token_vault.go index d066145..edd3b0d 100644 --- a/api_token_vault.go +++ b/api_token_vault.go @@ -334,7 +334,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -808,7 +808,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1273,7 +1273,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1732,7 +1732,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.3" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.3.5" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/configuration.go b/configuration.go index 68c2760..55f166e 100644 --- a/configuration.go +++ b/configuration.go @@ -92,7 +92,7 @@ func SetupSentry(environment CFEnvironment) { AttachStacktrace: true, EnableTracing: true, Environment: env, - Release: "4.3.3", + Release: "4.3.5", BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event { delete(event.Contexts, "device") delete(event.Contexts, "os") @@ -192,7 +192,7 @@ type Configuration struct { func NewConfiguration() *Configuration { cfg := &Configuration{ DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/4.3.3/go", + UserAgent: "OpenAPI-Generator/4.3.5/go", Debug: false, Servers: ServerConfigurations{ { diff --git a/docs/AddressDetails.md b/docs/AddressDetails.md new file mode 100644 index 0000000..6e96b6f --- /dev/null +++ b/docs/AddressDetails.md @@ -0,0 +1,316 @@ +# AddressDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | Full Name of the customer associated with the address. | [optional] +**AddressLineOne** | Pointer to **string** | First line of the address. | [optional] +**AddressLineTwo** | Pointer to **string** | Second line of the address. | [optional] +**Country** | Pointer to **string** | Country Name. | [optional] +**CountryCode** | Pointer to **string** | Country Code. | [optional] +**State** | Pointer to **string** | State Name. | [optional] +**StateCode** | Pointer to **string** | State Code. | [optional] +**City** | Pointer to **string** | City Name. | [optional] +**PinCode** | Pointer to **string** | Pin Code/Zip Code. | [optional] +**Phone** | Pointer to **string** | Customer Phone Number. | [optional] +**Email** | Pointer to **string** | Cutomer Email Address. | [optional] + +## Methods + +### NewAddressDetails + +`func NewAddressDetails() *AddressDetails` + +NewAddressDetails instantiates a new AddressDetails object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAddressDetailsWithDefaults + +`func NewAddressDetailsWithDefaults() *AddressDetails` + +NewAddressDetailsWithDefaults instantiates a new AddressDetails object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *AddressDetails) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AddressDetails) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *AddressDetails) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *AddressDetails) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetAddressLineOne + +`func (o *AddressDetails) GetAddressLineOne() string` + +GetAddressLineOne returns the AddressLineOne field if non-nil, zero value otherwise. + +### GetAddressLineOneOk + +`func (o *AddressDetails) GetAddressLineOneOk() (*string, bool)` + +GetAddressLineOneOk returns a tuple with the AddressLineOne field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddressLineOne + +`func (o *AddressDetails) SetAddressLineOne(v string)` + +SetAddressLineOne sets AddressLineOne field to given value. + +### HasAddressLineOne + +`func (o *AddressDetails) HasAddressLineOne() bool` + +HasAddressLineOne returns a boolean if a field has been set. + +### GetAddressLineTwo + +`func (o *AddressDetails) GetAddressLineTwo() string` + +GetAddressLineTwo returns the AddressLineTwo field if non-nil, zero value otherwise. + +### GetAddressLineTwoOk + +`func (o *AddressDetails) GetAddressLineTwoOk() (*string, bool)` + +GetAddressLineTwoOk returns a tuple with the AddressLineTwo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddressLineTwo + +`func (o *AddressDetails) SetAddressLineTwo(v string)` + +SetAddressLineTwo sets AddressLineTwo field to given value. + +### HasAddressLineTwo + +`func (o *AddressDetails) HasAddressLineTwo() bool` + +HasAddressLineTwo returns a boolean if a field has been set. + +### GetCountry + +`func (o *AddressDetails) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *AddressDetails) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *AddressDetails) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *AddressDetails) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetCountryCode + +`func (o *AddressDetails) GetCountryCode() string` + +GetCountryCode returns the CountryCode field if non-nil, zero value otherwise. + +### GetCountryCodeOk + +`func (o *AddressDetails) GetCountryCodeOk() (*string, bool)` + +GetCountryCodeOk returns a tuple with the CountryCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountryCode + +`func (o *AddressDetails) SetCountryCode(v string)` + +SetCountryCode sets CountryCode field to given value. + +### HasCountryCode + +`func (o *AddressDetails) HasCountryCode() bool` + +HasCountryCode returns a boolean if a field has been set. + +### GetState + +`func (o *AddressDetails) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *AddressDetails) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *AddressDetails) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *AddressDetails) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetStateCode + +`func (o *AddressDetails) GetStateCode() string` + +GetStateCode returns the StateCode field if non-nil, zero value otherwise. + +### GetStateCodeOk + +`func (o *AddressDetails) GetStateCodeOk() (*string, bool)` + +GetStateCodeOk returns a tuple with the StateCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStateCode + +`func (o *AddressDetails) SetStateCode(v string)` + +SetStateCode sets StateCode field to given value. + +### HasStateCode + +`func (o *AddressDetails) HasStateCode() bool` + +HasStateCode returns a boolean if a field has been set. + +### GetCity + +`func (o *AddressDetails) GetCity() string` + +GetCity returns the City field if non-nil, zero value otherwise. + +### GetCityOk + +`func (o *AddressDetails) GetCityOk() (*string, bool)` + +GetCityOk returns a tuple with the City field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCity + +`func (o *AddressDetails) SetCity(v string)` + +SetCity sets City field to given value. + +### HasCity + +`func (o *AddressDetails) HasCity() bool` + +HasCity returns a boolean if a field has been set. + +### GetPinCode + +`func (o *AddressDetails) GetPinCode() string` + +GetPinCode returns the PinCode field if non-nil, zero value otherwise. + +### GetPinCodeOk + +`func (o *AddressDetails) GetPinCodeOk() (*string, bool)` + +GetPinCodeOk returns a tuple with the PinCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPinCode + +`func (o *AddressDetails) SetPinCode(v string)` + +SetPinCode sets PinCode field to given value. + +### HasPinCode + +`func (o *AddressDetails) HasPinCode() bool` + +HasPinCode returns a boolean if a field has been set. + +### GetPhone + +`func (o *AddressDetails) GetPhone() string` + +GetPhone returns the Phone field if non-nil, zero value otherwise. + +### GetPhoneOk + +`func (o *AddressDetails) GetPhoneOk() (*string, bool)` + +GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhone + +`func (o *AddressDetails) SetPhone(v string)` + +SetPhone sets Phone field to given value. + +### HasPhone + +`func (o *AddressDetails) HasPhone() bool` + +HasPhone returns a boolean if a field has been set. + +### GetEmail + +`func (o *AddressDetails) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *AddressDetails) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *AddressDetails) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *AddressDetails) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CartDetails.md b/docs/CartDetails.md new file mode 100644 index 0000000..ad5e471 --- /dev/null +++ b/docs/CartDetails.md @@ -0,0 +1,108 @@ +# CartDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShippingCharge** | Pointer to **float64** | | [optional] +**CartName** | Pointer to **string** | Name of the cart. | [optional] +**CartItems** | Pointer to [**[]CartItem**](CartItem.md) | | [optional] + +## Methods + +### NewCartDetails + +`func NewCartDetails() *CartDetails` + +NewCartDetails instantiates a new CartDetails object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCartDetailsWithDefaults + +`func NewCartDetailsWithDefaults() *CartDetails` + +NewCartDetailsWithDefaults instantiates a new CartDetails object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetShippingCharge + +`func (o *CartDetails) GetShippingCharge() float64` + +GetShippingCharge returns the ShippingCharge field if non-nil, zero value otherwise. + +### GetShippingChargeOk + +`func (o *CartDetails) GetShippingChargeOk() (*float64, bool)` + +GetShippingChargeOk returns a tuple with the ShippingCharge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetShippingCharge + +`func (o *CartDetails) SetShippingCharge(v float64)` + +SetShippingCharge sets ShippingCharge field to given value. + +### HasShippingCharge + +`func (o *CartDetails) HasShippingCharge() bool` + +HasShippingCharge returns a boolean if a field has been set. + +### GetCartName + +`func (o *CartDetails) GetCartName() string` + +GetCartName returns the CartName field if non-nil, zero value otherwise. + +### GetCartNameOk + +`func (o *CartDetails) GetCartNameOk() (*string, bool)` + +GetCartNameOk returns a tuple with the CartName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCartName + +`func (o *CartDetails) SetCartName(v string)` + +SetCartName sets CartName field to given value. + +### HasCartName + +`func (o *CartDetails) HasCartName() bool` + +HasCartName returns a boolean if a field has been set. + +### GetCartItems + +`func (o *CartDetails) GetCartItems() []CartItem` + +GetCartItems returns the CartItems field if non-nil, zero value otherwise. + +### GetCartItemsOk + +`func (o *CartDetails) GetCartItemsOk() (*[]CartItem, bool)` + +GetCartItemsOk returns a tuple with the CartItems field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCartItems + +`func (o *CartDetails) SetCartItems(v []CartItem)` + +SetCartItems sets CartItems field to given value. + +### HasCartItems + +`func (o *CartDetails) HasCartItems() bool` + +HasCartItems returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CartDetailsEntity.md b/docs/CartDetailsEntity.md new file mode 100644 index 0000000..8045050 --- /dev/null +++ b/docs/CartDetailsEntity.md @@ -0,0 +1,56 @@ +# CartDetailsEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CartId** | Pointer to **string** | ID of the cart that was created | [optional] + +## Methods + +### NewCartDetailsEntity + +`func NewCartDetailsEntity() *CartDetailsEntity` + +NewCartDetailsEntity instantiates a new CartDetailsEntity object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCartDetailsEntityWithDefaults + +`func NewCartDetailsEntityWithDefaults() *CartDetailsEntity` + +NewCartDetailsEntityWithDefaults instantiates a new CartDetailsEntity object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCartId + +`func (o *CartDetailsEntity) GetCartId() string` + +GetCartId returns the CartId field if non-nil, zero value otherwise. + +### GetCartIdOk + +`func (o *CartDetailsEntity) GetCartIdOk() (*string, bool)` + +GetCartIdOk returns a tuple with the CartId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCartId + +`func (o *CartDetailsEntity) SetCartId(v string)` + +SetCartId sets CartId field to given value. + +### HasCartId + +`func (o *CartDetailsEntity) HasCartId() bool` + +HasCartId returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CartItem.md b/docs/CartItem.md new file mode 100644 index 0000000..c10b87c --- /dev/null +++ b/docs/CartItem.md @@ -0,0 +1,290 @@ +# CartItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ItemId** | Pointer to **string** | Unique identifier of the item | [optional] +**ItemName** | Pointer to **string** | Name of the item | [optional] +**ItemDescription** | Pointer to **string** | Description of the item | [optional] +**ItemTags** | Pointer to **[]string** | Tags attached to that item | [optional] +**ItemDetailsUrl** | Pointer to **string** | Item details url | [optional] +**ItemImageUrl** | Pointer to **string** | Item image url | [optional] +**ItemOriginalUnitPrice** | Pointer to **float64** | Original price | [optional] +**ItemDiscountedUnitPrice** | Pointer to **float64** | Discounted Price | [optional] +**ItemCurrency** | Pointer to **string** | Currency of the item. | [optional] +**ItemQuantity** | Pointer to **float32** | Quantity if that item | [optional] + +## Methods + +### NewCartItem + +`func NewCartItem() *CartItem` + +NewCartItem instantiates a new CartItem object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCartItemWithDefaults + +`func NewCartItemWithDefaults() *CartItem` + +NewCartItemWithDefaults instantiates a new CartItem object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetItemId + +`func (o *CartItem) GetItemId() string` + +GetItemId returns the ItemId field if non-nil, zero value otherwise. + +### GetItemIdOk + +`func (o *CartItem) GetItemIdOk() (*string, bool)` + +GetItemIdOk returns a tuple with the ItemId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItemId + +`func (o *CartItem) SetItemId(v string)` + +SetItemId sets ItemId field to given value. + +### HasItemId + +`func (o *CartItem) HasItemId() bool` + +HasItemId returns a boolean if a field has been set. + +### GetItemName + +`func (o *CartItem) GetItemName() string` + +GetItemName returns the ItemName field if non-nil, zero value otherwise. + +### GetItemNameOk + +`func (o *CartItem) GetItemNameOk() (*string, bool)` + +GetItemNameOk returns a tuple with the ItemName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItemName + +`func (o *CartItem) SetItemName(v string)` + +SetItemName sets ItemName field to given value. + +### HasItemName + +`func (o *CartItem) HasItemName() bool` + +HasItemName returns a boolean if a field has been set. + +### GetItemDescription + +`func (o *CartItem) GetItemDescription() string` + +GetItemDescription returns the ItemDescription field if non-nil, zero value otherwise. + +### GetItemDescriptionOk + +`func (o *CartItem) GetItemDescriptionOk() (*string, bool)` + +GetItemDescriptionOk returns a tuple with the ItemDescription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItemDescription + +`func (o *CartItem) SetItemDescription(v string)` + +SetItemDescription sets ItemDescription field to given value. + +### HasItemDescription + +`func (o *CartItem) HasItemDescription() bool` + +HasItemDescription returns a boolean if a field has been set. + +### GetItemTags + +`func (o *CartItem) GetItemTags() []string` + +GetItemTags returns the ItemTags field if non-nil, zero value otherwise. + +### GetItemTagsOk + +`func (o *CartItem) GetItemTagsOk() (*[]string, bool)` + +GetItemTagsOk returns a tuple with the ItemTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItemTags + +`func (o *CartItem) SetItemTags(v []string)` + +SetItemTags sets ItemTags field to given value. + +### HasItemTags + +`func (o *CartItem) HasItemTags() bool` + +HasItemTags returns a boolean if a field has been set. + +### GetItemDetailsUrl + +`func (o *CartItem) GetItemDetailsUrl() string` + +GetItemDetailsUrl returns the ItemDetailsUrl field if non-nil, zero value otherwise. + +### GetItemDetailsUrlOk + +`func (o *CartItem) GetItemDetailsUrlOk() (*string, bool)` + +GetItemDetailsUrlOk returns a tuple with the ItemDetailsUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItemDetailsUrl + +`func (o *CartItem) SetItemDetailsUrl(v string)` + +SetItemDetailsUrl sets ItemDetailsUrl field to given value. + +### HasItemDetailsUrl + +`func (o *CartItem) HasItemDetailsUrl() bool` + +HasItemDetailsUrl returns a boolean if a field has been set. + +### GetItemImageUrl + +`func (o *CartItem) GetItemImageUrl() string` + +GetItemImageUrl returns the ItemImageUrl field if non-nil, zero value otherwise. + +### GetItemImageUrlOk + +`func (o *CartItem) GetItemImageUrlOk() (*string, bool)` + +GetItemImageUrlOk returns a tuple with the ItemImageUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItemImageUrl + +`func (o *CartItem) SetItemImageUrl(v string)` + +SetItemImageUrl sets ItemImageUrl field to given value. + +### HasItemImageUrl + +`func (o *CartItem) HasItemImageUrl() bool` + +HasItemImageUrl returns a boolean if a field has been set. + +### GetItemOriginalUnitPrice + +`func (o *CartItem) GetItemOriginalUnitPrice() float64` + +GetItemOriginalUnitPrice returns the ItemOriginalUnitPrice field if non-nil, zero value otherwise. + +### GetItemOriginalUnitPriceOk + +`func (o *CartItem) GetItemOriginalUnitPriceOk() (*float64, bool)` + +GetItemOriginalUnitPriceOk returns a tuple with the ItemOriginalUnitPrice field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItemOriginalUnitPrice + +`func (o *CartItem) SetItemOriginalUnitPrice(v float64)` + +SetItemOriginalUnitPrice sets ItemOriginalUnitPrice field to given value. + +### HasItemOriginalUnitPrice + +`func (o *CartItem) HasItemOriginalUnitPrice() bool` + +HasItemOriginalUnitPrice returns a boolean if a field has been set. + +### GetItemDiscountedUnitPrice + +`func (o *CartItem) GetItemDiscountedUnitPrice() float64` + +GetItemDiscountedUnitPrice returns the ItemDiscountedUnitPrice field if non-nil, zero value otherwise. + +### GetItemDiscountedUnitPriceOk + +`func (o *CartItem) GetItemDiscountedUnitPriceOk() (*float64, bool)` + +GetItemDiscountedUnitPriceOk returns a tuple with the ItemDiscountedUnitPrice field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItemDiscountedUnitPrice + +`func (o *CartItem) SetItemDiscountedUnitPrice(v float64)` + +SetItemDiscountedUnitPrice sets ItemDiscountedUnitPrice field to given value. + +### HasItemDiscountedUnitPrice + +`func (o *CartItem) HasItemDiscountedUnitPrice() bool` + +HasItemDiscountedUnitPrice returns a boolean if a field has been set. + +### GetItemCurrency + +`func (o *CartItem) GetItemCurrency() string` + +GetItemCurrency returns the ItemCurrency field if non-nil, zero value otherwise. + +### GetItemCurrencyOk + +`func (o *CartItem) GetItemCurrencyOk() (*string, bool)` + +GetItemCurrencyOk returns a tuple with the ItemCurrency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItemCurrency + +`func (o *CartItem) SetItemCurrency(v string)` + +SetItemCurrency sets ItemCurrency field to given value. + +### HasItemCurrency + +`func (o *CartItem) HasItemCurrency() bool` + +HasItemCurrency returns a boolean if a field has been set. + +### GetItemQuantity + +`func (o *CartItem) GetItemQuantity() float32` + +GetItemQuantity returns the ItemQuantity field if non-nil, zero value otherwise. + +### GetItemQuantityOk + +`func (o *CartItem) GetItemQuantityOk() (*float32, bool)` + +GetItemQuantityOk returns a tuple with the ItemQuantity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItemQuantity + +`func (o *CartItem) SetItemQuantity(v float32)` + +SetItemQuantity sets ItemQuantity field to given value. + +### HasItemQuantity + +`func (o *CartItem) HasItemQuantity() bool` + +HasItemQuantity returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChargesEntity.md b/docs/ChargesEntity.md new file mode 100644 index 0000000..42bac9a --- /dev/null +++ b/docs/ChargesEntity.md @@ -0,0 +1,82 @@ +# ChargesEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShippingCharges** | Pointer to **float32** | Shipping charge of the order | [optional] +**CodHandlingCharges** | Pointer to **float32** | COD handling fee for order | [optional] + +## Methods + +### NewChargesEntity + +`func NewChargesEntity() *ChargesEntity` + +NewChargesEntity instantiates a new ChargesEntity object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewChargesEntityWithDefaults + +`func NewChargesEntityWithDefaults() *ChargesEntity` + +NewChargesEntityWithDefaults instantiates a new ChargesEntity object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetShippingCharges + +`func (o *ChargesEntity) GetShippingCharges() float32` + +GetShippingCharges returns the ShippingCharges field if non-nil, zero value otherwise. + +### GetShippingChargesOk + +`func (o *ChargesEntity) GetShippingChargesOk() (*float32, bool)` + +GetShippingChargesOk returns a tuple with the ShippingCharges field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetShippingCharges + +`func (o *ChargesEntity) SetShippingCharges(v float32)` + +SetShippingCharges sets ShippingCharges field to given value. + +### HasShippingCharges + +`func (o *ChargesEntity) HasShippingCharges() bool` + +HasShippingCharges returns a boolean if a field has been set. + +### GetCodHandlingCharges + +`func (o *ChargesEntity) GetCodHandlingCharges() float32` + +GetCodHandlingCharges returns the CodHandlingCharges field if non-nil, zero value otherwise. + +### GetCodHandlingChargesOk + +`func (o *ChargesEntity) GetCodHandlingChargesOk() (*float32, bool)` + +GetCodHandlingChargesOk returns a tuple with the CodHandlingCharges field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCodHandlingCharges + +`func (o *ChargesEntity) SetCodHandlingCharges(v float32)` + +SetCodHandlingCharges sets CodHandlingCharges field to given value. + +### HasCodHandlingCharges + +`func (o *ChargesEntity) HasCodHandlingCharges() bool` + +HasCodHandlingCharges returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateOrderRequest.md b/docs/CreateOrderRequest.md index 7faae36..aae75e7 100644 --- a/docs/CreateOrderRequest.md +++ b/docs/CreateOrderRequest.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **OrderId** | Pointer to **string** | Order identifier present in your system. Alphanumeric, '_' and '-' only | [optional] **OrderAmount** | **float64** | Bill amount for the order. Provide upto two decimals. 10.15 means Rs 10 and 15 paisa | **OrderCurrency** | **string** | Currency for the order. INR if left empty. Contact care@cashfree.com to enable new currencies. | +**CartDetails** | Pointer to [**CartDetails**](CartDetails.md) | | [optional] **CustomerDetails** | [**CustomerDetails**](CustomerDetails.md) | | **Terminal** | Pointer to [**TerminalDetails**](TerminalDetails.md) | | [optional] **OrderMeta** | Pointer to [**OrderMeta**](OrderMeta.md) | | [optional] @@ -99,6 +100,31 @@ and a boolean to check if the value has been set. SetOrderCurrency sets OrderCurrency field to given value. +### GetCartDetails + +`func (o *CreateOrderRequest) GetCartDetails() CartDetails` + +GetCartDetails returns the CartDetails field if non-nil, zero value otherwise. + +### GetCartDetailsOk + +`func (o *CreateOrderRequest) GetCartDetailsOk() (*CartDetails, bool)` + +GetCartDetailsOk returns a tuple with the CartDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCartDetails + +`func (o *CreateOrderRequest) SetCartDetails(v CartDetails)` + +SetCartDetails sets CartDetails field to given value. + +### HasCartDetails + +`func (o *CreateOrderRequest) HasCartDetails() bool` + +HasCartDetails returns a boolean if a field has been set. + ### GetCustomerDetails `func (o *CreateOrderRequest) GetCustomerDetails() CustomerDetails` diff --git a/docs/CreatePartnerVpaRequest.md b/docs/CreatePartnerVpaRequest.md new file mode 100644 index 0000000..5f3bbc6 --- /dev/null +++ b/docs/CreatePartnerVpaRequest.md @@ -0,0 +1,51 @@ +# CreatePartnerVpaRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**VpaCount** | **int32** | count of vpa , to create in bulk, max limit:50 | + +## Methods + +### NewCreatePartnerVpaRequest + +`func NewCreatePartnerVpaRequest(vpaCount int32, ) *CreatePartnerVpaRequest` + +NewCreatePartnerVpaRequest instantiates a new CreatePartnerVpaRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreatePartnerVpaRequestWithDefaults + +`func NewCreatePartnerVpaRequestWithDefaults() *CreatePartnerVpaRequest` + +NewCreatePartnerVpaRequestWithDefaults instantiates a new CreatePartnerVpaRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVpaCount + +`func (o *CreatePartnerVpaRequest) GetVpaCount() int32` + +GetVpaCount returns the VpaCount field if non-nil, zero value otherwise. + +### GetVpaCountOk + +`func (o *CreatePartnerVpaRequest) GetVpaCountOk() (*int32, bool)` + +GetVpaCountOk returns a tuple with the VpaCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVpaCount + +`func (o *CreatePartnerVpaRequest) SetVpaCount(v int32)` + +SetVpaCount sets VpaCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateSubscriptionRequestAuthorizationDetails.md b/docs/CreateSubscriptionRequestAuthorizationDetails.md index 90a7ef5..9a97e36 100644 --- a/docs/CreateSubscriptionRequestAuthorizationDetails.md +++ b/docs/CreateSubscriptionRequestAuthorizationDetails.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AuthorizationAmount** | Pointer to **float32** | Authorization amount for the auth payment. | [optional] **AuthorizationAmountRefund** | Pointer to **bool** | Indicates whether the authorization amount should be refunded to the customer automatically. Merchants can use this field to specify if the authorized funds should be returned to the customer after authorization of the subscription. | [optional] +**PaymentMethods** | Pointer to **[]string** | Payment methods for the subscription. enach, pnach, upi, card are possible values. | [optional] ## Methods @@ -76,6 +77,31 @@ SetAuthorizationAmountRefund sets AuthorizationAmountRefund field to given value HasAuthorizationAmountRefund returns a boolean if a field has been set. +### GetPaymentMethods + +`func (o *CreateSubscriptionRequestAuthorizationDetails) GetPaymentMethods() []string` + +GetPaymentMethods returns the PaymentMethods field if non-nil, zero value otherwise. + +### GetPaymentMethodsOk + +`func (o *CreateSubscriptionRequestAuthorizationDetails) GetPaymentMethodsOk() (*[]string, bool)` + +GetPaymentMethodsOk returns a tuple with the PaymentMethods field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPaymentMethods + +`func (o *CreateSubscriptionRequestAuthorizationDetails) SetPaymentMethods(v []string)` + +SetPaymentMethods sets PaymentMethods field to given value. + +### HasPaymentMethods + +`func (o *CreateSubscriptionRequestAuthorizationDetails) HasPaymentMethods() bool` + +HasPaymentMethods returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerDetailsInDisputesEntity.md b/docs/CustomerDetailsInDisputesEntity.md new file mode 100644 index 0000000..9eafed9 --- /dev/null +++ b/docs/CustomerDetailsInDisputesEntity.md @@ -0,0 +1,108 @@ +# CustomerDetailsInDisputesEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerName** | Pointer to **string** | | [optional] +**CustomerPhone** | Pointer to **string** | | [optional] +**CustomerEmail** | Pointer to **string** | | [optional] + +## Methods + +### NewCustomerDetailsInDisputesEntity + +`func NewCustomerDetailsInDisputesEntity() *CustomerDetailsInDisputesEntity` + +NewCustomerDetailsInDisputesEntity instantiates a new CustomerDetailsInDisputesEntity object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCustomerDetailsInDisputesEntityWithDefaults + +`func NewCustomerDetailsInDisputesEntityWithDefaults() *CustomerDetailsInDisputesEntity` + +NewCustomerDetailsInDisputesEntityWithDefaults instantiates a new CustomerDetailsInDisputesEntity object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustomerName + +`func (o *CustomerDetailsInDisputesEntity) GetCustomerName() string` + +GetCustomerName returns the CustomerName field if non-nil, zero value otherwise. + +### GetCustomerNameOk + +`func (o *CustomerDetailsInDisputesEntity) GetCustomerNameOk() (*string, bool)` + +GetCustomerNameOk returns a tuple with the CustomerName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerName + +`func (o *CustomerDetailsInDisputesEntity) SetCustomerName(v string)` + +SetCustomerName sets CustomerName field to given value. + +### HasCustomerName + +`func (o *CustomerDetailsInDisputesEntity) HasCustomerName() bool` + +HasCustomerName returns a boolean if a field has been set. + +### GetCustomerPhone + +`func (o *CustomerDetailsInDisputesEntity) GetCustomerPhone() string` + +GetCustomerPhone returns the CustomerPhone field if non-nil, zero value otherwise. + +### GetCustomerPhoneOk + +`func (o *CustomerDetailsInDisputesEntity) GetCustomerPhoneOk() (*string, bool)` + +GetCustomerPhoneOk returns a tuple with the CustomerPhone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerPhone + +`func (o *CustomerDetailsInDisputesEntity) SetCustomerPhone(v string)` + +SetCustomerPhone sets CustomerPhone field to given value. + +### HasCustomerPhone + +`func (o *CustomerDetailsInDisputesEntity) HasCustomerPhone() bool` + +HasCustomerPhone returns a boolean if a field has been set. + +### GetCustomerEmail + +`func (o *CustomerDetailsInDisputesEntity) GetCustomerEmail() string` + +GetCustomerEmail returns the CustomerEmail field if non-nil, zero value otherwise. + +### GetCustomerEmailOk + +`func (o *CustomerDetailsInDisputesEntity) GetCustomerEmailOk() (*string, bool)` + +GetCustomerEmailOk returns a tuple with the CustomerEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerEmail + +`func (o *CustomerDetailsInDisputesEntity) SetCustomerEmail(v string)` + +SetCustomerEmail sets CustomerEmail field to given value. + +### HasCustomerEmail + +`func (o *CustomerDetailsInDisputesEntity) HasCustomerEmail() bool` + +HasCustomerEmail returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DefaultAPI.md b/docs/DefaultAPI.md new file mode 100644 index 0000000..f008554 --- /dev/null +++ b/docs/DefaultAPI.md @@ -0,0 +1,166 @@ +# \DefaultAPI + +All URIs are relative to *https://sandbox.cashfree.com/pg* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TerminalCreateQRCodes**](DefaultAPI.md#TerminalCreateQRCodes) | **Post** /partners/merchant/qrcodes | Create Pre-Activated Vpas for partner +[**TerminalGetQRCodes**](DefaultAPI.md#TerminalGetQRCodes) | **Get** /partners/merchant/qrcodes | Get Pre-Activated Vpas for partner + + + +## TerminalCreateQRCodes + +> []StaticQrResponseEntity TerminalCreateQRCodes(ctx).XApiVersion(xApiVersion).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).CreatePartnerVpaRequest(createPartnerVpaRequest).Execute() + +Create Pre-Activated Vpas for partner + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + createPartnerVpaRequest := *cashfree.NewCreatePartnerVpaRequest(int32(123)) + + resp, r, err := cashfree.TerminalCreateQRCodes(&xApiVersion, &xRequestId, &xIdempotencyKey, &createPartnerVpaRequest, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.TerminalCreateQRCodes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TerminalCreateQRCodes`: []StaticQrResponseEntity + fmt.Fprintf(os.Stdout, "Response from `cashfree.TerminalCreateQRCodes`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTerminalCreateQRCodesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + **createPartnerVpaRequest** | [**CreatePartnerVpaRequest**](CreatePartnerVpaRequest.md) | | + +### Return type + +[**[]StaticQrResponseEntity**](StaticQrResponseEntity.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TerminalGetQRCodes + +> []StaticQrResponseEntity TerminalGetQRCodes(ctx).XApiVersion(xApiVersion).Status(status).CfTerminalId(cfTerminalId).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() + +Get Pre-Activated Vpas for partner + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + status := "MAPPED" + cfTerminalId := "123344" + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + + resp, r, err := cashfree.TerminalGetQRCodes(&xApiVersion, &status, &cfTerminalId, &xRequestId, &xIdempotencyKey, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.TerminalGetQRCodes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TerminalGetQRCodes`: []StaticQrResponseEntity + fmt.Fprintf(os.Stdout, "Response from `cashfree.TerminalGetQRCodes`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTerminalGetQRCodesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + **status** | **string** | Status of pre-created Qr. | + **cfTerminalId** | **string** | Cashfree terminal id for which you want to get pre-generated staticQRs. | + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + +### Return type + +[**[]StaticQrResponseEntity**](StaticQrResponseEntity.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/DemapSoundboxVpaRequest.md b/docs/DemapSoundboxVpaRequest.md new file mode 100644 index 0000000..d563661 --- /dev/null +++ b/docs/DemapSoundboxVpaRequest.md @@ -0,0 +1,72 @@ +# DemapSoundboxVpaRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CfTerminalId** | **string** | cashfree terminal id. | +**DeviceSerialNo** | **string** | Device Serial No of soundbox that need to demap. | + +## Methods + +### NewDemapSoundboxVpaRequest + +`func NewDemapSoundboxVpaRequest(cfTerminalId string, deviceSerialNo string, ) *DemapSoundboxVpaRequest` + +NewDemapSoundboxVpaRequest instantiates a new DemapSoundboxVpaRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDemapSoundboxVpaRequestWithDefaults + +`func NewDemapSoundboxVpaRequestWithDefaults() *DemapSoundboxVpaRequest` + +NewDemapSoundboxVpaRequestWithDefaults instantiates a new DemapSoundboxVpaRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCfTerminalId + +`func (o *DemapSoundboxVpaRequest) GetCfTerminalId() string` + +GetCfTerminalId returns the CfTerminalId field if non-nil, zero value otherwise. + +### GetCfTerminalIdOk + +`func (o *DemapSoundboxVpaRequest) GetCfTerminalIdOk() (*string, bool)` + +GetCfTerminalIdOk returns a tuple with the CfTerminalId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCfTerminalId + +`func (o *DemapSoundboxVpaRequest) SetCfTerminalId(v string)` + +SetCfTerminalId sets CfTerminalId field to given value. + + +### GetDeviceSerialNo + +`func (o *DemapSoundboxVpaRequest) GetDeviceSerialNo() string` + +GetDeviceSerialNo returns the DeviceSerialNo field if non-nil, zero value otherwise. + +### GetDeviceSerialNoOk + +`func (o *DemapSoundboxVpaRequest) GetDeviceSerialNoOk() (*string, bool)` + +GetDeviceSerialNoOk returns a tuple with the DeviceSerialNo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceSerialNo + +`func (o *DemapSoundboxVpaRequest) SetDeviceSerialNo(v string)` + +SetDeviceSerialNo sets DeviceSerialNo field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DisputeEvidence.md b/docs/DisputeEvidence.md new file mode 100644 index 0000000..2b5fd1e --- /dev/null +++ b/docs/DisputeEvidence.md @@ -0,0 +1,30 @@ +# DisputeEvidence + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewDisputeEvidence + +`func NewDisputeEvidence() *DisputeEvidence` + +NewDisputeEvidence instantiates a new DisputeEvidence object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDisputeEvidenceWithDefaults + +`func NewDisputeEvidenceWithDefaults() *DisputeEvidence` + +NewDisputeEvidenceWithDefaults instantiates a new DisputeEvidence object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DisputesAPI.md b/docs/DisputesAPI.md new file mode 100644 index 0000000..3cb3a44 --- /dev/null +++ b/docs/DisputesAPI.md @@ -0,0 +1,424 @@ +# \DisputesAPI + +All URIs are relative to *https://sandbox.cashfree.com/pg* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**PGAcceptDisputeByID**](DisputesAPI.md#PGAcceptDisputeByID) | **Put** /disputes/{dispute_id}/accept | Accept Dispute by Dispute ID +[**PGFetchDisputeByID**](DisputesAPI.md#PGFetchDisputeByID) | **Get** /disputes/{dispute_id} | Get Disputes by Dispute ID +[**PGFetchOrderDisputes**](DisputesAPI.md#PGFetchOrderDisputes) | **Get** /orders/{order_id}/disputes | Get Disputes by Order Id +[**PGFetchPaymentDisputes**](DisputesAPI.md#PGFetchPaymentDisputes) | **Get** /payments/{cf_payment_id}/disputes | Get Disputes by Payment ID +[**PGUploadDisputesDocuments**](DisputesAPI.md#PGUploadDisputesDocuments) | **Post** /disputes/{dispute_id}/documents | Submit Evidence to contest the Dispute by Dispute ID + + + +## PGAcceptDisputeByID + +> DisputesEntityMerchantAccepted PGAcceptDisputeByID(ctx, disputeId).XApiVersion(xApiVersion).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() + +Accept Dispute by Dispute ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + disputeId := int32(56) + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + + resp, r, err := cashfree.PGAcceptDisputeByID(&xApiVersion, &disputeId, &xRequestId, &xIdempotencyKey, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.PGAcceptDisputeByID``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PGAcceptDisputeByID`: DisputesEntityMerchantAccepted + fmt.Fprintf(os.Stdout, "Response from `cashfree.PGAcceptDisputeByID`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**disputeId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPGAcceptDisputeByIDRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + +### Return type + +[**DisputesEntityMerchantAccepted**](DisputesEntityMerchantAccepted.md) + +### Authorization + +[XPartnerAPIKey](../README.md#XPartnerAPIKey), [XClientSecret](../README.md#XClientSecret), [XPartnerMerchantID](../README.md#XPartnerMerchantID), [XClientID](../README.md#XClientID), [XClientSignatureHeader](../README.md#XClientSignatureHeader) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PGFetchDisputeByID + +> DisputesEntity PGFetchDisputeByID(ctx, disputeId).XApiVersion(xApiVersion).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() + +Get Disputes by Dispute ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + disputeId := int32(56) + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + + resp, r, err := cashfree.PGFetchDisputeByID(&xApiVersion, &disputeId, &xRequestId, &xIdempotencyKey, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.PGFetchDisputeByID``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PGFetchDisputeByID`: DisputesEntity + fmt.Fprintf(os.Stdout, "Response from `cashfree.PGFetchDisputeByID`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**disputeId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPGFetchDisputeByIDRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + +### Return type + +[**DisputesEntity**](DisputesEntity.md) + +### Authorization + +[XPartnerAPIKey](../README.md#XPartnerAPIKey), [XClientSecret](../README.md#XClientSecret), [XPartnerMerchantID](../README.md#XPartnerMerchantID), [XClientID](../README.md#XClientID), [XClientSignatureHeader](../README.md#XClientSignatureHeader) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PGFetchOrderDisputes + +> []DisputesEntity PGFetchOrderDisputes(ctx, orderId).XApiVersion(xApiVersion).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() + +Get Disputes by Order Id + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + orderId := "orderId_example" + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + + resp, r, err := cashfree.PGFetchOrderDisputes(&xApiVersion, &orderId, &xRequestId, &xIdempotencyKey, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.PGFetchOrderDisputes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PGFetchOrderDisputes`: []DisputesEntity + fmt.Fprintf(os.Stdout, "Response from `cashfree.PGFetchOrderDisputes`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orderId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPGFetchOrderDisputesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + +### Return type + +[**[]DisputesEntity**](DisputesEntity.md) + +### Authorization + +[XPartnerAPIKey](../README.md#XPartnerAPIKey), [XClientSecret](../README.md#XClientSecret), [XPartnerMerchantID](../README.md#XPartnerMerchantID), [XClientID](../README.md#XClientID), [XClientSignatureHeader](../README.md#XClientSignatureHeader) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PGFetchPaymentDisputes + +> []DisputesEntity PGFetchPaymentDisputes(ctx, cfPaymentId).XApiVersion(xApiVersion).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() + +Get Disputes by Payment ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + cfPaymentId := int32(56) + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + + resp, r, err := cashfree.PGFetchPaymentDisputes(&xApiVersion, &cfPaymentId, &xRequestId, &xIdempotencyKey, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.PGFetchPaymentDisputes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PGFetchPaymentDisputes`: []DisputesEntity + fmt.Fprintf(os.Stdout, "Response from `cashfree.PGFetchPaymentDisputes`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**cfPaymentId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPGFetchPaymentDisputesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + +### Return type + +[**[]DisputesEntity**](DisputesEntity.md) + +### Authorization + +[XPartnerAPIKey](../README.md#XPartnerAPIKey), [XClientSecret](../README.md#XClientSecret), [XPartnerMerchantID](../README.md#XPartnerMerchantID), [XClientID](../README.md#XClientID), [XClientSignatureHeader](../README.md#XClientSignatureHeader) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PGUploadDisputesDocuments + +> []DisputesEntity PGUploadDisputesDocuments(ctx, disputeId).XApiVersion(xApiVersion).File(file).DocType(docType).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Note(note).Execute() + +Submit Evidence to contest the Dispute by Dispute ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + disputeId := int32(56) + file := "file_example" + docType := "docType_example" + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + note := "note_example" + + resp, r, err := cashfree.PGUploadDisputesDocuments(&xApiVersion, &disputeId, &file, &docType, &xRequestId, &xIdempotencyKey, ¬e, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.PGUploadDisputesDocuments``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PGUploadDisputesDocuments`: []DisputesEntity + fmt.Fprintf(os.Stdout, "Response from `cashfree.PGUploadDisputesDocuments`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**disputeId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPGUploadDisputesDocumentsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + + **file** | **string** | File types supported are jpeg, jpg, png, pdf and maximum file size allowed is 20 MB. | + **docType** | **string** | Mention the type of the document you are uploading. Possible values :- Delivery/Service Proof, Shipping Proof, Statement of Service, Proof of Service Used, Cancellation of Service Proof, Refund Proof, Business model explanation, Extra Charges Declaration, Terms & Conditions, Customer Withdrawal Letter, Certificate of Authenticity, Reseller Agreement. You can use get evidences to contest dispute API to fetch set of documents required to contest particular dispute. | + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + **note** | **string** | | + +### Return type + +[**[]DisputesEntity**](DisputesEntity.md) + +### Authorization + +[XPartnerAPIKey](../README.md#XPartnerAPIKey), [XClientSecret](../README.md#XClientSecret), [XPartnerMerchantID](../README.md#XPartnerMerchantID), [XClientID](../README.md#XClientID), [XClientSignatureHeader](../README.md#XClientSignatureHeader) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/DisputesEntity.md b/docs/DisputesEntity.md new file mode 100644 index 0000000..345d833 --- /dev/null +++ b/docs/DisputesEntity.md @@ -0,0 +1,420 @@ +# DisputesEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DisputeId** | Pointer to **int32** | | [optional] +**DisputeType** | Pointer to **string** | | [optional] +**ReasonCode** | Pointer to **string** | | [optional] +**ReasonDescription** | Pointer to **string** | | [optional] +**DisputeAmount** | Pointer to **float32** | Dispute amount may differ from transaction amount for partial cases. | [optional] +**CreatedAt** | Pointer to **string** | This is the time when the dispute was created. | [optional] +**RespondBy** | Pointer to **string** | This is the time by which evidence should be submitted to contest the dispute. | [optional] +**UpdatedAt** | Pointer to **string** | This is the time when the dispute case was updated. | [optional] +**ResolvedAt** | Pointer to **string** | This is the time when the dispute case was closed. | [optional] +**DisputeStatus** | Pointer to **string** | | [optional] +**CfDisputeRemarks** | Pointer to **string** | | [optional] +**PreferredEvidence** | Pointer to **map[string]interface{}** | | [optional] +**DisputeEvidence** | Pointer to | | [optional] +**OrderDetails** | Pointer to [**OrderDetailsInDisputesEntity**](OrderDetailsInDisputesEntity.md) | | [optional] +**CustomerDetails** | Pointer to [**CustomerDetailsInDisputesEntity**](CustomerDetailsInDisputesEntity.md) | | [optional] + +## Methods + +### NewDisputesEntity + +`func NewDisputesEntity() *DisputesEntity` + +NewDisputesEntity instantiates a new DisputesEntity object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDisputesEntityWithDefaults + +`func NewDisputesEntityWithDefaults() *DisputesEntity` + +NewDisputesEntityWithDefaults instantiates a new DisputesEntity object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDisputeId + +`func (o *DisputesEntity) GetDisputeId() int32` + +GetDisputeId returns the DisputeId field if non-nil, zero value otherwise. + +### GetDisputeIdOk + +`func (o *DisputesEntity) GetDisputeIdOk() (*int32, bool)` + +GetDisputeIdOk returns a tuple with the DisputeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisputeId + +`func (o *DisputesEntity) SetDisputeId(v int32)` + +SetDisputeId sets DisputeId field to given value. + +### HasDisputeId + +`func (o *DisputesEntity) HasDisputeId() bool` + +HasDisputeId returns a boolean if a field has been set. + +### GetDisputeType + +`func (o *DisputesEntity) GetDisputeType() string` + +GetDisputeType returns the DisputeType field if non-nil, zero value otherwise. + +### GetDisputeTypeOk + +`func (o *DisputesEntity) GetDisputeTypeOk() (*string, bool)` + +GetDisputeTypeOk returns a tuple with the DisputeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisputeType + +`func (o *DisputesEntity) SetDisputeType(v string)` + +SetDisputeType sets DisputeType field to given value. + +### HasDisputeType + +`func (o *DisputesEntity) HasDisputeType() bool` + +HasDisputeType returns a boolean if a field has been set. + +### GetReasonCode + +`func (o *DisputesEntity) GetReasonCode() string` + +GetReasonCode returns the ReasonCode field if non-nil, zero value otherwise. + +### GetReasonCodeOk + +`func (o *DisputesEntity) GetReasonCodeOk() (*string, bool)` + +GetReasonCodeOk returns a tuple with the ReasonCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReasonCode + +`func (o *DisputesEntity) SetReasonCode(v string)` + +SetReasonCode sets ReasonCode field to given value. + +### HasReasonCode + +`func (o *DisputesEntity) HasReasonCode() bool` + +HasReasonCode returns a boolean if a field has been set. + +### GetReasonDescription + +`func (o *DisputesEntity) GetReasonDescription() string` + +GetReasonDescription returns the ReasonDescription field if non-nil, zero value otherwise. + +### GetReasonDescriptionOk + +`func (o *DisputesEntity) GetReasonDescriptionOk() (*string, bool)` + +GetReasonDescriptionOk returns a tuple with the ReasonDescription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReasonDescription + +`func (o *DisputesEntity) SetReasonDescription(v string)` + +SetReasonDescription sets ReasonDescription field to given value. + +### HasReasonDescription + +`func (o *DisputesEntity) HasReasonDescription() bool` + +HasReasonDescription returns a boolean if a field has been set. + +### GetDisputeAmount + +`func (o *DisputesEntity) GetDisputeAmount() float32` + +GetDisputeAmount returns the DisputeAmount field if non-nil, zero value otherwise. + +### GetDisputeAmountOk + +`func (o *DisputesEntity) GetDisputeAmountOk() (*float32, bool)` + +GetDisputeAmountOk returns a tuple with the DisputeAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisputeAmount + +`func (o *DisputesEntity) SetDisputeAmount(v float32)` + +SetDisputeAmount sets DisputeAmount field to given value. + +### HasDisputeAmount + +`func (o *DisputesEntity) HasDisputeAmount() bool` + +HasDisputeAmount returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *DisputesEntity) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DisputesEntity) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DisputesEntity) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DisputesEntity) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetRespondBy + +`func (o *DisputesEntity) GetRespondBy() string` + +GetRespondBy returns the RespondBy field if non-nil, zero value otherwise. + +### GetRespondByOk + +`func (o *DisputesEntity) GetRespondByOk() (*string, bool)` + +GetRespondByOk returns a tuple with the RespondBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRespondBy + +`func (o *DisputesEntity) SetRespondBy(v string)` + +SetRespondBy sets RespondBy field to given value. + +### HasRespondBy + +`func (o *DisputesEntity) HasRespondBy() bool` + +HasRespondBy returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *DisputesEntity) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *DisputesEntity) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *DisputesEntity) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *DisputesEntity) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetResolvedAt + +`func (o *DisputesEntity) GetResolvedAt() string` + +GetResolvedAt returns the ResolvedAt field if non-nil, zero value otherwise. + +### GetResolvedAtOk + +`func (o *DisputesEntity) GetResolvedAtOk() (*string, bool)` + +GetResolvedAtOk returns a tuple with the ResolvedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResolvedAt + +`func (o *DisputesEntity) SetResolvedAt(v string)` + +SetResolvedAt sets ResolvedAt field to given value. + +### HasResolvedAt + +`func (o *DisputesEntity) HasResolvedAt() bool` + +HasResolvedAt returns a boolean if a field has been set. + +### GetDisputeStatus + +`func (o *DisputesEntity) GetDisputeStatus() string` + +GetDisputeStatus returns the DisputeStatus field if non-nil, zero value otherwise. + +### GetDisputeStatusOk + +`func (o *DisputesEntity) GetDisputeStatusOk() (*string, bool)` + +GetDisputeStatusOk returns a tuple with the DisputeStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisputeStatus + +`func (o *DisputesEntity) SetDisputeStatus(v string)` + +SetDisputeStatus sets DisputeStatus field to given value. + +### HasDisputeStatus + +`func (o *DisputesEntity) HasDisputeStatus() bool` + +HasDisputeStatus returns a boolean if a field has been set. + +### GetCfDisputeRemarks + +`func (o *DisputesEntity) GetCfDisputeRemarks() string` + +GetCfDisputeRemarks returns the CfDisputeRemarks field if non-nil, zero value otherwise. + +### GetCfDisputeRemarksOk + +`func (o *DisputesEntity) GetCfDisputeRemarksOk() (*string, bool)` + +GetCfDisputeRemarksOk returns a tuple with the CfDisputeRemarks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCfDisputeRemarks + +`func (o *DisputesEntity) SetCfDisputeRemarks(v string)` + +SetCfDisputeRemarks sets CfDisputeRemarks field to given value. + +### HasCfDisputeRemarks + +`func (o *DisputesEntity) HasCfDisputeRemarks() bool` + +HasCfDisputeRemarks returns a boolean if a field has been set. + +### GetPreferredEvidence + +`func (o *DisputesEntity) GetPreferredEvidence() map[string]interface{}` + +GetPreferredEvidence returns the PreferredEvidence field if non-nil, zero value otherwise. + +### GetPreferredEvidenceOk + +`func (o *DisputesEntity) GetPreferredEvidenceOk() (*map[string]interface{}, bool)` + +GetPreferredEvidenceOk returns a tuple with the PreferredEvidence field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreferredEvidence + +`func (o *DisputesEntity) SetPreferredEvidence(v map[string]interface{})` + +SetPreferredEvidence sets PreferredEvidence field to given value. + +### HasPreferredEvidence + +`func (o *DisputesEntity) HasPreferredEvidence() bool` + +HasPreferredEvidence returns a boolean if a field has been set. + +### GetDisputeEvidence + +`func (o *DisputesEntity) GetDisputeEvidence() []Evidence` + +GetDisputeEvidence returns the DisputeEvidence field if non-nil, zero value otherwise. + +### GetDisputeEvidenceOk + +`func (o *DisputesEntity) GetDisputeEvidenceOk() (*[]Evidence, bool)` + +GetDisputeEvidenceOk returns a tuple with the DisputeEvidence field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisputeEvidence + +`func (o *DisputesEntity) SetDisputeEvidence(v []Evidence)` + +SetDisputeEvidence sets DisputeEvidence field to given value. + +### HasDisputeEvidence + +`func (o *DisputesEntity) HasDisputeEvidence() bool` + +HasDisputeEvidence returns a boolean if a field has been set. + +### GetOrderDetails + +`func (o *DisputesEntity) GetOrderDetails() OrderDetailsInDisputesEntity` + +GetOrderDetails returns the OrderDetails field if non-nil, zero value otherwise. + +### GetOrderDetailsOk + +`func (o *DisputesEntity) GetOrderDetailsOk() (*OrderDetailsInDisputesEntity, bool)` + +GetOrderDetailsOk returns a tuple with the OrderDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderDetails + +`func (o *DisputesEntity) SetOrderDetails(v OrderDetailsInDisputesEntity)` + +SetOrderDetails sets OrderDetails field to given value. + +### HasOrderDetails + +`func (o *DisputesEntity) HasOrderDetails() bool` + +HasOrderDetails returns a boolean if a field has been set. + +### GetCustomerDetails + +`func (o *DisputesEntity) GetCustomerDetails() CustomerDetailsInDisputesEntity` + +GetCustomerDetails returns the CustomerDetails field if non-nil, zero value otherwise. + +### GetCustomerDetailsOk + +`func (o *DisputesEntity) GetCustomerDetailsOk() (*CustomerDetailsInDisputesEntity, bool)` + +GetCustomerDetailsOk returns a tuple with the CustomerDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerDetails + +`func (o *DisputesEntity) SetCustomerDetails(v CustomerDetailsInDisputesEntity)` + +SetCustomerDetails sets CustomerDetails field to given value. + +### HasCustomerDetails + +`func (o *DisputesEntity) HasCustomerDetails() bool` + +HasCustomerDetails returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DisputesEntityMerchantAccepted.md b/docs/DisputesEntityMerchantAccepted.md new file mode 100644 index 0000000..00d3982 --- /dev/null +++ b/docs/DisputesEntityMerchantAccepted.md @@ -0,0 +1,420 @@ +# DisputesEntityMerchantAccepted + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DisputeId** | Pointer to **int32** | | [optional] +**DisputeType** | Pointer to **string** | | [optional] +**ReasonCode** | Pointer to **string** | | [optional] +**ReasonDescription** | Pointer to **string** | | [optional] +**DisputeAmount** | Pointer to **float32** | Dispute amount may differ from transaction amount for partial cases. | [optional] +**CreatedAt** | Pointer to **string** | This is the time when the dispute was created. | [optional] +**RespondBy** | Pointer to **string** | This is the time by which evidence should be submitted to contest the dispute. | [optional] +**UpdatedAt** | Pointer to **string** | This is the time when the dispute case was updated. | [optional] +**ResolvedAt** | Pointer to **string** | This is the time when the dispute case was closed. | [optional] +**DisputeStatus** | Pointer to **string** | | [optional] +**CfDisputeRemarks** | Pointer to **string** | | [optional] +**PreferredEvidence** | Pointer to **map[string]interface{}** | | [optional] +**DisputeEvidence** | Pointer to | | [optional] +**OrderDetails** | Pointer to [**OrderDetailsInDisputesEntity**](OrderDetailsInDisputesEntity.md) | | [optional] +**CustomerDetails** | Pointer to [**CustomerDetailsInDisputesEntity**](CustomerDetailsInDisputesEntity.md) | | [optional] + +## Methods + +### NewDisputesEntityMerchantAccepted + +`func NewDisputesEntityMerchantAccepted() *DisputesEntityMerchantAccepted` + +NewDisputesEntityMerchantAccepted instantiates a new DisputesEntityMerchantAccepted object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDisputesEntityMerchantAcceptedWithDefaults + +`func NewDisputesEntityMerchantAcceptedWithDefaults() *DisputesEntityMerchantAccepted` + +NewDisputesEntityMerchantAcceptedWithDefaults instantiates a new DisputesEntityMerchantAccepted object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDisputeId + +`func (o *DisputesEntityMerchantAccepted) GetDisputeId() int32` + +GetDisputeId returns the DisputeId field if non-nil, zero value otherwise. + +### GetDisputeIdOk + +`func (o *DisputesEntityMerchantAccepted) GetDisputeIdOk() (*int32, bool)` + +GetDisputeIdOk returns a tuple with the DisputeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisputeId + +`func (o *DisputesEntityMerchantAccepted) SetDisputeId(v int32)` + +SetDisputeId sets DisputeId field to given value. + +### HasDisputeId + +`func (o *DisputesEntityMerchantAccepted) HasDisputeId() bool` + +HasDisputeId returns a boolean if a field has been set. + +### GetDisputeType + +`func (o *DisputesEntityMerchantAccepted) GetDisputeType() string` + +GetDisputeType returns the DisputeType field if non-nil, zero value otherwise. + +### GetDisputeTypeOk + +`func (o *DisputesEntityMerchantAccepted) GetDisputeTypeOk() (*string, bool)` + +GetDisputeTypeOk returns a tuple with the DisputeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisputeType + +`func (o *DisputesEntityMerchantAccepted) SetDisputeType(v string)` + +SetDisputeType sets DisputeType field to given value. + +### HasDisputeType + +`func (o *DisputesEntityMerchantAccepted) HasDisputeType() bool` + +HasDisputeType returns a boolean if a field has been set. + +### GetReasonCode + +`func (o *DisputesEntityMerchantAccepted) GetReasonCode() string` + +GetReasonCode returns the ReasonCode field if non-nil, zero value otherwise. + +### GetReasonCodeOk + +`func (o *DisputesEntityMerchantAccepted) GetReasonCodeOk() (*string, bool)` + +GetReasonCodeOk returns a tuple with the ReasonCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReasonCode + +`func (o *DisputesEntityMerchantAccepted) SetReasonCode(v string)` + +SetReasonCode sets ReasonCode field to given value. + +### HasReasonCode + +`func (o *DisputesEntityMerchantAccepted) HasReasonCode() bool` + +HasReasonCode returns a boolean if a field has been set. + +### GetReasonDescription + +`func (o *DisputesEntityMerchantAccepted) GetReasonDescription() string` + +GetReasonDescription returns the ReasonDescription field if non-nil, zero value otherwise. + +### GetReasonDescriptionOk + +`func (o *DisputesEntityMerchantAccepted) GetReasonDescriptionOk() (*string, bool)` + +GetReasonDescriptionOk returns a tuple with the ReasonDescription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReasonDescription + +`func (o *DisputesEntityMerchantAccepted) SetReasonDescription(v string)` + +SetReasonDescription sets ReasonDescription field to given value. + +### HasReasonDescription + +`func (o *DisputesEntityMerchantAccepted) HasReasonDescription() bool` + +HasReasonDescription returns a boolean if a field has been set. + +### GetDisputeAmount + +`func (o *DisputesEntityMerchantAccepted) GetDisputeAmount() float32` + +GetDisputeAmount returns the DisputeAmount field if non-nil, zero value otherwise. + +### GetDisputeAmountOk + +`func (o *DisputesEntityMerchantAccepted) GetDisputeAmountOk() (*float32, bool)` + +GetDisputeAmountOk returns a tuple with the DisputeAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisputeAmount + +`func (o *DisputesEntityMerchantAccepted) SetDisputeAmount(v float32)` + +SetDisputeAmount sets DisputeAmount field to given value. + +### HasDisputeAmount + +`func (o *DisputesEntityMerchantAccepted) HasDisputeAmount() bool` + +HasDisputeAmount returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *DisputesEntityMerchantAccepted) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DisputesEntityMerchantAccepted) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DisputesEntityMerchantAccepted) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DisputesEntityMerchantAccepted) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetRespondBy + +`func (o *DisputesEntityMerchantAccepted) GetRespondBy() string` + +GetRespondBy returns the RespondBy field if non-nil, zero value otherwise. + +### GetRespondByOk + +`func (o *DisputesEntityMerchantAccepted) GetRespondByOk() (*string, bool)` + +GetRespondByOk returns a tuple with the RespondBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRespondBy + +`func (o *DisputesEntityMerchantAccepted) SetRespondBy(v string)` + +SetRespondBy sets RespondBy field to given value. + +### HasRespondBy + +`func (o *DisputesEntityMerchantAccepted) HasRespondBy() bool` + +HasRespondBy returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *DisputesEntityMerchantAccepted) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *DisputesEntityMerchantAccepted) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *DisputesEntityMerchantAccepted) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *DisputesEntityMerchantAccepted) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetResolvedAt + +`func (o *DisputesEntityMerchantAccepted) GetResolvedAt() string` + +GetResolvedAt returns the ResolvedAt field if non-nil, zero value otherwise. + +### GetResolvedAtOk + +`func (o *DisputesEntityMerchantAccepted) GetResolvedAtOk() (*string, bool)` + +GetResolvedAtOk returns a tuple with the ResolvedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResolvedAt + +`func (o *DisputesEntityMerchantAccepted) SetResolvedAt(v string)` + +SetResolvedAt sets ResolvedAt field to given value. + +### HasResolvedAt + +`func (o *DisputesEntityMerchantAccepted) HasResolvedAt() bool` + +HasResolvedAt returns a boolean if a field has been set. + +### GetDisputeStatus + +`func (o *DisputesEntityMerchantAccepted) GetDisputeStatus() string` + +GetDisputeStatus returns the DisputeStatus field if non-nil, zero value otherwise. + +### GetDisputeStatusOk + +`func (o *DisputesEntityMerchantAccepted) GetDisputeStatusOk() (*string, bool)` + +GetDisputeStatusOk returns a tuple with the DisputeStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisputeStatus + +`func (o *DisputesEntityMerchantAccepted) SetDisputeStatus(v string)` + +SetDisputeStatus sets DisputeStatus field to given value. + +### HasDisputeStatus + +`func (o *DisputesEntityMerchantAccepted) HasDisputeStatus() bool` + +HasDisputeStatus returns a boolean if a field has been set. + +### GetCfDisputeRemarks + +`func (o *DisputesEntityMerchantAccepted) GetCfDisputeRemarks() string` + +GetCfDisputeRemarks returns the CfDisputeRemarks field if non-nil, zero value otherwise. + +### GetCfDisputeRemarksOk + +`func (o *DisputesEntityMerchantAccepted) GetCfDisputeRemarksOk() (*string, bool)` + +GetCfDisputeRemarksOk returns a tuple with the CfDisputeRemarks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCfDisputeRemarks + +`func (o *DisputesEntityMerchantAccepted) SetCfDisputeRemarks(v string)` + +SetCfDisputeRemarks sets CfDisputeRemarks field to given value. + +### HasCfDisputeRemarks + +`func (o *DisputesEntityMerchantAccepted) HasCfDisputeRemarks() bool` + +HasCfDisputeRemarks returns a boolean if a field has been set. + +### GetPreferredEvidence + +`func (o *DisputesEntityMerchantAccepted) GetPreferredEvidence() map[string]interface{}` + +GetPreferredEvidence returns the PreferredEvidence field if non-nil, zero value otherwise. + +### GetPreferredEvidenceOk + +`func (o *DisputesEntityMerchantAccepted) GetPreferredEvidenceOk() (*map[string]interface{}, bool)` + +GetPreferredEvidenceOk returns a tuple with the PreferredEvidence field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreferredEvidence + +`func (o *DisputesEntityMerchantAccepted) SetPreferredEvidence(v map[string]interface{})` + +SetPreferredEvidence sets PreferredEvidence field to given value. + +### HasPreferredEvidence + +`func (o *DisputesEntityMerchantAccepted) HasPreferredEvidence() bool` + +HasPreferredEvidence returns a boolean if a field has been set. + +### GetDisputeEvidence + +`func (o *DisputesEntityMerchantAccepted) GetDisputeEvidence() []Evidence` + +GetDisputeEvidence returns the DisputeEvidence field if non-nil, zero value otherwise. + +### GetDisputeEvidenceOk + +`func (o *DisputesEntityMerchantAccepted) GetDisputeEvidenceOk() (*[]Evidence, bool)` + +GetDisputeEvidenceOk returns a tuple with the DisputeEvidence field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisputeEvidence + +`func (o *DisputesEntityMerchantAccepted) SetDisputeEvidence(v []Evidence)` + +SetDisputeEvidence sets DisputeEvidence field to given value. + +### HasDisputeEvidence + +`func (o *DisputesEntityMerchantAccepted) HasDisputeEvidence() bool` + +HasDisputeEvidence returns a boolean if a field has been set. + +### GetOrderDetails + +`func (o *DisputesEntityMerchantAccepted) GetOrderDetails() OrderDetailsInDisputesEntity` + +GetOrderDetails returns the OrderDetails field if non-nil, zero value otherwise. + +### GetOrderDetailsOk + +`func (o *DisputesEntityMerchantAccepted) GetOrderDetailsOk() (*OrderDetailsInDisputesEntity, bool)` + +GetOrderDetailsOk returns a tuple with the OrderDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderDetails + +`func (o *DisputesEntityMerchantAccepted) SetOrderDetails(v OrderDetailsInDisputesEntity)` + +SetOrderDetails sets OrderDetails field to given value. + +### HasOrderDetails + +`func (o *DisputesEntityMerchantAccepted) HasOrderDetails() bool` + +HasOrderDetails returns a boolean if a field has been set. + +### GetCustomerDetails + +`func (o *DisputesEntityMerchantAccepted) GetCustomerDetails() CustomerDetailsInDisputesEntity` + +GetCustomerDetails returns the CustomerDetails field if non-nil, zero value otherwise. + +### GetCustomerDetailsOk + +`func (o *DisputesEntityMerchantAccepted) GetCustomerDetailsOk() (*CustomerDetailsInDisputesEntity, bool)` + +GetCustomerDetailsOk returns a tuple with the CustomerDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerDetails + +`func (o *DisputesEntityMerchantAccepted) SetCustomerDetails(v CustomerDetailsInDisputesEntity)` + +SetCustomerDetails sets CustomerDetails field to given value. + +### HasCustomerDetails + +`func (o *DisputesEntityMerchantAccepted) HasCustomerDetails() bool` + +HasCustomerDetails returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EasySplitAPI.md b/docs/EasySplitAPI.md index d4afecc..079fc8f 100644 --- a/docs/EasySplitAPI.md +++ b/docs/EasySplitAPI.md @@ -4,6 +4,7 @@ All URIs are relative to *https://sandbox.cashfree.com/pg* Method | HTTP request | Description ------------- | ------------- | ------------- +[**PGESCreateAdjustment**](EasySplitAPI.md#PGESCreateAdjustment) | **Post** /easy-split/vendors/{vendor_id}/adjustment | Create Adjustment [**PGESCreateOnDemandTransfer**](EasySplitAPI.md#PGESCreateOnDemandTransfer) | **Post** /easy-split/vendors/{vendor_id}/transfer | Create On Demand Transfer [**PGESCreateVendors**](EasySplitAPI.md#PGESCreateVendors) | **Post** /easy-split/vendors | Create vendor [**PGESDownloadVendorsDocs**](EasySplitAPI.md#PGESDownloadVendorsDocs) | **Get** /easy-split/vendor-docs/{vendor_id}/download/{doc_type} | Download Vendor Documents @@ -16,9 +17,93 @@ Method | HTTP request | Description [**PGESUploadVendorsDocs**](EasySplitAPI.md#PGESUploadVendorsDocs) | **Post** /easy-split/vendor-docs/{vendor_id} | Upload Vendor Docs [**PGOrderSplitAfterPayment**](EasySplitAPI.md#PGOrderSplitAfterPayment) | **Post** /easy-split/orders/{order_id}/split | Split After Payment [**PGOrderStaticSplit**](EasySplitAPI.md#PGOrderStaticSplit) | **Post** /easy-split/static-split | Create Static Split Configuration +[**PGSplitOrderRecon**](EasySplitAPI.md#PGSplitOrderRecon) | **Get** /easy-split/orders/{order_id} | Get Split and Settlement Details by OrderID +## PGESCreateAdjustment + +> VendorAdjustmentSuccessResponse PGESCreateAdjustment(ctx, vendorId).XApiVersion(xApiVersion).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).VendorAdjustmentRequest(vendorAdjustmentRequest).Execute() + +Create Adjustment + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + vendorId := "your-vendor-id" + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + vendorAdjustmentRequest := *cashfree.NewVendorAdjustmentRequest("VendorId_example", int64(123), float32(123), "Type_example") + + resp, r, err := cashfree.PGESCreateAdjustment(&xApiVersion, &vendorId, &xRequestId, &xIdempotencyKey, &vendorAdjustmentRequest, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.PGESCreateAdjustment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PGESCreateAdjustment`: VendorAdjustmentSuccessResponse + fmt.Fprintf(os.Stdout, "Response from `cashfree.PGESCreateAdjustment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**vendorId** | **string** | The id which uniquely identifies your vendor. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPGESCreateAdjustmentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + **vendorAdjustmentRequest** | [**VendorAdjustmentRequest**](VendorAdjustmentRequest.md) | Vendor Adjustment Request Body. | + +### Return type + +[**VendorAdjustmentSuccessResponse**](VendorAdjustmentSuccessResponse.md) + +### Authorization + +[XPartnerAPIKey](../README.md#XPartnerAPIKey), [XClientSecret](../README.md#XClientSecret), [XPartnerMerchantID](../README.md#XPartnerMerchantID), [XClientID](../README.md#XClientID), [XClientSignatureHeader](../README.md#XClientSignatureHeader) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## PGESCreateOnDemandTransfer > AdjustVendorBalanceResponse PGESCreateOnDemandTransfer(ctx, vendorId).XApiVersion(xApiVersion).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).AdjustVendorBalanceRequest(adjustVendorBalanceRequest).Execute() @@ -995,3 +1080,84 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## PGSplitOrderRecon + +> SplitOrderReconSuccessResponse PGSplitOrderRecon(ctx, orderId).XApiVersion(xApiVersion).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() + +Get Split and Settlement Details by OrderID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + orderId := "your-order-id" + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + + resp, r, err := cashfree.PGSplitOrderRecon(&xApiVersion, &orderId, &xRequestId, &xIdempotencyKey, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.PGSplitOrderRecon``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PGSplitOrderRecon`: SplitOrderReconSuccessResponse + fmt.Fprintf(os.Stdout, "Response from `cashfree.PGSplitOrderRecon`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orderId** | **string** | The id which uniquely identifies your order | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPGSplitOrderReconRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + +### Return type + +[**SplitOrderReconSuccessResponse**](SplitOrderReconSuccessResponse.md) + +### Authorization + +[XPartnerAPIKey](../README.md#XPartnerAPIKey), [XClientSecret](../README.md#XClientSecret), [XPartnerMerchantID](../README.md#XPartnerMerchantID), [XClientID](../README.md#XClientID), [XClientSignatureHeader](../README.md#XClientSignatureHeader) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/Evidence.md b/docs/Evidence.md new file mode 100644 index 0000000..4671300 --- /dev/null +++ b/docs/Evidence.md @@ -0,0 +1,108 @@ +# Evidence + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DocumentId** | Pointer to **int32** | | [optional] +**DocumentName** | Pointer to **string** | | [optional] +**DocumentType** | Pointer to **string** | | [optional] + +## Methods + +### NewEvidence + +`func NewEvidence() *Evidence` + +NewEvidence instantiates a new Evidence object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEvidenceWithDefaults + +`func NewEvidenceWithDefaults() *Evidence` + +NewEvidenceWithDefaults instantiates a new Evidence object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDocumentId + +`func (o *Evidence) GetDocumentId() int32` + +GetDocumentId returns the DocumentId field if non-nil, zero value otherwise. + +### GetDocumentIdOk + +`func (o *Evidence) GetDocumentIdOk() (*int32, bool)` + +GetDocumentIdOk returns a tuple with the DocumentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentId + +`func (o *Evidence) SetDocumentId(v int32)` + +SetDocumentId sets DocumentId field to given value. + +### HasDocumentId + +`func (o *Evidence) HasDocumentId() bool` + +HasDocumentId returns a boolean if a field has been set. + +### GetDocumentName + +`func (o *Evidence) GetDocumentName() string` + +GetDocumentName returns the DocumentName field if non-nil, zero value otherwise. + +### GetDocumentNameOk + +`func (o *Evidence) GetDocumentNameOk() (*string, bool)` + +GetDocumentNameOk returns a tuple with the DocumentName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentName + +`func (o *Evidence) SetDocumentName(v string)` + +SetDocumentName sets DocumentName field to given value. + +### HasDocumentName + +`func (o *Evidence) HasDocumentName() bool` + +HasDocumentName returns a boolean if a field has been set. + +### GetDocumentType + +`func (o *Evidence) GetDocumentType() string` + +GetDocumentType returns the DocumentType field if non-nil, zero value otherwise. + +### GetDocumentTypeOk + +`func (o *Evidence) GetDocumentTypeOk() (*string, bool)` + +GetDocumentTypeOk returns a tuple with the DocumentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentType + +`func (o *Evidence) SetDocumentType(v string)` + +SetDocumentType sets DocumentType field to given value. + +### HasDocumentType + +`func (o *Evidence) HasDocumentType() bool` + +HasDocumentType returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EvidenceSubmittedToContestDispute.md b/docs/EvidenceSubmittedToContestDispute.md new file mode 100644 index 0000000..d8f5482 --- /dev/null +++ b/docs/EvidenceSubmittedToContestDispute.md @@ -0,0 +1,134 @@ +# EvidenceSubmittedToContestDispute + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DocumentId** | Pointer to **int32** | | [optional] +**DocumentName** | Pointer to **string** | | [optional] +**DocumentType** | Pointer to **string** | | [optional] +**DownloadUrl** | Pointer to **string** | | [optional] + +## Methods + +### NewEvidenceSubmittedToContestDispute + +`func NewEvidenceSubmittedToContestDispute() *EvidenceSubmittedToContestDispute` + +NewEvidenceSubmittedToContestDispute instantiates a new EvidenceSubmittedToContestDispute object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEvidenceSubmittedToContestDisputeWithDefaults + +`func NewEvidenceSubmittedToContestDisputeWithDefaults() *EvidenceSubmittedToContestDispute` + +NewEvidenceSubmittedToContestDisputeWithDefaults instantiates a new EvidenceSubmittedToContestDispute object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDocumentId + +`func (o *EvidenceSubmittedToContestDispute) GetDocumentId() int32` + +GetDocumentId returns the DocumentId field if non-nil, zero value otherwise. + +### GetDocumentIdOk + +`func (o *EvidenceSubmittedToContestDispute) GetDocumentIdOk() (*int32, bool)` + +GetDocumentIdOk returns a tuple with the DocumentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentId + +`func (o *EvidenceSubmittedToContestDispute) SetDocumentId(v int32)` + +SetDocumentId sets DocumentId field to given value. + +### HasDocumentId + +`func (o *EvidenceSubmittedToContestDispute) HasDocumentId() bool` + +HasDocumentId returns a boolean if a field has been set. + +### GetDocumentName + +`func (o *EvidenceSubmittedToContestDispute) GetDocumentName() string` + +GetDocumentName returns the DocumentName field if non-nil, zero value otherwise. + +### GetDocumentNameOk + +`func (o *EvidenceSubmittedToContestDispute) GetDocumentNameOk() (*string, bool)` + +GetDocumentNameOk returns a tuple with the DocumentName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentName + +`func (o *EvidenceSubmittedToContestDispute) SetDocumentName(v string)` + +SetDocumentName sets DocumentName field to given value. + +### HasDocumentName + +`func (o *EvidenceSubmittedToContestDispute) HasDocumentName() bool` + +HasDocumentName returns a boolean if a field has been set. + +### GetDocumentType + +`func (o *EvidenceSubmittedToContestDispute) GetDocumentType() string` + +GetDocumentType returns the DocumentType field if non-nil, zero value otherwise. + +### GetDocumentTypeOk + +`func (o *EvidenceSubmittedToContestDispute) GetDocumentTypeOk() (*string, bool)` + +GetDocumentTypeOk returns a tuple with the DocumentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentType + +`func (o *EvidenceSubmittedToContestDispute) SetDocumentType(v string)` + +SetDocumentType sets DocumentType field to given value. + +### HasDocumentType + +`func (o *EvidenceSubmittedToContestDispute) HasDocumentType() bool` + +HasDocumentType returns a boolean if a field has been set. + +### GetDownloadUrl + +`func (o *EvidenceSubmittedToContestDispute) GetDownloadUrl() string` + +GetDownloadUrl returns the DownloadUrl field if non-nil, zero value otherwise. + +### GetDownloadUrlOk + +`func (o *EvidenceSubmittedToContestDispute) GetDownloadUrlOk() (*string, bool)` + +GetDownloadUrlOk returns a tuple with the DownloadUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDownloadUrl + +`func (o *EvidenceSubmittedToContestDispute) SetDownloadUrl(v string)` + +SetDownloadUrl sets DownloadUrl field to given value. + +### HasDownloadUrl + +`func (o *EvidenceSubmittedToContestDispute) HasDownloadUrl() bool` + +HasDownloadUrl returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EvidencesToContestDispute.md b/docs/EvidencesToContestDispute.md new file mode 100644 index 0000000..662af4f --- /dev/null +++ b/docs/EvidencesToContestDispute.md @@ -0,0 +1,82 @@ +# EvidencesToContestDispute + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DocumentType** | Pointer to **string** | | [optional] +**DocumentDescription** | Pointer to **string** | | [optional] + +## Methods + +### NewEvidencesToContestDispute + +`func NewEvidencesToContestDispute() *EvidencesToContestDispute` + +NewEvidencesToContestDispute instantiates a new EvidencesToContestDispute object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEvidencesToContestDisputeWithDefaults + +`func NewEvidencesToContestDisputeWithDefaults() *EvidencesToContestDispute` + +NewEvidencesToContestDisputeWithDefaults instantiates a new EvidencesToContestDispute object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDocumentType + +`func (o *EvidencesToContestDispute) GetDocumentType() string` + +GetDocumentType returns the DocumentType field if non-nil, zero value otherwise. + +### GetDocumentTypeOk + +`func (o *EvidencesToContestDispute) GetDocumentTypeOk() (*string, bool)` + +GetDocumentTypeOk returns a tuple with the DocumentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentType + +`func (o *EvidencesToContestDispute) SetDocumentType(v string)` + +SetDocumentType sets DocumentType field to given value. + +### HasDocumentType + +`func (o *EvidencesToContestDispute) HasDocumentType() bool` + +HasDocumentType returns a boolean if a field has been set. + +### GetDocumentDescription + +`func (o *EvidencesToContestDispute) GetDocumentDescription() string` + +GetDocumentDescription returns the DocumentDescription field if non-nil, zero value otherwise. + +### GetDocumentDescriptionOk + +`func (o *EvidencesToContestDispute) GetDocumentDescriptionOk() (*string, bool)` + +GetDocumentDescriptionOk returns a tuple with the DocumentDescription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentDescription + +`func (o *EvidencesToContestDispute) SetDocumentDescription(v string)` + +SetDocumentDescription sets DocumentDescription field to given value. + +### HasDocumentDescription + +`func (o *EvidencesToContestDispute) HasDocumentDescription() bool` + +HasDocumentDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtendedCartDetails.md b/docs/ExtendedCartDetails.md new file mode 100644 index 0000000..2505d0c --- /dev/null +++ b/docs/ExtendedCartDetails.md @@ -0,0 +1,82 @@ +# ExtendedCartDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | Name of the cart. | [optional] +**Items** | Pointer to [**[]CartItem**](CartItem.md) | | [optional] + +## Methods + +### NewExtendedCartDetails + +`func NewExtendedCartDetails() *ExtendedCartDetails` + +NewExtendedCartDetails instantiates a new ExtendedCartDetails object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewExtendedCartDetailsWithDefaults + +`func NewExtendedCartDetailsWithDefaults() *ExtendedCartDetails` + +NewExtendedCartDetailsWithDefaults instantiates a new ExtendedCartDetails object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ExtendedCartDetails) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ExtendedCartDetails) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ExtendedCartDetails) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ExtendedCartDetails) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetItems + +`func (o *ExtendedCartDetails) GetItems() []CartItem` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *ExtendedCartDetails) GetItemsOk() (*[]CartItem, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *ExtendedCartDetails) SetItems(v []CartItem)` + +SetItems sets Items field to given value. + +### HasItems + +`func (o *ExtendedCartDetails) HasItems() bool` + +HasItems returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtendedCustomerDetails.md b/docs/ExtendedCustomerDetails.md new file mode 100644 index 0000000..79cc090 --- /dev/null +++ b/docs/ExtendedCustomerDetails.md @@ -0,0 +1,160 @@ +# ExtendedCustomerDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerId** | Pointer to **string** | A unique identifier for the customer. Use alphanumeric values only. | [optional] +**CustomerEmail** | Pointer to **string** | Customer email address. | [optional] +**CustomerPhone** | Pointer to **string** | Customer phone number. | [optional] +**CustomerName** | Pointer to **string** | Name of the customer. | [optional] +**CustomerUid** | Pointer to **string** | Customer identifier at Cashfree. You will get this when you create/get customer | [optional] + +## Methods + +### NewExtendedCustomerDetails + +`func NewExtendedCustomerDetails() *ExtendedCustomerDetails` + +NewExtendedCustomerDetails instantiates a new ExtendedCustomerDetails object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewExtendedCustomerDetailsWithDefaults + +`func NewExtendedCustomerDetailsWithDefaults() *ExtendedCustomerDetails` + +NewExtendedCustomerDetailsWithDefaults instantiates a new ExtendedCustomerDetails object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustomerId + +`func (o *ExtendedCustomerDetails) GetCustomerId() string` + +GetCustomerId returns the CustomerId field if non-nil, zero value otherwise. + +### GetCustomerIdOk + +`func (o *ExtendedCustomerDetails) GetCustomerIdOk() (*string, bool)` + +GetCustomerIdOk returns a tuple with the CustomerId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerId + +`func (o *ExtendedCustomerDetails) SetCustomerId(v string)` + +SetCustomerId sets CustomerId field to given value. + +### HasCustomerId + +`func (o *ExtendedCustomerDetails) HasCustomerId() bool` + +HasCustomerId returns a boolean if a field has been set. + +### GetCustomerEmail + +`func (o *ExtendedCustomerDetails) GetCustomerEmail() string` + +GetCustomerEmail returns the CustomerEmail field if non-nil, zero value otherwise. + +### GetCustomerEmailOk + +`func (o *ExtendedCustomerDetails) GetCustomerEmailOk() (*string, bool)` + +GetCustomerEmailOk returns a tuple with the CustomerEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerEmail + +`func (o *ExtendedCustomerDetails) SetCustomerEmail(v string)` + +SetCustomerEmail sets CustomerEmail field to given value. + +### HasCustomerEmail + +`func (o *ExtendedCustomerDetails) HasCustomerEmail() bool` + +HasCustomerEmail returns a boolean if a field has been set. + +### GetCustomerPhone + +`func (o *ExtendedCustomerDetails) GetCustomerPhone() string` + +GetCustomerPhone returns the CustomerPhone field if non-nil, zero value otherwise. + +### GetCustomerPhoneOk + +`func (o *ExtendedCustomerDetails) GetCustomerPhoneOk() (*string, bool)` + +GetCustomerPhoneOk returns a tuple with the CustomerPhone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerPhone + +`func (o *ExtendedCustomerDetails) SetCustomerPhone(v string)` + +SetCustomerPhone sets CustomerPhone field to given value. + +### HasCustomerPhone + +`func (o *ExtendedCustomerDetails) HasCustomerPhone() bool` + +HasCustomerPhone returns a boolean if a field has been set. + +### GetCustomerName + +`func (o *ExtendedCustomerDetails) GetCustomerName() string` + +GetCustomerName returns the CustomerName field if non-nil, zero value otherwise. + +### GetCustomerNameOk + +`func (o *ExtendedCustomerDetails) GetCustomerNameOk() (*string, bool)` + +GetCustomerNameOk returns a tuple with the CustomerName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerName + +`func (o *ExtendedCustomerDetails) SetCustomerName(v string)` + +SetCustomerName sets CustomerName field to given value. + +### HasCustomerName + +`func (o *ExtendedCustomerDetails) HasCustomerName() bool` + +HasCustomerName returns a boolean if a field has been set. + +### GetCustomerUid + +`func (o *ExtendedCustomerDetails) GetCustomerUid() string` + +GetCustomerUid returns the CustomerUid field if non-nil, zero value otherwise. + +### GetCustomerUidOk + +`func (o *ExtendedCustomerDetails) GetCustomerUidOk() (*string, bool)` + +GetCustomerUidOk returns a tuple with the CustomerUid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerUid + +`func (o *ExtendedCustomerDetails) SetCustomerUid(v string)` + +SetCustomerUid sets CustomerUid field to given value. + +### HasCustomerUid + +`func (o *ExtendedCustomerDetails) HasCustomerUid() bool` + +HasCustomerUid returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OfferExtendedDetails.md b/docs/OfferExtendedDetails.md new file mode 100644 index 0000000..988b498 --- /dev/null +++ b/docs/OfferExtendedDetails.md @@ -0,0 +1,186 @@ +# OfferExtendedDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OfferId** | Pointer to **string** | | [optional] +**OfferStatus** | Pointer to **string** | | [optional] +**OfferMeta** | Pointer to [**OfferMeta**](OfferMeta.md) | | [optional] +**OfferTnc** | Pointer to [**OfferTnc**](OfferTnc.md) | | [optional] +**OfferDetails** | Pointer to [**OfferDetails**](OfferDetails.md) | | [optional] +**OfferValidations** | Pointer to [**OfferValidations**](OfferValidations.md) | | [optional] + +## Methods + +### NewOfferExtendedDetails + +`func NewOfferExtendedDetails() *OfferExtendedDetails` + +NewOfferExtendedDetails instantiates a new OfferExtendedDetails object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOfferExtendedDetailsWithDefaults + +`func NewOfferExtendedDetailsWithDefaults() *OfferExtendedDetails` + +NewOfferExtendedDetailsWithDefaults instantiates a new OfferExtendedDetails object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOfferId + +`func (o *OfferExtendedDetails) GetOfferId() string` + +GetOfferId returns the OfferId field if non-nil, zero value otherwise. + +### GetOfferIdOk + +`func (o *OfferExtendedDetails) GetOfferIdOk() (*string, bool)` + +GetOfferIdOk returns a tuple with the OfferId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOfferId + +`func (o *OfferExtendedDetails) SetOfferId(v string)` + +SetOfferId sets OfferId field to given value. + +### HasOfferId + +`func (o *OfferExtendedDetails) HasOfferId() bool` + +HasOfferId returns a boolean if a field has been set. + +### GetOfferStatus + +`func (o *OfferExtendedDetails) GetOfferStatus() string` + +GetOfferStatus returns the OfferStatus field if non-nil, zero value otherwise. + +### GetOfferStatusOk + +`func (o *OfferExtendedDetails) GetOfferStatusOk() (*string, bool)` + +GetOfferStatusOk returns a tuple with the OfferStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOfferStatus + +`func (o *OfferExtendedDetails) SetOfferStatus(v string)` + +SetOfferStatus sets OfferStatus field to given value. + +### HasOfferStatus + +`func (o *OfferExtendedDetails) HasOfferStatus() bool` + +HasOfferStatus returns a boolean if a field has been set. + +### GetOfferMeta + +`func (o *OfferExtendedDetails) GetOfferMeta() OfferMeta` + +GetOfferMeta returns the OfferMeta field if non-nil, zero value otherwise. + +### GetOfferMetaOk + +`func (o *OfferExtendedDetails) GetOfferMetaOk() (*OfferMeta, bool)` + +GetOfferMetaOk returns a tuple with the OfferMeta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOfferMeta + +`func (o *OfferExtendedDetails) SetOfferMeta(v OfferMeta)` + +SetOfferMeta sets OfferMeta field to given value. + +### HasOfferMeta + +`func (o *OfferExtendedDetails) HasOfferMeta() bool` + +HasOfferMeta returns a boolean if a field has been set. + +### GetOfferTnc + +`func (o *OfferExtendedDetails) GetOfferTnc() OfferTnc` + +GetOfferTnc returns the OfferTnc field if non-nil, zero value otherwise. + +### GetOfferTncOk + +`func (o *OfferExtendedDetails) GetOfferTncOk() (*OfferTnc, bool)` + +GetOfferTncOk returns a tuple with the OfferTnc field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOfferTnc + +`func (o *OfferExtendedDetails) SetOfferTnc(v OfferTnc)` + +SetOfferTnc sets OfferTnc field to given value. + +### HasOfferTnc + +`func (o *OfferExtendedDetails) HasOfferTnc() bool` + +HasOfferTnc returns a boolean if a field has been set. + +### GetOfferDetails + +`func (o *OfferExtendedDetails) GetOfferDetails() OfferDetails` + +GetOfferDetails returns the OfferDetails field if non-nil, zero value otherwise. + +### GetOfferDetailsOk + +`func (o *OfferExtendedDetails) GetOfferDetailsOk() (*OfferDetails, bool)` + +GetOfferDetailsOk returns a tuple with the OfferDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOfferDetails + +`func (o *OfferExtendedDetails) SetOfferDetails(v OfferDetails)` + +SetOfferDetails sets OfferDetails field to given value. + +### HasOfferDetails + +`func (o *OfferExtendedDetails) HasOfferDetails() bool` + +HasOfferDetails returns a boolean if a field has been set. + +### GetOfferValidations + +`func (o *OfferExtendedDetails) GetOfferValidations() OfferValidations` + +GetOfferValidations returns the OfferValidations field if non-nil, zero value otherwise. + +### GetOfferValidationsOk + +`func (o *OfferExtendedDetails) GetOfferValidationsOk() (*OfferValidations, bool)` + +GetOfferValidationsOk returns a tuple with the OfferValidations field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOfferValidations + +`func (o *OfferExtendedDetails) SetOfferValidations(v OfferValidations)` + +SetOfferValidations sets OfferValidations field to given value. + +### HasOfferValidations + +`func (o *OfferExtendedDetails) HasOfferValidations() bool` + +HasOfferValidations returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OnboardSoundboxVpaRequest.md b/docs/OnboardSoundboxVpaRequest.md new file mode 100644 index 0000000..ac47b53 --- /dev/null +++ b/docs/OnboardSoundboxVpaRequest.md @@ -0,0 +1,145 @@ +# OnboardSoundboxVpaRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Vpa** | **string** | Terminal Vpa ,that need to onboard on soundbox | +**CfTerminalId** | **string** | cashfree terminal id. | +**DeviceSerialNo** | **string** | Device Serial No of soundbox | +**MerchantName** | Pointer to **string** | Merchant Name that need to onboard on soundbox | [optional] +**Language** | Pointer to **string** | language of soundbox,currently English, Hindi, Tamil | [optional] + +## Methods + +### NewOnboardSoundboxVpaRequest + +`func NewOnboardSoundboxVpaRequest(vpa string, cfTerminalId string, deviceSerialNo string, ) *OnboardSoundboxVpaRequest` + +NewOnboardSoundboxVpaRequest instantiates a new OnboardSoundboxVpaRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOnboardSoundboxVpaRequestWithDefaults + +`func NewOnboardSoundboxVpaRequestWithDefaults() *OnboardSoundboxVpaRequest` + +NewOnboardSoundboxVpaRequestWithDefaults instantiates a new OnboardSoundboxVpaRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVpa + +`func (o *OnboardSoundboxVpaRequest) GetVpa() string` + +GetVpa returns the Vpa field if non-nil, zero value otherwise. + +### GetVpaOk + +`func (o *OnboardSoundboxVpaRequest) GetVpaOk() (*string, bool)` + +GetVpaOk returns a tuple with the Vpa field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVpa + +`func (o *OnboardSoundboxVpaRequest) SetVpa(v string)` + +SetVpa sets Vpa field to given value. + + +### GetCfTerminalId + +`func (o *OnboardSoundboxVpaRequest) GetCfTerminalId() string` + +GetCfTerminalId returns the CfTerminalId field if non-nil, zero value otherwise. + +### GetCfTerminalIdOk + +`func (o *OnboardSoundboxVpaRequest) GetCfTerminalIdOk() (*string, bool)` + +GetCfTerminalIdOk returns a tuple with the CfTerminalId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCfTerminalId + +`func (o *OnboardSoundboxVpaRequest) SetCfTerminalId(v string)` + +SetCfTerminalId sets CfTerminalId field to given value. + + +### GetDeviceSerialNo + +`func (o *OnboardSoundboxVpaRequest) GetDeviceSerialNo() string` + +GetDeviceSerialNo returns the DeviceSerialNo field if non-nil, zero value otherwise. + +### GetDeviceSerialNoOk + +`func (o *OnboardSoundboxVpaRequest) GetDeviceSerialNoOk() (*string, bool)` + +GetDeviceSerialNoOk returns a tuple with the DeviceSerialNo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceSerialNo + +`func (o *OnboardSoundboxVpaRequest) SetDeviceSerialNo(v string)` + +SetDeviceSerialNo sets DeviceSerialNo field to given value. + + +### GetMerchantName + +`func (o *OnboardSoundboxVpaRequest) GetMerchantName() string` + +GetMerchantName returns the MerchantName field if non-nil, zero value otherwise. + +### GetMerchantNameOk + +`func (o *OnboardSoundboxVpaRequest) GetMerchantNameOk() (*string, bool)` + +GetMerchantNameOk returns a tuple with the MerchantName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMerchantName + +`func (o *OnboardSoundboxVpaRequest) SetMerchantName(v string)` + +SetMerchantName sets MerchantName field to given value. + +### HasMerchantName + +`func (o *OnboardSoundboxVpaRequest) HasMerchantName() bool` + +HasMerchantName returns a boolean if a field has been set. + +### GetLanguage + +`func (o *OnboardSoundboxVpaRequest) GetLanguage() string` + +GetLanguage returns the Language field if non-nil, zero value otherwise. + +### GetLanguageOk + +`func (o *OnboardSoundboxVpaRequest) GetLanguageOk() (*string, bool)` + +GetLanguageOk returns a tuple with the Language field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLanguage + +`func (o *OnboardSoundboxVpaRequest) SetLanguage(v string)` + +SetLanguage sets Language field to given value. + +### HasLanguage + +`func (o *OnboardSoundboxVpaRequest) HasLanguage() bool` + +HasLanguage returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrderDeliveryStatus.md b/docs/OrderDeliveryStatus.md new file mode 100644 index 0000000..5b224c5 --- /dev/null +++ b/docs/OrderDeliveryStatus.md @@ -0,0 +1,77 @@ +# OrderDeliveryStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | Delivery status of order | +**Reason** | Pointer to **string** | Reason of provided order delivery status. This is optional field. | [optional] + +## Methods + +### NewOrderDeliveryStatus + +`func NewOrderDeliveryStatus(status string, ) *OrderDeliveryStatus` + +NewOrderDeliveryStatus instantiates a new OrderDeliveryStatus object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderDeliveryStatusWithDefaults + +`func NewOrderDeliveryStatusWithDefaults() *OrderDeliveryStatus` + +NewOrderDeliveryStatusWithDefaults instantiates a new OrderDeliveryStatus object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *OrderDeliveryStatus) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *OrderDeliveryStatus) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *OrderDeliveryStatus) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetReason + +`func (o *OrderDeliveryStatus) GetReason() string` + +GetReason returns the Reason field if non-nil, zero value otherwise. + +### GetReasonOk + +`func (o *OrderDeliveryStatus) GetReasonOk() (*string, bool)` + +GetReasonOk returns a tuple with the Reason field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReason + +`func (o *OrderDeliveryStatus) SetReason(v string)` + +SetReason sets Reason field to given value. + +### HasReason + +`func (o *OrderDeliveryStatus) HasReason() bool` + +HasReason returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrderDetailsInDisputesEntity.md b/docs/OrderDetailsInDisputesEntity.md new file mode 100644 index 0000000..e342c62 --- /dev/null +++ b/docs/OrderDetailsInDisputesEntity.md @@ -0,0 +1,186 @@ +# OrderDetailsInDisputesEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OrderId** | Pointer to **string** | | [optional] +**OrderCurrency** | Pointer to **string** | | [optional] +**OrderAmount** | Pointer to **float32** | | [optional] +**CfPaymentId** | Pointer to **string** | | [optional] +**PaymentCurrency** | Pointer to **string** | | [optional] +**PaymentAmount** | Pointer to **float32** | | [optional] + +## Methods + +### NewOrderDetailsInDisputesEntity + +`func NewOrderDetailsInDisputesEntity() *OrderDetailsInDisputesEntity` + +NewOrderDetailsInDisputesEntity instantiates a new OrderDetailsInDisputesEntity object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderDetailsInDisputesEntityWithDefaults + +`func NewOrderDetailsInDisputesEntityWithDefaults() *OrderDetailsInDisputesEntity` + +NewOrderDetailsInDisputesEntityWithDefaults instantiates a new OrderDetailsInDisputesEntity object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOrderId + +`func (o *OrderDetailsInDisputesEntity) GetOrderId() string` + +GetOrderId returns the OrderId field if non-nil, zero value otherwise. + +### GetOrderIdOk + +`func (o *OrderDetailsInDisputesEntity) GetOrderIdOk() (*string, bool)` + +GetOrderIdOk returns a tuple with the OrderId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderId + +`func (o *OrderDetailsInDisputesEntity) SetOrderId(v string)` + +SetOrderId sets OrderId field to given value. + +### HasOrderId + +`func (o *OrderDetailsInDisputesEntity) HasOrderId() bool` + +HasOrderId returns a boolean if a field has been set. + +### GetOrderCurrency + +`func (o *OrderDetailsInDisputesEntity) GetOrderCurrency() string` + +GetOrderCurrency returns the OrderCurrency field if non-nil, zero value otherwise. + +### GetOrderCurrencyOk + +`func (o *OrderDetailsInDisputesEntity) GetOrderCurrencyOk() (*string, bool)` + +GetOrderCurrencyOk returns a tuple with the OrderCurrency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderCurrency + +`func (o *OrderDetailsInDisputesEntity) SetOrderCurrency(v string)` + +SetOrderCurrency sets OrderCurrency field to given value. + +### HasOrderCurrency + +`func (o *OrderDetailsInDisputesEntity) HasOrderCurrency() bool` + +HasOrderCurrency returns a boolean if a field has been set. + +### GetOrderAmount + +`func (o *OrderDetailsInDisputesEntity) GetOrderAmount() float32` + +GetOrderAmount returns the OrderAmount field if non-nil, zero value otherwise. + +### GetOrderAmountOk + +`func (o *OrderDetailsInDisputesEntity) GetOrderAmountOk() (*float32, bool)` + +GetOrderAmountOk returns a tuple with the OrderAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderAmount + +`func (o *OrderDetailsInDisputesEntity) SetOrderAmount(v float32)` + +SetOrderAmount sets OrderAmount field to given value. + +### HasOrderAmount + +`func (o *OrderDetailsInDisputesEntity) HasOrderAmount() bool` + +HasOrderAmount returns a boolean if a field has been set. + +### GetCfPaymentId + +`func (o *OrderDetailsInDisputesEntity) GetCfPaymentId() string` + +GetCfPaymentId returns the CfPaymentId field if non-nil, zero value otherwise. + +### GetCfPaymentIdOk + +`func (o *OrderDetailsInDisputesEntity) GetCfPaymentIdOk() (*string, bool)` + +GetCfPaymentIdOk returns a tuple with the CfPaymentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCfPaymentId + +`func (o *OrderDetailsInDisputesEntity) SetCfPaymentId(v string)` + +SetCfPaymentId sets CfPaymentId field to given value. + +### HasCfPaymentId + +`func (o *OrderDetailsInDisputesEntity) HasCfPaymentId() bool` + +HasCfPaymentId returns a boolean if a field has been set. + +### GetPaymentCurrency + +`func (o *OrderDetailsInDisputesEntity) GetPaymentCurrency() string` + +GetPaymentCurrency returns the PaymentCurrency field if non-nil, zero value otherwise. + +### GetPaymentCurrencyOk + +`func (o *OrderDetailsInDisputesEntity) GetPaymentCurrencyOk() (*string, bool)` + +GetPaymentCurrencyOk returns a tuple with the PaymentCurrency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPaymentCurrency + +`func (o *OrderDetailsInDisputesEntity) SetPaymentCurrency(v string)` + +SetPaymentCurrency sets PaymentCurrency field to given value. + +### HasPaymentCurrency + +`func (o *OrderDetailsInDisputesEntity) HasPaymentCurrency() bool` + +HasPaymentCurrency returns a boolean if a field has been set. + +### GetPaymentAmount + +`func (o *OrderDetailsInDisputesEntity) GetPaymentAmount() float32` + +GetPaymentAmount returns the PaymentAmount field if non-nil, zero value otherwise. + +### GetPaymentAmountOk + +`func (o *OrderDetailsInDisputesEntity) GetPaymentAmountOk() (*float32, bool)` + +GetPaymentAmountOk returns a tuple with the PaymentAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPaymentAmount + +`func (o *OrderDetailsInDisputesEntity) SetPaymentAmount(v float32)` + +SetPaymentAmount sets PaymentAmount field to given value. + +### HasPaymentAmount + +`func (o *OrderDetailsInDisputesEntity) HasPaymentAmount() bool` + +HasPaymentAmount returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrderEntity.md b/docs/OrderEntity.md index 9eb712b..bfa14a8 100644 --- a/docs/OrderEntity.md +++ b/docs/OrderEntity.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **CustomerDetails** | Pointer to [**CustomerDetailsResponse**](CustomerDetailsResponse.md) | | [optional] **OrderMeta** | Pointer to [**OrderMeta**](OrderMeta.md) | | [optional] **OrderTags** | Pointer to **map[string]string** | Custom Tags in thr form of {\"key\":\"value\"} which can be passed for an order. A maximum of 10 tags can be added | [optional] +**CartDetails** | Pointer to [**CartDetailsEntity**](CartDetailsEntity.md) | | [optional] ## Methods @@ -388,6 +389,31 @@ SetOrderTags sets OrderTags field to given value. HasOrderTags returns a boolean if a field has been set. +### GetCartDetails + +`func (o *OrderEntity) GetCartDetails() CartDetailsEntity` + +GetCartDetails returns the CartDetails field if non-nil, zero value otherwise. + +### GetCartDetailsOk + +`func (o *OrderEntity) GetCartDetailsOk() (*CartDetailsEntity, bool)` + +GetCartDetailsOk returns a tuple with the CartDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCartDetails + +`func (o *OrderEntity) SetCartDetails(v CartDetailsEntity)` + +SetCartDetails sets CartDetails field to given value. + +### HasCartDetails + +`func (o *OrderEntity) HasCartDetails() bool` + +HasCartDetails returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderExtendedDataEntity.md b/docs/OrderExtendedDataEntity.md new file mode 100644 index 0000000..e780a95 --- /dev/null +++ b/docs/OrderExtendedDataEntity.md @@ -0,0 +1,316 @@ +# OrderExtendedDataEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CfOrderId** | Pointer to **string** | unique id generated by cashfree for your order | [optional] +**OrderId** | Pointer to **string** | order_id sent during the api request | [optional] +**OrderAmount** | Pointer to **float32** | | [optional] +**OrderCurrency** | Pointer to **string** | Currency of the order. Example INR | [optional] +**CreatedAt** | Pointer to **time.Time** | When the order was created at cashfree's server | [optional] +**Charges** | Pointer to [**ChargesEntity**](ChargesEntity.md) | | [optional] +**CustomerDetails** | Pointer to [**ExtendedCustomerDetails**](ExtendedCustomerDetails.md) | | [optional] +**ShippingAddress** | Pointer to [**AddressDetails**](AddressDetails.md) | | [optional] +**BillingAddress** | Pointer to [**AddressDetails**](AddressDetails.md) | | [optional] +**Cart** | Pointer to [**ExtendedCartDetails**](ExtendedCartDetails.md) | | [optional] +**Offer** | Pointer to [**OfferExtendedDetails**](OfferExtendedDetails.md) | | [optional] + +## Methods + +### NewOrderExtendedDataEntity + +`func NewOrderExtendedDataEntity() *OrderExtendedDataEntity` + +NewOrderExtendedDataEntity instantiates a new OrderExtendedDataEntity object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderExtendedDataEntityWithDefaults + +`func NewOrderExtendedDataEntityWithDefaults() *OrderExtendedDataEntity` + +NewOrderExtendedDataEntityWithDefaults instantiates a new OrderExtendedDataEntity object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCfOrderId + +`func (o *OrderExtendedDataEntity) GetCfOrderId() string` + +GetCfOrderId returns the CfOrderId field if non-nil, zero value otherwise. + +### GetCfOrderIdOk + +`func (o *OrderExtendedDataEntity) GetCfOrderIdOk() (*string, bool)` + +GetCfOrderIdOk returns a tuple with the CfOrderId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCfOrderId + +`func (o *OrderExtendedDataEntity) SetCfOrderId(v string)` + +SetCfOrderId sets CfOrderId field to given value. + +### HasCfOrderId + +`func (o *OrderExtendedDataEntity) HasCfOrderId() bool` + +HasCfOrderId returns a boolean if a field has been set. + +### GetOrderId + +`func (o *OrderExtendedDataEntity) GetOrderId() string` + +GetOrderId returns the OrderId field if non-nil, zero value otherwise. + +### GetOrderIdOk + +`func (o *OrderExtendedDataEntity) GetOrderIdOk() (*string, bool)` + +GetOrderIdOk returns a tuple with the OrderId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderId + +`func (o *OrderExtendedDataEntity) SetOrderId(v string)` + +SetOrderId sets OrderId field to given value. + +### HasOrderId + +`func (o *OrderExtendedDataEntity) HasOrderId() bool` + +HasOrderId returns a boolean if a field has been set. + +### GetOrderAmount + +`func (o *OrderExtendedDataEntity) GetOrderAmount() float32` + +GetOrderAmount returns the OrderAmount field if non-nil, zero value otherwise. + +### GetOrderAmountOk + +`func (o *OrderExtendedDataEntity) GetOrderAmountOk() (*float32, bool)` + +GetOrderAmountOk returns a tuple with the OrderAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderAmount + +`func (o *OrderExtendedDataEntity) SetOrderAmount(v float32)` + +SetOrderAmount sets OrderAmount field to given value. + +### HasOrderAmount + +`func (o *OrderExtendedDataEntity) HasOrderAmount() bool` + +HasOrderAmount returns a boolean if a field has been set. + +### GetOrderCurrency + +`func (o *OrderExtendedDataEntity) GetOrderCurrency() string` + +GetOrderCurrency returns the OrderCurrency field if non-nil, zero value otherwise. + +### GetOrderCurrencyOk + +`func (o *OrderExtendedDataEntity) GetOrderCurrencyOk() (*string, bool)` + +GetOrderCurrencyOk returns a tuple with the OrderCurrency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderCurrency + +`func (o *OrderExtendedDataEntity) SetOrderCurrency(v string)` + +SetOrderCurrency sets OrderCurrency field to given value. + +### HasOrderCurrency + +`func (o *OrderExtendedDataEntity) HasOrderCurrency() bool` + +HasOrderCurrency returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *OrderExtendedDataEntity) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *OrderExtendedDataEntity) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *OrderExtendedDataEntity) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *OrderExtendedDataEntity) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetCharges + +`func (o *OrderExtendedDataEntity) GetCharges() ChargesEntity` + +GetCharges returns the Charges field if non-nil, zero value otherwise. + +### GetChargesOk + +`func (o *OrderExtendedDataEntity) GetChargesOk() (*ChargesEntity, bool)` + +GetChargesOk returns a tuple with the Charges field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCharges + +`func (o *OrderExtendedDataEntity) SetCharges(v ChargesEntity)` + +SetCharges sets Charges field to given value. + +### HasCharges + +`func (o *OrderExtendedDataEntity) HasCharges() bool` + +HasCharges returns a boolean if a field has been set. + +### GetCustomerDetails + +`func (o *OrderExtendedDataEntity) GetCustomerDetails() ExtendedCustomerDetails` + +GetCustomerDetails returns the CustomerDetails field if non-nil, zero value otherwise. + +### GetCustomerDetailsOk + +`func (o *OrderExtendedDataEntity) GetCustomerDetailsOk() (*ExtendedCustomerDetails, bool)` + +GetCustomerDetailsOk returns a tuple with the CustomerDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerDetails + +`func (o *OrderExtendedDataEntity) SetCustomerDetails(v ExtendedCustomerDetails)` + +SetCustomerDetails sets CustomerDetails field to given value. + +### HasCustomerDetails + +`func (o *OrderExtendedDataEntity) HasCustomerDetails() bool` + +HasCustomerDetails returns a boolean if a field has been set. + +### GetShippingAddress + +`func (o *OrderExtendedDataEntity) GetShippingAddress() AddressDetails` + +GetShippingAddress returns the ShippingAddress field if non-nil, zero value otherwise. + +### GetShippingAddressOk + +`func (o *OrderExtendedDataEntity) GetShippingAddressOk() (*AddressDetails, bool)` + +GetShippingAddressOk returns a tuple with the ShippingAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetShippingAddress + +`func (o *OrderExtendedDataEntity) SetShippingAddress(v AddressDetails)` + +SetShippingAddress sets ShippingAddress field to given value. + +### HasShippingAddress + +`func (o *OrderExtendedDataEntity) HasShippingAddress() bool` + +HasShippingAddress returns a boolean if a field has been set. + +### GetBillingAddress + +`func (o *OrderExtendedDataEntity) GetBillingAddress() AddressDetails` + +GetBillingAddress returns the BillingAddress field if non-nil, zero value otherwise. + +### GetBillingAddressOk + +`func (o *OrderExtendedDataEntity) GetBillingAddressOk() (*AddressDetails, bool)` + +GetBillingAddressOk returns a tuple with the BillingAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBillingAddress + +`func (o *OrderExtendedDataEntity) SetBillingAddress(v AddressDetails)` + +SetBillingAddress sets BillingAddress field to given value. + +### HasBillingAddress + +`func (o *OrderExtendedDataEntity) HasBillingAddress() bool` + +HasBillingAddress returns a boolean if a field has been set. + +### GetCart + +`func (o *OrderExtendedDataEntity) GetCart() ExtendedCartDetails` + +GetCart returns the Cart field if non-nil, zero value otherwise. + +### GetCartOk + +`func (o *OrderExtendedDataEntity) GetCartOk() (*ExtendedCartDetails, bool)` + +GetCartOk returns a tuple with the Cart field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCart + +`func (o *OrderExtendedDataEntity) SetCart(v ExtendedCartDetails)` + +SetCart sets Cart field to given value. + +### HasCart + +`func (o *OrderExtendedDataEntity) HasCart() bool` + +HasCart returns a boolean if a field has been set. + +### GetOffer + +`func (o *OrderExtendedDataEntity) GetOffer() OfferExtendedDetails` + +GetOffer returns the Offer field if non-nil, zero value otherwise. + +### GetOfferOk + +`func (o *OrderExtendedDataEntity) GetOfferOk() (*OfferExtendedDetails, bool)` + +GetOfferOk returns a tuple with the Offer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOffer + +`func (o *OrderExtendedDataEntity) SetOffer(v OfferExtendedDetails)` + +SetOffer sets Offer field to given value. + +### HasOffer + +`func (o *OrderExtendedDataEntity) HasOffer() bool` + +HasOffer returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrdersAPI.md b/docs/OrdersAPI.md index 1ac0032..610c482 100644 --- a/docs/OrdersAPI.md +++ b/docs/OrdersAPI.md @@ -6,7 +6,9 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**PGCreateOrder**](OrdersAPI.md#PGCreateOrder) | **Post** /orders | Create Order [**PGFetchOrder**](OrdersAPI.md#PGFetchOrder) | **Get** /orders/{order_id} | Get Order +[**PGFetchOrderExtendedData**](OrdersAPI.md#PGFetchOrderExtendedData) | **Get** /orders/{order_id}/extended | Get Order Extended [**PGTerminateOrder**](OrdersAPI.md#PGTerminateOrder) | **Patch** /orders/{order_id} | Terminate Order +[**PGUpdateOrderExtendedData**](OrdersAPI.md#PGUpdateOrderExtendedData) | **Put** /orders/{order_id}/extended | Update Order Extended @@ -168,6 +170,87 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## PGFetchOrderExtendedData + +> OrderExtendedDataEntity PGFetchOrderExtendedData(ctx, orderId).XApiVersion(xApiVersion).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() + +Get Order Extended + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + orderId := "your-order-id" + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + + resp, r, err := cashfree.PGFetchOrderExtendedData(&xApiVersion, &orderId, &xRequestId, &xIdempotencyKey, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.PGFetchOrderExtendedData``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PGFetchOrderExtendedData`: OrderExtendedDataEntity + fmt.Fprintf(os.Stdout, "Response from `cashfree.PGFetchOrderExtendedData`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orderId** | **string** | The id which uniquely identifies your order | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPGFetchOrderExtendedDataRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + +### Return type + +[**OrderExtendedDataEntity**](OrderExtendedDataEntity.md) + +### Authorization + +[XPartnerAPIKey](../README.md#XPartnerAPIKey), [XClientSecret](../README.md#XClientSecret), [XPartnerMerchantID](../README.md#XPartnerMerchantID), [XClientID](../README.md#XClientID), [XClientSignatureHeader](../README.md#XClientSignatureHeader) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## PGTerminateOrder > OrderEntity PGTerminateOrder(ctx, orderId).XApiVersion(xApiVersion).TerminateOrderRequest(terminateOrderRequest).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() @@ -250,3 +333,86 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## PGUpdateOrderExtendedData + +> UpdateOrderExtendedDataEntity PGUpdateOrderExtendedData(ctx, orderId).XApiVersion(xApiVersion).UpdateOrderExtendedRequest(updateOrderExtendedRequest).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() + +Update Order Extended + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + orderId := "your-order-id" + updateOrderExtendedRequest := *cashfree.NewUpdateOrderExtendedRequest([]cashfree.ShipmentDetails{*cashfree.NewShipmentDetails("DHL", []string{"https://dhl.com/track/123456"}, []string{"TRACK654321"})}) + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + + resp, r, err := cashfree.PGUpdateOrderExtendedData(&xApiVersion, &orderId, &updateOrderExtendedRequest, &xRequestId, &xIdempotencyKey, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.PGUpdateOrderExtendedData``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PGUpdateOrderExtendedData`: UpdateOrderExtendedDataEntity + fmt.Fprintf(os.Stdout, "Response from `cashfree.PGUpdateOrderExtendedData`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**orderId** | **string** | The id which uniquely identifies your order | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPGUpdateOrderExtendedDataRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + + **updateOrderExtendedRequest** | [**UpdateOrderExtendedRequest**](UpdateOrderExtendedRequest.md) | Request Body to Update extended data related to order | + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + +### Return type + +[**UpdateOrderExtendedDataEntity**](UpdateOrderExtendedDataEntity.md) + +### Authorization + +[XPartnerAPIKey](../README.md#XPartnerAPIKey), [XClientSecret](../README.md#XClientSecret), [XPartnerMerchantID](../README.md#XPartnerMerchantID), [XClientID](../README.md#XClientID), [XClientSignatureHeader](../README.md#XClientSignatureHeader) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/ShipmentDetails.md b/docs/ShipmentDetails.md new file mode 100644 index 0000000..b69e1f6 --- /dev/null +++ b/docs/ShipmentDetails.md @@ -0,0 +1,93 @@ +# ShipmentDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TrackingCompany** | **string** | Tracking company name associated with order. | +**TrackingUrls** | **[]string** | Tracking Urls associated with order. | +**TrackingNumbers** | **[]string** | Tracking Numbers associated with order. | + +## Methods + +### NewShipmentDetails + +`func NewShipmentDetails(trackingCompany string, trackingUrls []string, trackingNumbers []string, ) *ShipmentDetails` + +NewShipmentDetails instantiates a new ShipmentDetails object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewShipmentDetailsWithDefaults + +`func NewShipmentDetailsWithDefaults() *ShipmentDetails` + +NewShipmentDetailsWithDefaults instantiates a new ShipmentDetails object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTrackingCompany + +`func (o *ShipmentDetails) GetTrackingCompany() string` + +GetTrackingCompany returns the TrackingCompany field if non-nil, zero value otherwise. + +### GetTrackingCompanyOk + +`func (o *ShipmentDetails) GetTrackingCompanyOk() (*string, bool)` + +GetTrackingCompanyOk returns a tuple with the TrackingCompany field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTrackingCompany + +`func (o *ShipmentDetails) SetTrackingCompany(v string)` + +SetTrackingCompany sets TrackingCompany field to given value. + + +### GetTrackingUrls + +`func (o *ShipmentDetails) GetTrackingUrls() []string` + +GetTrackingUrls returns the TrackingUrls field if non-nil, zero value otherwise. + +### GetTrackingUrlsOk + +`func (o *ShipmentDetails) GetTrackingUrlsOk() (*[]string, bool)` + +GetTrackingUrlsOk returns a tuple with the TrackingUrls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTrackingUrls + +`func (o *ShipmentDetails) SetTrackingUrls(v []string)` + +SetTrackingUrls sets TrackingUrls field to given value. + + +### GetTrackingNumbers + +`func (o *ShipmentDetails) GetTrackingNumbers() []string` + +GetTrackingNumbers returns the TrackingNumbers field if non-nil, zero value otherwise. + +### GetTrackingNumbersOk + +`func (o *ShipmentDetails) GetTrackingNumbersOk() (*[]string, bool)` + +GetTrackingNumbersOk returns a tuple with the TrackingNumbers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTrackingNumbers + +`func (o *ShipmentDetails) SetTrackingNumbers(v []string)` + +SetTrackingNumbers sets TrackingNumbers field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SimulateRequest.md b/docs/SimulateRequest.md index de5f93b..d4b85e3 100644 --- a/docs/SimulateRequest.md +++ b/docs/SimulateRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Entity** | **string** | Entity type should be PAYMENTS only. | -**EntityId** | **string** | In case of Entity type is PAYMENTS, entity_id will be transactionId | +**Entity** | **string** | Entity type should be PAYMENTS or SUBS_PAYMENTS only. | +**EntityId** | **string** | If the entity type is PAYMENTS, the entity_id will be the transactionId. If the entity type is SUBS_PAYMENTS, the entity_id will be the merchantTxnId | **EntitySimulation** | [**EntitySimulationRequest**](EntitySimulationRequest.md) | | ## Methods diff --git a/docs/SoftPOSAPI.md b/docs/SoftPOSAPI.md index 85f7382..f514df0 100644 --- a/docs/SoftPOSAPI.md +++ b/docs/SoftPOSAPI.md @@ -6,9 +6,13 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**SposCreateTerminal**](SoftPOSAPI.md#SposCreateTerminal) | **Post** /terminal | Create Terminal [**SposCreateTerminalTransaction**](SoftPOSAPI.md#SposCreateTerminalTransaction) | **Post** /terminal/transactions | Create Terminal Transaction +[**SposDemapSoundboxVpa**](SoftPOSAPI.md#SposDemapSoundboxVpa) | **Post** /terminal/demap/soundbox | Demap Soundbox Vpa [**SposFetchTerminal**](SoftPOSAPI.md#SposFetchTerminal) | **Get** /terminal/{terminal_phone_no} | Get Terminal Status using Phone Number [**SposFetchTerminalQRCodes**](SoftPOSAPI.md#SposFetchTerminalQRCodes) | **Get** /terminal/qrcodes | Fetch Terminal QR Codes +[**SposFetchTerminalSoundboxVpa**](SoftPOSAPI.md#SposFetchTerminalSoundboxVpa) | **Get** /terminal/soundbox/qrcodes | Fetch Terminal Soundbox vpa [**SposFetchTerminalTransaction**](SoftPOSAPI.md#SposFetchTerminalTransaction) | **Get** /terminal/{cf_terminal_id}/payments | Get Terminal Transaction +[**SposOnboardSoundboxVpa**](SoftPOSAPI.md#SposOnboardSoundboxVpa) | **Post** /terminal/soundbox | Onboard Soundbox Vpa +[**SposUpdateSoundboxVpa**](SoftPOSAPI.md#SposUpdateSoundboxVpa) | **Patch** /terminal/{cf_terminal_id}/soundbox | Update Soundbox Vpa [**SposUpdateTerminal**](SoftPOSAPI.md#SposUpdateTerminal) | **Patch** /terminal/{cf_terminal_id} | Update Terminal [**SposUpdateTerminalStatus**](SoftPOSAPI.md#SposUpdateTerminalStatus) | **Patch** /terminal/{cf_terminal_id}/status | Update Terminal Status [**SposUploadTerminalDocs**](SoftPOSAPI.md#SposUploadTerminalDocs) | **Post** /terminal/{cf_terminal_id}/docs | Upload Terminal Docs @@ -169,6 +173,83 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## SposDemapSoundboxVpa + +> []SoundboxVpaEntity SposDemapSoundboxVpa(ctx).XApiVersion(xApiVersion).DemapSoundboxVpaRequest(demapSoundboxVpaRequest).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() + +Demap Soundbox Vpa + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + demapSoundboxVpaRequest := *cashfree.NewDemapSoundboxVpaRequest("CfTerminalId_example", "DeviceSerialNo_example") + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + + resp, r, err := cashfree.SposDemapSoundboxVpa(&xApiVersion, &demapSoundboxVpaRequest, &xRequestId, &xIdempotencyKey, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.SposDemapSoundboxVpa``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SposDemapSoundboxVpa`: []SoundboxVpaEntity + fmt.Fprintf(os.Stdout, "Response from `cashfree.SposDemapSoundboxVpa`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSposDemapSoundboxVpaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + **demapSoundboxVpaRequest** | [**DemapSoundboxVpaRequest**](DemapSoundboxVpaRequest.md) | Request body to demap soundbox vpa | + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + +### Return type + +[**[]SoundboxVpaEntity**](SoundboxVpaEntity.md) + +### Authorization + +[XPartnerAPIKey](../README.md#XPartnerAPIKey), [XClientSecret](../README.md#XClientSecret), [XPartnerMerchantID](../README.md#XPartnerMerchantID), [XClientID](../README.md#XClientID), [XClientSignatureHeader](../README.md#XClientSignatureHeader) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## SposFetchTerminal > TerminalEntity SposFetchTerminal(ctx, terminalPhoneNo).XApiVersion(xApiVersion).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() @@ -329,6 +410,85 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## SposFetchTerminalSoundboxVpa + +> []SoundboxVpaEntity SposFetchTerminalSoundboxVpa(ctx).XApiVersion(xApiVersion).DeviceSerialNo(deviceSerialNo).CfTerminalId(cfTerminalId).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() + +Fetch Terminal Soundbox vpa + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + deviceSerialNo := "9876543214" + cfTerminalId := "123344" + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + + resp, r, err := cashfree.SposFetchTerminalSoundboxVpa(&xApiVersion, &deviceSerialNo, &cfTerminalId, &xRequestId, &xIdempotencyKey, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.SposFetchTerminalSoundboxVpa``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SposFetchTerminalSoundboxVpa`: []SoundboxVpaEntity + fmt.Fprintf(os.Stdout, "Response from `cashfree.SposFetchTerminalSoundboxVpa`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSposFetchTerminalSoundboxVpaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + **deviceSerialNo** | **string** | Device Serial No assinged. Required if you are not providing the cf_terminal_id in the request. | + **cfTerminalId** | **string** | Cashfree terminal id for which you want to get Soundbox Vpa. Required if you are not providing the device_serial_no in the request. | + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + +### Return type + +[**[]SoundboxVpaEntity**](SoundboxVpaEntity.md) + +### Authorization + +[XPartnerAPIKey](../README.md#XPartnerAPIKey), [XClientSecret](../README.md#XClientSecret), [XPartnerMerchantID](../README.md#XPartnerMerchantID), [XClientID](../README.md#XClientID), [XClientSignatureHeader](../README.md#XClientSignatureHeader) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## SposFetchTerminalTransaction > TerminalPaymentEntity SposFetchTerminalTransaction(ctx, cfTerminalId).XApiVersion(xApiVersion).Utr(utr).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() @@ -412,6 +572,166 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## SposOnboardSoundboxVpa + +> SoundboxVpaEntity SposOnboardSoundboxVpa(ctx).XApiVersion(xApiVersion).OnboardSoundboxVpaRequest(onboardSoundboxVpaRequest).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() + +Onboard Soundbox Vpa + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + onboardSoundboxVpaRequest := *cashfree.NewOnboardSoundboxVpaRequest("Vpa_example", "CfTerminalId_example", "DeviceSerialNo_example") + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + + resp, r, err := cashfree.SposOnboardSoundboxVpa(&xApiVersion, &onboardSoundboxVpaRequest, &xRequestId, &xIdempotencyKey, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.SposOnboardSoundboxVpa``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SposOnboardSoundboxVpa`: SoundboxVpaEntity + fmt.Fprintf(os.Stdout, "Response from `cashfree.SposOnboardSoundboxVpa`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSposOnboardSoundboxVpaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + **onboardSoundboxVpaRequest** | [**OnboardSoundboxVpaRequest**](OnboardSoundboxVpaRequest.md) | Request body to onboard soundbox vpa | + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + +### Return type + +[**SoundboxVpaEntity**](SoundboxVpaEntity.md) + +### Authorization + +[XPartnerAPIKey](../README.md#XPartnerAPIKey), [XClientSecret](../README.md#XClientSecret), [XPartnerMerchantID](../README.md#XPartnerMerchantID), [XClientID](../README.md#XClientID), [XClientSignatureHeader](../README.md#XClientSignatureHeader) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SposUpdateSoundboxVpa + +> SoundboxVpaEntity SposUpdateSoundboxVpa(ctx, cfTerminalId).XApiVersion(xApiVersion).UpdateSoundboxVpaRequest(updateSoundboxVpaRequest).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() + +Update Soundbox Vpa + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v4" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + cfTerminalId := "123344" + updateSoundboxVpaRequest := *cashfree.NewUpdateSoundboxVpaRequest("Vpa_example", "CfTerminalId_example") + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + + resp, r, err := cashfree.SposUpdateSoundboxVpa(&xApiVersion, &cfTerminalId, &updateSoundboxVpaRequest, &xRequestId, &xIdempotencyKey, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.SposUpdateSoundboxVpa``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SposUpdateSoundboxVpa`: SoundboxVpaEntity + fmt.Fprintf(os.Stdout, "Response from `cashfree.SposUpdateSoundboxVpa`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**cfTerminalId** | **string** | Provide the Cashfree terminal ID for which the details have to be updated. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSposUpdateSoundboxVpaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] + + **updateSoundboxVpaRequest** | [**UpdateSoundboxVpaRequest**](UpdateSoundboxVpaRequest.md) | Request body to update soundbox vpa | + **xRequestId** | **string** | Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree | + **xIdempotencyKey** | **string** | An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions. | + +### Return type + +[**SoundboxVpaEntity**](SoundboxVpaEntity.md) + +### Authorization + +[XPartnerAPIKey](../README.md#XPartnerAPIKey), [XClientSecret](../README.md#XClientSecret), [XPartnerMerchantID](../README.md#XPartnerMerchantID), [XClientID](../README.md#XClientID), [XClientSignatureHeader](../README.md#XClientSignatureHeader) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## SposUpdateTerminal > []UpdateTerminalEntity SposUpdateTerminal(ctx, cfTerminalId).XApiVersion(xApiVersion).UpdateTerminalRequest(updateTerminalRequest).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() diff --git a/docs/SoundboxVpaEntity.md b/docs/SoundboxVpaEntity.md new file mode 100644 index 0000000..eebc070 --- /dev/null +++ b/docs/SoundboxVpaEntity.md @@ -0,0 +1,160 @@ +# SoundboxVpaEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Vpa** | Pointer to **string** | | [optional] +**CfTerminalId** | Pointer to **string** | | [optional] +**DeviceSerialNo** | Pointer to **string** | | [optional] +**MerchantName** | Pointer to **string** | | [optional] +**Language** | Pointer to **string** | | [optional] + +## Methods + +### NewSoundboxVpaEntity + +`func NewSoundboxVpaEntity() *SoundboxVpaEntity` + +NewSoundboxVpaEntity instantiates a new SoundboxVpaEntity object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSoundboxVpaEntityWithDefaults + +`func NewSoundboxVpaEntityWithDefaults() *SoundboxVpaEntity` + +NewSoundboxVpaEntityWithDefaults instantiates a new SoundboxVpaEntity object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVpa + +`func (o *SoundboxVpaEntity) GetVpa() string` + +GetVpa returns the Vpa field if non-nil, zero value otherwise. + +### GetVpaOk + +`func (o *SoundboxVpaEntity) GetVpaOk() (*string, bool)` + +GetVpaOk returns a tuple with the Vpa field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVpa + +`func (o *SoundboxVpaEntity) SetVpa(v string)` + +SetVpa sets Vpa field to given value. + +### HasVpa + +`func (o *SoundboxVpaEntity) HasVpa() bool` + +HasVpa returns a boolean if a field has been set. + +### GetCfTerminalId + +`func (o *SoundboxVpaEntity) GetCfTerminalId() string` + +GetCfTerminalId returns the CfTerminalId field if non-nil, zero value otherwise. + +### GetCfTerminalIdOk + +`func (o *SoundboxVpaEntity) GetCfTerminalIdOk() (*string, bool)` + +GetCfTerminalIdOk returns a tuple with the CfTerminalId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCfTerminalId + +`func (o *SoundboxVpaEntity) SetCfTerminalId(v string)` + +SetCfTerminalId sets CfTerminalId field to given value. + +### HasCfTerminalId + +`func (o *SoundboxVpaEntity) HasCfTerminalId() bool` + +HasCfTerminalId returns a boolean if a field has been set. + +### GetDeviceSerialNo + +`func (o *SoundboxVpaEntity) GetDeviceSerialNo() string` + +GetDeviceSerialNo returns the DeviceSerialNo field if non-nil, zero value otherwise. + +### GetDeviceSerialNoOk + +`func (o *SoundboxVpaEntity) GetDeviceSerialNoOk() (*string, bool)` + +GetDeviceSerialNoOk returns a tuple with the DeviceSerialNo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceSerialNo + +`func (o *SoundboxVpaEntity) SetDeviceSerialNo(v string)` + +SetDeviceSerialNo sets DeviceSerialNo field to given value. + +### HasDeviceSerialNo + +`func (o *SoundboxVpaEntity) HasDeviceSerialNo() bool` + +HasDeviceSerialNo returns a boolean if a field has been set. + +### GetMerchantName + +`func (o *SoundboxVpaEntity) GetMerchantName() string` + +GetMerchantName returns the MerchantName field if non-nil, zero value otherwise. + +### GetMerchantNameOk + +`func (o *SoundboxVpaEntity) GetMerchantNameOk() (*string, bool)` + +GetMerchantNameOk returns a tuple with the MerchantName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMerchantName + +`func (o *SoundboxVpaEntity) SetMerchantName(v string)` + +SetMerchantName sets MerchantName field to given value. + +### HasMerchantName + +`func (o *SoundboxVpaEntity) HasMerchantName() bool` + +HasMerchantName returns a boolean if a field has been set. + +### GetLanguage + +`func (o *SoundboxVpaEntity) GetLanguage() string` + +GetLanguage returns the Language field if non-nil, zero value otherwise. + +### GetLanguageOk + +`func (o *SoundboxVpaEntity) GetLanguageOk() (*string, bool)` + +GetLanguageOk returns a tuple with the Language field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLanguage + +`func (o *SoundboxVpaEntity) SetLanguage(v string)` + +SetLanguage sets Language field to given value. + +### HasLanguage + +`func (o *SoundboxVpaEntity) HasLanguage() bool` + +HasLanguage returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SplitOrderReconSuccessResponse.md b/docs/SplitOrderReconSuccessResponse.md new file mode 100644 index 0000000..8085658 --- /dev/null +++ b/docs/SplitOrderReconSuccessResponse.md @@ -0,0 +1,108 @@ +# SplitOrderReconSuccessResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Settlement** | Pointer to [**SplitOrderReconSuccessResponseSettlement**](SplitOrderReconSuccessResponseSettlement.md) | | [optional] +**Refunds** | Pointer to **[]map[string]interface{}** | List of refunds associated with the order, if any. | [optional] +**Vendors** | Pointer to [**[]SplitOrderReconSuccessResponseVendorsInner**](SplitOrderReconSuccessResponseVendorsInner.md) | List of vendor settlements associated with the split settlement. | [optional] + +## Methods + +### NewSplitOrderReconSuccessResponse + +`func NewSplitOrderReconSuccessResponse() *SplitOrderReconSuccessResponse` + +NewSplitOrderReconSuccessResponse instantiates a new SplitOrderReconSuccessResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSplitOrderReconSuccessResponseWithDefaults + +`func NewSplitOrderReconSuccessResponseWithDefaults() *SplitOrderReconSuccessResponse` + +NewSplitOrderReconSuccessResponseWithDefaults instantiates a new SplitOrderReconSuccessResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSettlement + +`func (o *SplitOrderReconSuccessResponse) GetSettlement() SplitOrderReconSuccessResponseSettlement` + +GetSettlement returns the Settlement field if non-nil, zero value otherwise. + +### GetSettlementOk + +`func (o *SplitOrderReconSuccessResponse) GetSettlementOk() (*SplitOrderReconSuccessResponseSettlement, bool)` + +GetSettlementOk returns a tuple with the Settlement field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSettlement + +`func (o *SplitOrderReconSuccessResponse) SetSettlement(v SplitOrderReconSuccessResponseSettlement)` + +SetSettlement sets Settlement field to given value. + +### HasSettlement + +`func (o *SplitOrderReconSuccessResponse) HasSettlement() bool` + +HasSettlement returns a boolean if a field has been set. + +### GetRefunds + +`func (o *SplitOrderReconSuccessResponse) GetRefunds() []map[string]interface{}` + +GetRefunds returns the Refunds field if non-nil, zero value otherwise. + +### GetRefundsOk + +`func (o *SplitOrderReconSuccessResponse) GetRefundsOk() (*[]map[string]interface{}, bool)` + +GetRefundsOk returns a tuple with the Refunds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefunds + +`func (o *SplitOrderReconSuccessResponse) SetRefunds(v []map[string]interface{})` + +SetRefunds sets Refunds field to given value. + +### HasRefunds + +`func (o *SplitOrderReconSuccessResponse) HasRefunds() bool` + +HasRefunds returns a boolean if a field has been set. + +### GetVendors + +`func (o *SplitOrderReconSuccessResponse) GetVendors() []SplitOrderReconSuccessResponseVendorsInner` + +GetVendors returns the Vendors field if non-nil, zero value otherwise. + +### GetVendorsOk + +`func (o *SplitOrderReconSuccessResponse) GetVendorsOk() (*[]SplitOrderReconSuccessResponseVendorsInner, bool)` + +GetVendorsOk returns a tuple with the Vendors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVendors + +`func (o *SplitOrderReconSuccessResponse) SetVendors(v []SplitOrderReconSuccessResponseVendorsInner)` + +SetVendors sets Vendors field to given value. + +### HasVendors + +`func (o *SplitOrderReconSuccessResponse) HasVendors() bool` + +HasVendors returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SplitOrderReconSuccessResponseSettlement.md b/docs/SplitOrderReconSuccessResponseSettlement.md new file mode 100644 index 0000000..f08c55a --- /dev/null +++ b/docs/SplitOrderReconSuccessResponseSettlement.md @@ -0,0 +1,424 @@ +# SplitOrderReconSuccessResponseSettlement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Entity** | Pointer to **string** | Type of entity. Example: \"settlement\". | [optional] +**CfSettlementId** | Pointer to **int64** | Unique Cashfree settlement ID. | [optional] +**CfPaymentId** | Pointer to **int64** | Unique Cashfree payment ID associated with the order. | [optional] +**OrderId** | Pointer to **string** | Unique identifier for the order. | [optional] +**OrderCurrency** | Pointer to **string** | Currency of the order. Example: \"INR\". | [optional] +**TransferId** | Pointer to **NullableString** | Unique transfer ID if available, otherwise null. | [optional] +**OrderAmount** | Pointer to **float32** | Total amount of the order. | [optional] +**ServiceCharge** | Pointer to **float32** | Service charge for the order. | [optional] +**ServiceTax** | Pointer to **float32** | Service tax for the order. | [optional] +**SettlementAmount** | Pointer to **float32** | Amount to be settled after charges and tax. | [optional] +**SettlementCurrency** | Pointer to **string** | Currency of the settlement. Example: \"INR\". | [optional] +**TransferUtr** | Pointer to **NullableString** | UTR (Unique Transaction Reference) for the transfer if available, otherwise null. | [optional] +**TransferTime** | Pointer to **NullableTime** | Time of transfer if available, otherwise null. | [optional] +**PaymentTime** | Pointer to **time.Time** | Timestamp when payment was made. | [optional] + +## Methods + +### NewSplitOrderReconSuccessResponseSettlement + +`func NewSplitOrderReconSuccessResponseSettlement() *SplitOrderReconSuccessResponseSettlement` + +NewSplitOrderReconSuccessResponseSettlement instantiates a new SplitOrderReconSuccessResponseSettlement object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSplitOrderReconSuccessResponseSettlementWithDefaults + +`func NewSplitOrderReconSuccessResponseSettlementWithDefaults() *SplitOrderReconSuccessResponseSettlement` + +NewSplitOrderReconSuccessResponseSettlementWithDefaults instantiates a new SplitOrderReconSuccessResponseSettlement object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEntity + +`func (o *SplitOrderReconSuccessResponseSettlement) GetEntity() string` + +GetEntity returns the Entity field if non-nil, zero value otherwise. + +### GetEntityOk + +`func (o *SplitOrderReconSuccessResponseSettlement) GetEntityOk() (*string, bool)` + +GetEntityOk returns a tuple with the Entity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntity + +`func (o *SplitOrderReconSuccessResponseSettlement) SetEntity(v string)` + +SetEntity sets Entity field to given value. + +### HasEntity + +`func (o *SplitOrderReconSuccessResponseSettlement) HasEntity() bool` + +HasEntity returns a boolean if a field has been set. + +### GetCfSettlementId + +`func (o *SplitOrderReconSuccessResponseSettlement) GetCfSettlementId() int64` + +GetCfSettlementId returns the CfSettlementId field if non-nil, zero value otherwise. + +### GetCfSettlementIdOk + +`func (o *SplitOrderReconSuccessResponseSettlement) GetCfSettlementIdOk() (*int64, bool)` + +GetCfSettlementIdOk returns a tuple with the CfSettlementId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCfSettlementId + +`func (o *SplitOrderReconSuccessResponseSettlement) SetCfSettlementId(v int64)` + +SetCfSettlementId sets CfSettlementId field to given value. + +### HasCfSettlementId + +`func (o *SplitOrderReconSuccessResponseSettlement) HasCfSettlementId() bool` + +HasCfSettlementId returns a boolean if a field has been set. + +### GetCfPaymentId + +`func (o *SplitOrderReconSuccessResponseSettlement) GetCfPaymentId() int64` + +GetCfPaymentId returns the CfPaymentId field if non-nil, zero value otherwise. + +### GetCfPaymentIdOk + +`func (o *SplitOrderReconSuccessResponseSettlement) GetCfPaymentIdOk() (*int64, bool)` + +GetCfPaymentIdOk returns a tuple with the CfPaymentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCfPaymentId + +`func (o *SplitOrderReconSuccessResponseSettlement) SetCfPaymentId(v int64)` + +SetCfPaymentId sets CfPaymentId field to given value. + +### HasCfPaymentId + +`func (o *SplitOrderReconSuccessResponseSettlement) HasCfPaymentId() bool` + +HasCfPaymentId returns a boolean if a field has been set. + +### GetOrderId + +`func (o *SplitOrderReconSuccessResponseSettlement) GetOrderId() string` + +GetOrderId returns the OrderId field if non-nil, zero value otherwise. + +### GetOrderIdOk + +`func (o *SplitOrderReconSuccessResponseSettlement) GetOrderIdOk() (*string, bool)` + +GetOrderIdOk returns a tuple with the OrderId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderId + +`func (o *SplitOrderReconSuccessResponseSettlement) SetOrderId(v string)` + +SetOrderId sets OrderId field to given value. + +### HasOrderId + +`func (o *SplitOrderReconSuccessResponseSettlement) HasOrderId() bool` + +HasOrderId returns a boolean if a field has been set. + +### GetOrderCurrency + +`func (o *SplitOrderReconSuccessResponseSettlement) GetOrderCurrency() string` + +GetOrderCurrency returns the OrderCurrency field if non-nil, zero value otherwise. + +### GetOrderCurrencyOk + +`func (o *SplitOrderReconSuccessResponseSettlement) GetOrderCurrencyOk() (*string, bool)` + +GetOrderCurrencyOk returns a tuple with the OrderCurrency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderCurrency + +`func (o *SplitOrderReconSuccessResponseSettlement) SetOrderCurrency(v string)` + +SetOrderCurrency sets OrderCurrency field to given value. + +### HasOrderCurrency + +`func (o *SplitOrderReconSuccessResponseSettlement) HasOrderCurrency() bool` + +HasOrderCurrency returns a boolean if a field has been set. + +### GetTransferId + +`func (o *SplitOrderReconSuccessResponseSettlement) GetTransferId() string` + +GetTransferId returns the TransferId field if non-nil, zero value otherwise. + +### GetTransferIdOk + +`func (o *SplitOrderReconSuccessResponseSettlement) GetTransferIdOk() (*string, bool)` + +GetTransferIdOk returns a tuple with the TransferId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTransferId + +`func (o *SplitOrderReconSuccessResponseSettlement) SetTransferId(v string)` + +SetTransferId sets TransferId field to given value. + +### HasTransferId + +`func (o *SplitOrderReconSuccessResponseSettlement) HasTransferId() bool` + +HasTransferId returns a boolean if a field has been set. + +### SetTransferIdNil + +`func (o *SplitOrderReconSuccessResponseSettlement) SetTransferIdNil(b bool)` + + SetTransferIdNil sets the value for TransferId to be an explicit nil + +### UnsetTransferId +`func (o *SplitOrderReconSuccessResponseSettlement) UnsetTransferId()` + +UnsetTransferId ensures that no value is present for TransferId, not even an explicit nil +### GetOrderAmount + +`func (o *SplitOrderReconSuccessResponseSettlement) GetOrderAmount() float32` + +GetOrderAmount returns the OrderAmount field if non-nil, zero value otherwise. + +### GetOrderAmountOk + +`func (o *SplitOrderReconSuccessResponseSettlement) GetOrderAmountOk() (*float32, bool)` + +GetOrderAmountOk returns a tuple with the OrderAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderAmount + +`func (o *SplitOrderReconSuccessResponseSettlement) SetOrderAmount(v float32)` + +SetOrderAmount sets OrderAmount field to given value. + +### HasOrderAmount + +`func (o *SplitOrderReconSuccessResponseSettlement) HasOrderAmount() bool` + +HasOrderAmount returns a boolean if a field has been set. + +### GetServiceCharge + +`func (o *SplitOrderReconSuccessResponseSettlement) GetServiceCharge() float32` + +GetServiceCharge returns the ServiceCharge field if non-nil, zero value otherwise. + +### GetServiceChargeOk + +`func (o *SplitOrderReconSuccessResponseSettlement) GetServiceChargeOk() (*float32, bool)` + +GetServiceChargeOk returns a tuple with the ServiceCharge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceCharge + +`func (o *SplitOrderReconSuccessResponseSettlement) SetServiceCharge(v float32)` + +SetServiceCharge sets ServiceCharge field to given value. + +### HasServiceCharge + +`func (o *SplitOrderReconSuccessResponseSettlement) HasServiceCharge() bool` + +HasServiceCharge returns a boolean if a field has been set. + +### GetServiceTax + +`func (o *SplitOrderReconSuccessResponseSettlement) GetServiceTax() float32` + +GetServiceTax returns the ServiceTax field if non-nil, zero value otherwise. + +### GetServiceTaxOk + +`func (o *SplitOrderReconSuccessResponseSettlement) GetServiceTaxOk() (*float32, bool)` + +GetServiceTaxOk returns a tuple with the ServiceTax field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceTax + +`func (o *SplitOrderReconSuccessResponseSettlement) SetServiceTax(v float32)` + +SetServiceTax sets ServiceTax field to given value. + +### HasServiceTax + +`func (o *SplitOrderReconSuccessResponseSettlement) HasServiceTax() bool` + +HasServiceTax returns a boolean if a field has been set. + +### GetSettlementAmount + +`func (o *SplitOrderReconSuccessResponseSettlement) GetSettlementAmount() float32` + +GetSettlementAmount returns the SettlementAmount field if non-nil, zero value otherwise. + +### GetSettlementAmountOk + +`func (o *SplitOrderReconSuccessResponseSettlement) GetSettlementAmountOk() (*float32, bool)` + +GetSettlementAmountOk returns a tuple with the SettlementAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSettlementAmount + +`func (o *SplitOrderReconSuccessResponseSettlement) SetSettlementAmount(v float32)` + +SetSettlementAmount sets SettlementAmount field to given value. + +### HasSettlementAmount + +`func (o *SplitOrderReconSuccessResponseSettlement) HasSettlementAmount() bool` + +HasSettlementAmount returns a boolean if a field has been set. + +### GetSettlementCurrency + +`func (o *SplitOrderReconSuccessResponseSettlement) GetSettlementCurrency() string` + +GetSettlementCurrency returns the SettlementCurrency field if non-nil, zero value otherwise. + +### GetSettlementCurrencyOk + +`func (o *SplitOrderReconSuccessResponseSettlement) GetSettlementCurrencyOk() (*string, bool)` + +GetSettlementCurrencyOk returns a tuple with the SettlementCurrency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSettlementCurrency + +`func (o *SplitOrderReconSuccessResponseSettlement) SetSettlementCurrency(v string)` + +SetSettlementCurrency sets SettlementCurrency field to given value. + +### HasSettlementCurrency + +`func (o *SplitOrderReconSuccessResponseSettlement) HasSettlementCurrency() bool` + +HasSettlementCurrency returns a boolean if a field has been set. + +### GetTransferUtr + +`func (o *SplitOrderReconSuccessResponseSettlement) GetTransferUtr() string` + +GetTransferUtr returns the TransferUtr field if non-nil, zero value otherwise. + +### GetTransferUtrOk + +`func (o *SplitOrderReconSuccessResponseSettlement) GetTransferUtrOk() (*string, bool)` + +GetTransferUtrOk returns a tuple with the TransferUtr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTransferUtr + +`func (o *SplitOrderReconSuccessResponseSettlement) SetTransferUtr(v string)` + +SetTransferUtr sets TransferUtr field to given value. + +### HasTransferUtr + +`func (o *SplitOrderReconSuccessResponseSettlement) HasTransferUtr() bool` + +HasTransferUtr returns a boolean if a field has been set. + +### SetTransferUtrNil + +`func (o *SplitOrderReconSuccessResponseSettlement) SetTransferUtrNil(b bool)` + + SetTransferUtrNil sets the value for TransferUtr to be an explicit nil + +### UnsetTransferUtr +`func (o *SplitOrderReconSuccessResponseSettlement) UnsetTransferUtr()` + +UnsetTransferUtr ensures that no value is present for TransferUtr, not even an explicit nil +### GetTransferTime + +`func (o *SplitOrderReconSuccessResponseSettlement) GetTransferTime() time.Time` + +GetTransferTime returns the TransferTime field if non-nil, zero value otherwise. + +### GetTransferTimeOk + +`func (o *SplitOrderReconSuccessResponseSettlement) GetTransferTimeOk() (*time.Time, bool)` + +GetTransferTimeOk returns a tuple with the TransferTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTransferTime + +`func (o *SplitOrderReconSuccessResponseSettlement) SetTransferTime(v time.Time)` + +SetTransferTime sets TransferTime field to given value. + +### HasTransferTime + +`func (o *SplitOrderReconSuccessResponseSettlement) HasTransferTime() bool` + +HasTransferTime returns a boolean if a field has been set. + +### SetTransferTimeNil + +`func (o *SplitOrderReconSuccessResponseSettlement) SetTransferTimeNil(b bool)` + + SetTransferTimeNil sets the value for TransferTime to be an explicit nil + +### UnsetTransferTime +`func (o *SplitOrderReconSuccessResponseSettlement) UnsetTransferTime()` + +UnsetTransferTime ensures that no value is present for TransferTime, not even an explicit nil +### GetPaymentTime + +`func (o *SplitOrderReconSuccessResponseSettlement) GetPaymentTime() time.Time` + +GetPaymentTime returns the PaymentTime field if non-nil, zero value otherwise. + +### GetPaymentTimeOk + +`func (o *SplitOrderReconSuccessResponseSettlement) GetPaymentTimeOk() (*time.Time, bool)` + +GetPaymentTimeOk returns a tuple with the PaymentTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPaymentTime + +`func (o *SplitOrderReconSuccessResponseSettlement) SetPaymentTime(v time.Time)` + +SetPaymentTime sets PaymentTime field to given value. + +### HasPaymentTime + +`func (o *SplitOrderReconSuccessResponseSettlement) HasPaymentTime() bool` + +HasPaymentTime returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SplitOrderReconSuccessResponseVendorsInner.md b/docs/SplitOrderReconSuccessResponseVendorsInner.md new file mode 100644 index 0000000..1c4d339 --- /dev/null +++ b/docs/SplitOrderReconSuccessResponseVendorsInner.md @@ -0,0 +1,134 @@ +# SplitOrderReconSuccessResponseVendorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**VendorId** | Pointer to **string** | Unique identifier for the vendor. | [optional] +**SettlementId** | Pointer to **int64** | Settlement ID associated with the vendor. | [optional] +**SettlementAmount** | Pointer to **float32** | Settlement amount allocated to the vendor. | [optional] +**SettlementEligibilityDate** | Pointer to **time.Time** | Date and time when the vendor is eligible for the settlement. | [optional] + +## Methods + +### NewSplitOrderReconSuccessResponseVendorsInner + +`func NewSplitOrderReconSuccessResponseVendorsInner() *SplitOrderReconSuccessResponseVendorsInner` + +NewSplitOrderReconSuccessResponseVendorsInner instantiates a new SplitOrderReconSuccessResponseVendorsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSplitOrderReconSuccessResponseVendorsInnerWithDefaults + +`func NewSplitOrderReconSuccessResponseVendorsInnerWithDefaults() *SplitOrderReconSuccessResponseVendorsInner` + +NewSplitOrderReconSuccessResponseVendorsInnerWithDefaults instantiates a new SplitOrderReconSuccessResponseVendorsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVendorId + +`func (o *SplitOrderReconSuccessResponseVendorsInner) GetVendorId() string` + +GetVendorId returns the VendorId field if non-nil, zero value otherwise. + +### GetVendorIdOk + +`func (o *SplitOrderReconSuccessResponseVendorsInner) GetVendorIdOk() (*string, bool)` + +GetVendorIdOk returns a tuple with the VendorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVendorId + +`func (o *SplitOrderReconSuccessResponseVendorsInner) SetVendorId(v string)` + +SetVendorId sets VendorId field to given value. + +### HasVendorId + +`func (o *SplitOrderReconSuccessResponseVendorsInner) HasVendorId() bool` + +HasVendorId returns a boolean if a field has been set. + +### GetSettlementId + +`func (o *SplitOrderReconSuccessResponseVendorsInner) GetSettlementId() int64` + +GetSettlementId returns the SettlementId field if non-nil, zero value otherwise. + +### GetSettlementIdOk + +`func (o *SplitOrderReconSuccessResponseVendorsInner) GetSettlementIdOk() (*int64, bool)` + +GetSettlementIdOk returns a tuple with the SettlementId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSettlementId + +`func (o *SplitOrderReconSuccessResponseVendorsInner) SetSettlementId(v int64)` + +SetSettlementId sets SettlementId field to given value. + +### HasSettlementId + +`func (o *SplitOrderReconSuccessResponseVendorsInner) HasSettlementId() bool` + +HasSettlementId returns a boolean if a field has been set. + +### GetSettlementAmount + +`func (o *SplitOrderReconSuccessResponseVendorsInner) GetSettlementAmount() float32` + +GetSettlementAmount returns the SettlementAmount field if non-nil, zero value otherwise. + +### GetSettlementAmountOk + +`func (o *SplitOrderReconSuccessResponseVendorsInner) GetSettlementAmountOk() (*float32, bool)` + +GetSettlementAmountOk returns a tuple with the SettlementAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSettlementAmount + +`func (o *SplitOrderReconSuccessResponseVendorsInner) SetSettlementAmount(v float32)` + +SetSettlementAmount sets SettlementAmount field to given value. + +### HasSettlementAmount + +`func (o *SplitOrderReconSuccessResponseVendorsInner) HasSettlementAmount() bool` + +HasSettlementAmount returns a boolean if a field has been set. + +### GetSettlementEligibilityDate + +`func (o *SplitOrderReconSuccessResponseVendorsInner) GetSettlementEligibilityDate() time.Time` + +GetSettlementEligibilityDate returns the SettlementEligibilityDate field if non-nil, zero value otherwise. + +### GetSettlementEligibilityDateOk + +`func (o *SplitOrderReconSuccessResponseVendorsInner) GetSettlementEligibilityDateOk() (*time.Time, bool)` + +GetSettlementEligibilityDateOk returns a tuple with the SettlementEligibilityDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSettlementEligibilityDate + +`func (o *SplitOrderReconSuccessResponseVendorsInner) SetSettlementEligibilityDate(v time.Time)` + +SetSettlementEligibilityDate sets SettlementEligibilityDate field to given value. + +### HasSettlementEligibilityDate + +`func (o *SplitOrderReconSuccessResponseVendorsInner) HasSettlementEligibilityDate() bool` + +HasSettlementEligibilityDate returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StaticQrResponseEntity.md b/docs/StaticQrResponseEntity.md new file mode 100644 index 0000000..75cca94 --- /dev/null +++ b/docs/StaticQrResponseEntity.md @@ -0,0 +1,134 @@ +# StaticQrResponseEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CfTerminalId** | Pointer to **int32** | cashfree terminal id | [optional] +**Vpa** | Pointer to **string** | Virtual Address | [optional] +**Status** | Pointer to **string** | Status of vpa | [optional] +**QrCode** | Pointer to **string** | qrcode | [optional] + +## Methods + +### NewStaticQrResponseEntity + +`func NewStaticQrResponseEntity() *StaticQrResponseEntity` + +NewStaticQrResponseEntity instantiates a new StaticQrResponseEntity object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStaticQrResponseEntityWithDefaults + +`func NewStaticQrResponseEntityWithDefaults() *StaticQrResponseEntity` + +NewStaticQrResponseEntityWithDefaults instantiates a new StaticQrResponseEntity object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCfTerminalId + +`func (o *StaticQrResponseEntity) GetCfTerminalId() int32` + +GetCfTerminalId returns the CfTerminalId field if non-nil, zero value otherwise. + +### GetCfTerminalIdOk + +`func (o *StaticQrResponseEntity) GetCfTerminalIdOk() (*int32, bool)` + +GetCfTerminalIdOk returns a tuple with the CfTerminalId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCfTerminalId + +`func (o *StaticQrResponseEntity) SetCfTerminalId(v int32)` + +SetCfTerminalId sets CfTerminalId field to given value. + +### HasCfTerminalId + +`func (o *StaticQrResponseEntity) HasCfTerminalId() bool` + +HasCfTerminalId returns a boolean if a field has been set. + +### GetVpa + +`func (o *StaticQrResponseEntity) GetVpa() string` + +GetVpa returns the Vpa field if non-nil, zero value otherwise. + +### GetVpaOk + +`func (o *StaticQrResponseEntity) GetVpaOk() (*string, bool)` + +GetVpaOk returns a tuple with the Vpa field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVpa + +`func (o *StaticQrResponseEntity) SetVpa(v string)` + +SetVpa sets Vpa field to given value. + +### HasVpa + +`func (o *StaticQrResponseEntity) HasVpa() bool` + +HasVpa returns a boolean if a field has been set. + +### GetStatus + +`func (o *StaticQrResponseEntity) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *StaticQrResponseEntity) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *StaticQrResponseEntity) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *StaticQrResponseEntity) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetQrCode + +`func (o *StaticQrResponseEntity) GetQrCode() string` + +GetQrCode returns the QrCode field if non-nil, zero value otherwise. + +### GetQrCodeOk + +`func (o *StaticQrResponseEntity) GetQrCodeOk() (*string, bool)` + +GetQrCodeOk returns a tuple with the QrCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQrCode + +`func (o *StaticQrResponseEntity) SetQrCode(v string)` + +SetQrCode sets QrCode field to given value. + +### HasQrCode + +`func (o *StaticQrResponseEntity) HasQrCode() bool` + +HasQrCode returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubscriptionAPI.md b/docs/SubscriptionAPI.md index 0bc5d8b..bdb3310 100644 --- a/docs/SubscriptionAPI.md +++ b/docs/SubscriptionAPI.md @@ -15,7 +15,7 @@ Method | HTTP request | Description [**SubsFetchSubscriptionRefund**](SubscriptionAPI.md#SubsFetchSubscriptionRefund) | **Get** /subscriptions/{subscription_id}/refunds/{refund_id} | Fetch details of a refund. [**SubsManageSubscription**](SubscriptionAPI.md#SubsManageSubscription) | **Post** /subscriptions/{subscription_id}/manage | Manage a subscription. [**SubsManageSubscriptionPayment**](SubscriptionAPI.md#SubsManageSubscriptionPayment) | **Post** /subscriptions/{subscription_id}/payments/{payment_id}/manage | Manage a single payment. -[**SubscriptionDocumentUpload**](SubscriptionAPI.md#SubscriptionDocumentUpload) | **Post** /subscriptions/pay/documents/{payment_id} | API to upload Physical Nach for Physical Nach Authorization. +[**SubscriptionDocumentUpload**](SubscriptionAPI.md#SubscriptionDocumentUpload) | **Post** /subscriptions/pay/documents/{payment_id} | API to upload file for Physical Nach Authorization. [**SubscriptionEligibility**](SubscriptionAPI.md#SubscriptionEligibility) | **Post** /subscriptions/eligibility/payment_methods | API to get all the payment method details available for subscription payments. @@ -918,7 +918,7 @@ Name | Type | Description | Notes > UploadPnachImageResponse SubscriptionDocumentUpload(ctx, paymentId).XApiVersion(xApiVersion).File(file).PaymentId2(paymentId2).Action(action).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() -API to upload Physical Nach for Physical Nach Authorization. +API to upload file for Physical Nach Authorization. diff --git a/docs/SubscriptionCustomerDetails.md b/docs/SubscriptionCustomerDetails.md index 1b51186..375285e 100644 --- a/docs/SubscriptionCustomerDetails.md +++ b/docs/SubscriptionCustomerDetails.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **CustomerBankAccountHolderName** | Pointer to **string** | Bank holder name of the customer. | [optional] **CustomerBankAccountNumber** | Pointer to **string** | Bank account number of the customer. | [optional] **CustomerBankIfsc** | Pointer to **string** | IFSC code of the customer. | [optional] -**CustomerBankCode** | Pointer to **string** | Bank code of the customer. | [optional] +**CustomerBankCode** | Pointer to **string** | Bank code of the customer. Refer to https://www.npci.org.in/PDF/nach/live-members-e-mandates/Live-Banks-in-API-E-Mandate.pdf | [optional] **CustomerBankAccountType** | Pointer to **string** | Bank account type of the customer. | [optional] ## Methods diff --git a/docs/SubscriptionEntity.md b/docs/SubscriptionEntity.md index 36907b8..ef1965d 100644 --- a/docs/SubscriptionEntity.md +++ b/docs/SubscriptionEntity.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **SubscriptionId** | Pointer to **string** | A unique ID passed by merchant for identifying the subscription. | [optional] **SubscriptionMeta** | Pointer to [**SubscriptionEntitySubscriptionMeta**](SubscriptionEntitySubscriptionMeta.md) | | [optional] **SubscriptionNote** | Pointer to **string** | Note for the subscription. | [optional] +**SubscriptionSessionId** | Pointer to **string** | Subscription Session Id. | [optional] **SubscriptionPaymentSplits** | Pointer to [**[]SubscriptionPaymentSplitItem**](SubscriptionPaymentSplitItem.md) | Payment splits for the subscription. | [optional] **SubscriptionStatus** | Pointer to **string** | Status of the subscription. | [optional] **SubscriptionTags** | Pointer to **map[string]interface{}** | Tags for the subscription. | [optional] @@ -261,6 +262,31 @@ SetSubscriptionNote sets SubscriptionNote field to given value. HasSubscriptionNote returns a boolean if a field has been set. +### GetSubscriptionSessionId + +`func (o *SubscriptionEntity) GetSubscriptionSessionId() string` + +GetSubscriptionSessionId returns the SubscriptionSessionId field if non-nil, zero value otherwise. + +### GetSubscriptionSessionIdOk + +`func (o *SubscriptionEntity) GetSubscriptionSessionIdOk() (*string, bool)` + +GetSubscriptionSessionIdOk returns a tuple with the SubscriptionSessionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubscriptionSessionId + +`func (o *SubscriptionEntity) SetSubscriptionSessionId(v string)` + +SetSubscriptionSessionId sets SubscriptionSessionId field to given value. + +### HasSubscriptionSessionId + +`func (o *SubscriptionEntity) HasSubscriptionSessionId() bool` + +HasSubscriptionSessionId returns a boolean if a field has been set. + ### GetSubscriptionPaymentSplits `func (o *SubscriptionEntity) GetSubscriptionPaymentSplits() []SubscriptionPaymentSplitItem` diff --git a/docs/TerminalDetails.md b/docs/TerminalDetails.md index 68d2bd9..ec8314a 100644 --- a/docs/TerminalDetails.md +++ b/docs/TerminalDetails.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **TerminalId** | Pointer to **string** | terminal id for merchant reference | [optional] **TerminalName** | Pointer to **string** | name of terminal/agent/storefront | [optional] **TerminalNote** | Pointer to **string** | note given by merchant while creating the terminal | [optional] -**TerminalPhoneNo** | **string** | mobile num of the terminal/agent/storefront | +**TerminalPhoneNo** | **string** | mobile num of the terminal/agent/storefront,This is a required parameter when you do not provide the cf_terminal_id. | **TerminalStatus** | Pointer to **string** | status of terminal active/inactive | [optional] **TerminalType** | **string** | To identify the type of terminal product in use, in this case it is SPOS. | diff --git a/docs/UpdateOrderExtendedDataEntity.md b/docs/UpdateOrderExtendedDataEntity.md new file mode 100644 index 0000000..aa39f06 --- /dev/null +++ b/docs/UpdateOrderExtendedDataEntity.md @@ -0,0 +1,134 @@ +# UpdateOrderExtendedDataEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CfOrderId** | Pointer to **string** | unique id generated by cashfree for your order | [optional] +**OrderId** | Pointer to **string** | order_id sent during the api request | [optional] +**ShipmentDetails** | Pointer to [**[]ShipmentDetails**](ShipmentDetails.md) | | [optional] +**OrderDeliveryStatus** | Pointer to [**OrderDeliveryStatus**](OrderDeliveryStatus.md) | | [optional] + +## Methods + +### NewUpdateOrderExtendedDataEntity + +`func NewUpdateOrderExtendedDataEntity() *UpdateOrderExtendedDataEntity` + +NewUpdateOrderExtendedDataEntity instantiates a new UpdateOrderExtendedDataEntity object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateOrderExtendedDataEntityWithDefaults + +`func NewUpdateOrderExtendedDataEntityWithDefaults() *UpdateOrderExtendedDataEntity` + +NewUpdateOrderExtendedDataEntityWithDefaults instantiates a new UpdateOrderExtendedDataEntity object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCfOrderId + +`func (o *UpdateOrderExtendedDataEntity) GetCfOrderId() string` + +GetCfOrderId returns the CfOrderId field if non-nil, zero value otherwise. + +### GetCfOrderIdOk + +`func (o *UpdateOrderExtendedDataEntity) GetCfOrderIdOk() (*string, bool)` + +GetCfOrderIdOk returns a tuple with the CfOrderId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCfOrderId + +`func (o *UpdateOrderExtendedDataEntity) SetCfOrderId(v string)` + +SetCfOrderId sets CfOrderId field to given value. + +### HasCfOrderId + +`func (o *UpdateOrderExtendedDataEntity) HasCfOrderId() bool` + +HasCfOrderId returns a boolean if a field has been set. + +### GetOrderId + +`func (o *UpdateOrderExtendedDataEntity) GetOrderId() string` + +GetOrderId returns the OrderId field if non-nil, zero value otherwise. + +### GetOrderIdOk + +`func (o *UpdateOrderExtendedDataEntity) GetOrderIdOk() (*string, bool)` + +GetOrderIdOk returns a tuple with the OrderId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderId + +`func (o *UpdateOrderExtendedDataEntity) SetOrderId(v string)` + +SetOrderId sets OrderId field to given value. + +### HasOrderId + +`func (o *UpdateOrderExtendedDataEntity) HasOrderId() bool` + +HasOrderId returns a boolean if a field has been set. + +### GetShipmentDetails + +`func (o *UpdateOrderExtendedDataEntity) GetShipmentDetails() []ShipmentDetails` + +GetShipmentDetails returns the ShipmentDetails field if non-nil, zero value otherwise. + +### GetShipmentDetailsOk + +`func (o *UpdateOrderExtendedDataEntity) GetShipmentDetailsOk() (*[]ShipmentDetails, bool)` + +GetShipmentDetailsOk returns a tuple with the ShipmentDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetShipmentDetails + +`func (o *UpdateOrderExtendedDataEntity) SetShipmentDetails(v []ShipmentDetails)` + +SetShipmentDetails sets ShipmentDetails field to given value. + +### HasShipmentDetails + +`func (o *UpdateOrderExtendedDataEntity) HasShipmentDetails() bool` + +HasShipmentDetails returns a boolean if a field has been set. + +### GetOrderDeliveryStatus + +`func (o *UpdateOrderExtendedDataEntity) GetOrderDeliveryStatus() OrderDeliveryStatus` + +GetOrderDeliveryStatus returns the OrderDeliveryStatus field if non-nil, zero value otherwise. + +### GetOrderDeliveryStatusOk + +`func (o *UpdateOrderExtendedDataEntity) GetOrderDeliveryStatusOk() (*OrderDeliveryStatus, bool)` + +GetOrderDeliveryStatusOk returns a tuple with the OrderDeliveryStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderDeliveryStatus + +`func (o *UpdateOrderExtendedDataEntity) SetOrderDeliveryStatus(v OrderDeliveryStatus)` + +SetOrderDeliveryStatus sets OrderDeliveryStatus field to given value. + +### HasOrderDeliveryStatus + +`func (o *UpdateOrderExtendedDataEntity) HasOrderDeliveryStatus() bool` + +HasOrderDeliveryStatus returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateOrderExtendedRequest.md b/docs/UpdateOrderExtendedRequest.md new file mode 100644 index 0000000..db2d008 --- /dev/null +++ b/docs/UpdateOrderExtendedRequest.md @@ -0,0 +1,77 @@ +# UpdateOrderExtendedRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShipmentDetails** | [**[]ShipmentDetails**](ShipmentDetails.md) | Shipment details, such as the tracking company, tracking number, and tracking URLs, associated with the shipping of an order. Either `shipment_details` or `order_delivery_status` is required. | +**OrderDeliveryStatus** | Pointer to [**OrderDeliveryStatus**](OrderDeliveryStatus.md) | | [optional] + +## Methods + +### NewUpdateOrderExtendedRequest + +`func NewUpdateOrderExtendedRequest(shipmentDetails []ShipmentDetails, ) *UpdateOrderExtendedRequest` + +NewUpdateOrderExtendedRequest instantiates a new UpdateOrderExtendedRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateOrderExtendedRequestWithDefaults + +`func NewUpdateOrderExtendedRequestWithDefaults() *UpdateOrderExtendedRequest` + +NewUpdateOrderExtendedRequestWithDefaults instantiates a new UpdateOrderExtendedRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetShipmentDetails + +`func (o *UpdateOrderExtendedRequest) GetShipmentDetails() []ShipmentDetails` + +GetShipmentDetails returns the ShipmentDetails field if non-nil, zero value otherwise. + +### GetShipmentDetailsOk + +`func (o *UpdateOrderExtendedRequest) GetShipmentDetailsOk() (*[]ShipmentDetails, bool)` + +GetShipmentDetailsOk returns a tuple with the ShipmentDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetShipmentDetails + +`func (o *UpdateOrderExtendedRequest) SetShipmentDetails(v []ShipmentDetails)` + +SetShipmentDetails sets ShipmentDetails field to given value. + + +### GetOrderDeliveryStatus + +`func (o *UpdateOrderExtendedRequest) GetOrderDeliveryStatus() OrderDeliveryStatus` + +GetOrderDeliveryStatus returns the OrderDeliveryStatus field if non-nil, zero value otherwise. + +### GetOrderDeliveryStatusOk + +`func (o *UpdateOrderExtendedRequest) GetOrderDeliveryStatusOk() (*OrderDeliveryStatus, bool)` + +GetOrderDeliveryStatusOk returns a tuple with the OrderDeliveryStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderDeliveryStatus + +`func (o *UpdateOrderExtendedRequest) SetOrderDeliveryStatus(v OrderDeliveryStatus)` + +SetOrderDeliveryStatus sets OrderDeliveryStatus field to given value. + +### HasOrderDeliveryStatus + +`func (o *UpdateOrderExtendedRequest) HasOrderDeliveryStatus() bool` + +HasOrderDeliveryStatus returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateSoundboxVpaRequest.md b/docs/UpdateSoundboxVpaRequest.md new file mode 100644 index 0000000..57ac13d --- /dev/null +++ b/docs/UpdateSoundboxVpaRequest.md @@ -0,0 +1,124 @@ +# UpdateSoundboxVpaRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Vpa** | **string** | Terminal Vpa,for which we need to update details. | +**CfTerminalId** | **string** | cashfree terminal id. | +**MerchantName** | Pointer to **string** | Merchant Name that need to updated on soundbox | [optional] +**Language** | Pointer to **string** | language of soundbox,currently English, Hindi, Tamil | [optional] + +## Methods + +### NewUpdateSoundboxVpaRequest + +`func NewUpdateSoundboxVpaRequest(vpa string, cfTerminalId string, ) *UpdateSoundboxVpaRequest` + +NewUpdateSoundboxVpaRequest instantiates a new UpdateSoundboxVpaRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateSoundboxVpaRequestWithDefaults + +`func NewUpdateSoundboxVpaRequestWithDefaults() *UpdateSoundboxVpaRequest` + +NewUpdateSoundboxVpaRequestWithDefaults instantiates a new UpdateSoundboxVpaRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVpa + +`func (o *UpdateSoundboxVpaRequest) GetVpa() string` + +GetVpa returns the Vpa field if non-nil, zero value otherwise. + +### GetVpaOk + +`func (o *UpdateSoundboxVpaRequest) GetVpaOk() (*string, bool)` + +GetVpaOk returns a tuple with the Vpa field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVpa + +`func (o *UpdateSoundboxVpaRequest) SetVpa(v string)` + +SetVpa sets Vpa field to given value. + + +### GetCfTerminalId + +`func (o *UpdateSoundboxVpaRequest) GetCfTerminalId() string` + +GetCfTerminalId returns the CfTerminalId field if non-nil, zero value otherwise. + +### GetCfTerminalIdOk + +`func (o *UpdateSoundboxVpaRequest) GetCfTerminalIdOk() (*string, bool)` + +GetCfTerminalIdOk returns a tuple with the CfTerminalId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCfTerminalId + +`func (o *UpdateSoundboxVpaRequest) SetCfTerminalId(v string)` + +SetCfTerminalId sets CfTerminalId field to given value. + + +### GetMerchantName + +`func (o *UpdateSoundboxVpaRequest) GetMerchantName() string` + +GetMerchantName returns the MerchantName field if non-nil, zero value otherwise. + +### GetMerchantNameOk + +`func (o *UpdateSoundboxVpaRequest) GetMerchantNameOk() (*string, bool)` + +GetMerchantNameOk returns a tuple with the MerchantName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMerchantName + +`func (o *UpdateSoundboxVpaRequest) SetMerchantName(v string)` + +SetMerchantName sets MerchantName field to given value. + +### HasMerchantName + +`func (o *UpdateSoundboxVpaRequest) HasMerchantName() bool` + +HasMerchantName returns a boolean if a field has been set. + +### GetLanguage + +`func (o *UpdateSoundboxVpaRequest) GetLanguage() string` + +GetLanguage returns the Language field if non-nil, zero value otherwise. + +### GetLanguageOk + +`func (o *UpdateSoundboxVpaRequest) GetLanguageOk() (*string, bool)` + +GetLanguageOk returns a tuple with the Language field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLanguage + +`func (o *UpdateSoundboxVpaRequest) SetLanguage(v string)` + +SetLanguage sets Language field to given value. + +### HasLanguage + +`func (o *UpdateSoundboxVpaRequest) HasLanguage() bool` + +HasLanguage returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VendorAdjustmentRequest.md b/docs/VendorAdjustmentRequest.md new file mode 100644 index 0000000..432977b --- /dev/null +++ b/docs/VendorAdjustmentRequest.md @@ -0,0 +1,140 @@ +# VendorAdjustmentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**VendorId** | **string** | The unique identifier of the vendor to whom the adjustment is applied | +**AdjustmentId** | **int64** | The unique identifier for the adjustment transaction. | +**Amount** | **float32** | The adjustment amount to be applied. | +**Type** | **string** | The type of adjustment. Possible values: CREDIT, DEBIT. | +**Remarks** | Pointer to **string** | Remarks for the adjustment transaction, if any. | [optional] + +## Methods + +### NewVendorAdjustmentRequest + +`func NewVendorAdjustmentRequest(vendorId string, adjustmentId int64, amount float32, type_ string, ) *VendorAdjustmentRequest` + +NewVendorAdjustmentRequest instantiates a new VendorAdjustmentRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVendorAdjustmentRequestWithDefaults + +`func NewVendorAdjustmentRequestWithDefaults() *VendorAdjustmentRequest` + +NewVendorAdjustmentRequestWithDefaults instantiates a new VendorAdjustmentRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVendorId + +`func (o *VendorAdjustmentRequest) GetVendorId() string` + +GetVendorId returns the VendorId field if non-nil, zero value otherwise. + +### GetVendorIdOk + +`func (o *VendorAdjustmentRequest) GetVendorIdOk() (*string, bool)` + +GetVendorIdOk returns a tuple with the VendorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVendorId + +`func (o *VendorAdjustmentRequest) SetVendorId(v string)` + +SetVendorId sets VendorId field to given value. + + +### GetAdjustmentId + +`func (o *VendorAdjustmentRequest) GetAdjustmentId() int64` + +GetAdjustmentId returns the AdjustmentId field if non-nil, zero value otherwise. + +### GetAdjustmentIdOk + +`func (o *VendorAdjustmentRequest) GetAdjustmentIdOk() (*int64, bool)` + +GetAdjustmentIdOk returns a tuple with the AdjustmentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAdjustmentId + +`func (o *VendorAdjustmentRequest) SetAdjustmentId(v int64)` + +SetAdjustmentId sets AdjustmentId field to given value. + + +### GetAmount + +`func (o *VendorAdjustmentRequest) GetAmount() float32` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *VendorAdjustmentRequest) GetAmountOk() (*float32, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmount + +`func (o *VendorAdjustmentRequest) SetAmount(v float32)` + +SetAmount sets Amount field to given value. + + +### GetType + +`func (o *VendorAdjustmentRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *VendorAdjustmentRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *VendorAdjustmentRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetRemarks + +`func (o *VendorAdjustmentRequest) GetRemarks() string` + +GetRemarks returns the Remarks field if non-nil, zero value otherwise. + +### GetRemarksOk + +`func (o *VendorAdjustmentRequest) GetRemarksOk() (*string, bool)` + +GetRemarksOk returns a tuple with the Remarks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRemarks + +`func (o *VendorAdjustmentRequest) SetRemarks(v string)` + +SetRemarks sets Remarks field to given value. + +### HasRemarks + +`func (o *VendorAdjustmentRequest) HasRemarks() bool` + +HasRemarks returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VendorAdjustmentSuccessResponse.md b/docs/VendorAdjustmentSuccessResponse.md new file mode 100644 index 0000000..95b9354 --- /dev/null +++ b/docs/VendorAdjustmentSuccessResponse.md @@ -0,0 +1,82 @@ +# VendorAdjustmentSuccessResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] + +## Methods + +### NewVendorAdjustmentSuccessResponse + +`func NewVendorAdjustmentSuccessResponse() *VendorAdjustmentSuccessResponse` + +NewVendorAdjustmentSuccessResponse instantiates a new VendorAdjustmentSuccessResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVendorAdjustmentSuccessResponseWithDefaults + +`func NewVendorAdjustmentSuccessResponseWithDefaults() *VendorAdjustmentSuccessResponse` + +NewVendorAdjustmentSuccessResponseWithDefaults instantiates a new VendorAdjustmentSuccessResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMessage + +`func (o *VendorAdjustmentSuccessResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *VendorAdjustmentSuccessResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *VendorAdjustmentSuccessResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *VendorAdjustmentSuccessResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatus + +`func (o *VendorAdjustmentSuccessResponse) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *VendorAdjustmentSuccessResponse) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *VendorAdjustmentSuccessResponse) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *VendorAdjustmentSuccessResponse) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/model_address_details.go b/model_address_details.go new file mode 100644 index 0000000..4a9acfd --- /dev/null +++ b/model_address_details.go @@ -0,0 +1,97 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the AddressDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddressDetails{} + +// AddressDetails Address associated with the customer. +type AddressDetails struct { + // Full Name of the customer associated with the address. + Name *string `json:"name,omitempty"` + // First line of the address. + AddressLineOne *string `json:"address_line_one,omitempty"` + // Second line of the address. + AddressLineTwo *string `json:"address_line_two,omitempty"` + // Country Name. + Country *string `json:"country,omitempty"` + // Country Code. + CountryCode *string `json:"country_code,omitempty"` + // State Name. + State *string `json:"state,omitempty"` + // State Code. + StateCode *string `json:"state_code,omitempty"` + // City Name. + City *string `json:"city,omitempty"` + // Pin Code/Zip Code. + PinCode *string `json:"pin_code,omitempty"` + // Customer Phone Number. + Phone *string `json:"phone,omitempty"` + // Cutomer Email Address. + Email *string `json:"email,omitempty"` +} + + +func (o AddressDetails) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddressDetails) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.AddressLineOne) { + toSerialize["address_line_one"] = o.AddressLineOne + } + if !IsNil(o.AddressLineTwo) { + toSerialize["address_line_two"] = o.AddressLineTwo + } + if !IsNil(o.Country) { + toSerialize["country"] = o.Country + } + if !IsNil(o.CountryCode) { + toSerialize["country_code"] = o.CountryCode + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if !IsNil(o.StateCode) { + toSerialize["state_code"] = o.StateCode + } + if !IsNil(o.City) { + toSerialize["city"] = o.City + } + if !IsNil(o.PinCode) { + toSerialize["pin_code"] = o.PinCode + } + if !IsNil(o.Phone) { + toSerialize["phone"] = o.Phone + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + return toSerialize, nil +} + + + diff --git a/model_cart_details.go b/model_cart_details.go new file mode 100644 index 0000000..5bae1a8 --- /dev/null +++ b/model_cart_details.go @@ -0,0 +1,55 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the CartDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CartDetails{} + +// CartDetails The cart details that are necessary like shipping address, billing address and more. +type CartDetails struct { + ShippingCharge *float64 `json:"shipping_charge,omitempty"` + // Name of the cart. + CartName *string `json:"cart_name,omitempty"` + CartItems []CartItem `json:"cart_items,omitempty"` +} + + +func (o CartDetails) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CartDetails) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.ShippingCharge) { + toSerialize["shipping_charge"] = o.ShippingCharge + } + if !IsNil(o.CartName) { + toSerialize["cart_name"] = o.CartName + } + if !IsNil(o.CartItems) { + toSerialize["cart_items"] = o.CartItems + } + return toSerialize, nil +} + + + diff --git a/model_cart_details_entity.go b/model_cart_details_entity.go new file mode 100644 index 0000000..6c13450 --- /dev/null +++ b/model_cart_details_entity.go @@ -0,0 +1,47 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the CartDetailsEntity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CartDetailsEntity{} + +// CartDetailsEntity Cart Details in the Order Entity Response +type CartDetailsEntity struct { + // ID of the cart that was created + CartId *string `json:"cart_id,omitempty"` +} + + +func (o CartDetailsEntity) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CartDetailsEntity) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.CartId) { + toSerialize["cart_id"] = o.CartId + } + return toSerialize, nil +} + + + diff --git a/model_cart_item.go b/model_cart_item.go new file mode 100644 index 0000000..be7c17f --- /dev/null +++ b/model_cart_item.go @@ -0,0 +1,92 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the CartItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CartItem{} + +// CartItem Each item in the cart. +type CartItem struct { + // Unique identifier of the item + ItemId *string `json:"item_id,omitempty"` + // Name of the item + ItemName *string `json:"item_name,omitempty"` + // Description of the item + ItemDescription *string `json:"item_description,omitempty"` + // Tags attached to that item + ItemTags []string `json:"item_tags,omitempty"` + // Item details url + ItemDetailsUrl *string `json:"item_details_url,omitempty"` + // Item image url + ItemImageUrl *string `json:"item_image_url,omitempty"` + // Original price + ItemOriginalUnitPrice *float64 `json:"item_original_unit_price,omitempty"` + // Discounted Price + ItemDiscountedUnitPrice *float64 `json:"item_discounted_unit_price,omitempty"` + // Currency of the item. + ItemCurrency *string `json:"item_currency,omitempty"` + // Quantity if that item + ItemQuantity *float32 `json:"item_quantity,omitempty"` +} + + +func (o CartItem) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CartItem) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.ItemId) { + toSerialize["item_id"] = o.ItemId + } + if !IsNil(o.ItemName) { + toSerialize["item_name"] = o.ItemName + } + if !IsNil(o.ItemDescription) { + toSerialize["item_description"] = o.ItemDescription + } + if !IsNil(o.ItemTags) { + toSerialize["item_tags"] = o.ItemTags + } + if !IsNil(o.ItemDetailsUrl) { + toSerialize["item_details_url"] = o.ItemDetailsUrl + } + if !IsNil(o.ItemImageUrl) { + toSerialize["item_image_url"] = o.ItemImageUrl + } + if !IsNil(o.ItemOriginalUnitPrice) { + toSerialize["item_original_unit_price"] = o.ItemOriginalUnitPrice + } + if !IsNil(o.ItemDiscountedUnitPrice) { + toSerialize["item_discounted_unit_price"] = o.ItemDiscountedUnitPrice + } + if !IsNil(o.ItemCurrency) { + toSerialize["item_currency"] = o.ItemCurrency + } + if !IsNil(o.ItemQuantity) { + toSerialize["item_quantity"] = o.ItemQuantity + } + return toSerialize, nil +} + + + diff --git a/model_charges_entity.go b/model_charges_entity.go new file mode 100644 index 0000000..caa6626 --- /dev/null +++ b/model_charges_entity.go @@ -0,0 +1,52 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the ChargesEntity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChargesEntity{} + +// ChargesEntity Charges accociated with the order +type ChargesEntity struct { + // Shipping charge of the order + ShippingCharges *float32 `json:"shipping_charges,omitempty"` + // COD handling fee for order + CodHandlingCharges *float32 `json:"cod_handling_charges,omitempty"` +} + + +func (o ChargesEntity) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChargesEntity) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.ShippingCharges) { + toSerialize["shipping_charges"] = o.ShippingCharges + } + if !IsNil(o.CodHandlingCharges) { + toSerialize["cod_handling_charges"] = o.CodHandlingCharges + } + return toSerialize, nil +} + + + diff --git a/model_create_order_request.go b/model_create_order_request.go index 71decee..85d3647 100644 --- a/model_create_order_request.go +++ b/model_create_order_request.go @@ -27,6 +27,7 @@ type CreateOrderRequest struct { OrderAmount float64 `json:"order_amount"` // Currency for the order. INR if left empty. Contact care@cashfree.com to enable new currencies. OrderCurrency string `json:"order_currency"` + CartDetails *CartDetails `json:"cart_details,omitempty"` CustomerDetails CustomerDetails `json:"customer_details"` Terminal *TerminalDetails `json:"terminal,omitempty"` OrderMeta *OrderMeta `json:"order_meta,omitempty"` @@ -57,6 +58,9 @@ func (o CreateOrderRequest) ToMap() (map[string]interface{}, error) { } toSerialize["order_amount"] = o.OrderAmount toSerialize["order_currency"] = o.OrderCurrency + if !IsNil(o.CartDetails) { + toSerialize["cart_details"] = o.CartDetails + } toSerialize["customer_details"] = o.CustomerDetails if !IsNil(o.Terminal) { toSerialize["terminal"] = o.Terminal diff --git a/model_create_partner_vpa_request.go b/model_create_partner_vpa_request.go new file mode 100644 index 0000000..6914b0d --- /dev/null +++ b/model_create_partner_vpa_request.go @@ -0,0 +1,45 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the CreatePartnerVpaRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatePartnerVpaRequest{} + +// CreatePartnerVpaRequest struct for CreatePartnerVpaRequest +type CreatePartnerVpaRequest struct { + // count of vpa , to create in bulk, max limit:50 + VpaCount int32 `json:"vpa_count"` +} + + +func (o CreatePartnerVpaRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatePartnerVpaRequest) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + toSerialize["vpa_count"] = o.VpaCount + return toSerialize, nil +} + + + diff --git a/model_create_subscription_request_authorization_details.go b/model_create_subscription_request_authorization_details.go index 927f175..48dc2ec 100644 --- a/model_create_subscription_request_authorization_details.go +++ b/model_create_subscription_request_authorization_details.go @@ -25,6 +25,8 @@ type CreateSubscriptionRequestAuthorizationDetails struct { AuthorizationAmount *float32 `json:"authorization_amount,omitempty"` // Indicates whether the authorization amount should be refunded to the customer automatically. Merchants can use this field to specify if the authorized funds should be returned to the customer after authorization of the subscription. AuthorizationAmountRefund *bool `json:"authorization_amount_refund,omitempty"` + // Payment methods for the subscription. enach, pnach, upi, card are possible values. + PaymentMethods []string `json:"payment_methods,omitempty"` } @@ -45,6 +47,9 @@ func (o CreateSubscriptionRequestAuthorizationDetails) ToMap() (map[string]inter if !IsNil(o.AuthorizationAmountRefund) { toSerialize["authorization_amount_refund"] = o.AuthorizationAmountRefund } + if !IsNil(o.PaymentMethods) { + toSerialize["payment_methods"] = o.PaymentMethods + } return toSerialize, nil } diff --git a/model_customer_details_in_disputes_entity.go b/model_customer_details_in_disputes_entity.go new file mode 100644 index 0000000..83364ab --- /dev/null +++ b/model_customer_details_in_disputes_entity.go @@ -0,0 +1,54 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the CustomerDetailsInDisputesEntity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomerDetailsInDisputesEntity{} + +// CustomerDetailsInDisputesEntity struct for CustomerDetailsInDisputesEntity +type CustomerDetailsInDisputesEntity struct { + CustomerName *string `json:"customer_name,omitempty"` + CustomerPhone *string `json:"customer_phone,omitempty"` + CustomerEmail *string `json:"customer_email,omitempty"` +} + + +func (o CustomerDetailsInDisputesEntity) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomerDetailsInDisputesEntity) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.CustomerName) { + toSerialize["customer_name"] = o.CustomerName + } + if !IsNil(o.CustomerPhone) { + toSerialize["customer_phone"] = o.CustomerPhone + } + if !IsNil(o.CustomerEmail) { + toSerialize["customer_email"] = o.CustomerEmail + } + return toSerialize, nil +} + + + diff --git a/model_demap_soundbox_vpa_request.go b/model_demap_soundbox_vpa_request.go new file mode 100644 index 0000000..1aae1ef --- /dev/null +++ b/model_demap_soundbox_vpa_request.go @@ -0,0 +1,48 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the DemapSoundboxVpaRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DemapSoundboxVpaRequest{} + +// DemapSoundboxVpaRequest Request body to demap soundbox vpa +type DemapSoundboxVpaRequest struct { + // cashfree terminal id. + CfTerminalId string `json:"cf_terminal_id"` + // Device Serial No of soundbox that need to demap. + DeviceSerialNo string `json:"device_serial_no"` +} + + +func (o DemapSoundboxVpaRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DemapSoundboxVpaRequest) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + toSerialize["cf_terminal_id"] = o.CfTerminalId + toSerialize["device_serial_no"] = o.DeviceSerialNo + return toSerialize, nil +} + + + diff --git a/model_dispute_evidence.go b/model_dispute_evidence.go new file mode 100644 index 0000000..b017da0 --- /dev/null +++ b/model_dispute_evidence.go @@ -0,0 +1,51 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the DisputeEvidence type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DisputeEvidence{} + +// DisputeEvidence struct for DisputeEvidence +type DisputeEvidence struct { + []Evidence +} + + +func (o DisputeEvidence) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DisputeEvidence) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + serialized[]Evidence, err[]Evidence := json.Marshal(o.[]Evidence) + if err[]Evidence != nil { + return map[string]interface{}{}, err[]Evidence + } + err[]Evidence = json.Unmarshal([]byte(serialized[]Evidence), &toSerialize) + if err[]Evidence != nil { + return map[string]interface{}{}, err[]Evidence + } + return toSerialize, nil +} + + + diff --git a/model_disputes_entity.go b/model_disputes_entity.go new file mode 100644 index 0000000..532b4e2 --- /dev/null +++ b/model_disputes_entity.go @@ -0,0 +1,107 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the DisputesEntity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DisputesEntity{} + +// DisputesEntity struct for DisputesEntity +type DisputesEntity struct { + DisputeId *int32 `json:"dispute_id,omitempty"` + DisputeType *string `json:"dispute_type,omitempty"` + ReasonCode *string `json:"reason_code,omitempty"` + ReasonDescription *string `json:"reason_description,omitempty"` + // Dispute amount may differ from transaction amount for partial cases. + DisputeAmount *float32 `json:"dispute_amount,omitempty"` + // This is the time when the dispute was created. + CreatedAt *string `json:"created_at,omitempty"` + // This is the time by which evidence should be submitted to contest the dispute. + RespondBy *string `json:"respond_by,omitempty"` + // This is the time when the dispute case was updated. + UpdatedAt *string `json:"updated_at,omitempty"` + // This is the time when the dispute case was closed. + ResolvedAt *string `json:"resolved_at,omitempty"` + DisputeStatus *string `json:"dispute_status,omitempty"` + CfDisputeRemarks *string `json:"cf_dispute_remarks,omitempty"` + PreferredEvidence *map[string]interface{} `json:"preferred_evidence,omitempty"` + DisputeEvidence *[]Evidence `json:"dispute_evidence,omitempty"` + OrderDetails *OrderDetailsInDisputesEntity `json:"order_details,omitempty"` + CustomerDetails *CustomerDetailsInDisputesEntity `json:"customer_details,omitempty"` +} + + +func (o DisputesEntity) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DisputesEntity) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.DisputeId) { + toSerialize["dispute_id"] = o.DisputeId + } + if !IsNil(o.DisputeType) { + toSerialize["dispute_type"] = o.DisputeType + } + if !IsNil(o.ReasonCode) { + toSerialize["reason_code"] = o.ReasonCode + } + if !IsNil(o.ReasonDescription) { + toSerialize["reason_description"] = o.ReasonDescription + } + if !IsNil(o.DisputeAmount) { + toSerialize["dispute_amount"] = o.DisputeAmount + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.RespondBy) { + toSerialize["respond_by"] = o.RespondBy + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.ResolvedAt) { + toSerialize["resolved_at"] = o.ResolvedAt + } + if !IsNil(o.DisputeStatus) { + toSerialize["dispute_status"] = o.DisputeStatus + } + if !IsNil(o.CfDisputeRemarks) { + toSerialize["cf_dispute_remarks"] = o.CfDisputeRemarks + } + if !IsNil(o.PreferredEvidence) { + toSerialize["preferred_evidence"] = o.PreferredEvidence + } + if !IsNil(o.DisputeEvidence) { + toSerialize["dispute_evidence"] = o.DisputeEvidence + } + if !IsNil(o.OrderDetails) { + toSerialize["order_details"] = o.OrderDetails + } + if !IsNil(o.CustomerDetails) { + toSerialize["customer_details"] = o.CustomerDetails + } + return toSerialize, nil +} + + + diff --git a/model_disputes_entity_merchant_accepted.go b/model_disputes_entity_merchant_accepted.go new file mode 100644 index 0000000..8a86bf2 --- /dev/null +++ b/model_disputes_entity_merchant_accepted.go @@ -0,0 +1,107 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the DisputesEntityMerchantAccepted type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DisputesEntityMerchantAccepted{} + +// DisputesEntityMerchantAccepted struct for DisputesEntityMerchantAccepted +type DisputesEntityMerchantAccepted struct { + DisputeId *int32 `json:"dispute_id,omitempty"` + DisputeType *string `json:"dispute_type,omitempty"` + ReasonCode *string `json:"reason_code,omitempty"` + ReasonDescription *string `json:"reason_description,omitempty"` + // Dispute amount may differ from transaction amount for partial cases. + DisputeAmount *float32 `json:"dispute_amount,omitempty"` + // This is the time when the dispute was created. + CreatedAt *string `json:"created_at,omitempty"` + // This is the time by which evidence should be submitted to contest the dispute. + RespondBy *string `json:"respond_by,omitempty"` + // This is the time when the dispute case was updated. + UpdatedAt *string `json:"updated_at,omitempty"` + // This is the time when the dispute case was closed. + ResolvedAt *string `json:"resolved_at,omitempty"` + DisputeStatus *string `json:"dispute_status,omitempty"` + CfDisputeRemarks *string `json:"cf_dispute_remarks,omitempty"` + PreferredEvidence *map[string]interface{} `json:"preferred_evidence,omitempty"` + DisputeEvidence *[]Evidence `json:"dispute_evidence,omitempty"` + OrderDetails *OrderDetailsInDisputesEntity `json:"order_details,omitempty"` + CustomerDetails *CustomerDetailsInDisputesEntity `json:"customer_details,omitempty"` +} + + +func (o DisputesEntityMerchantAccepted) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DisputesEntityMerchantAccepted) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.DisputeId) { + toSerialize["dispute_id"] = o.DisputeId + } + if !IsNil(o.DisputeType) { + toSerialize["dispute_type"] = o.DisputeType + } + if !IsNil(o.ReasonCode) { + toSerialize["reason_code"] = o.ReasonCode + } + if !IsNil(o.ReasonDescription) { + toSerialize["reason_description"] = o.ReasonDescription + } + if !IsNil(o.DisputeAmount) { + toSerialize["dispute_amount"] = o.DisputeAmount + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.RespondBy) { + toSerialize["respond_by"] = o.RespondBy + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.ResolvedAt) { + toSerialize["resolved_at"] = o.ResolvedAt + } + if !IsNil(o.DisputeStatus) { + toSerialize["dispute_status"] = o.DisputeStatus + } + if !IsNil(o.CfDisputeRemarks) { + toSerialize["cf_dispute_remarks"] = o.CfDisputeRemarks + } + if !IsNil(o.PreferredEvidence) { + toSerialize["preferred_evidence"] = o.PreferredEvidence + } + if !IsNil(o.DisputeEvidence) { + toSerialize["dispute_evidence"] = o.DisputeEvidence + } + if !IsNil(o.OrderDetails) { + toSerialize["order_details"] = o.OrderDetails + } + if !IsNil(o.CustomerDetails) { + toSerialize["customer_details"] = o.CustomerDetails + } + return toSerialize, nil +} + + + diff --git a/model_evidence.go b/model_evidence.go new file mode 100644 index 0000000..c3b29c8 --- /dev/null +++ b/model_evidence.go @@ -0,0 +1,54 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the Evidence type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Evidence{} + +// Evidence struct for Evidence +type Evidence struct { + DocumentId *int32 `json:"document_id,omitempty"` + DocumentName *string `json:"document_name,omitempty"` + DocumentType *string `json:"document_type,omitempty"` +} + + +func (o Evidence) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Evidence) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.DocumentId) { + toSerialize["document_id"] = o.DocumentId + } + if !IsNil(o.DocumentName) { + toSerialize["document_name"] = o.DocumentName + } + if !IsNil(o.DocumentType) { + toSerialize["document_type"] = o.DocumentType + } + return toSerialize, nil +} + + + diff --git a/model_evidence_submitted_to_contest_dispute.go b/model_evidence_submitted_to_contest_dispute.go new file mode 100644 index 0000000..957f341 --- /dev/null +++ b/model_evidence_submitted_to_contest_dispute.go @@ -0,0 +1,58 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the EvidenceSubmittedToContestDispute type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvidenceSubmittedToContestDispute{} + +// EvidenceSubmittedToContestDispute struct for EvidenceSubmittedToContestDispute +type EvidenceSubmittedToContestDispute struct { + DocumentId *int32 `json:"documentId,omitempty"` + DocumentName *string `json:"documentName,omitempty"` + DocumentType *string `json:"documentType,omitempty"` + DownloadUrl *string `json:"downloadUrl,omitempty"` +} + + +func (o EvidenceSubmittedToContestDispute) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvidenceSubmittedToContestDispute) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.DocumentId) { + toSerialize["documentId"] = o.DocumentId + } + if !IsNil(o.DocumentName) { + toSerialize["documentName"] = o.DocumentName + } + if !IsNil(o.DocumentType) { + toSerialize["documentType"] = o.DocumentType + } + if !IsNil(o.DownloadUrl) { + toSerialize["downloadUrl"] = o.DownloadUrl + } + return toSerialize, nil +} + + + diff --git a/model_evidences_to_contest_dispute.go b/model_evidences_to_contest_dispute.go new file mode 100644 index 0000000..6a3617d --- /dev/null +++ b/model_evidences_to_contest_dispute.go @@ -0,0 +1,50 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the EvidencesToContestDispute type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvidencesToContestDispute{} + +// EvidencesToContestDispute struct for EvidencesToContestDispute +type EvidencesToContestDispute struct { + DocumentType *string `json:"document_type,omitempty"` + DocumentDescription *string `json:"document_description,omitempty"` +} + + +func (o EvidencesToContestDispute) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvidencesToContestDispute) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.DocumentType) { + toSerialize["document_type"] = o.DocumentType + } + if !IsNil(o.DocumentDescription) { + toSerialize["document_description"] = o.DocumentDescription + } + return toSerialize, nil +} + + + diff --git a/model_extended_cart_details.go b/model_extended_cart_details.go new file mode 100644 index 0000000..0915428 --- /dev/null +++ b/model_extended_cart_details.go @@ -0,0 +1,51 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the ExtendedCartDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExtendedCartDetails{} + +// ExtendedCartDetails The cart details that are necessary like shipping address, billing address and more. +type ExtendedCartDetails struct { + // Name of the cart. + Name *string `json:"name,omitempty"` + Items []CartItem `json:"items,omitempty"` +} + + +func (o ExtendedCartDetails) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExtendedCartDetails) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + + + diff --git a/model_extended_customer_details.go b/model_extended_customer_details.go new file mode 100644 index 0000000..050f4b3 --- /dev/null +++ b/model_extended_customer_details.go @@ -0,0 +1,67 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the ExtendedCustomerDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExtendedCustomerDetails{} + +// ExtendedCustomerDetails Recent Customer details associated with the order. +type ExtendedCustomerDetails struct { + // A unique identifier for the customer. Use alphanumeric values only. + CustomerId *string `json:"customer_id,omitempty"` + // Customer email address. + CustomerEmail *string `json:"customer_email,omitempty"` + // Customer phone number. + CustomerPhone *string `json:"customer_phone,omitempty"` + // Name of the customer. + CustomerName *string `json:"customer_name,omitempty"` + // Customer identifier at Cashfree. You will get this when you create/get customer + CustomerUid *string `json:"customer_uid,omitempty"` +} + + +func (o ExtendedCustomerDetails) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExtendedCustomerDetails) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.CustomerId) { + toSerialize["customer_id"] = o.CustomerId + } + if !IsNil(o.CustomerEmail) { + toSerialize["customer_email"] = o.CustomerEmail + } + if !IsNil(o.CustomerPhone) { + toSerialize["customer_phone"] = o.CustomerPhone + } + if !IsNil(o.CustomerName) { + toSerialize["customer_name"] = o.CustomerName + } + if !IsNil(o.CustomerUid) { + toSerialize["customer_uid"] = o.CustomerUid + } + return toSerialize, nil +} + + + diff --git a/model_offer_extended_details.go b/model_offer_extended_details.go new file mode 100644 index 0000000..3e3e54b --- /dev/null +++ b/model_offer_extended_details.go @@ -0,0 +1,66 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the OfferExtendedDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OfferExtendedDetails{} + +// OfferExtendedDetails Details of the offer which got applied to the paid order. +type OfferExtendedDetails struct { + OfferId *string `json:"offer_id,omitempty"` + OfferStatus *string `json:"offer_status,omitempty"` + OfferMeta *OfferMeta `json:"offer_meta,omitempty"` + OfferTnc *OfferTnc `json:"offer_tnc,omitempty"` + OfferDetails *OfferDetails `json:"offer_details,omitempty"` + OfferValidations *OfferValidations `json:"offer_validations,omitempty"` +} + + +func (o OfferExtendedDetails) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OfferExtendedDetails) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.OfferId) { + toSerialize["offer_id"] = o.OfferId + } + if !IsNil(o.OfferStatus) { + toSerialize["offer_status"] = o.OfferStatus + } + if !IsNil(o.OfferMeta) { + toSerialize["offer_meta"] = o.OfferMeta + } + if !IsNil(o.OfferTnc) { + toSerialize["offer_tnc"] = o.OfferTnc + } + if !IsNil(o.OfferDetails) { + toSerialize["offer_details"] = o.OfferDetails + } + if !IsNil(o.OfferValidations) { + toSerialize["offer_validations"] = o.OfferValidations + } + return toSerialize, nil +} + + + diff --git a/model_offer_validations_payment_method.go b/model_offer_validations_payment_method.go index 7ead18b..2fe1bc3 100644 --- a/model_offer_validations_payment_method.go +++ b/model_offer_validations_payment_method.go @@ -106,16 +106,6 @@ func (dst *OfferValidationsPaymentMethod) UnmarshalJSON(data []byte) error { match++ } - - if match == 0 { - all := map[string]interface{}{} - if strings.Contains(string(jsonOfferAll), "all") { - match++ - dst.OfferAll = &OfferAll{ - All: all, - } - } - } } else { diff --git a/model_onboard_soundbox_vpa_request.go b/model_onboard_soundbox_vpa_request.go new file mode 100644 index 0000000..1c54341 --- /dev/null +++ b/model_onboard_soundbox_vpa_request.go @@ -0,0 +1,61 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the OnboardSoundboxVpaRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OnboardSoundboxVpaRequest{} + +// OnboardSoundboxVpaRequest Request body to onboard soundbox vpa +type OnboardSoundboxVpaRequest struct { + // Terminal Vpa ,that need to onboard on soundbox + Vpa string `json:"vpa"` + // cashfree terminal id. + CfTerminalId string `json:"cf_terminal_id"` + // Device Serial No of soundbox + DeviceSerialNo string `json:"device_serial_no"` + // Merchant Name that need to onboard on soundbox + MerchantName *string `json:"merchant_name,omitempty"` + // language of soundbox,currently English, Hindi, Tamil + Language *string `json:"language,omitempty"` +} + + +func (o OnboardSoundboxVpaRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OnboardSoundboxVpaRequest) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + toSerialize["vpa"] = o.Vpa + toSerialize["cf_terminal_id"] = o.CfTerminalId + toSerialize["device_serial_no"] = o.DeviceSerialNo + if !IsNil(o.MerchantName) { + toSerialize["merchant_name"] = o.MerchantName + } + if !IsNil(o.Language) { + toSerialize["language"] = o.Language + } + return toSerialize, nil +} + + + diff --git a/model_order_delivery_status.go b/model_order_delivery_status.go new file mode 100644 index 0000000..34bfc5b --- /dev/null +++ b/model_order_delivery_status.go @@ -0,0 +1,50 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the OrderDeliveryStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrderDeliveryStatus{} + +// OrderDeliveryStatus Order delivery Status associated with order. +type OrderDeliveryStatus struct { + // Delivery status of order + Status string `json:"status"` + // Reason of provided order delivery status. This is optional field. + Reason *string `json:"reason,omitempty"` +} + + +func (o OrderDeliveryStatus) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrderDeliveryStatus) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + if !IsNil(o.Reason) { + toSerialize["reason"] = o.Reason + } + return toSerialize, nil +} + + + diff --git a/model_order_details_in_disputes_entity.go b/model_order_details_in_disputes_entity.go new file mode 100644 index 0000000..be9c959 --- /dev/null +++ b/model_order_details_in_disputes_entity.go @@ -0,0 +1,66 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the OrderDetailsInDisputesEntity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrderDetailsInDisputesEntity{} + +// OrderDetailsInDisputesEntity struct for OrderDetailsInDisputesEntity +type OrderDetailsInDisputesEntity struct { + OrderId *string `json:"order_id,omitempty"` + OrderCurrency *string `json:"order_currency,omitempty"` + OrderAmount *float32 `json:"order_amount,omitempty"` + CfPaymentId *string `json:"cf_payment_id,omitempty"` + PaymentCurrency *string `json:"payment_currency,omitempty"` + PaymentAmount *float32 `json:"payment_amount,omitempty"` +} + + +func (o OrderDetailsInDisputesEntity) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrderDetailsInDisputesEntity) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.OrderId) { + toSerialize["order_id"] = o.OrderId + } + if !IsNil(o.OrderCurrency) { + toSerialize["order_currency"] = o.OrderCurrency + } + if !IsNil(o.OrderAmount) { + toSerialize["order_amount"] = o.OrderAmount + } + if !IsNil(o.CfPaymentId) { + toSerialize["cf_payment_id"] = o.CfPaymentId + } + if !IsNil(o.PaymentCurrency) { + toSerialize["payment_currency"] = o.PaymentCurrency + } + if !IsNil(o.PaymentAmount) { + toSerialize["payment_amount"] = o.PaymentAmount + } + return toSerialize, nil +} + + + diff --git a/model_order_entity.go b/model_order_entity.go index b4f5d2b..7d38494 100644 --- a/model_order_entity.go +++ b/model_order_entity.go @@ -44,6 +44,7 @@ type OrderEntity struct { OrderMeta *OrderMeta `json:"order_meta,omitempty"` // Custom Tags in thr form of {\"key\":\"value\"} which can be passed for an order. A maximum of 10 tags can be added OrderTags *map[string]string `json:"order_tags,omitempty"` + CartDetails *CartDetailsEntity `json:"cart_details,omitempty"` } @@ -100,6 +101,9 @@ func (o OrderEntity) ToMap() (map[string]interface{}, error) { if !IsNil(o.OrderTags) { toSerialize["order_tags"] = o.OrderTags } + if !IsNil(o.CartDetails) { + toSerialize["cart_details"] = o.CartDetails + } return toSerialize, nil } diff --git a/model_order_extended_data_entity.go b/model_order_extended_data_entity.go new file mode 100644 index 0000000..09a6bc7 --- /dev/null +++ b/model_order_extended_data_entity.go @@ -0,0 +1,91 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" + "time" +) + +// checks if the OrderExtendedDataEntity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrderExtendedDataEntity{} + +// OrderExtendedDataEntity The complete order extended data entity +type OrderExtendedDataEntity struct { + // unique id generated by cashfree for your order + CfOrderId *string `json:"cf_order_id,omitempty"` + // order_id sent during the api request + OrderId *string `json:"order_id,omitempty"` + OrderAmount *float32 `json:"order_amount,omitempty"` + // Currency of the order. Example INR + OrderCurrency *string `json:"order_currency,omitempty"` + // When the order was created at cashfree's server + CreatedAt *time.Time `json:"created_at,omitempty"` + Charges *ChargesEntity `json:"charges,omitempty"` + CustomerDetails *ExtendedCustomerDetails `json:"customer_details,omitempty"` + ShippingAddress *AddressDetails `json:"shipping_address,omitempty"` + BillingAddress *AddressDetails `json:"billing_address,omitempty"` + Cart *ExtendedCartDetails `json:"cart,omitempty"` + Offer *OfferExtendedDetails `json:"offer,omitempty"` +} + + +func (o OrderExtendedDataEntity) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrderExtendedDataEntity) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.CfOrderId) { + toSerialize["cf_order_id"] = o.CfOrderId + } + if !IsNil(o.OrderId) { + toSerialize["order_id"] = o.OrderId + } + if !IsNil(o.OrderAmount) { + toSerialize["order_amount"] = o.OrderAmount + } + if !IsNil(o.OrderCurrency) { + toSerialize["order_currency"] = o.OrderCurrency + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.Charges) { + toSerialize["charges"] = o.Charges + } + if !IsNil(o.CustomerDetails) { + toSerialize["customer_details"] = o.CustomerDetails + } + if !IsNil(o.ShippingAddress) { + toSerialize["shipping_address"] = o.ShippingAddress + } + if !IsNil(o.BillingAddress) { + toSerialize["billing_address"] = o.BillingAddress + } + if !IsNil(o.Cart) { + toSerialize["cart"] = o.Cart + } + if !IsNil(o.Offer) { + toSerialize["offer"] = o.Offer + } + return toSerialize, nil +} + + + diff --git a/model_shipment_details.go b/model_shipment_details.go new file mode 100644 index 0000000..175e0e4 --- /dev/null +++ b/model_shipment_details.go @@ -0,0 +1,51 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the ShipmentDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ShipmentDetails{} + +// ShipmentDetails Shipment details associated with shipping of order like tracking company, tracking number,tracking urls etc. +type ShipmentDetails struct { + // Tracking company name associated with order. + TrackingCompany string `json:"tracking_company"` + // Tracking Urls associated with order. + TrackingUrls []string `json:"tracking_urls"` + // Tracking Numbers associated with order. + TrackingNumbers []string `json:"tracking_numbers"` +} + + +func (o ShipmentDetails) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ShipmentDetails) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + toSerialize["tracking_company"] = o.TrackingCompany + toSerialize["tracking_urls"] = o.TrackingUrls + toSerialize["tracking_numbers"] = o.TrackingNumbers + return toSerialize, nil +} + + + diff --git a/model_simulate_request.go b/model_simulate_request.go index 6836fd0..a26d64a 100644 --- a/model_simulate_request.go +++ b/model_simulate_request.go @@ -21,9 +21,9 @@ var _ MappedNullable = &SimulateRequest{} // SimulateRequest simulate payment request object type SimulateRequest struct { - // Entity type should be PAYMENTS only. + // Entity type should be PAYMENTS or SUBS_PAYMENTS only. Entity string `json:"entity"` - // In case of Entity type is PAYMENTS, entity_id will be transactionId + // If the entity type is PAYMENTS, the entity_id will be the transactionId. If the entity type is SUBS_PAYMENTS, the entity_id will be the merchantTxnId EntityId string `json:"entity_id"` EntitySimulation EntitySimulationRequest `json:"entity_simulation"` } diff --git a/model_soundbox_vpa_entity.go b/model_soundbox_vpa_entity.go new file mode 100644 index 0000000..7b09906 --- /dev/null +++ b/model_soundbox_vpa_entity.go @@ -0,0 +1,62 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the SoundboxVpaEntity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SoundboxVpaEntity{} + +// SoundboxVpaEntity soundbox response object +type SoundboxVpaEntity struct { + Vpa *string `json:"vpa,omitempty"` + CfTerminalId *string `json:"cf_terminal_id,omitempty"` + DeviceSerialNo *string `json:"device_serial_no,omitempty"` + MerchantName *string `json:"merchant_name,omitempty"` + Language *string `json:"language,omitempty"` +} + + +func (o SoundboxVpaEntity) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SoundboxVpaEntity) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.Vpa) { + toSerialize["vpa"] = o.Vpa + } + if !IsNil(o.CfTerminalId) { + toSerialize["cf_terminal_id"] = o.CfTerminalId + } + if !IsNil(o.DeviceSerialNo) { + toSerialize["device_serial_no"] = o.DeviceSerialNo + } + if !IsNil(o.MerchantName) { + toSerialize["merchant_name"] = o.MerchantName + } + if !IsNil(o.Language) { + toSerialize["language"] = o.Language + } + return toSerialize, nil +} + + + diff --git a/model_split_order_recon_success_response.go b/model_split_order_recon_success_response.go new file mode 100644 index 0000000..90d406e --- /dev/null +++ b/model_split_order_recon_success_response.go @@ -0,0 +1,56 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the SplitOrderReconSuccessResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SplitOrderReconSuccessResponse{} + +// SplitOrderReconSuccessResponse Split Order Reconciliation Request Body +type SplitOrderReconSuccessResponse struct { + Settlement *SplitOrderReconSuccessResponseSettlement `json:"settlement,omitempty"` + // List of refunds associated with the order, if any. + Refunds []map[string]interface{} `json:"refunds,omitempty"` + // List of vendor settlements associated with the split settlement. + Vendors []SplitOrderReconSuccessResponseVendorsInner `json:"vendors,omitempty"` +} + + +func (o SplitOrderReconSuccessResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SplitOrderReconSuccessResponse) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.Settlement) { + toSerialize["settlement"] = o.Settlement + } + if !IsNil(o.Refunds) { + toSerialize["refunds"] = o.Refunds + } + if !IsNil(o.Vendors) { + toSerialize["vendors"] = o.Vendors + } + return toSerialize, nil +} + + + diff --git a/model_split_order_recon_success_response_settlement.go b/model_split_order_recon_success_response_settlement.go new file mode 100644 index 0000000..0f91d67 --- /dev/null +++ b/model_split_order_recon_success_response_settlement.go @@ -0,0 +1,113 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" + "time" +) + +// checks if the SplitOrderReconSuccessResponseSettlement type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SplitOrderReconSuccessResponseSettlement{} + +// SplitOrderReconSuccessResponseSettlement Details of the settlement information. +type SplitOrderReconSuccessResponseSettlement struct { + // Type of entity. Example: \"settlement\". + Entity *string `json:"entity,omitempty"` + // Unique Cashfree settlement ID. + CfSettlementId *int64 `json:"cf_settlement_id,omitempty"` + // Unique Cashfree payment ID associated with the order. + CfPaymentId *int64 `json:"cf_payment_id,omitempty"` + // Unique identifier for the order. + OrderId *string `json:"order_id,omitempty"` + // Currency of the order. Example: \"INR\". + OrderCurrency *string `json:"order_currency,omitempty"` + // Unique transfer ID if available, otherwise null. + TransferId NullableString `json:"transfer_id,omitempty"` + // Total amount of the order. + OrderAmount *float32 `json:"order_amount,omitempty"` + // Service charge for the order. + ServiceCharge *float32 `json:"service_charge,omitempty"` + // Service tax for the order. + ServiceTax *float32 `json:"service_tax,omitempty"` + // Amount to be settled after charges and tax. + SettlementAmount *float32 `json:"settlement_amount,omitempty"` + // Currency of the settlement. Example: \"INR\". + SettlementCurrency *string `json:"settlement_currency,omitempty"` + // UTR (Unique Transaction Reference) for the transfer if available, otherwise null. + TransferUtr NullableString `json:"transfer_utr,omitempty"` + // Time of transfer if available, otherwise null. + TransferTime NullableTime `json:"transfer_time,omitempty"` + // Timestamp when payment was made. + PaymentTime *time.Time `json:"payment_time,omitempty"` +} + + +func (o SplitOrderReconSuccessResponseSettlement) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SplitOrderReconSuccessResponseSettlement) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.Entity) { + toSerialize["entity"] = o.Entity + } + if !IsNil(o.CfSettlementId) { + toSerialize["cf_settlement_id"] = o.CfSettlementId + } + if !IsNil(o.CfPaymentId) { + toSerialize["cf_payment_id"] = o.CfPaymentId + } + if !IsNil(o.OrderId) { + toSerialize["order_id"] = o.OrderId + } + if !IsNil(o.OrderCurrency) { + toSerialize["order_currency"] = o.OrderCurrency + } + if o.TransferId.IsSet() { + toSerialize["transfer_id"] = o.TransferId.Get() + } + if !IsNil(o.OrderAmount) { + toSerialize["order_amount"] = o.OrderAmount + } + if !IsNil(o.ServiceCharge) { + toSerialize["service_charge"] = o.ServiceCharge + } + if !IsNil(o.ServiceTax) { + toSerialize["service_tax"] = o.ServiceTax + } + if !IsNil(o.SettlementAmount) { + toSerialize["settlement_amount"] = o.SettlementAmount + } + if !IsNil(o.SettlementCurrency) { + toSerialize["settlement_currency"] = o.SettlementCurrency + } + if o.TransferUtr.IsSet() { + toSerialize["transfer_utr"] = o.TransferUtr.Get() + } + if o.TransferTime.IsSet() { + toSerialize["transfer_time"] = o.TransferTime.Get() + } + if !IsNil(o.PaymentTime) { + toSerialize["payment_time"] = o.PaymentTime + } + return toSerialize, nil +} + + + diff --git a/model_split_order_recon_success_response_vendors_inner.go b/model_split_order_recon_success_response_vendors_inner.go new file mode 100644 index 0000000..db7161c --- /dev/null +++ b/model_split_order_recon_success_response_vendors_inner.go @@ -0,0 +1,63 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" + "time" +) + +// checks if the SplitOrderReconSuccessResponseVendorsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SplitOrderReconSuccessResponseVendorsInner{} + +// SplitOrderReconSuccessResponseVendorsInner struct for SplitOrderReconSuccessResponseVendorsInner +type SplitOrderReconSuccessResponseVendorsInner struct { + // Unique identifier for the vendor. + VendorId *string `json:"vendor_id,omitempty"` + // Settlement ID associated with the vendor. + SettlementId *int64 `json:"settlement_id,omitempty"` + // Settlement amount allocated to the vendor. + SettlementAmount *float32 `json:"settlement_amount,omitempty"` + // Date and time when the vendor is eligible for the settlement. + SettlementEligibilityDate *time.Time `json:"settlement_eligibility_date,omitempty"` +} + + +func (o SplitOrderReconSuccessResponseVendorsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SplitOrderReconSuccessResponseVendorsInner) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.VendorId) { + toSerialize["vendor_id"] = o.VendorId + } + if !IsNil(o.SettlementId) { + toSerialize["settlement_id"] = o.SettlementId + } + if !IsNil(o.SettlementAmount) { + toSerialize["settlement_amount"] = o.SettlementAmount + } + if !IsNil(o.SettlementEligibilityDate) { + toSerialize["settlement_eligibility_date"] = o.SettlementEligibilityDate + } + return toSerialize, nil +} + + + diff --git a/model_static_qr_response_entity.go b/model_static_qr_response_entity.go new file mode 100644 index 0000000..d814e83 --- /dev/null +++ b/model_static_qr_response_entity.go @@ -0,0 +1,62 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the StaticQrResponseEntity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StaticQrResponseEntity{} + +// StaticQrResponseEntity struct for StaticQrResponseEntity +type StaticQrResponseEntity struct { + // cashfree terminal id + CfTerminalId *int32 `json:"cf_terminal_id,omitempty"` + // Virtual Address + Vpa *string `json:"vpa,omitempty"` + // Status of vpa + Status *string `json:"status,omitempty"` + // qrcode + QrCode *string `json:"qrCode,omitempty"` +} + + +func (o StaticQrResponseEntity) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StaticQrResponseEntity) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.CfTerminalId) { + toSerialize["cf_terminal_id"] = o.CfTerminalId + } + if !IsNil(o.Vpa) { + toSerialize["vpa"] = o.Vpa + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.QrCode) { + toSerialize["qrCode"] = o.QrCode + } + return toSerialize, nil +} + + + diff --git a/model_subscription_customer_details.go b/model_subscription_customer_details.go index 50b8953..8fc8a8e 100644 --- a/model_subscription_customer_details.go +++ b/model_subscription_customer_details.go @@ -33,7 +33,7 @@ type SubscriptionCustomerDetails struct { CustomerBankAccountNumber *string `json:"customer_bank_account_number,omitempty"` // IFSC code of the customer. CustomerBankIfsc *string `json:"customer_bank_ifsc,omitempty"` - // Bank code of the customer. + // Bank code of the customer. Refer to https://www.npci.org.in/PDF/nach/live-members-e-mandates/Live-Banks-in-API-E-Mandate.pdf CustomerBankCode *string `json:"customer_bank_code,omitempty"` // Bank account type of the customer. CustomerBankAccountType *string `json:"customer_bank_account_type,omitempty"` diff --git a/model_subscription_entity.go b/model_subscription_entity.go index 508a47d..c658d46 100644 --- a/model_subscription_entity.go +++ b/model_subscription_entity.go @@ -35,6 +35,8 @@ type SubscriptionEntity struct { SubscriptionMeta *SubscriptionEntitySubscriptionMeta `json:"subscription_meta,omitempty"` // Note for the subscription. SubscriptionNote *string `json:"subscription_note,omitempty"` + // Subscription Session Id. + SubscriptionSessionId *string `json:"subscription_session_id,omitempty"` // Payment splits for the subscription. SubscriptionPaymentSplits []SubscriptionPaymentSplitItem `json:"subscription_payment_splits,omitempty"` // Status of the subscription. @@ -82,6 +84,9 @@ func (o SubscriptionEntity) ToMap() (map[string]interface{}, error) { if !IsNil(o.SubscriptionNote) { toSerialize["subscription_note"] = o.SubscriptionNote } + if !IsNil(o.SubscriptionSessionId) { + toSerialize["subscription_session_id"] = o.SubscriptionSessionId + } if !IsNil(o.SubscriptionPaymentSplits) { toSerialize["subscription_payment_splits"] = o.SubscriptionPaymentSplits } diff --git a/model_terminal_details.go b/model_terminal_details.go index ec9c42b..dd2ea2f 100644 --- a/model_terminal_details.go +++ b/model_terminal_details.go @@ -35,7 +35,7 @@ type TerminalDetails struct { TerminalName *string `json:"terminal_name,omitempty"` // note given by merchant while creating the terminal TerminalNote *string `json:"terminal_note,omitempty"` - // mobile num of the terminal/agent/storefront + // mobile num of the terminal/agent/storefront,This is a required parameter when you do not provide the cf_terminal_id. TerminalPhoneNo string `json:"terminal_phone_no"` // status of terminal active/inactive TerminalStatus *string `json:"terminal_status,omitempty"` diff --git a/model_update_order_extended_data_entity.go b/model_update_order_extended_data_entity.go new file mode 100644 index 0000000..23c32c5 --- /dev/null +++ b/model_update_order_extended_data_entity.go @@ -0,0 +1,60 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the UpdateOrderExtendedDataEntity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateOrderExtendedDataEntity{} + +// UpdateOrderExtendedDataEntity The complete update order extended data entity +type UpdateOrderExtendedDataEntity struct { + // unique id generated by cashfree for your order + CfOrderId *string `json:"cf_order_id,omitempty"` + // order_id sent during the api request + OrderId *string `json:"order_id,omitempty"` + ShipmentDetails []ShipmentDetails `json:"shipment_details,omitempty"` + OrderDeliveryStatus *OrderDeliveryStatus `json:"order_delivery_status,omitempty"` +} + + +func (o UpdateOrderExtendedDataEntity) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateOrderExtendedDataEntity) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.CfOrderId) { + toSerialize["cf_order_id"] = o.CfOrderId + } + if !IsNil(o.OrderId) { + toSerialize["order_id"] = o.OrderId + } + if !IsNil(o.ShipmentDetails) { + toSerialize["shipment_details"] = o.ShipmentDetails + } + if !IsNil(o.OrderDeliveryStatus) { + toSerialize["order_delivery_status"] = o.OrderDeliveryStatus + } + return toSerialize, nil +} + + + diff --git a/model_update_order_extended_request.go b/model_update_order_extended_request.go new file mode 100644 index 0000000..b04ad0b --- /dev/null +++ b/model_update_order_extended_request.go @@ -0,0 +1,49 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the UpdateOrderExtendedRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateOrderExtendedRequest{} + +// UpdateOrderExtendedRequest Request Body to Update extended data related to order +type UpdateOrderExtendedRequest struct { + // Shipment details, such as the tracking company, tracking number, and tracking URLs, associated with the shipping of an order. Either `shipment_details` or `order_delivery_status` is required. + ShipmentDetails []ShipmentDetails `json:"shipment_details"` + OrderDeliveryStatus *OrderDeliveryStatus `json:"order_delivery_status,omitempty"` +} + + +func (o UpdateOrderExtendedRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateOrderExtendedRequest) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + toSerialize["shipment_details"] = o.ShipmentDetails + if !IsNil(o.OrderDeliveryStatus) { + toSerialize["order_delivery_status"] = o.OrderDeliveryStatus + } + return toSerialize, nil +} + + + diff --git a/model_update_soundbox_vpa_request.go b/model_update_soundbox_vpa_request.go new file mode 100644 index 0000000..3fa2630 --- /dev/null +++ b/model_update_soundbox_vpa_request.go @@ -0,0 +1,58 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the UpdateSoundboxVpaRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateSoundboxVpaRequest{} + +// UpdateSoundboxVpaRequest Request body to update soundbox vpa +type UpdateSoundboxVpaRequest struct { + // Terminal Vpa,for which we need to update details. + Vpa string `json:"vpa"` + // cashfree terminal id. + CfTerminalId string `json:"cf_terminal_id"` + // Merchant Name that need to updated on soundbox + MerchantName *string `json:"merchant_name,omitempty"` + // language of soundbox,currently English, Hindi, Tamil + Language *string `json:"language,omitempty"` +} + + +func (o UpdateSoundboxVpaRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateSoundboxVpaRequest) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + toSerialize["vpa"] = o.Vpa + toSerialize["cf_terminal_id"] = o.CfTerminalId + if !IsNil(o.MerchantName) { + toSerialize["merchant_name"] = o.MerchantName + } + if !IsNil(o.Language) { + toSerialize["language"] = o.Language + } + return toSerialize, nil +} + + + diff --git a/model_vendor_adjustment_request.go b/model_vendor_adjustment_request.go new file mode 100644 index 0000000..13c190d --- /dev/null +++ b/model_vendor_adjustment_request.go @@ -0,0 +1,59 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the VendorAdjustmentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VendorAdjustmentRequest{} + +// VendorAdjustmentRequest Vendor Adjustment Request Body +type VendorAdjustmentRequest struct { + // The unique identifier of the vendor to whom the adjustment is applied + VendorId string `json:"vendor_id"` + // The unique identifier for the adjustment transaction. + AdjustmentId int64 `json:"adjustment_id"` + // The adjustment amount to be applied. + Amount float32 `json:"amount"` + // The type of adjustment. Possible values: CREDIT, DEBIT. + Type string `json:"type"` + // Remarks for the adjustment transaction, if any. + Remarks *string `json:"remarks,omitempty"` +} + + +func (o VendorAdjustmentRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VendorAdjustmentRequest) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + toSerialize["vendor_id"] = o.VendorId + toSerialize["adjustment_id"] = o.AdjustmentId + toSerialize["amount"] = o.Amount + toSerialize["type"] = o.Type + if !IsNil(o.Remarks) { + toSerialize["remarks"] = o.Remarks + } + return toSerialize, nil +} + + + diff --git a/model_vendor_adjustment_success_response.go b/model_vendor_adjustment_success_response.go new file mode 100644 index 0000000..196b0db --- /dev/null +++ b/model_vendor_adjustment_success_response.go @@ -0,0 +1,50 @@ +/* +Cashfree Payment Gateway APIs + +Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites. + +API version: 2023-08-01 +Contact: developers@cashfree.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cashfree_pg + +import ( + "encoding/json" + "strings" +) + +// checks if the VendorAdjustmentSuccessResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VendorAdjustmentSuccessResponse{} + +// VendorAdjustmentSuccessResponse Vendor Adjustment Success Response +type VendorAdjustmentSuccessResponse struct { + Message *string `json:"message,omitempty"` + Status *string `json:"status,omitempty"` +} + + +func (o VendorAdjustmentSuccessResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VendorAdjustmentSuccessResponse) ToMap() (map[string]interface{}, error) { + strings.HasPrefix("cf", "cf") + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + + +