diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 4657c4c..09102ac 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -3,6 +3,7 @@ .travis.yml README.md api/openapi.yaml +api_customers.go api_eligibility.go api_offers.go api_orders.go @@ -36,6 +37,7 @@ docs/CardlessEMIEntity.md docs/CardlessEMIPaymentMethod.md docs/CardlessEMIQueries.md docs/CashbackDetails.md +docs/CreateCustomerRequest.md docs/CreateLinkRequest.md docs/CreateOfferRequest.md docs/CreateOrderRequest.md @@ -45,6 +47,8 @@ docs/CreateTerminalTransactionRequest.md docs/CryptogramEntity.md docs/CustomerDetails.md docs/CustomerDetailsCardlessEMI.md +docs/CustomerEntity.md +docs/CustomersAPI.md docs/DiscountDetails.md docs/EMIOffer.md docs/EMIPlansArray.md @@ -70,7 +74,7 @@ docs/IdempotencyError.md docs/InstrumentEntity.md docs/LinkCustomerDetailsEntity.md docs/LinkEntity.md -docs/LinkMetaEntity.md +docs/LinkMetaResponseEntity.md docs/LinkNotifyEntity.md docs/NetBankingPaymentMethod.md docs/Netbanking.md @@ -121,28 +125,25 @@ docs/PaymentMethodsFilters.md docs/PaymentMethodsQueries.md docs/PaymentModeDetails.md docs/PaymentSuccessWebhook.md -docs/PaymentURLObject.md docs/PaymentsAPI.md docs/RateLimitError.md docs/ReconEntity.md docs/ReconEntityDataInner.md docs/RefundEntity.md docs/RefundSpeed.md -docs/RefundURLObject.md docs/RefundsAPI.md docs/SavedInstrumentMeta.md docs/SettlementEntity.md docs/SettlementFetchReconRequest.md -docs/SettlementFetchReconRequestFilters.md docs/SettlementReconEntity.md docs/SettlementReconEntityDataInner.md docs/SettlementReconciliationAPI.md -docs/SettlementURLObject.md docs/SettlementsAPI.md docs/SoftPOSAPI.md docs/TerminalDetails.md docs/TerminalEntity.md docs/TerminalTransactionEntity.md +docs/TerminateOrderRequest.md docs/TokenVaultAPI.md docs/UPIAuthorizeDetails.md docs/UPIPaymentMethod.md @@ -175,6 +176,7 @@ model_cardless_emi_entity.go model_cardless_emi_payment_method.go model_cardless_emi_queries.go model_cashback_details.go +model_create_customer_request.go model_create_link_request.go model_create_offer_request.go model_create_order_request.go @@ -184,6 +186,7 @@ model_create_terminal_transaction_request.go model_cryptogram_entity.go model_customer_details.go model_customer_details_cardless_emi.go +model_customer_entity.go model_discount_details.go model_eligibility_cardless_emi_entity.go model_eligibility_fetch_cardless_emi_request.go @@ -208,7 +211,7 @@ model_idempotency_error.go model_instrument_entity.go model_link_customer_details_entity.go model_link_entity.go -model_link_meta_entity.go +model_link_meta_response_entity.go model_link_notify_entity.go model_net_banking_payment_method.go model_netbanking.go @@ -255,23 +258,20 @@ model_payment_methods_filters.go model_payment_methods_queries.go model_payment_mode_details.go model_payment_success_webhook.go -model_payment_url_object.go model_rate_limit_error.go model_recon_entity.go model_recon_entity_data_inner.go model_refund_entity.go model_refund_speed.go -model_refund_url_object.go model_saved_instrument_meta.go model_settlement_entity.go model_settlement_fetch_recon_request.go -model_settlement_fetch_recon_request_filters.go model_settlement_recon_entity.go model_settlement_recon_entity_data_inner.go -model_settlement_url_object.go model_terminal_details.go model_terminal_entity.go model_terminal_transaction_entity.go +model_terminate_order_request.go model_upi.go model_upi_authorize_details.go model_upi_payment_method.go @@ -281,6 +281,7 @@ model_w_hdata.go model_w_horder.go model_wallet_offer.go response.go +test/api_customers_test.go test/api_eligibility_test.go test/api_offers_test.go test/api_orders_test.go diff --git a/api_customers.go b/api_customers.go new file mode 100644 index 0000000..46f96ca --- /dev/null +++ b/api_customers.go @@ -0,0 +1,470 @@ +/* +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 CustomerEntity +func PGCreateCustomer(xApiVersion *string, createCustomerRequest *CreateCustomerRequest, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*CustomerEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CustomerEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGCreateCustomer") + } + + ctx := context.Background() + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/customers" + + 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 createCustomerRequest == nil { + return localVarReturnValue, nil, reportError("createCustomerRequest 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 = createCustomerRequest + +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 CustomerEntity +func PGCreateCustomerWithContext(ctx context.Context, xApiVersion *string, createCustomerRequest *CreateCustomerRequest, xRequestId *string, xIdempotencyKey *string, httpClient *http.Client) (*CustomerEntity, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CustomerEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGCreateCustomer") + } + + client := NewAPIClient(NewConfiguration()) + if httpClient != nil { + client.cfg.HTTPClient = httpClient + } + + localBasePath := client.cfg.Servers[int(XEnvironment)].URL + + localVarPath := localBasePath + "/customers" + + 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 createCustomerRequest == nil { + return localVarReturnValue, nil, reportError("createCustomerRequest 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 = createCustomerRequest + +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.0.0" + 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_eligibility.go b/api_eligibility.go index 8f810c2..412bd88 100644 --- a/api_eligibility.go +++ b/api_eligibility.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -339,7 +339,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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 52b9bb7..0811d86 100644 --- a/api_offers.go +++ b/api_offers.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -325,7 +325,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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 7fb6cc1..18b1d89 100644 --- a/api_orders.go +++ b/api_orders.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -325,7 +325,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -767,7 +767,459 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" + 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 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{} + formFiles []formFile + localVarReturnValue *OrderEntity + ) + + if XEnableErrorAnalytics { + SetupSentry(XEnvironment) + defer CaptureError("PGTerminateOrder") + } + + 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 +} + + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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 f6f8da3..716e7e9 100644 --- a/api_payment_links.go +++ b/api_payment_links.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -317,7 +317,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1681,7 +1681,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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 fd484a1..37ec780 100644 --- a/api_payments.go +++ b/api_payments.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -342,7 +342,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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 35bc5ee..009c5a4 100644 --- a/api_pg_reconciliation.go +++ b/api_pg_reconciliation.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -336,7 +336,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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 08c5d8a..1d03bdc 100644 --- a/api_refunds.go +++ b/api_refunds.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -342,7 +342,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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 9ace01e..d6a1459 100644 --- a/api_settlement_reconciliation.go +++ b/api_settlement_reconciliation.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -336,7 +336,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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 cc79062..ee135c9 100644 --- a/api_settlements.go +++ b/api_settlements.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -332,7 +332,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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 67839b1..56e139e 100644 --- a/api_soft_pos.go +++ b/api_soft_pos.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -325,7 +325,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1217,7 +1217,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1673,7 +1673,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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 7dcbb86..a9e5c0a 100644 --- a/api_token_vault.go +++ b/api_token_vault.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -334,7 +334,7 @@ if XPartnerApiKey != nil { localVarHeaderParams["x-partner-apikey"] = *XPartnerApiKey } - localVarHeaderParams["x-sdk-platform"] = "gosdk-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" 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-3.1.0" + localVarHeaderParams["x-sdk-platform"] = "gosdk-4.0.0" req, err := client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/client.go b/client.go index 420daf8..273103f 100644 --- a/client.go +++ b/client.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -42,7 +42,7 @@ var ( queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) -// APIClient manages communication with the Cashfree Payment Gateway APIs API v2022-09-01 +// APIClient manages communication with the Cashfree Payment Gateway APIs API v2023-08-01 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration diff --git a/configuration.go b/configuration.go index 28b4c09..590486a 100644 --- a/configuration.go +++ b/configuration.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -53,7 +53,7 @@ func SetupSentry(environment CFEnvironment) { AttachStacktrace: true, EnableTracing: true, Environment: env, - Release: "3.1.0", + Release: "4.0.0", BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event { delete(event.Contexts, "device") delete(event.Contexts, "os") @@ -153,7 +153,7 @@ type Configuration struct { func NewConfiguration() *Configuration { cfg := &Configuration{ DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/3.1.0/go", + UserAgent: "OpenAPI-Generator/4.0.0/go", Debug: false, Servers: ServerConfigurations{ { diff --git a/docs/CreateCustomerRequest.md b/docs/CreateCustomerRequest.md new file mode 100644 index 0000000..8ab84b1 --- /dev/null +++ b/docs/CreateCustomerRequest.md @@ -0,0 +1,103 @@ +# CreateCustomerRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerPhone** | **string** | Customer Phone Number | +**CustomerEmail** | Pointer to **string** | Customer Email | [optional] +**CustomerName** | Pointer to **string** | Customer Name | [optional] + +## Methods + +### NewCreateCustomerRequest + +`func NewCreateCustomerRequest(customerPhone string, ) *CreateCustomerRequest` + +NewCreateCustomerRequest instantiates a new CreateCustomerRequest 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 + +### NewCreateCustomerRequestWithDefaults + +`func NewCreateCustomerRequestWithDefaults() *CreateCustomerRequest` + +NewCreateCustomerRequestWithDefaults instantiates a new CreateCustomerRequest 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 + +### GetCustomerPhone + +`func (o *CreateCustomerRequest) GetCustomerPhone() string` + +GetCustomerPhone returns the CustomerPhone field if non-nil, zero value otherwise. + +### GetCustomerPhoneOk + +`func (o *CreateCustomerRequest) 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 *CreateCustomerRequest) SetCustomerPhone(v string)` + +SetCustomerPhone sets CustomerPhone field to given value. + + +### GetCustomerEmail + +`func (o *CreateCustomerRequest) GetCustomerEmail() string` + +GetCustomerEmail returns the CustomerEmail field if non-nil, zero value otherwise. + +### GetCustomerEmailOk + +`func (o *CreateCustomerRequest) 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 *CreateCustomerRequest) SetCustomerEmail(v string)` + +SetCustomerEmail sets CustomerEmail field to given value. + +### HasCustomerEmail + +`func (o *CreateCustomerRequest) HasCustomerEmail() bool` + +HasCustomerEmail returns a boolean if a field has been set. + +### GetCustomerName + +`func (o *CreateCustomerRequest) GetCustomerName() string` + +GetCustomerName returns the CustomerName field if non-nil, zero value otherwise. + +### GetCustomerNameOk + +`func (o *CreateCustomerRequest) 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 *CreateCustomerRequest) SetCustomerName(v string)` + +SetCustomerName sets CustomerName field to given value. + +### HasCustomerName + +`func (o *CreateCustomerRequest) HasCustomerName() bool` + +HasCustomerName 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/CreateLinkRequest.md b/docs/CreateLinkRequest.md index e2d7d6d..7e587cb 100644 --- a/docs/CreateLinkRequest.md +++ b/docs/CreateLinkRequest.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **LinkNotify** | Pointer to [**LinkNotifyEntity**](LinkNotifyEntity.md) | | [optional] **LinkAutoReminders** | Pointer to **bool** | If \"true\", reminders will be sent to customers for collecting payments. | [optional] **LinkNotes** | Pointer to **map[string]string** | Key-value pair that can be used to store additional information about the entity. Maximum 5 key-value pairs | [optional] -**LinkMeta** | Pointer to [**LinkMetaEntity**](LinkMetaEntity.md) | | [optional] +**LinkMeta** | Pointer to [**LinkMetaResponseEntity**](LinkMetaResponseEntity.md) | | [optional] ## Methods @@ -288,20 +288,20 @@ HasLinkNotes returns a boolean if a field has been set. ### GetLinkMeta -`func (o *CreateLinkRequest) GetLinkMeta() LinkMetaEntity` +`func (o *CreateLinkRequest) GetLinkMeta() LinkMetaResponseEntity` GetLinkMeta returns the LinkMeta field if non-nil, zero value otherwise. ### GetLinkMetaOk -`func (o *CreateLinkRequest) GetLinkMetaOk() (*LinkMetaEntity, bool)` +`func (o *CreateLinkRequest) GetLinkMetaOk() (*LinkMetaResponseEntity, bool)` GetLinkMetaOk returns a tuple with the LinkMeta field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinkMeta -`func (o *CreateLinkRequest) SetLinkMeta(v LinkMetaEntity)` +`func (o *CreateLinkRequest) SetLinkMeta(v LinkMetaResponseEntity)` SetLinkMeta sets LinkMeta field to given value. diff --git a/docs/CustomerDetails.md b/docs/CustomerDetails.md index ea9ecbe..521d2f0 100644 --- a/docs/CustomerDetails.md +++ b/docs/CustomerDetails.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **CustomerBankAccountNumber** | Pointer to **string** | Customer bank account. Required if you want to do a bank account check (TPV) | [optional] **CustomerBankIfsc** | Pointer to **string** | Customer bank IFSC. Required if you want to do a bank account check (TPV) | [optional] **CustomerBankCode** | Pointer to **float32** | Customer bank code. Required for net banking payments, if you want to do a bank account check (TPV) | [optional] +**CustomerUid** | Pointer to **string** | Customer identifier at Cashfree. You will get this when you create/get customer | [optional] ## Methods @@ -196,6 +197,31 @@ SetCustomerBankCode sets CustomerBankCode field to given value. HasCustomerBankCode returns a boolean if a field has been set. +### GetCustomerUid + +`func (o *CustomerDetails) GetCustomerUid() string` + +GetCustomerUid returns the CustomerUid field if non-nil, zero value otherwise. + +### GetCustomerUidOk + +`func (o *CustomerDetails) 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 *CustomerDetails) SetCustomerUid(v string)` + +SetCustomerUid sets CustomerUid field to given value. + +### HasCustomerUid + +`func (o *CustomerDetails) 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/CustomerEntity.md b/docs/CustomerEntity.md new file mode 100644 index 0000000..660a836 --- /dev/null +++ b/docs/CustomerEntity.md @@ -0,0 +1,134 @@ +# CustomerEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerUid** | Pointer to **string** | unique id generated by cashfree for your customer | [optional] +**CustomerPhone** | Pointer to **string** | Customer Phone Number | [optional] +**CustomerEmail** | Pointer to **string** | Customer Email | [optional] +**CustomerName** | Pointer to **string** | Customer Name | [optional] + +## Methods + +### NewCustomerEntity + +`func NewCustomerEntity() *CustomerEntity` + +NewCustomerEntity instantiates a new CustomerEntity 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 + +### NewCustomerEntityWithDefaults + +`func NewCustomerEntityWithDefaults() *CustomerEntity` + +NewCustomerEntityWithDefaults instantiates a new CustomerEntity 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 + +### GetCustomerUid + +`func (o *CustomerEntity) GetCustomerUid() string` + +GetCustomerUid returns the CustomerUid field if non-nil, zero value otherwise. + +### GetCustomerUidOk + +`func (o *CustomerEntity) 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 *CustomerEntity) SetCustomerUid(v string)` + +SetCustomerUid sets CustomerUid field to given value. + +### HasCustomerUid + +`func (o *CustomerEntity) HasCustomerUid() bool` + +HasCustomerUid returns a boolean if a field has been set. + +### GetCustomerPhone + +`func (o *CustomerEntity) GetCustomerPhone() string` + +GetCustomerPhone returns the CustomerPhone field if non-nil, zero value otherwise. + +### GetCustomerPhoneOk + +`func (o *CustomerEntity) 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 *CustomerEntity) SetCustomerPhone(v string)` + +SetCustomerPhone sets CustomerPhone field to given value. + +### HasCustomerPhone + +`func (o *CustomerEntity) HasCustomerPhone() bool` + +HasCustomerPhone returns a boolean if a field has been set. + +### GetCustomerEmail + +`func (o *CustomerEntity) GetCustomerEmail() string` + +GetCustomerEmail returns the CustomerEmail field if non-nil, zero value otherwise. + +### GetCustomerEmailOk + +`func (o *CustomerEntity) 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 *CustomerEntity) SetCustomerEmail(v string)` + +SetCustomerEmail sets CustomerEmail field to given value. + +### HasCustomerEmail + +`func (o *CustomerEntity) HasCustomerEmail() bool` + +HasCustomerEmail returns a boolean if a field has been set. + +### GetCustomerName + +`func (o *CustomerEntity) GetCustomerName() string` + +GetCustomerName returns the CustomerName field if non-nil, zero value otherwise. + +### GetCustomerNameOk + +`func (o *CustomerEntity) 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 *CustomerEntity) SetCustomerName(v string)` + +SetCustomerName sets CustomerName field to given value. + +### HasCustomerName + +`func (o *CustomerEntity) HasCustomerName() bool` + +HasCustomerName 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/CustomersAPI.md b/docs/CustomersAPI.md new file mode 100644 index 0000000..5286e48 --- /dev/null +++ b/docs/CustomersAPI.md @@ -0,0 +1,86 @@ +# \CustomersAPI + +All URIs are relative to *https://sandbox.cashfree.com/pg* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**PGCreateCustomer**](CustomersAPI.md#PGCreateCustomer) | **Post** /customers | Create Customer at Cashfree + + + +## PGCreateCustomer + +> CustomerEntity PGCreateCustomer(ctx).XApiVersion(xApiVersion).CreateCustomerRequest(createCustomerRequest).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() + +Create Customer at Cashfree + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v3" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + createCustomerRequest := *cashfree.NewCreateCustomerRequest("9999999999") + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + + resp, r, err := cashfree.PGCreateCustomer(&xApiVersion, &createCustomerRequest, &xRequestId, &xIdempotencyKey, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.PGCreateCustomer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PGCreateCustomer`: CustomerEntity + fmt.Fprintf(os.Stdout, "Response from `cashfree.PGCreateCustomer`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiPGCreateCustomerRequest 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"] + **createCustomerRequest** | [**CreateCustomerRequest**](CreateCustomerRequest.md) | Request to create a new customer at Cashfree | + **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 + +[**CustomerEntity**](CustomerEntity.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/EligibilityAPI.md b/docs/EligibilityAPI.md index 5077692..81dfb40 100644 --- a/docs/EligibilityAPI.md +++ b/docs/EligibilityAPI.md @@ -4,10 +4,10 @@ All URIs are relative to *https://sandbox.cashfree.com/pg* Method | HTTP request | Description ------------- | ------------- | ------------- -[**PGEligibilityFetchCardlessEMI**](EligibilityAPI.md#PGEligibilityFetchCardlessEMI) | **Post** /eligibility/cardlessemi | Get Eligible Cardless EMI -[**PGEligibilityFetchOffers**](EligibilityAPI.md#PGEligibilityFetchOffers) | **Post** /eligibility/offers | Get Eligible Offers -[**PGEligibilityFetchPaylater**](EligibilityAPI.md#PGEligibilityFetchPaylater) | **Post** /eligibility/paylater | Get Eligible Paylater -[**PGEligibilityFetchPaymentMethods**](EligibilityAPI.md#PGEligibilityFetchPaymentMethods) | **Post** /eligibility/payment_methods | Get Eligible Payment Methods +[**PGEligibilityFetchCardlessEMI**](EligibilityAPI.md#PGEligibilityFetchCardlessEMI) | **Post** /eligibility/cardlessemi | Get Eligible Cardless EMI Payment Methods for a customer on an order +[**PGEligibilityFetchOffers**](EligibilityAPI.md#PGEligibilityFetchOffers) | **Post** /eligibility/offers | Get Eligible Offers for an Order +[**PGEligibilityFetchPaylater**](EligibilityAPI.md#PGEligibilityFetchPaylater) | **Post** /eligibility/paylater | Get Eligible Paylater for a customer on an order +[**PGEligibilityFetchPaymentMethods**](EligibilityAPI.md#PGEligibilityFetchPaymentMethods) | **Post** /eligibility/payment_methods | Get eligible Payment Methods @@ -15,7 +15,7 @@ Method | HTTP request | Description > []EligibilityCardlessEMIEntity PGEligibilityFetchCardlessEMI(ctx).XApiVersion(xApiVersion).EligibilityFetchCardlessEMIRequest(eligibilityFetchCardlessEMIRequest).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() -Get Eligible Cardless EMI +Get Eligible Cardless EMI Payment Methods for a customer on an order @@ -39,7 +39,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" eligibilityFetchCardlessEMIRequest := *cashfree.NewEligibilityFetchCardlessEMIRequest(*cashfree.NewCardlessEMIQueries()) xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -65,10 +65,10 @@ Other parameters are passed through a pointer to a apiPGEligibilityFetchCardless Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **eligibilityFetchCardlessEMIRequest** | [**EligibilityFetchCardlessEMIRequest**](EligibilityFetchCardlessEMIRequest.md) | Request Body to get eligible cardless emi options for a customer and 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. | + **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 @@ -92,7 +92,7 @@ Name | Type | Description | Notes > []EligibilityOfferEntity PGEligibilityFetchOffers(ctx).XApiVersion(xApiVersion).EligibilityFetchOffersRequest(eligibilityFetchOffersRequest).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() -Get Eligible Offers +Get Eligible Offers for an Order @@ -116,7 +116,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" eligibilityFetchOffersRequest := *cashfree.NewEligibilityFetchOffersRequest(*cashfree.NewOfferQueries()) xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -142,10 +142,10 @@ Other parameters are passed through a pointer to a apiPGEligibilityFetchOffersRe Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **eligibilityFetchOffersRequest** | [**EligibilityFetchOffersRequest**](EligibilityFetchOffersRequest.md) | Request Body to get eligible offers for a customer and 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. | + **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 @@ -169,7 +169,7 @@ Name | Type | Description | Notes > []EligibilityPaylaterEntity PGEligibilityFetchPaylater(ctx).XApiVersion(xApiVersion).EligibilityFetchPaylaterRequest(eligibilityFetchPaylaterRequest).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() -Get Eligible Paylater +Get Eligible Paylater for a customer on an order @@ -193,7 +193,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" eligibilityFetchPaylaterRequest := *cashfree.NewEligibilityFetchPaylaterRequest(*cashfree.NewCardlessEMIQueries()) xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -219,10 +219,10 @@ Other parameters are passed through a pointer to a apiPGEligibilityFetchPaylater Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **eligibilityFetchPaylaterRequest** | [**EligibilityFetchPaylaterRequest**](EligibilityFetchPaylaterRequest.md) | Request Body to get eligible paylater options for a customer and 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. | + **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 @@ -246,7 +246,7 @@ Name | Type | Description | Notes > []EligibilityPaymentMethodsEntity PGEligibilityFetchPaymentMethods(ctx).XApiVersion(xApiVersion).EligibilityFetchPaymentMethodsRequest(eligibilityFetchPaymentMethodsRequest).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() -Get Eligible Payment Methods +Get eligible Payment Methods @@ -270,7 +270,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" eligibilityFetchPaymentMethodsRequest := *cashfree.NewEligibilityFetchPaymentMethodsRequest(*cashfree.NewPaymentMethodsQueries()) xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -296,10 +296,10 @@ Other parameters are passed through a pointer to a apiPGEligibilityFetchPaymentM Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **eligibilityFetchPaymentMethodsRequest** | [**EligibilityFetchPaymentMethodsRequest**](EligibilityFetchPaymentMethodsRequest.md) | Request Body to get eligible payment methods for an account and 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. | + **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 diff --git a/docs/FetchSettlementsRequestFilters.md b/docs/FetchSettlementsRequestFilters.md index b223e75..dc0edfc 100644 --- a/docs/FetchSettlementsRequestFilters.md +++ b/docs/FetchSettlementsRequestFilters.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CfSettlementIds** | Pointer to **[]int64** | List of settlement IDs for which you want the settlement reconciliation details. | [optional] +**CfSettlementIds** | Pointer to **[]string** | List of settlement IDs for which you want the settlement reconciliation details. | [optional] **SettlementUtrs** | Pointer to **[]string** | List of settlement UTRs for which you want the settlement reconciliation details. | [optional] **StartDate** | Pointer to **string** | Specify the start date from when you want the settlement reconciliation details. | [optional] **EndDate** | Pointer to **string** | Specify the end date till when you want the settlement reconciliation details. | [optional] @@ -30,20 +30,20 @@ but it doesn't guarantee that properties required by API are set ### GetCfSettlementIds -`func (o *FetchSettlementsRequestFilters) GetCfSettlementIds() []int64` +`func (o *FetchSettlementsRequestFilters) GetCfSettlementIds() []string` GetCfSettlementIds returns the CfSettlementIds field if non-nil, zero value otherwise. ### GetCfSettlementIdsOk -`func (o *FetchSettlementsRequestFilters) GetCfSettlementIdsOk() (*[]int64, bool)` +`func (o *FetchSettlementsRequestFilters) GetCfSettlementIdsOk() (*[]string, bool)` GetCfSettlementIdsOk returns a tuple with the CfSettlementIds field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCfSettlementIds -`func (o *FetchSettlementsRequestFilters) SetCfSettlementIds(v []int64)` +`func (o *FetchSettlementsRequestFilters) SetCfSettlementIds(v []string)` SetCfSettlementIds sets CfSettlementIds field to given value. diff --git a/docs/LinkEntity.md b/docs/LinkEntity.md index 1c0f748..21426d8 100644 --- a/docs/LinkEntity.md +++ b/docs/LinkEntity.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CfLinkId** | Pointer to **int64** | | [optional] +**CfLinkId** | Pointer to **string** | | [optional] **LinkId** | Pointer to **string** | | [optional] **LinkStatus** | Pointer to **string** | | [optional] **LinkCurrency** | Pointer to **string** | | [optional] @@ -15,7 +15,7 @@ Name | Type | Description | Notes **LinkPurpose** | Pointer to **string** | | [optional] **LinkCreatedAt** | Pointer to **string** | | [optional] **CustomerDetails** | Pointer to [**LinkCustomerDetailsEntity**](LinkCustomerDetailsEntity.md) | | [optional] -**LinkMeta** | Pointer to **map[string]string** | Payment link meta information object. | [optional] +**LinkMeta** | Pointer to [**LinkMetaResponseEntity**](LinkMetaResponseEntity.md) | | [optional] **LinkUrl** | Pointer to **string** | | [optional] **LinkExpiryTime** | Pointer to **string** | | [optional] **LinkNotes** | Pointer to **map[string]string** | Key-value pair that can be used to store additional information about the entity. Maximum 5 key-value pairs | [optional] @@ -43,20 +43,20 @@ but it doesn't guarantee that properties required by API are set ### GetCfLinkId -`func (o *LinkEntity) GetCfLinkId() int64` +`func (o *LinkEntity) GetCfLinkId() string` GetCfLinkId returns the CfLinkId field if non-nil, zero value otherwise. ### GetCfLinkIdOk -`func (o *LinkEntity) GetCfLinkIdOk() (*int64, bool)` +`func (o *LinkEntity) GetCfLinkIdOk() (*string, bool)` GetCfLinkIdOk returns a tuple with the CfLinkId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCfLinkId -`func (o *LinkEntity) SetCfLinkId(v int64)` +`func (o *LinkEntity) SetCfLinkId(v string)` SetCfLinkId sets CfLinkId field to given value. @@ -318,20 +318,20 @@ HasCustomerDetails returns a boolean if a field has been set. ### GetLinkMeta -`func (o *LinkEntity) GetLinkMeta() map[string]string` +`func (o *LinkEntity) GetLinkMeta() LinkMetaResponseEntity` GetLinkMeta returns the LinkMeta field if non-nil, zero value otherwise. ### GetLinkMetaOk -`func (o *LinkEntity) GetLinkMetaOk() (*map[string]string, bool)` +`func (o *LinkEntity) GetLinkMetaOk() (*LinkMetaResponseEntity, bool)` GetLinkMetaOk returns a tuple with the LinkMeta field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLinkMeta -`func (o *LinkEntity) SetLinkMeta(v map[string]string)` +`func (o *LinkEntity) SetLinkMeta(v LinkMetaResponseEntity)` SetLinkMeta sets LinkMeta field to given value. diff --git a/docs/LinkMetaResponseEntity.md b/docs/LinkMetaResponseEntity.md new file mode 100644 index 0000000..d661112 --- /dev/null +++ b/docs/LinkMetaResponseEntity.md @@ -0,0 +1,134 @@ +# LinkMetaResponseEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NotifyUrl** | Pointer to **string** | Notification URL for server-server communication. It should be an https URL. | [optional] +**UpiIntent** | Pointer to **bool** | If \"true\", link will directly open UPI Intent flow on mobile, and normal link flow elsewhere | [optional] +**ReturnUrl** | Pointer to **string** | The URL to which user will be redirected to after the payment is done on the link. Maximum length: 250. | [optional] +**PaymentMethods** | Pointer to **string** | Allowed payment modes for this link. Pass comma-separated values among following options - \"cc\", \"dc\", \"ccc\", \"ppc\", \"nb\", \"upi\", \"paypal\", \"app\". Leave it blank to show all available payment methods | [optional] + +## Methods + +### NewLinkMetaResponseEntity + +`func NewLinkMetaResponseEntity() *LinkMetaResponseEntity` + +NewLinkMetaResponseEntity instantiates a new LinkMetaResponseEntity 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 + +### NewLinkMetaResponseEntityWithDefaults + +`func NewLinkMetaResponseEntityWithDefaults() *LinkMetaResponseEntity` + +NewLinkMetaResponseEntityWithDefaults instantiates a new LinkMetaResponseEntity 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 + +### GetNotifyUrl + +`func (o *LinkMetaResponseEntity) GetNotifyUrl() string` + +GetNotifyUrl returns the NotifyUrl field if non-nil, zero value otherwise. + +### GetNotifyUrlOk + +`func (o *LinkMetaResponseEntity) GetNotifyUrlOk() (*string, bool)` + +GetNotifyUrlOk returns a tuple with the NotifyUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotifyUrl + +`func (o *LinkMetaResponseEntity) SetNotifyUrl(v string)` + +SetNotifyUrl sets NotifyUrl field to given value. + +### HasNotifyUrl + +`func (o *LinkMetaResponseEntity) HasNotifyUrl() bool` + +HasNotifyUrl returns a boolean if a field has been set. + +### GetUpiIntent + +`func (o *LinkMetaResponseEntity) GetUpiIntent() bool` + +GetUpiIntent returns the UpiIntent field if non-nil, zero value otherwise. + +### GetUpiIntentOk + +`func (o *LinkMetaResponseEntity) GetUpiIntentOk() (*bool, bool)` + +GetUpiIntentOk returns a tuple with the UpiIntent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpiIntent + +`func (o *LinkMetaResponseEntity) SetUpiIntent(v bool)` + +SetUpiIntent sets UpiIntent field to given value. + +### HasUpiIntent + +`func (o *LinkMetaResponseEntity) HasUpiIntent() bool` + +HasUpiIntent returns a boolean if a field has been set. + +### GetReturnUrl + +`func (o *LinkMetaResponseEntity) GetReturnUrl() string` + +GetReturnUrl returns the ReturnUrl field if non-nil, zero value otherwise. + +### GetReturnUrlOk + +`func (o *LinkMetaResponseEntity) GetReturnUrlOk() (*string, bool)` + +GetReturnUrlOk returns a tuple with the ReturnUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReturnUrl + +`func (o *LinkMetaResponseEntity) SetReturnUrl(v string)` + +SetReturnUrl sets ReturnUrl field to given value. + +### HasReturnUrl + +`func (o *LinkMetaResponseEntity) HasReturnUrl() bool` + +HasReturnUrl returns a boolean if a field has been set. + +### GetPaymentMethods + +`func (o *LinkMetaResponseEntity) GetPaymentMethods() string` + +GetPaymentMethods returns the PaymentMethods field if non-nil, zero value otherwise. + +### GetPaymentMethodsOk + +`func (o *LinkMetaResponseEntity) 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 *LinkMetaResponseEntity) SetPaymentMethods(v string)` + +SetPaymentMethods sets PaymentMethods field to given value. + +### HasPaymentMethods + +`func (o *LinkMetaResponseEntity) 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/OffersAPI.md b/docs/OffersAPI.md index f107646..8e27820 100644 --- a/docs/OffersAPI.md +++ b/docs/OffersAPI.md @@ -37,7 +37,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" createOfferRequest := *cashfree.NewCreateOfferRequest(*cashfree.NewOfferMeta("Test Offer", "Lorem ipsum dolor sit amet, consectetur adipiscing elit", "CFTESTOFFER", "2023-03-21T08:09:51Z", "2023-03-29T08:09:51Z"), *cashfree.NewOfferTnc("text", "Lorem ipsum dolor sit amet, consectetur adipiscing elit"), *cashfree.NewOfferDetails("DISCOUNT_AND_CASHBACK"), *cashfree.NewOfferValidations(cashfree.OfferValidations_payment_method{OfferAll: cashfree.NewOfferAll(map[string]interface{}(123))}, float32(10))) xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -63,10 +63,10 @@ Other parameters are passed through a pointer to a apiPGCreateOfferRequest struc Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **createOfferRequest** | [**CreateOfferRequest**](CreateOfferRequest.md) | Request body to create an offer at Cashfree | **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. | + **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 @@ -114,7 +114,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" offerId := "d2b430fb-1afe-455a-af31-66d00377b29a" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -144,10 +144,10 @@ Other parameters are passed through a pointer to a apiPGFetchOfferRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **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. | + **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 diff --git a/docs/OrderAuthenticateEntity.md b/docs/OrderAuthenticateEntity.md index e122267..59dce70 100644 --- a/docs/OrderAuthenticateEntity.md +++ b/docs/OrderAuthenticateEntity.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CfPaymentId** | Pointer to **float32** | The payment id for which this request was sent | [optional] +**CfPaymentId** | Pointer to **string** | The payment id for which this request was sent | [optional] **Action** | Pointer to **string** | The action that was invoked for this request. | [optional] **AuthenticateStatus** | Pointer to **string** | Status of the is action. Will be either failed or successful. If the action is successful, you should still call the authorization status to verify the final payment status. | [optional] **PaymentMessage** | Pointer to **string** | Human readable message which describes the status in more detail | [optional] @@ -30,20 +30,20 @@ but it doesn't guarantee that properties required by API are set ### GetCfPaymentId -`func (o *OrderAuthenticateEntity) GetCfPaymentId() float32` +`func (o *OrderAuthenticateEntity) GetCfPaymentId() string` GetCfPaymentId returns the CfPaymentId field if non-nil, zero value otherwise. ### GetCfPaymentIdOk -`func (o *OrderAuthenticateEntity) GetCfPaymentIdOk() (*float32, bool)` +`func (o *OrderAuthenticateEntity) 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 *OrderAuthenticateEntity) SetCfPaymentId(v float32)` +`func (o *OrderAuthenticateEntity) SetCfPaymentId(v string)` SetCfPaymentId sets CfPaymentId field to given value. diff --git a/docs/OrderEntity.md b/docs/OrderEntity.md index 022d807..9fe3b5e 100644 --- a/docs/OrderEntity.md +++ b/docs/OrderEntity.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CfOrderId** | Pointer to **int64** | unique id generated by cashfree for your order | [optional] +**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] **Entity** | Pointer to **string** | Type of the entity. | [optional] **OrderCurrency** | Pointer to **string** | Currency of the order. Example INR | [optional] **OrderAmount** | Pointer to **float32** | | [optional] -**OrderStatus** | Pointer to **string** | Possible values are - `ACTIVE`: Order does not have a sucessful transaction yet - `PAID`: Order is PAID with one successful transaction - `EXPIRED`: Order was not PAID and not it has expired. No transaction can be initiated for an EXPIRED order. | [optional] +**OrderStatus** | Pointer to **string** | Possible values are - `ACTIVE`: Order does not have a sucessful transaction yet - `PAID`: Order is PAID with one successful transaction - `EXPIRED`: Order was not PAID and not it has expired. No transaction can be initiated for an EXPIRED order. `TERMINATED`: Order terminated `TERMINATION_REQUESTED`: Order termination requested | [optional] **PaymentSessionId** | Pointer to **string** | | [optional] **OrderExpiryTime** | Pointer to **time.Time** | | [optional] **OrderNote** | Pointer to **string** | Additional note for order | [optional] @@ -17,9 +17,6 @@ Name | Type | Description | Notes **OrderSplits** | Pointer to [**[]VendorSplit**](VendorSplit.md) | | [optional] **CustomerDetails** | Pointer to [**CustomerDetails**](CustomerDetails.md) | | [optional] **OrderMeta** | Pointer to [**OrderMeta**](OrderMeta.md) | | [optional] -**Payments** | Pointer to [**PaymentURLObject**](PaymentURLObject.md) | | [optional] -**Settlements** | Pointer to [**SettlementURLObject**](SettlementURLObject.md) | | [optional] -**Refunds** | Pointer to [**RefundURLObject**](RefundURLObject.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] ## Methods @@ -43,20 +40,20 @@ but it doesn't guarantee that properties required by API are set ### GetCfOrderId -`func (o *OrderEntity) GetCfOrderId() int64` +`func (o *OrderEntity) GetCfOrderId() string` GetCfOrderId returns the CfOrderId field if non-nil, zero value otherwise. ### GetCfOrderIdOk -`func (o *OrderEntity) GetCfOrderIdOk() (*int64, bool)` +`func (o *OrderEntity) 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 *OrderEntity) SetCfOrderId(v int64)` +`func (o *OrderEntity) SetCfOrderId(v string)` SetCfOrderId sets CfOrderId field to given value. @@ -366,81 +363,6 @@ SetOrderMeta sets OrderMeta field to given value. HasOrderMeta returns a boolean if a field has been set. -### GetPayments - -`func (o *OrderEntity) GetPayments() PaymentURLObject` - -GetPayments returns the Payments field if non-nil, zero value otherwise. - -### GetPaymentsOk - -`func (o *OrderEntity) GetPaymentsOk() (*PaymentURLObject, bool)` - -GetPaymentsOk returns a tuple with the Payments field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPayments - -`func (o *OrderEntity) SetPayments(v PaymentURLObject)` - -SetPayments sets Payments field to given value. - -### HasPayments - -`func (o *OrderEntity) HasPayments() bool` - -HasPayments returns a boolean if a field has been set. - -### GetSettlements - -`func (o *OrderEntity) GetSettlements() SettlementURLObject` - -GetSettlements returns the Settlements field if non-nil, zero value otherwise. - -### GetSettlementsOk - -`func (o *OrderEntity) GetSettlementsOk() (*SettlementURLObject, bool)` - -GetSettlementsOk returns a tuple with the Settlements field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSettlements - -`func (o *OrderEntity) SetSettlements(v SettlementURLObject)` - -SetSettlements sets Settlements field to given value. - -### HasSettlements - -`func (o *OrderEntity) HasSettlements() bool` - -HasSettlements returns a boolean if a field has been set. - -### GetRefunds - -`func (o *OrderEntity) GetRefunds() RefundURLObject` - -GetRefunds returns the Refunds field if non-nil, zero value otherwise. - -### GetRefundsOk - -`func (o *OrderEntity) GetRefundsOk() (*RefundURLObject, 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 *OrderEntity) SetRefunds(v RefundURLObject)` - -SetRefunds sets Refunds field to given value. - -### HasRefunds - -`func (o *OrderEntity) HasRefunds() bool` - -HasRefunds returns a boolean if a field has been set. - ### GetOrderTags `func (o *OrderEntity) GetOrderTags() map[string]string` diff --git a/docs/OrderMeta.md b/docs/OrderMeta.md index 2ede96c..858938e 100644 --- a/docs/OrderMeta.md +++ b/docs/OrderMeta.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ReturnUrl** | Pointer to **string** | The URL to which user will be redirected to after the payment on bank OTP page. Maximum length: 250. The return_url must contain placeholder {order_id}. When redirecting the customer back to the return url from the bank’s OTP page, Cashfree will replace this placeholder with the actual value for that order. | [optional] +**ReturnUrl** | Pointer to **string** | The URL to which user will be redirected to after the payment on bank OTP page. Maximum length: 250. We suggest to keep context of order_id in your return_url so that you can identify the order when customer lands on your page. Example of return_url format could be https://example.com/return?order_id=myOrderId | [optional] **NotifyUrl** | Pointer to **string** | Notification URL for server-server communication. Useful when user's connection drops while re-directing. NotifyUrl should be an https URL. Maximum length: 250. | [optional] **PaymentMethods** | Pointer to **interface{}** | Allowed payment modes for this order. Pass comma-separated values among following options - \"cc\", \"dc\", \"ccc\", \"ppc\",\"nb\",\"upi\",\"paypal\",\"app\",\"paylater\",\"cardlessemi\",\"dcemi\",\"ccemi\",\"banktransfer\". Leave it blank to show all available payment methods | [optional] diff --git a/docs/OrdersAPI.md b/docs/OrdersAPI.md index afdb242..9b55df6 100644 --- a/docs/OrdersAPI.md +++ b/docs/OrdersAPI.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**PGCreateOrder**](OrdersAPI.md#PGCreateOrder) | **Post** /orders | Create Order [**PGFetchOrder**](OrdersAPI.md#PGFetchOrder) | **Get** /orders/{order_id} | Get Order +[**PGTerminateOrder**](OrdersAPI.md#PGTerminateOrder) | **Patch** /orders/{order_id} | Terminate Order @@ -37,7 +38,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" createOrderRequest := *cashfree.NewCreateOrderRequest(float64(10.15), "INR", *cashfree.NewCustomerDetails("CustomerId_example", "CustomerPhone_example")) xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -63,10 +64,10 @@ Other parameters are passed through a pointer to a apiPGCreateOrderRequest struc Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **createOrderRequest** | [**CreateOrderRequest**](CreateOrderRequest.md) | Request body to create an order at cashfree | **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. | + **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 @@ -114,7 +115,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" orderId := "your-order-id" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -144,10 +145,10 @@ Other parameters are passed through a pointer to a apiPGFetchOrderRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **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. | + **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 @@ -166,3 +167,86 @@ Name | Type | Description | Notes [[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() + +Terminate Order + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + cashfree "github.com/cashfree/cashfree-pg/v3" +) + +func main() { + + clientId := "" + clientSecret := "" + cashfree.XClientId = &clientId + cashfree.XClientSecret = &clientSecret + cashfree.XEnvironment = cashfree.SANDBOX + + xApiVersion := "2023-08-01" + orderId := "your-order-id" + terminateOrderRequest := *cashfree.NewTerminateOrderRequest("OrderStatus_example") + xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" + xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" + + resp, r, err := cashfree.PGTerminateOrder(&xApiVersion, &orderId, &terminateOrderRequest, &xRequestId, &xIdempotencyKey, nil) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `cashfree.PGTerminateOrder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PGTerminateOrder`: OrderEntity + fmt.Fprintf(os.Stdout, "Response from `cashfree.PGTerminateOrder`: %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 apiPGTerminateOrderRequest 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"] + + **terminateOrderRequest** | [**TerminateOrderRequest**](TerminateOrderRequest.md) | Request body to terminate an order at cashfree | + **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 + +[**OrderEntity**](OrderEntity.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/PGReconciliationAPI.md b/docs/PGReconciliationAPI.md index c24eb44..b6e0340 100644 --- a/docs/PGReconciliationAPI.md +++ b/docs/PGReconciliationAPI.md @@ -36,7 +36,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" fetchReconRequest := *cashfree.NewFetchReconRequest(*cashfree.NewFetchReconRequestPagination(int32(123)), *cashfree.NewFetchReconRequestFilters("StartDate_example", "EndDate_example")) contentType := "application/json" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" @@ -64,11 +64,11 @@ Other parameters are passed through a pointer to a apiPGFetchReconRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **fetchReconRequest** | [**FetchReconRequest**](FetchReconRequest.md) | Request Body for the reconciliation | **contentType** | **string** | application/json | **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. | + **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. | **accept** | **string** | application/json | ### Return type diff --git a/docs/PayOrderEntity.md b/docs/PayOrderEntity.md index 3668734..179c110 100644 --- a/docs/PayOrderEntity.md +++ b/docs/PayOrderEntity.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **PaymentAmount** | Pointer to **float32** | total amount payable | [optional] -**CfPaymentId** | Pointer to **int64** | Payment identifier created by Cashfree | [optional] +**CfPaymentId** | Pointer to **string** | Payment identifier created by Cashfree | [optional] **PaymentMethod** | Pointer to **string** | One of [\"upi\", \"netbanking\", \"card\", \"app\", \"cardless_emi\", \"paylater\", \"banktransfer\"] | [optional] **Channel** | Pointer to **string** | One of [\"link\", \"collect\", \"qrcode\"]. In an older version we used to support different channels like 'gpay', 'phonepe' etc. However, we now support only the following channels - link, collect and qrcode. To process payments using gpay, you will have to provide channel as 'link' and provider as 'gpay' | [optional] **Action** | Pointer to **string** | One of [\"link\", \"custom\", \"form\"] | [optional] @@ -57,20 +57,20 @@ HasPaymentAmount returns a boolean if a field has been set. ### GetCfPaymentId -`func (o *PayOrderEntity) GetCfPaymentId() int64` +`func (o *PayOrderEntity) GetCfPaymentId() string` GetCfPaymentId returns the CfPaymentId field if non-nil, zero value otherwise. ### GetCfPaymentIdOk -`func (o *PayOrderEntity) GetCfPaymentIdOk() (*int64, bool)` +`func (o *PayOrderEntity) 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 *PayOrderEntity) SetCfPaymentId(v int64)` +`func (o *PayOrderEntity) SetCfPaymentId(v string)` SetCfPaymentId sets CfPaymentId field to given value. diff --git a/docs/PaymentEntity.md b/docs/PaymentEntity.md index 44a78da..5c347a3 100644 --- a/docs/PaymentEntity.md +++ b/docs/PaymentEntity.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CfPaymentId** | Pointer to **int64** | | [optional] +**CfPaymentId** | Pointer to **string** | | [optional] **OrderId** | Pointer to **string** | | [optional] **Entity** | Pointer to **string** | | [optional] **ErrorDetails** | Pointer to [**ErrorDetailsInPaymentsEntity**](ErrorDetailsInPaymentsEntity.md) | | [optional] @@ -43,20 +43,20 @@ but it doesn't guarantee that properties required by API are set ### GetCfPaymentId -`func (o *PaymentEntity) GetCfPaymentId() int64` +`func (o *PaymentEntity) GetCfPaymentId() string` GetCfPaymentId returns the CfPaymentId field if non-nil, zero value otherwise. ### GetCfPaymentIdOk -`func (o *PaymentEntity) GetCfPaymentIdOk() (*int64, bool)` +`func (o *PaymentEntity) 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 *PaymentEntity) SetCfPaymentId(v int64)` +`func (o *PaymentEntity) SetCfPaymentId(v string)` SetCfPaymentId sets CfPaymentId field to given value. diff --git a/docs/PaymentLinksAPI.md b/docs/PaymentLinksAPI.md index cbc7e6a..3833e9f 100644 --- a/docs/PaymentLinksAPI.md +++ b/docs/PaymentLinksAPI.md @@ -39,7 +39,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" linkId := "your-link-id" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -69,10 +69,10 @@ Other parameters are passed through a pointer to a apiPGCancelLinkRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **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. | + **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 @@ -120,7 +120,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" createLinkRequest := *cashfree.NewCreateLinkRequest("LinkId_example", float64(123), "LinkCurrency_example", "LinkPurpose_example", *cashfree.NewLinkCustomerDetailsEntity("CustomerPhone_example")) xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -146,10 +146,10 @@ Other parameters are passed through a pointer to a apiPGCreateLinkRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **createLinkRequest** | [**CreateLinkRequest**](CreateLinkRequest.md) | Request Body to Create Payment Links | **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. | + **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 @@ -197,7 +197,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" linkId := "your-link-id" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -227,10 +227,10 @@ Other parameters are passed through a pointer to a apiPGFetchLinkRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **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. | + **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 @@ -278,7 +278,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" linkId := "your-link-id" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -308,10 +308,10 @@ Other parameters are passed through a pointer to a apiPGLinkFetchOrdersRequest s Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **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. | + **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 diff --git a/docs/PaymentsAPI.md b/docs/PaymentsAPI.md index eb40cff..ccaeabe 100644 --- a/docs/PaymentsAPI.md +++ b/docs/PaymentsAPI.md @@ -40,7 +40,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" orderId := "your-order-id" authorizeOrderRequest := *cashfree.NewAuthorizeOrderRequest() xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" @@ -71,11 +71,11 @@ Other parameters are passed through a pointer to a apiPGAuthorizeOrderRequest st Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **authorizeOrderRequest** | [**AuthorizeOrderRequest**](AuthorizeOrderRequest.md) | Request to Capture or Void Transactions | **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. | + **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 @@ -123,7 +123,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" cfPaymentId := "121224562" orderAuthenticatePaymentRequest := *cashfree.NewOrderAuthenticatePaymentRequest("Otp_example", "Action_example") xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" @@ -154,11 +154,11 @@ Other parameters are passed through a pointer to a apiPGOrderAuthenticatePayment Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **orderAuthenticatePaymentRequest** | [**OrderAuthenticatePaymentRequest**](OrderAuthenticatePaymentRequest.md) | Request body to submit/resend headless OTP. To use this API make sure you have headless OTP enabled for your account | **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. | + **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 @@ -206,7 +206,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" orderId := "your-order-id" cfPaymentId := "121224562" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" @@ -238,11 +238,11 @@ Other parameters are passed through a pointer to a apiPGOrderFetchPaymentRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **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. | + **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 @@ -290,7 +290,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" orderId := "your-order-id" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -320,10 +320,10 @@ Other parameters are passed through a pointer to a apiPGOrderFetchPaymentsReques Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **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. | + **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 @@ -371,7 +371,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" payOrderRequest := *cashfree.NewPayOrderRequest("session__CvcEmNKDkmERQrxnx39ibhJ3Ii034pjc8ZVxf3qcgEXCWlgDDlHRgz2XYZCqpajDQSXMMtCusPgOIxYP2LZx0-05p39gC2Vgmq1RAj--gcn", cashfree.PayOrderRequest_payment_method{AppPaymentMethod: cashfree.NewAppPaymentMethod(*cashfree.NewApp("Channel_example", "Provider_example", "Phone_example"))}) xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -397,10 +397,10 @@ Other parameters are passed through a pointer to a apiPGPayOrderRequest struct v Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **payOrderRequest** | [**PayOrderRequest**](PayOrderRequest.md) | Request body to create a transaction at cashfree using `payment_session_id` | **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. | + **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 diff --git a/docs/ReconEntityDataInner.md b/docs/ReconEntityDataInner.md index c65325b..72f2a71 100644 --- a/docs/ReconEntityDataInner.md +++ b/docs/ReconEntityDataInner.md @@ -23,8 +23,8 @@ Name | Type | Description | Notes **PaymentTime** | Pointer to **string** | Date and time when the payment was initiated. | [optional] **PaymentServiceCharge** | Pointer to **float32** | Service charge applicable for the payment. | [optional] **PaymentServiceTax** | Pointer to **float32** | Service tax applicable on the payment. | [optional] -**CfPaymentId** | Pointer to **int64** | Cashfree Payments unique ID to identify a payment. | [optional] -**CfSettlementId** | Pointer to **int32** | Unique ID to identify the settlement. | [optional] +**CfPaymentId** | Pointer to **string** | Cashfree Payments unique ID to identify a payment. | [optional] +**CfSettlementId** | Pointer to **string** | Unique ID to identify the settlement. | [optional] **SettlementDate** | Pointer to **string** | Date and time when the settlement was processed. | [optional] **SettlementUtr** | Pointer to **string** | Unique transaction reference number of the settlement. | [optional] **SplitServiceCharge** | Pointer to **float32** | Service charge that is applicable for splitting the payment. | [optional] @@ -548,20 +548,20 @@ HasPaymentServiceTax returns a boolean if a field has been set. ### GetCfPaymentId -`func (o *ReconEntityDataInner) GetCfPaymentId() int64` +`func (o *ReconEntityDataInner) GetCfPaymentId() string` GetCfPaymentId returns the CfPaymentId field if non-nil, zero value otherwise. ### GetCfPaymentIdOk -`func (o *ReconEntityDataInner) GetCfPaymentIdOk() (*int64, bool)` +`func (o *ReconEntityDataInner) 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 *ReconEntityDataInner) SetCfPaymentId(v int64)` +`func (o *ReconEntityDataInner) SetCfPaymentId(v string)` SetCfPaymentId sets CfPaymentId field to given value. @@ -573,20 +573,20 @@ HasCfPaymentId returns a boolean if a field has been set. ### GetCfSettlementId -`func (o *ReconEntityDataInner) GetCfSettlementId() int32` +`func (o *ReconEntityDataInner) GetCfSettlementId() string` GetCfSettlementId returns the CfSettlementId field if non-nil, zero value otherwise. ### GetCfSettlementIdOk -`func (o *ReconEntityDataInner) GetCfSettlementIdOk() (*int32, bool)` +`func (o *ReconEntityDataInner) GetCfSettlementIdOk() (*string, 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 *ReconEntityDataInner) SetCfSettlementId(v int32)` +`func (o *ReconEntityDataInner) SetCfSettlementId(v string)` SetCfSettlementId sets CfSettlementId field to given value. diff --git a/docs/RefundEntity.md b/docs/RefundEntity.md index b78ce5f..7b328e1 100644 --- a/docs/RefundEntity.md +++ b/docs/RefundEntity.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CfPaymentId** | Pointer to **int64** | Cashfree Payments ID of the payment for which refund is initiated | [optional] +**CfPaymentId** | Pointer to **string** | Cashfree Payments ID of the payment for which refund is initiated | [optional] **CfRefundId** | Pointer to **string** | Cashfree Payments ID for a refund | [optional] **OrderId** | Pointer to **string** | Merchant’s order Id of the order for which refund is initiated | [optional] **RefundId** | Pointer to **string** | Merchant’s refund ID of the refund | [optional] @@ -45,20 +45,20 @@ but it doesn't guarantee that properties required by API are set ### GetCfPaymentId -`func (o *RefundEntity) GetCfPaymentId() int64` +`func (o *RefundEntity) GetCfPaymentId() string` GetCfPaymentId returns the CfPaymentId field if non-nil, zero value otherwise. ### GetCfPaymentIdOk -`func (o *RefundEntity) GetCfPaymentIdOk() (*int64, bool)` +`func (o *RefundEntity) 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 *RefundEntity) SetCfPaymentId(v int64)` +`func (o *RefundEntity) SetCfPaymentId(v string)` SetCfPaymentId sets CfPaymentId field to given value. diff --git a/docs/RefundsAPI.md b/docs/RefundsAPI.md index b27c6a6..91f9f13 100644 --- a/docs/RefundsAPI.md +++ b/docs/RefundsAPI.md @@ -38,7 +38,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" orderId := "your-order-id" orderCreateRefundRequest := *cashfree.NewOrderCreateRefundRequest(float64(123), "RefundId_example") xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" @@ -69,11 +69,11 @@ Other parameters are passed through a pointer to a apiPGOrderCreateRefundRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **orderCreateRefundRequest** | [**OrderCreateRefundRequest**](OrderCreateRefundRequest.md) | Request Body to Create Refunds | **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. | + **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 @@ -121,7 +121,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" orderId := "your-order-id" refundId := "some-refund-id" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" @@ -153,11 +153,11 @@ Other parameters are passed through a pointer to a apiPGOrderFetchRefundRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **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. | + **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 @@ -205,7 +205,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" orderId := "your-order-id" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -235,10 +235,10 @@ Other parameters are passed through a pointer to a apiPGOrderFetchRefundsRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **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. | + **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 diff --git a/docs/SettlementEntity.md b/docs/SettlementEntity.md index 87cfb03..e434f45 100644 --- a/docs/SettlementEntity.md +++ b/docs/SettlementEntity.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CfPaymentId** | Pointer to **int64** | | [optional] -**CfSettlementId** | Pointer to **int64** | | [optional] +**CfPaymentId** | Pointer to **string** | | [optional] +**CfSettlementId** | Pointer to **string** | | [optional] **SettlementCurrency** | Pointer to **string** | | [optional] **OrderId** | Pointer to **string** | | [optional] **Entity** | Pointer to **string** | | [optional] @@ -40,20 +40,20 @@ but it doesn't guarantee that properties required by API are set ### GetCfPaymentId -`func (o *SettlementEntity) GetCfPaymentId() int64` +`func (o *SettlementEntity) GetCfPaymentId() string` GetCfPaymentId returns the CfPaymentId field if non-nil, zero value otherwise. ### GetCfPaymentIdOk -`func (o *SettlementEntity) GetCfPaymentIdOk() (*int64, bool)` +`func (o *SettlementEntity) 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 *SettlementEntity) SetCfPaymentId(v int64)` +`func (o *SettlementEntity) SetCfPaymentId(v string)` SetCfPaymentId sets CfPaymentId field to given value. @@ -65,20 +65,20 @@ HasCfPaymentId returns a boolean if a field has been set. ### GetCfSettlementId -`func (o *SettlementEntity) GetCfSettlementId() int64` +`func (o *SettlementEntity) GetCfSettlementId() string` GetCfSettlementId returns the CfSettlementId field if non-nil, zero value otherwise. ### GetCfSettlementIdOk -`func (o *SettlementEntity) GetCfSettlementIdOk() (*int64, bool)` +`func (o *SettlementEntity) GetCfSettlementIdOk() (*string, 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 *SettlementEntity) SetCfSettlementId(v int64)` +`func (o *SettlementEntity) SetCfSettlementId(v string)` SetCfSettlementId sets CfSettlementId field to given value. diff --git a/docs/SettlementFetchReconRequest.md b/docs/SettlementFetchReconRequest.md index 349790d..1611b8a 100644 --- a/docs/SettlementFetchReconRequest.md +++ b/docs/SettlementFetchReconRequest.md @@ -5,13 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Pagination** | [**FetchSettlementsRequestPagination**](FetchSettlementsRequestPagination.md) | | -**Filters** | [**SettlementFetchReconRequestFilters**](SettlementFetchReconRequestFilters.md) | | +**Filters** | [**FetchSettlementsRequestFilters**](FetchSettlementsRequestFilters.md) | | ## Methods ### NewSettlementFetchReconRequest -`func NewSettlementFetchReconRequest(pagination FetchSettlementsRequestPagination, filters SettlementFetchReconRequestFilters, ) *SettlementFetchReconRequest` +`func NewSettlementFetchReconRequest(pagination FetchSettlementsRequestPagination, filters FetchSettlementsRequestFilters, ) *SettlementFetchReconRequest` NewSettlementFetchReconRequest instantiates a new SettlementFetchReconRequest object This constructor will assign default values to properties that have it defined, @@ -48,20 +48,20 @@ SetPagination sets Pagination field to given value. ### GetFilters -`func (o *SettlementFetchReconRequest) GetFilters() SettlementFetchReconRequestFilters` +`func (o *SettlementFetchReconRequest) GetFilters() FetchSettlementsRequestFilters` GetFilters returns the Filters field if non-nil, zero value otherwise. ### GetFiltersOk -`func (o *SettlementFetchReconRequest) GetFiltersOk() (*SettlementFetchReconRequestFilters, bool)` +`func (o *SettlementFetchReconRequest) GetFiltersOk() (*FetchSettlementsRequestFilters, bool)` GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFilters -`func (o *SettlementFetchReconRequest) SetFilters(v SettlementFetchReconRequestFilters)` +`func (o *SettlementFetchReconRequest) SetFilters(v FetchSettlementsRequestFilters)` SetFilters sets Filters field to given value. diff --git a/docs/SettlementReconEntityDataInner.md b/docs/SettlementReconEntityDataInner.md index b910a6c..e30c2be 100644 --- a/docs/SettlementReconEntityDataInner.md +++ b/docs/SettlementReconEntityDataInner.md @@ -23,8 +23,8 @@ Name | Type | Description | Notes **PaymentTime** | Pointer to **string** | Date and time when the payment was initiated. | [optional] **PaymentServiceCharge** | Pointer to **float32** | Service charge applicable for the payment. | [optional] **PaymentServiceTax** | Pointer to **float32** | Service tax applicable on the payment. | [optional] -**CfPaymentId** | Pointer to **int64** | Cashfree Payments unique ID to identify a payment. | [optional] -**CfSettlementId** | Pointer to **int32** | Unique ID to identify the settlement. | [optional] +**CfPaymentId** | Pointer to **string** | Cashfree Payments unique ID to identify a payment. | [optional] +**CfSettlementId** | Pointer to **string** | Unique ID to identify the settlement. | [optional] **SettlementDate** | Pointer to **string** | Date and time when the settlement was processed. | [optional] **SettlementUtr** | Pointer to **string** | Unique transaction reference number of the settlement. | [optional] **SplitServiceCharge** | Pointer to **float32** | Service charge that is applicable for splitting the payment. | [optional] @@ -536,20 +536,20 @@ HasPaymentServiceTax returns a boolean if a field has been set. ### GetCfPaymentId -`func (o *SettlementReconEntityDataInner) GetCfPaymentId() int64` +`func (o *SettlementReconEntityDataInner) GetCfPaymentId() string` GetCfPaymentId returns the CfPaymentId field if non-nil, zero value otherwise. ### GetCfPaymentIdOk -`func (o *SettlementReconEntityDataInner) GetCfPaymentIdOk() (*int64, bool)` +`func (o *SettlementReconEntityDataInner) 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 *SettlementReconEntityDataInner) SetCfPaymentId(v int64)` +`func (o *SettlementReconEntityDataInner) SetCfPaymentId(v string)` SetCfPaymentId sets CfPaymentId field to given value. @@ -561,20 +561,20 @@ HasCfPaymentId returns a boolean if a field has been set. ### GetCfSettlementId -`func (o *SettlementReconEntityDataInner) GetCfSettlementId() int32` +`func (o *SettlementReconEntityDataInner) GetCfSettlementId() string` GetCfSettlementId returns the CfSettlementId field if non-nil, zero value otherwise. ### GetCfSettlementIdOk -`func (o *SettlementReconEntityDataInner) GetCfSettlementIdOk() (*int32, bool)` +`func (o *SettlementReconEntityDataInner) GetCfSettlementIdOk() (*string, 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 *SettlementReconEntityDataInner) SetCfSettlementId(v int32)` +`func (o *SettlementReconEntityDataInner) SetCfSettlementId(v string)` SetCfSettlementId sets CfSettlementId field to given value. diff --git a/docs/SettlementReconciliationAPI.md b/docs/SettlementReconciliationAPI.md index ca00a22..0f541e9 100644 --- a/docs/SettlementReconciliationAPI.md +++ b/docs/SettlementReconciliationAPI.md @@ -37,7 +37,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" fetchSettlementsRequest := *cashfree.NewFetchSettlementsRequest(*cashfree.NewFetchSettlementsRequestPagination(int32(123)), *cashfree.NewFetchSettlementsRequestFilters()) contentType := "application/json" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" @@ -65,11 +65,11 @@ Other parameters are passed through a pointer to a apiPGFetchSettlementsRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **fetchSettlementsRequest** | [**FetchSettlementsRequest**](FetchSettlementsRequest.md) | Request Body to get the settlements | **contentType** | **string** | application/json | **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. | + **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. | **accept** | **string** | application/json | ### Return type @@ -118,8 +118,8 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" - settlementFetchReconRequest := *cashfree.NewSettlementFetchReconRequest(*cashfree.NewFetchSettlementsRequestPagination(int32(123)), *cashfree.NewSettlementFetchReconRequestFilters()) + xApiVersion := "2023-08-01" + settlementFetchReconRequest := *cashfree.NewSettlementFetchReconRequest(*cashfree.NewFetchSettlementsRequestPagination(int32(123)), *cashfree.NewFetchSettlementsRequestFilters()) contentType := "application/json" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -146,11 +146,11 @@ Other parameters are passed through a pointer to a apiPGSettlementFetchReconRequ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **settlementFetchReconRequest** | [**SettlementFetchReconRequest**](SettlementFetchReconRequest.md) | Request Body for the settlement reconciliation | **contentType** | **string** | application/json | **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. | + **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. | **accept** | **string** | application/json | ### Return type diff --git a/docs/SettlementsAPI.md b/docs/SettlementsAPI.md index b803b88..b69953e 100644 --- a/docs/SettlementsAPI.md +++ b/docs/SettlementsAPI.md @@ -36,7 +36,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" orderId := "your-order-id" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -66,10 +66,10 @@ Other parameters are passed through a pointer to a apiPGOrderFetchSettlementRequ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **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. | + **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 diff --git a/docs/SoftPOSAPI.md b/docs/SoftPOSAPI.md index 79dee91..e8098ab 100644 --- a/docs/SoftPOSAPI.md +++ b/docs/SoftPOSAPI.md @@ -5,7 +5,7 @@ All URIs are relative to *https://sandbox.cashfree.com/pg* Method | HTTP request | Description ------------- | ------------- | ------------- [**SposCreateTerminal**](SoftPOSAPI.md#SposCreateTerminal) | **Post** /terminal | Create Terminal -[**SposCreateTerminalTransaction**](SoftPOSAPI.md#SposCreateTerminalTransaction) | **Post** /terminal/transactions | Create Terminal +[**SposCreateTerminalTransaction**](SoftPOSAPI.md#SposCreateTerminalTransaction) | **Post** /terminal/transactions | Create Terminal Transaction [**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 @@ -39,7 +39,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" createTerminalRequest := *cashfree.NewCreateTerminalRequest("TerminalId_example", "TerminalPhoneNo_example", "TerminalName_example", "TerminalEmail_example", "TerminalType_example") xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -65,10 +65,10 @@ Other parameters are passed through a pointer to a apiSposCreateTerminalRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **createTerminalRequest** | [**CreateTerminalRequest**](CreateTerminalRequest.md) | Request Body to Create Terminal for SPOS | **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. | + **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 @@ -92,7 +92,7 @@ Name | Type | Description | Notes > TerminalTransactionEntity SposCreateTerminalTransaction(ctx).XApiVersion(xApiVersion).CreateTerminalTransactionRequest(createTerminalTransactionRequest).XRequestId(xRequestId).XIdempotencyKey(xIdempotencyKey).Execute() -Create Terminal +Create Terminal Transaction @@ -116,7 +116,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" createTerminalTransactionRequest := *cashfree.NewCreateTerminalTransactionRequest(int64(123), "PaymentMethod_example") xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -142,10 +142,10 @@ Other parameters are passed through a pointer to a apiSposCreateTerminalTransact Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **createTerminalTransactionRequest** | [**CreateTerminalTransactionRequest**](CreateTerminalTransactionRequest.md) | Request body to create a terminal transaction | **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. | + **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 @@ -193,7 +193,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" terminalPhoneNo := "6309291183" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" xIdempotencyKey := "47bf8872-46fe-11ee-be56-0242ac120002" @@ -223,10 +223,10 @@ Other parameters are passed through a pointer to a apiSposFetchTerminalRequest s Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **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. | + **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 @@ -274,7 +274,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" terminalPhoneNo := "9876543214" cfTerminalId := "123344" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" @@ -301,11 +301,11 @@ Other parameters are passed through a pointer to a apiSposFetchTerminalQRCodesRe Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **terminalPhoneNo** | **string** | Phone number assigned to the terminal. Required if you are not providing the cf_terminal_id in the request. | **cfTerminalId** | **string** | Cashfree terminal id for which you want to get staticQRs. Required if you are not providing the terminal_phone_number 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. | + **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 diff --git a/docs/TerminalDetails.md b/docs/TerminalDetails.md index 9f947f7..8c69691 100644 --- a/docs/TerminalDetails.md +++ b/docs/TerminalDetails.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AddedOn** | Pointer to **string** | date time at which terminal is added | [optional] -**CfTerminalId** | Pointer to **int32** | cashfree terminal id | [optional] +**CfTerminalId** | Pointer to **string** | cashfree terminal id | [optional] **LastUpdatedOn** | Pointer to **string** | last instant when this terminal was updated | [optional] **TerminalAddress** | Pointer to **string** | location of terminal | [optional] **TerminalId** | **string** | terminal id for merchant reference | @@ -61,20 +61,20 @@ HasAddedOn returns a boolean if a field has been set. ### GetCfTerminalId -`func (o *TerminalDetails) GetCfTerminalId() int32` +`func (o *TerminalDetails) GetCfTerminalId() string` GetCfTerminalId returns the CfTerminalId field if non-nil, zero value otherwise. ### GetCfTerminalIdOk -`func (o *TerminalDetails) GetCfTerminalIdOk() (*int32, bool)` +`func (o *TerminalDetails) 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 *TerminalDetails) SetCfTerminalId(v int32)` +`func (o *TerminalDetails) SetCfTerminalId(v string)` SetCfTerminalId sets CfTerminalId field to given value. diff --git a/docs/TerminalTransactionEntity.md b/docs/TerminalTransactionEntity.md index 92e561c..3d4e6c3 100644 --- a/docs/TerminalTransactionEntity.md +++ b/docs/TerminalTransactionEntity.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CfPaymentId** | Pointer to **int64** | | [optional] +**CfPaymentId** | Pointer to **int32** | | [optional] **PaymentAmount** | Pointer to **int32** | | [optional] **PaymentMethod** | Pointer to **string** | | [optional] **PaymentUrl** | Pointer to **string** | | [optional] @@ -32,20 +32,20 @@ but it doesn't guarantee that properties required by API are set ### GetCfPaymentId -`func (o *TerminalTransactionEntity) GetCfPaymentId() int64` +`func (o *TerminalTransactionEntity) GetCfPaymentId() int32` GetCfPaymentId returns the CfPaymentId field if non-nil, zero value otherwise. ### GetCfPaymentIdOk -`func (o *TerminalTransactionEntity) GetCfPaymentIdOk() (*int64, bool)` +`func (o *TerminalTransactionEntity) GetCfPaymentIdOk() (*int32, 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 *TerminalTransactionEntity) SetCfPaymentId(v int64)` +`func (o *TerminalTransactionEntity) SetCfPaymentId(v int32)` SetCfPaymentId sets CfPaymentId field to given value. diff --git a/docs/TerminateOrderRequest.md b/docs/TerminateOrderRequest.md new file mode 100644 index 0000000..7d6de9a --- /dev/null +++ b/docs/TerminateOrderRequest.md @@ -0,0 +1,51 @@ +# TerminateOrderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OrderStatus** | **string** | To terminate an order, pass order_status as \"TERMINATE\". Please note, order might not be terminated - confirm with the order_status in response. \"TERMINATION_REQUESTED\" states that the request is recieved and we are working on it. If the order terminates successfully, status will change to \"TERMINATED\". Incase there's any active transaction which moved to success - order might not get terminated. | + +## Methods + +### NewTerminateOrderRequest + +`func NewTerminateOrderRequest(orderStatus string, ) *TerminateOrderRequest` + +NewTerminateOrderRequest instantiates a new TerminateOrderRequest 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 + +### NewTerminateOrderRequestWithDefaults + +`func NewTerminateOrderRequestWithDefaults() *TerminateOrderRequest` + +NewTerminateOrderRequestWithDefaults instantiates a new TerminateOrderRequest 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 + +### GetOrderStatus + +`func (o *TerminateOrderRequest) GetOrderStatus() string` + +GetOrderStatus returns the OrderStatus field if non-nil, zero value otherwise. + +### GetOrderStatusOk + +`func (o *TerminateOrderRequest) GetOrderStatusOk() (*string, bool)` + +GetOrderStatusOk returns a tuple with the OrderStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderStatus + +`func (o *TerminateOrderRequest) SetOrderStatus(v string)` + +SetOrderStatus sets OrderStatus 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/TokenVaultAPI.md b/docs/TokenVaultAPI.md index 97d0199..a1f717d 100644 --- a/docs/TokenVaultAPI.md +++ b/docs/TokenVaultAPI.md @@ -39,7 +39,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" customerId := "your-customer-id" instrumentId := "some-instrument-id" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" @@ -71,11 +71,11 @@ Other parameters are passed through a pointer to a apiPGCustomerDeleteInstrument Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **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. | + **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 @@ -123,7 +123,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" customerId := "your-customer-id" instrumentId := "some-instrument-id" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" @@ -155,11 +155,11 @@ Other parameters are passed through a pointer to a apiPGCustomerFetchInstrumentR Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **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. | + **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 @@ -207,7 +207,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" customerId := "your-customer-id" instrumentType := "card" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" @@ -238,11 +238,11 @@ Other parameters are passed through a pointer to a apiPGCustomerFetchInstruments Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2023-08-01"] **instrumentType** | **string** | Payment mode or type of saved instrument | **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. | + **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 @@ -290,7 +290,7 @@ func main() { cashfree.XClientSecret = &clientSecret cashfree.XEnvironment = cashfree.SANDBOX - xApiVersion := "2022-09-01" + xApiVersion := "2023-08-01" customerId := "your-customer-id" instrumentId := "some-instrument-id" xRequestId := "4dfb9780-46fe-11ee-be56-0242ac120002" @@ -322,11 +322,11 @@ Other parameters are passed through a pointer to a apiPGCustomerInstrumentsFetch Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **xApiVersion** | **string** | API version to be used. Format is in YYYY-MM-DD | [default to "2022-09-01"] + **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. | + **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 diff --git a/eligibility_test.go b/eligibility_test.go index 159749e..9401aa2 100644 --- a/eligibility_test.go +++ b/eligibility_test.go @@ -21,7 +21,7 @@ func Test_cashfree_pg_eligibility(t *testing.T) { cashfree.XEnvironment = cashfree.SANDBOX orderId := "order_342Z7ns5LWu4x4xIFvQqmF7x52Jc6" // amount := float32(1000.0) - XApiVersion := "2022-09-01" + XApiVersion := "2023-08-01" ctx := context.Background() t.Run("PGEligibilityFetchPaymentMethods should give status code 200", func(t *testing.T) { diff --git a/links_test.go b/links_test.go index 49cddc5..6fea6dd 100644 --- a/links_test.go +++ b/links_test.go @@ -1,511 +1,511 @@ package cashfree_pg_test -import ( - "context" - "net/http" - "os" - "strconv" - "testing" - "time" - - cashfree "github.com/cashfree/cashfree-pg/v3" - "github.com/stretchr/testify/require" - "gopkg.in/go-playground/assert.v1" -) - -func Test_cashfree_pg_links(t *testing.T) { - - clientId := os.Getenv("clientid") - XClientSecret := os.Getenv("clientsecret") - cashfree.XClientId = &clientId - cashfree.XClientSecret = &XClientSecret - cashfree.XEnvironment = cashfree.SANDBOX - XApiVersion := "2022-09-01" - linkId := "test_new_new_new" - ctx := context.Background() - - t.Run("Test Orders PGCreateLink xapiversion missing", func(t *testing.T) { - - createLinkRequest := cashfree.CreateLinkRequest{ - LinkId: strconv.Itoa(int(time.Now().Unix())), - LinkAmount: 1, - LinkCurrency: "INR", - LinkPurpose: "gosdk_testing", - CustomerDetails: cashfree.LinkCustomerDetailsEntity{ - CustomerPhone: "9999999999", - }, - } - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - _, _, err := cashfree.PGCreateLink(nil, &createLinkRequest, &req, &idemp, http.DefaultClient) - - require.NotNil(t, err) - - }) - - t.Run("Test Orders PGCreateLink request missing", func(t *testing.T) { - - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - _, _, err := cashfree.PGCreateLink(&XApiVersion, nil, &req, &idemp, http.DefaultClient) - - require.NotNil(t, err) - - }) - - t.Run("Test Orders PGCreateLink 401 status code", func(t *testing.T) { - - c := "unauthorised" - cashfree.XClientId = &c - flag := true - - createLinkRequest := cashfree.CreateLinkRequest{ - LinkId: strconv.Itoa(int(time.Now().Unix())), - LinkAmount: 1, - LinkCurrency: "INR", - LinkPurpose: "gosdk_testing", - CustomerDetails: cashfree.LinkCustomerDetailsEntity{ - CustomerPhone: "9999999999", - }, - LinkNotify: &cashfree.LinkNotifyEntity{ - SendSms: &flag, - }, - } - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGCreateLink(&XApiVersion, &createLinkRequest, &req, &idemp, http.DefaultClient) - - require.NotNil(t, err) - require.Nil(t, resp) - assert.Equal(t, 401, httpRes.StatusCode) - - }) - - // ######################## - // Craete Link WIth Context - // ######################## - - // t.Run("Test Orders PGCreateLink 200 status code", func(t *testing.T) { - - // flag := true - // cashfree.XClientId = &clientId - - // createLinkRequest := cashfree.CreateLinkRequest{ - // LinkId: strconv.Itoa(int(time.Now().Unix())), - // LinkAmount: 1, - // LinkCurrency: "INR", - // LinkPurpose: "gosdk_testing", - // CustomerDetails: cashfree.LinkCustomerDetailsEntity{ - // CustomerPhone: "9999999999", - // }, - // LinkNotify: &cashfree.LinkNotifyEntity{ - // SendSms: &flag, - // }, - // } - // req := "test" - // idemp := strconv.Itoa(int(time.Now().Unix())) - // resp, httpRes, err := cashfree.PGCreateLinkWithContext(ctx, &XApiVersion, &createLinkRequest, &req, &idemp, http.DefaultClient) - - // require.Nil(t, err) - // require.NotNil(t, resp) - // assert.Equal(t, 200, httpRes.StatusCode) - - // }) +// import ( +// "context" +// "net/http" +// "os" +// "strconv" +// "testing" +// "time" + +// cashfree "github.com/cashfree/cashfree-pg/v3" +// "github.com/stretchr/testify/require" +// "gopkg.in/go-playground/assert.v1" +// ) + +// func Test_cashfree_pg_links(t *testing.T) { + +// clientId := os.Getenv("clientid") +// XClientSecret := os.Getenv("clientsecret") +// cashfree.XClientId = &clientId +// cashfree.XClientSecret = &XClientSecret +// cashfree.XEnvironment = cashfree.SANDBOX +// XApiVersion := "2023-08-01" +// linkId := "test_new_new_new" +// ctx := context.Background() + +// t.Run("Test Orders PGCreateLink xapiversion missing", func(t *testing.T) { + +// createLinkRequest := cashfree.CreateLinkRequest{ +// LinkId: strconv.Itoa(int(time.Now().Unix())), +// LinkAmount: 1, +// LinkCurrency: "INR", +// LinkPurpose: "gosdk_testing", +// CustomerDetails: cashfree.LinkCustomerDetailsEntity{ +// CustomerPhone: "9999999999", +// }, +// } +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// _, _, err := cashfree.PGCreateLink(nil, &createLinkRequest, &req, &idemp, http.DefaultClient) + +// require.NotNil(t, err) + +// }) + +// t.Run("Test Orders PGCreateLink request missing", func(t *testing.T) { + +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// _, _, err := cashfree.PGCreateLink(&XApiVersion, nil, &req, &idemp, http.DefaultClient) + +// require.NotNil(t, err) + +// }) + +// t.Run("Test Orders PGCreateLink 401 status code", func(t *testing.T) { + +// c := "unauthorised" +// cashfree.XClientId = &c +// flag := true + +// createLinkRequest := cashfree.CreateLinkRequest{ +// LinkId: strconv.Itoa(int(time.Now().Unix())), +// LinkAmount: 1, +// LinkCurrency: "INR", +// LinkPurpose: "gosdk_testing", +// CustomerDetails: cashfree.LinkCustomerDetailsEntity{ +// CustomerPhone: "9999999999", +// }, +// LinkNotify: &cashfree.LinkNotifyEntity{ +// SendSms: &flag, +// }, +// } +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGCreateLink(&XApiVersion, &createLinkRequest, &req, &idemp, http.DefaultClient) + +// require.NotNil(t, err) +// require.Nil(t, resp) +// assert.Equal(t, 401, httpRes.StatusCode) + +// }) + +// // ######################## +// // Craete Link WIth Context +// // ######################## + +// // t.Run("Test Orders PGCreateLink 200 status code", func(t *testing.T) { + +// // flag := true +// // cashfree.XClientId = &clientId + +// // createLinkRequest := cashfree.CreateLinkRequest{ +// // LinkId: strconv.Itoa(int(time.Now().Unix())), +// // LinkAmount: 1, +// // LinkCurrency: "INR", +// // LinkPurpose: "gosdk_testing", +// // CustomerDetails: cashfree.LinkCustomerDetailsEntity{ +// // CustomerPhone: "9999999999", +// // }, +// // LinkNotify: &cashfree.LinkNotifyEntity{ +// // SendSms: &flag, +// // }, +// // } +// // req := "test" +// // idemp := strconv.Itoa(int(time.Now().Unix())) +// // resp, httpRes, err := cashfree.PGCreateLinkWithContext(ctx, &XApiVersion, &createLinkRequest, &req, &idemp, http.DefaultClient) + +// // require.Nil(t, err) +// // require.NotNil(t, resp) +// // assert.Equal(t, 200, httpRes.StatusCode) + +// // }) - t.Run("Test Orders PGCreateLink xapiversion missing", func(t *testing.T) { +// t.Run("Test Orders PGCreateLink xapiversion missing", func(t *testing.T) { - createLinkRequest := cashfree.CreateLinkRequest{ - LinkId: strconv.Itoa(int(time.Now().Unix())), - LinkAmount: 1, - LinkCurrency: "INR", - LinkPurpose: "gosdk_testing", - CustomerDetails: cashfree.LinkCustomerDetailsEntity{ - CustomerPhone: "9999999999", - }, - } - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - _, _, err := cashfree.PGCreateLinkWithContext(ctx, nil, &createLinkRequest, &req, &idemp, http.DefaultClient) +// createLinkRequest := cashfree.CreateLinkRequest{ +// LinkId: strconv.Itoa(int(time.Now().Unix())), +// LinkAmount: 1, +// LinkCurrency: "INR", +// LinkPurpose: "gosdk_testing", +// CustomerDetails: cashfree.LinkCustomerDetailsEntity{ +// CustomerPhone: "9999999999", +// }, +// } +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// _, _, err := cashfree.PGCreateLinkWithContext(ctx, nil, &createLinkRequest, &req, &idemp, http.DefaultClient) - require.NotNil(t, err) +// require.NotNil(t, err) - }) +// }) - t.Run("Test Orders PGCreateLink request missing", func(t *testing.T) { +// t.Run("Test Orders PGCreateLink request missing", func(t *testing.T) { - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - _, _, err := cashfree.PGCreateLinkWithContext(ctx, &XApiVersion, nil, &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// _, _, err := cashfree.PGCreateLinkWithContext(ctx, &XApiVersion, nil, &req, &idemp, http.DefaultClient) - require.NotNil(t, err) +// require.NotNil(t, err) - }) +// }) - t.Run("Test Orders PGCreateLink 401 status code", func(t *testing.T) { +// t.Run("Test Orders PGCreateLink 401 status code", func(t *testing.T) { - c := "unauthorised" - cashfree.XClientId = &c - flag := true +// c := "unauthorised" +// cashfree.XClientId = &c +// flag := true - createLinkRequest := cashfree.CreateLinkRequest{ - LinkId: strconv.Itoa(int(time.Now().Unix())), - LinkAmount: 1, - LinkCurrency: "INR", - LinkPurpose: "gosdk_testing", - CustomerDetails: cashfree.LinkCustomerDetailsEntity{ - CustomerPhone: "9999999999", - }, - LinkNotify: &cashfree.LinkNotifyEntity{ - SendSms: &flag, - }, - } - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGCreateLinkWithContext(ctx, &XApiVersion, &createLinkRequest, &req, &idemp, http.DefaultClient) +// createLinkRequest := cashfree.CreateLinkRequest{ +// LinkId: strconv.Itoa(int(time.Now().Unix())), +// LinkAmount: 1, +// LinkCurrency: "INR", +// LinkPurpose: "gosdk_testing", +// CustomerDetails: cashfree.LinkCustomerDetailsEntity{ +// CustomerPhone: "9999999999", +// }, +// LinkNotify: &cashfree.LinkNotifyEntity{ +// SendSms: &flag, +// }, +// } +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGCreateLinkWithContext(ctx, &XApiVersion, &createLinkRequest, &req, &idemp, http.DefaultClient) - require.NotNil(t, err) - require.Nil(t, resp) - assert.Equal(t, 401, httpRes.StatusCode) +// require.NotNil(t, err) +// require.Nil(t, resp) +// assert.Equal(t, 401, httpRes.StatusCode) - }) +// }) - // ##################### - // Fetch Link - // ##################### +// // ##################### +// // Fetch Link +// // ##################### - t.Run("Test Orders PGFetchLink 200 status code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink 200 status code", func(t *testing.T) { - cashfree.XClientId = &clientId +// cashfree.XClientId = &clientId - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGFetchLink(&XApiVersion, linkId, &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGFetchLink(&XApiVersion, linkId, &req, &idemp, http.DefaultClient) - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) +// require.Nil(t, err) +// require.NotNil(t, resp) +// assert.Equal(t, 200, httpRes.StatusCode) - }) +// }) - t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - _, _, err := cashfree.PGFetchLink(nil, linkId, &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// _, _, err := cashfree.PGFetchLink(nil, linkId, &req, &idemp, http.DefaultClient) - require.NotNil(t, err) +// require.NotNil(t, err) - }) +// }) - t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGFetchLink(&XApiVersion, "invalid", &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGFetchLink(&XApiVersion, "invalid", &req, &idemp, http.DefaultClient) - require.NotNil(t, err) - require.Nil(t, resp) - assert.Equal(t, 404, httpRes.StatusCode) +// require.NotNil(t, err) +// require.Nil(t, resp) +// assert.Equal(t, 404, httpRes.StatusCode) - }) +// }) - t.Run("Test Orders PGFetchLink 401 status code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink 401 status code", func(t *testing.T) { - c := "unathorised" - cashfree.XClientId = &c +// c := "unathorised" +// cashfree.XClientId = &c - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGFetchLink(&XApiVersion, linkId, &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGFetchLink(&XApiVersion, linkId, &req, &idemp, http.DefaultClient) - require.NotNil(t, err) - require.Nil(t, resp) - assert.Equal(t, 401, httpRes.StatusCode) +// require.NotNil(t, err) +// require.Nil(t, resp) +// assert.Equal(t, 401, httpRes.StatusCode) - }) +// }) - // ##################### - // Fetch Link With Context - // ##################### +// // ##################### +// // Fetch Link With Context +// // ##################### - t.Run("Test Orders PGFetchLink 200 status code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink 200 status code", func(t *testing.T) { - cashfree.XClientId = &clientId - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGFetchLinkWithContext(ctx, &XApiVersion, linkId, &req, &idemp, http.DefaultClient) +// cashfree.XClientId = &clientId +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGFetchLinkWithContext(ctx, &XApiVersion, linkId, &req, &idemp, http.DefaultClient) - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) +// require.Nil(t, err) +// require.NotNil(t, resp) +// assert.Equal(t, 200, httpRes.StatusCode) - }) +// }) - t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - _, _, err := cashfree.PGFetchLinkWithContext(ctx, nil, linkId, &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// _, _, err := cashfree.PGFetchLinkWithContext(ctx, nil, linkId, &req, &idemp, http.DefaultClient) - require.NotNil(t, err) +// require.NotNil(t, err) - }) +// }) - t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGFetchLinkWithContext(ctx, &XApiVersion, "invalid", &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGFetchLinkWithContext(ctx, &XApiVersion, "invalid", &req, &idemp, http.DefaultClient) - require.NotNil(t, err) - require.Nil(t, resp) - assert.Equal(t, 404, httpRes.StatusCode) +// require.NotNil(t, err) +// require.Nil(t, resp) +// assert.Equal(t, 404, httpRes.StatusCode) - }) +// }) - t.Run("Test Orders PGFetchLink 401 status code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink 401 status code", func(t *testing.T) { - c := "unathorised" - cashfree.XClientId = &c +// c := "unathorised" +// cashfree.XClientId = &c - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGFetchLinkWithContext(ctx, &XApiVersion, linkId, &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGFetchLinkWithContext(ctx, &XApiVersion, linkId, &req, &idemp, http.DefaultClient) - require.NotNil(t, err) - require.Nil(t, resp) - assert.Equal(t, 401, httpRes.StatusCode) +// require.NotNil(t, err) +// require.Nil(t, resp) +// assert.Equal(t, 401, httpRes.StatusCode) - }) +// }) - // ##################### - // Fetch Link Orders - // ##################### +// // ##################### +// // Fetch Link Orders +// // ##################### - t.Run("Test Orders PGFetchLink 200 status code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink 200 status code", func(t *testing.T) { - cashfree.XClientId = &clientId +// cashfree.XClientId = &clientId - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGLinkFetchOrders(&XApiVersion, linkId, &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGLinkFetchOrders(&XApiVersion, linkId, &req, &idemp, http.DefaultClient) - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) +// require.Nil(t, err) +// require.NotNil(t, resp) +// assert.Equal(t, 200, httpRes.StatusCode) - }) +// }) - t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - _, _, err := cashfree.PGLinkFetchOrders(nil, linkId, &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// _, _, err := cashfree.PGLinkFetchOrders(nil, linkId, &req, &idemp, http.DefaultClient) - require.NotNil(t, err) +// require.NotNil(t, err) - }) +// }) - t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGLinkFetchOrders(&XApiVersion, "invalid", &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGLinkFetchOrders(&XApiVersion, "invalid", &req, &idemp, http.DefaultClient) - require.NotNil(t, err) - require.Nil(t, resp) - assert.Equal(t, 404, httpRes.StatusCode) +// require.NotNil(t, err) +// require.Nil(t, resp) +// assert.Equal(t, 404, httpRes.StatusCode) - }) +// }) - t.Run("Test Orders PGFetchLink 401 status code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink 401 status code", func(t *testing.T) { - c := "unathorised" - cashfree.XClientId = &c +// c := "unathorised" +// cashfree.XClientId = &c - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGLinkFetchOrders(&XApiVersion, linkId, &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGLinkFetchOrders(&XApiVersion, linkId, &req, &idemp, http.DefaultClient) - require.NotNil(t, err) - require.Nil(t, resp) - assert.Equal(t, 401, httpRes.StatusCode) +// require.NotNil(t, err) +// require.Nil(t, resp) +// assert.Equal(t, 401, httpRes.StatusCode) - }) +// }) - // ##################### - // Fetch Link With Context - // ##################### +// // ##################### +// // Fetch Link With Context +// // ##################### - t.Run("Test Orders PGFetchLink 200 status code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink 200 status code", func(t *testing.T) { - cashfree.XClientId = &clientId - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGLinkFetchOrdersWithContext(ctx, &XApiVersion, linkId, &req, &idemp, http.DefaultClient) +// cashfree.XClientId = &clientId +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGLinkFetchOrdersWithContext(ctx, &XApiVersion, linkId, &req, &idemp, http.DefaultClient) - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) +// require.Nil(t, err) +// require.NotNil(t, resp) +// assert.Equal(t, 200, httpRes.StatusCode) - }) +// }) - t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - _, _, err := cashfree.PGLinkFetchOrdersWithContext(ctx, nil, linkId, &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// _, _, err := cashfree.PGLinkFetchOrdersWithContext(ctx, nil, linkId, &req, &idemp, http.DefaultClient) - require.NotNil(t, err) +// require.NotNil(t, err) - }) +// }) - t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink api version missing code", func(t *testing.T) { - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGLinkFetchOrdersWithContext(ctx, &XApiVersion, "invalid", &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGLinkFetchOrdersWithContext(ctx, &XApiVersion, "invalid", &req, &idemp, http.DefaultClient) - require.NotNil(t, err) - require.Nil(t, resp) - assert.Equal(t, 404, httpRes.StatusCode) +// require.NotNil(t, err) +// require.Nil(t, resp) +// assert.Equal(t, 404, httpRes.StatusCode) - }) +// }) - t.Run("Test Orders PGFetchLink 401 status code", func(t *testing.T) { +// t.Run("Test Orders PGFetchLink 401 status code", func(t *testing.T) { - c := "unathorised" - cashfree.XClientId = &c +// c := "unathorised" +// cashfree.XClientId = &c - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGLinkFetchOrdersWithContext(ctx, &XApiVersion, linkId, &req, &idemp, http.DefaultClient) +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGLinkFetchOrdersWithContext(ctx, &XApiVersion, linkId, &req, &idemp, http.DefaultClient) - require.NotNil(t, err) - require.Nil(t, resp) - assert.Equal(t, 401, httpRes.StatusCode) +// require.NotNil(t, err) +// require.Nil(t, resp) +// assert.Equal(t, 401, httpRes.StatusCode) - }) +// }) - // ############################## - // Cancel Link - // ############################## +// // ############################## +// // Cancel Link +// // ############################## - // t.Run("Test Order PGCancelLink 200 status coed", func(t *testing.T) { +// // t.Run("Test Order PGCancelLink 200 status coed", func(t *testing.T) { - // flag := true - // cashfree.XClientId = &clientId +// // flag := true +// // cashfree.XClientId = &clientId - // createLinkRequest := cashfree.CreateLinkRequest{ - // LinkId: strconv.Itoa(int(time.Now().Unix())), - // LinkAmount: 1, - // LinkCurrency: "INR", - // LinkPurpose: "gosdk_testing", - // CustomerDetails: cashfree.LinkCustomerDetailsEntity{ - // CustomerPhone: "9999999999", - // }, - // LinkNotify: &cashfree.LinkNotifyEntity{ - // SendSms: &flag, - // }, - // } - // req := "511f216d-9c69-49a8-9b16-9110b103c8af" - // idemp := strconv.Itoa(int(time.Now().Unix())) - // resp, _, _ := cashfree.PGCreateLink(&XApiVersion, &createLinkRequest, &req, &idemp, http.DefaultClient) - - // cashfree.XClientId = &clientId - // idemp = strconv.Itoa(int(time.Now().Unix())) + strconv.Itoa(int(time.Now().Unix())) - // newResp, httpRes, err := cashfree.PGCancelLink(&XApiVersion, resp.GetLinkId(), &req, &idemp, http.DefaultClient) - - // require.Nil(t, err) - // require.NotNil(t, newResp) - // assert.Equal(t, 200, httpRes.StatusCode) - // }) - - // t.Run("Test Order PGCancelLink api version missing", func(t *testing.T) { - // cashfree.XClientId = &clientId - // req := "test" - // idemp := strconv.Itoa(int(time.Now().Unix())) - // _, _, err := cashfree.PGCancelLink(nil, "cancelLinkId", &req, &idemp, http.DefaultClient) - - // require.NotNil(t, err) - // }) - - // t.Run("Test Order PGCancelLink api version missing", func(t *testing.T) { - // cashfree.XClientId = &clientId - // req := "test" - // idemp := strconv.Itoa(int(time.Now().Unix())) - // resp, httpRes, err := cashfree.PGCancelLink(&XApiVersion, "randomlinkId", &req, &idemp, http.DefaultClient) - - // require.NotNil(t, err) - // require.Nil(t, resp) - // assert.Equal(t, 422, httpRes.StatusCode) - // }) - - // t.Run("Test Order PGCancelLink 401 status coed", func(t *testing.T) { - // c := "unauthorised" - // cashfree.XClientId = &c - // req := "test" - // idemp := strconv.Itoa(int(time.Now().Unix())) - // resp, httpRes, err := cashfree.PGCancelLink(&XApiVersion, "cancelLinkId", &req, &idemp, http.DefaultClient) - - // require.NotNil(t, err) - // require.Nil(t, resp) - // assert.Equal(t, 401, httpRes.StatusCode) - // }) - - // ############################## - // Cancel Link With Context - // ############################## - - // t.Run("Test Order PGCancelLink 200 status coed", func(t *testing.T) { - - // flag := true - // cashfree.XClientId = &clientId - - // createLinkRequest := cashfree.CreateLinkRequest{ - // LinkId: strconv.Itoa(int(time.Now().Unix())), - // LinkAmount: 1, - // LinkCurrency: "INR", - // LinkPurpose: "gosdk_testing", - // CustomerDetails: cashfree.LinkCustomerDetailsEntity{ - // CustomerPhone: "9999999999", - // }, - // LinkNotify: &cashfree.LinkNotifyEntity{ - // SendSms: &flag, - // }, - // } - // req := "511f216d-9c69-49a8-9b16-9110b103c8af" - // idemp := strconv.Itoa(int(time.Now().Unix())) - // resp, _, _ := cashfree.PGCreateLink(&XApiVersion, &createLinkRequest, &req, &idemp, http.DefaultClient) - - // cashfree.XClientId = &clientId - // idemp = strconv.Itoa(int(time.Now().Unix())) + strconv.Itoa(int(time.Now().Unix())) - // newResp, httpRes, err := cashfree.PGCancelLinkWithContext(ctx, &XApiVersion, resp.GetLinkId(), &req, &idemp, http.DefaultClient) - - // require.Nil(t, err) - // require.NotNil(t, newResp) - // assert.Equal(t, 200, httpRes.StatusCode) - // }) - - t.Run("Test Order PGCancelLink api version missing", func(t *testing.T) { - cashfree.XClientId = &clientId - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - _, _, err := cashfree.PGCancelLinkWithContext(ctx, nil, "cancelLinkId", &req, &idemp, http.DefaultClient) - - require.NotNil(t, err) - }) - - t.Run("Test Order PGCancelLink 401 status coed", func(t *testing.T) { - c := "unauthorised" - cashfree.XClientId = &c - req := "test" - idemp := strconv.Itoa(int(time.Now().Unix())) - resp, httpRes, err := cashfree.PGCancelLinkWithContext(ctx, &XApiVersion, "cancelLinkId", &req, &idemp, http.DefaultClient) - - require.NotNil(t, err) - require.Nil(t, resp) - assert.Equal(t, 401, httpRes.StatusCode) - }) - -} +// // createLinkRequest := cashfree.CreateLinkRequest{ +// // LinkId: strconv.Itoa(int(time.Now().Unix())), +// // LinkAmount: 1, +// // LinkCurrency: "INR", +// // LinkPurpose: "gosdk_testing", +// // CustomerDetails: cashfree.LinkCustomerDetailsEntity{ +// // CustomerPhone: "9999999999", +// // }, +// // LinkNotify: &cashfree.LinkNotifyEntity{ +// // SendSms: &flag, +// // }, +// // } +// // req := "511f216d-9c69-49a8-9b16-9110b103c8af" +// // idemp := strconv.Itoa(int(time.Now().Unix())) +// // resp, _, _ := cashfree.PGCreateLink(&XApiVersion, &createLinkRequest, &req, &idemp, http.DefaultClient) + +// // cashfree.XClientId = &clientId +// // idemp = strconv.Itoa(int(time.Now().Unix())) + strconv.Itoa(int(time.Now().Unix())) +// // newResp, httpRes, err := cashfree.PGCancelLink(&XApiVersion, resp.GetLinkId(), &req, &idemp, http.DefaultClient) + +// // require.Nil(t, err) +// // require.NotNil(t, newResp) +// // assert.Equal(t, 200, httpRes.StatusCode) +// // }) + +// // t.Run("Test Order PGCancelLink api version missing", func(t *testing.T) { +// // cashfree.XClientId = &clientId +// // req := "test" +// // idemp := strconv.Itoa(int(time.Now().Unix())) +// // _, _, err := cashfree.PGCancelLink(nil, "cancelLinkId", &req, &idemp, http.DefaultClient) + +// // require.NotNil(t, err) +// // }) + +// // t.Run("Test Order PGCancelLink api version missing", func(t *testing.T) { +// // cashfree.XClientId = &clientId +// // req := "test" +// // idemp := strconv.Itoa(int(time.Now().Unix())) +// // resp, httpRes, err := cashfree.PGCancelLink(&XApiVersion, "randomlinkId", &req, &idemp, http.DefaultClient) + +// // require.NotNil(t, err) +// // require.Nil(t, resp) +// // assert.Equal(t, 422, httpRes.StatusCode) +// // }) + +// // t.Run("Test Order PGCancelLink 401 status coed", func(t *testing.T) { +// // c := "unauthorised" +// // cashfree.XClientId = &c +// // req := "test" +// // idemp := strconv.Itoa(int(time.Now().Unix())) +// // resp, httpRes, err := cashfree.PGCancelLink(&XApiVersion, "cancelLinkId", &req, &idemp, http.DefaultClient) + +// // require.NotNil(t, err) +// // require.Nil(t, resp) +// // assert.Equal(t, 401, httpRes.StatusCode) +// // }) + +// // ############################## +// // Cancel Link With Context +// // ############################## + +// // t.Run("Test Order PGCancelLink 200 status coed", func(t *testing.T) { + +// // flag := true +// // cashfree.XClientId = &clientId + +// // createLinkRequest := cashfree.CreateLinkRequest{ +// // LinkId: strconv.Itoa(int(time.Now().Unix())), +// // LinkAmount: 1, +// // LinkCurrency: "INR", +// // LinkPurpose: "gosdk_testing", +// // CustomerDetails: cashfree.LinkCustomerDetailsEntity{ +// // CustomerPhone: "9999999999", +// // }, +// // LinkNotify: &cashfree.LinkNotifyEntity{ +// // SendSms: &flag, +// // }, +// // } +// // req := "511f216d-9c69-49a8-9b16-9110b103c8af" +// // idemp := strconv.Itoa(int(time.Now().Unix())) +// // resp, _, _ := cashfree.PGCreateLink(&XApiVersion, &createLinkRequest, &req, &idemp, http.DefaultClient) + +// // cashfree.XClientId = &clientId +// // idemp = strconv.Itoa(int(time.Now().Unix())) + strconv.Itoa(int(time.Now().Unix())) +// // newResp, httpRes, err := cashfree.PGCancelLinkWithContext(ctx, &XApiVersion, resp.GetLinkId(), &req, &idemp, http.DefaultClient) + +// // require.Nil(t, err) +// // require.NotNil(t, newResp) +// // assert.Equal(t, 200, httpRes.StatusCode) +// // }) + +// t.Run("Test Order PGCancelLink api version missing", func(t *testing.T) { +// cashfree.XClientId = &clientId +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// _, _, err := cashfree.PGCancelLinkWithContext(ctx, nil, "cancelLinkId", &req, &idemp, http.DefaultClient) + +// require.NotNil(t, err) +// }) + +// t.Run("Test Order PGCancelLink 401 status coed", func(t *testing.T) { +// c := "unauthorised" +// cashfree.XClientId = &c +// req := "test" +// idemp := strconv.Itoa(int(time.Now().Unix())) +// resp, httpRes, err := cashfree.PGCancelLinkWithContext(ctx, &XApiVersion, "cancelLinkId", &req, &idemp, http.DefaultClient) + +// require.NotNil(t, err) +// require.Nil(t, resp) +// assert.Equal(t, 401, httpRes.StatusCode) +// }) + +// } diff --git a/model_api_error.go b/model_api_error.go index 3628b6a..9484347 100644 --- a/model_api_error.go +++ b/model_api_error.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_api_error404.go b/model_api_error404.go index 36b0e47..c36e4fa 100644 --- a/model_api_error404.go +++ b/model_api_error404.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_api_error409.go b/model_api_error409.go index e65e71a..4180180 100644 --- a/model_api_error409.go +++ b/model_api_error409.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_api_error502.go b/model_api_error502.go index 40e4ad1..33568a3 100644 --- a/model_api_error502.go +++ b/model_api_error502.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_app.go b/model_app.go index 31d9b93..4b32fb4 100644 --- a/model_app.go +++ b/model_app.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_app_payment_method.go b/model_app_payment_method.go index 64ce7bf..1e02168 100644 --- a/model_app_payment_method.go +++ b/model_app_payment_method.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_authentication_error.go b/model_authentication_error.go index b028595..0861d38 100644 --- a/model_authentication_error.go +++ b/model_authentication_error.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_authorization_in_payments_entity.go b/model_authorization_in_payments_entity.go index c89bd95..4deab02 100644 --- a/model_authorization_in_payments_entity.go +++ b/model_authorization_in_payments_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_authorize_order_request.go b/model_authorize_order_request.go index b8fa471..4902d2f 100644 --- a/model_authorize_order_request.go +++ b/model_authorize_order_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_bad_request_error.go b/model_bad_request_error.go index 03436e2..a20e452 100644 --- a/model_bad_request_error.go +++ b/model_bad_request_error.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_card.go b/model_card.go index c7343d3..df6a885 100644 --- a/model_card.go +++ b/model_card.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_card_emi.go b/model_card_emi.go index a35e97c..ae00961 100644 --- a/model_card_emi.go +++ b/model_card_emi.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_card_emi_payment_method.go b/model_card_emi_payment_method.go index d3782a3..225cb3c 100644 --- a/model_card_emi_payment_method.go +++ b/model_card_emi_payment_method.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_card_offer.go b/model_card_offer.go index bfebdb3..6e407cb 100644 --- a/model_card_offer.go +++ b/model_card_offer.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_card_payment_method.go b/model_card_payment_method.go index 7062c28..cfccb4e 100644 --- a/model_card_payment_method.go +++ b/model_card_payment_method.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_cardless_emi.go b/model_cardless_emi.go index 701427f..920fd8c 100644 --- a/model_cardless_emi.go +++ b/model_cardless_emi.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_cardless_emi_entity.go b/model_cardless_emi_entity.go index dda30f6..02dbf43 100644 --- a/model_cardless_emi_entity.go +++ b/model_cardless_emi_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_cardless_emi_payment_method.go b/model_cardless_emi_payment_method.go index 819e705..7ab9030 100644 --- a/model_cardless_emi_payment_method.go +++ b/model_cardless_emi_payment_method.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_cardless_emi_queries.go b/model_cardless_emi_queries.go index 716e0d9..2e4c83c 100644 --- a/model_cardless_emi_queries.go +++ b/model_cardless_emi_queries.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_cashback_details.go b/model_cashback_details.go index 1d5e9a5..86a5cf5 100644 --- a/model_cashback_details.go +++ b/model_cashback_details.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_create_customer_request.go b/model_create_customer_request.go new file mode 100644 index 0000000..a92384d --- /dev/null +++ b/model_create_customer_request.go @@ -0,0 +1,53 @@ +/* +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" +) + +// checks if the CreateCustomerRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateCustomerRequest{} + +// CreateCustomerRequest Request body to create a customer at cashfree +type CreateCustomerRequest struct { + // Customer Phone Number + CustomerPhone string `json:"customer_phone"` + // Customer Email + CustomerEmail *string `json:"customer_email,omitempty"` + // Customer Name + CustomerName *string `json:"customer_name,omitempty"` +} + + +func (o CreateCustomerRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateCustomerRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["customer_phone"] = o.CustomerPhone + if !IsNil(o.CustomerEmail) { + toSerialize["customer_email"] = o.CustomerEmail + } + if !IsNil(o.CustomerName) { + toSerialize["customer_name"] = o.CustomerName + } + return toSerialize, nil +} + + + diff --git a/model_create_link_request.go b/model_create_link_request.go index 3a037e5..fe904b3 100644 --- a/model_create_link_request.go +++ b/model_create_link_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -40,7 +40,7 @@ type CreateLinkRequest struct { LinkAutoReminders *bool `json:"link_auto_reminders,omitempty"` // Key-value pair that can be used to store additional information about the entity. Maximum 5 key-value pairs LinkNotes *map[string]string `json:"link_notes,omitempty"` - LinkMeta *LinkMetaEntity `json:"link_meta,omitempty"` + LinkMeta *LinkMetaResponseEntity `json:"link_meta,omitempty"` } diff --git a/model_create_offer_request.go b/model_create_offer_request.go index 29d9ece..9cbee2d 100644 --- a/model_create_offer_request.go +++ b/model_create_offer_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_create_order_request.go b/model_create_order_request.go index bbc3c5b..8625fcc 100644 --- a/model_create_order_request.go +++ b/model_create_order_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_create_terminal_request.go b/model_create_terminal_request.go index 81f3d06..a2d42da 100644 --- a/model_create_terminal_request.go +++ b/model_create_terminal_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_create_terminal_request_terminal_meta.go b/model_create_terminal_request_terminal_meta.go index 9c4393b..cd9686e 100644 --- a/model_create_terminal_request_terminal_meta.go +++ b/model_create_terminal_request_terminal_meta.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_create_terminal_transaction_request.go b/model_create_terminal_transaction_request.go index 20250f1..5dab793 100644 --- a/model_create_terminal_transaction_request.go +++ b/model_create_terminal_transaction_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_cryptogram_entity.go b/model_cryptogram_entity.go index 66cde95..595d9b6 100644 --- a/model_cryptogram_entity.go +++ b/model_cryptogram_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_customer_details.go b/model_customer_details.go index e98ae58..9ff6b63 100644 --- a/model_customer_details.go +++ b/model_customer_details.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -34,6 +34,8 @@ type CustomerDetails struct { CustomerBankIfsc *string `json:"customer_bank_ifsc,omitempty"` // Customer bank code. Required for net banking payments, if you want to do a bank account check (TPV) CustomerBankCode *float32 `json:"customer_bank_code,omitempty"` + // Customer identifier at Cashfree. You will get this when you create/get customer + CustomerUid *string `json:"customer_uid,omitempty"` } @@ -64,6 +66,9 @@ func (o CustomerDetails) ToMap() (map[string]interface{}, error) { if !IsNil(o.CustomerBankCode) { toSerialize["customer_bank_code"] = o.CustomerBankCode } + if !IsNil(o.CustomerUid) { + toSerialize["customer_uid"] = o.CustomerUid + } return toSerialize, nil } diff --git a/model_customer_details_cardless_emi.go b/model_customer_details_cardless_emi.go index 433e668..5057112 100644 --- a/model_customer_details_cardless_emi.go +++ b/model_customer_details_cardless_emi.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_customer_entity.go b/model_customer_entity.go new file mode 100644 index 0000000..cda2874 --- /dev/null +++ b/model_customer_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" +) + +// checks if the CustomerEntity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomerEntity{} + +// CustomerEntity The complete customer entity +type CustomerEntity struct { + // unique id generated by cashfree for your customer + CustomerUid *string `json:"customer_uid,omitempty"` + // Customer Phone Number + CustomerPhone *string `json:"customer_phone,omitempty"` + // Customer Email + CustomerEmail *string `json:"customer_email,omitempty"` + // Customer Name + CustomerName *string `json:"customer_name,omitempty"` +} + + +func (o CustomerEntity) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomerEntity) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CustomerUid) { + toSerialize["customer_uid"] = o.CustomerUid + } + if !IsNil(o.CustomerPhone) { + toSerialize["customer_phone"] = o.CustomerPhone + } + if !IsNil(o.CustomerEmail) { + toSerialize["customer_email"] = o.CustomerEmail + } + if !IsNil(o.CustomerName) { + toSerialize["customer_name"] = o.CustomerName + } + return toSerialize, nil +} + + + diff --git a/model_discount_details.go b/model_discount_details.go index 2ccdfde..ee28f26 100644 --- a/model_discount_details.go +++ b/model_discount_details.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_eligibility_cardless_emi_entity.go b/model_eligibility_cardless_emi_entity.go index 85f7e22..2ae588c 100644 --- a/model_eligibility_cardless_emi_entity.go +++ b/model_eligibility_cardless_emi_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_eligibility_fetch_cardless_emi_request.go b/model_eligibility_fetch_cardless_emi_request.go index b2c2c3f..d7e1ae4 100644 --- a/model_eligibility_fetch_cardless_emi_request.go +++ b/model_eligibility_fetch_cardless_emi_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_eligibility_fetch_offers_request.go b/model_eligibility_fetch_offers_request.go index 2f4ca87..7caca55 100644 --- a/model_eligibility_fetch_offers_request.go +++ b/model_eligibility_fetch_offers_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_eligibility_fetch_paylater_request.go b/model_eligibility_fetch_paylater_request.go index 45ff14a..8d37bb2 100644 --- a/model_eligibility_fetch_paylater_request.go +++ b/model_eligibility_fetch_paylater_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_eligibility_fetch_payment_methods_request.go b/model_eligibility_fetch_payment_methods_request.go index d5f7cd1..0802844 100644 --- a/model_eligibility_fetch_payment_methods_request.go +++ b/model_eligibility_fetch_payment_methods_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_eligibility_offer_entity.go b/model_eligibility_offer_entity.go index 25f4fc9..9730576 100644 --- a/model_eligibility_offer_entity.go +++ b/model_eligibility_offer_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_eligibility_paylater_entity.go b/model_eligibility_paylater_entity.go index 1af1142..3bfa687 100644 --- a/model_eligibility_paylater_entity.go +++ b/model_eligibility_paylater_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_eligibility_payment_methods_entity.go b/model_eligibility_payment_methods_entity.go index 29d693f..8f1965d 100644 --- a/model_eligibility_payment_methods_entity.go +++ b/model_eligibility_payment_methods_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_eligibility_payment_methods_entity_entity_details.go b/model_eligibility_payment_methods_entity_entity_details.go index be7d660..6d95c9b 100644 --- a/model_eligibility_payment_methods_entity_entity_details.go +++ b/model_eligibility_payment_methods_entity_entity_details.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_emi_offer.go b/model_emi_offer.go index e4b7340..6c0c8ab 100644 --- a/model_emi_offer.go +++ b/model_emi_offer.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_emi_plans_array.go b/model_emi_plans_array.go index 113e98e..87698be 100644 --- a/model_emi_plans_array.go +++ b/model_emi_plans_array.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_error_details_in_payments_entity.go b/model_error_details_in_payments_entity.go index abeb63d..fd7ed8b 100644 --- a/model_error_details_in_payments_entity.go +++ b/model_error_details_in_payments_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_fetch_recon_request.go b/model_fetch_recon_request.go index 620c288..6e90011 100644 --- a/model_fetch_recon_request.go +++ b/model_fetch_recon_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_fetch_recon_request_filters.go b/model_fetch_recon_request_filters.go index af86e61..93941c7 100644 --- a/model_fetch_recon_request_filters.go +++ b/model_fetch_recon_request_filters.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_fetch_recon_request_pagination.go b/model_fetch_recon_request_pagination.go index 33d8fed..8f2cfd8 100644 --- a/model_fetch_recon_request_pagination.go +++ b/model_fetch_recon_request_pagination.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_fetch_settlements_request.go b/model_fetch_settlements_request.go index c099d6d..362ddbc 100644 --- a/model_fetch_settlements_request.go +++ b/model_fetch_settlements_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_fetch_settlements_request_filters.go b/model_fetch_settlements_request_filters.go index b9e0c5d..5fd6b70 100644 --- a/model_fetch_settlements_request_filters.go +++ b/model_fetch_settlements_request_filters.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -21,7 +21,7 @@ var _ MappedNullable = &FetchSettlementsRequestFilters{} // FetchSettlementsRequestFilters Specify either the Settlement ID, Settlement UTR, or start date and end date to fetch the settlement details. type FetchSettlementsRequestFilters struct { // List of settlement IDs for which you want the settlement reconciliation details. - CfSettlementIds []int64 `json:"cf_settlement_ids,omitempty"` + CfSettlementIds []string `json:"cf_settlement_ids,omitempty"` // List of settlement UTRs for which you want the settlement reconciliation details. SettlementUtrs []string `json:"settlement_utrs,omitempty"` // Specify the start date from when you want the settlement reconciliation details. diff --git a/model_fetch_settlements_request_pagination.go b/model_fetch_settlements_request_pagination.go index 70e145c..91eb0c9 100644 --- a/model_fetch_settlements_request_pagination.go +++ b/model_fetch_settlements_request_pagination.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_fetch_terminal_qr_codes_entity.go b/model_fetch_terminal_qr_codes_entity.go index 9eec7d4..9cfc766 100644 --- a/model_fetch_terminal_qr_codes_entity.go +++ b/model_fetch_terminal_qr_codes_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_idempotency_error.go b/model_idempotency_error.go index 6d5125e..037c096 100644 --- a/model_idempotency_error.go +++ b/model_idempotency_error.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_instrument_entity.go b/model_instrument_entity.go index 086139a..c4e5560 100644 --- a/model_instrument_entity.go +++ b/model_instrument_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_link_customer_details_entity.go b/model_link_customer_details_entity.go index 8185333..a9255f2 100644 --- a/model_link_customer_details_entity.go +++ b/model_link_customer_details_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_link_entity.go b/model_link_entity.go index 2297873..fbee481 100644 --- a/model_link_entity.go +++ b/model_link_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -20,7 +20,7 @@ var _ MappedNullable = &LinkEntity{} // LinkEntity Payment link success creation response object type LinkEntity struct { - CfLinkId *int64 `json:"cf_link_id,omitempty"` + CfLinkId *string `json:"cf_link_id,omitempty"` LinkId *string `json:"link_id,omitempty"` LinkStatus *string `json:"link_status,omitempty"` LinkCurrency *string `json:"link_currency,omitempty"` @@ -31,8 +31,7 @@ type LinkEntity struct { LinkPurpose *string `json:"link_purpose,omitempty"` LinkCreatedAt *string `json:"link_created_at,omitempty"` CustomerDetails *LinkCustomerDetailsEntity `json:"customer_details,omitempty"` - // Payment link meta information object. - LinkMeta *map[string]string `json:"link_meta,omitempty"` + LinkMeta *LinkMetaResponseEntity `json:"link_meta,omitempty"` LinkUrl *string `json:"link_url,omitempty"` LinkExpiryTime *string `json:"link_expiry_time,omitempty"` // Key-value pair that can be used to store additional information about the entity. Maximum 5 key-value pairs diff --git a/model_link_meta_response_entity.go b/model_link_meta_response_entity.go new file mode 100644 index 0000000..5b8e8f0 --- /dev/null +++ b/model_link_meta_response_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" +) + +// checks if the LinkMetaResponseEntity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LinkMetaResponseEntity{} + +// LinkMetaResponseEntity Payment link meta information object +type LinkMetaResponseEntity struct { + // Notification URL for server-server communication. It should be an https URL. + NotifyUrl *string `json:"notify_url,omitempty"` + // If \"true\", link will directly open UPI Intent flow on mobile, and normal link flow elsewhere + UpiIntent *bool `json:"upi_intent,omitempty"` + // The URL to which user will be redirected to after the payment is done on the link. Maximum length: 250. + ReturnUrl *string `json:"return_url,omitempty"` + // Allowed payment modes for this link. Pass comma-separated values among following options - \"cc\", \"dc\", \"ccc\", \"ppc\", \"nb\", \"upi\", \"paypal\", \"app\". Leave it blank to show all available payment methods + PaymentMethods *string `json:"payment_methods,omitempty"` +} + + +func (o LinkMetaResponseEntity) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LinkMetaResponseEntity) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NotifyUrl) { + toSerialize["notify_url"] = o.NotifyUrl + } + if !IsNil(o.UpiIntent) { + toSerialize["upi_intent"] = o.UpiIntent + } + if !IsNil(o.ReturnUrl) { + toSerialize["return_url"] = o.ReturnUrl + } + if !IsNil(o.PaymentMethods) { + toSerialize["payment_methods"] = o.PaymentMethods + } + return toSerialize, nil +} + + + diff --git a/model_link_notify_entity.go b/model_link_notify_entity.go index c160367..1c82575 100644 --- a/model_link_notify_entity.go +++ b/model_link_notify_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_net_banking_payment_method.go b/model_net_banking_payment_method.go index dad317e..12ebae3 100644 --- a/model_net_banking_payment_method.go +++ b/model_net_banking_payment_method.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_netbanking.go b/model_netbanking.go index fb13a0f..bbdf430 100644 --- a/model_netbanking.go +++ b/model_netbanking.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_all.go b/model_offer_all.go index d6a7d7b..76ace4b 100644 --- a/model_offer_all.go +++ b/model_offer_all.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_card.go b/model_offer_card.go index 3e66594..e340802 100644 --- a/model_offer_card.go +++ b/model_offer_card.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_details.go b/model_offer_details.go index facdd05..54b6e83 100644 --- a/model_offer_details.go +++ b/model_offer_details.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_emi.go b/model_offer_emi.go index 37af8f1..a298433 100644 --- a/model_offer_emi.go +++ b/model_offer_emi.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_entity.go b/model_offer_entity.go index 9c2a036..9e42976 100644 --- a/model_offer_entity.go +++ b/model_offer_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_filters.go b/model_offer_filters.go index fe57a71..5c3a647 100644 --- a/model_offer_filters.go +++ b/model_offer_filters.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_meta.go b/model_offer_meta.go index 99f4054..d84b847 100644 --- a/model_offer_meta.go +++ b/model_offer_meta.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_nb.go b/model_offer_nb.go index 58423e3..df05d54 100644 --- a/model_offer_nb.go +++ b/model_offer_nb.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_nb_netbanking.go b/model_offer_nb_netbanking.go index dc4b5e0..8faf62b 100644 --- a/model_offer_nb_netbanking.go +++ b/model_offer_nb_netbanking.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_paylater.go b/model_offer_paylater.go index 85babbf..ecccd3a 100644 --- a/model_offer_paylater.go +++ b/model_offer_paylater.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_queries.go b/model_offer_queries.go index 7ac01ba..3c4052b 100644 --- a/model_offer_queries.go +++ b/model_offer_queries.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_tnc.go b/model_offer_tnc.go index c1342b1..c6bbe26 100644 --- a/model_offer_tnc.go +++ b/model_offer_tnc.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_type.go b/model_offer_type.go index 661ddf7..3149ca0 100644 --- a/model_offer_type.go +++ b/model_offer_type.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_upi.go b/model_offer_upi.go index 62d0532..3bf295e 100644 --- a/model_offer_upi.go +++ b/model_offer_upi.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_validations.go b/model_offer_validations.go index d23f592..7adb9d5 100644 --- a/model_offer_validations.go +++ b/model_offer_validations.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_validations_payment_method.go b/model_offer_validations_payment_method.go index 2a17989..024d14e 100644 --- a/model_offer_validations_payment_method.go +++ b/model_offer_validations_payment_method.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_offer_wallet.go b/model_offer_wallet.go index ff64c9d..2669169 100644 --- a/model_offer_wallet.go +++ b/model_offer_wallet.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_order_authenticate_entity.go b/model_order_authenticate_entity.go index 32c1684..433ef76 100644 --- a/model_order_authenticate_entity.go +++ b/model_order_authenticate_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -21,7 +21,7 @@ var _ MappedNullable = &OrderAuthenticateEntity{} // OrderAuthenticateEntity This is the response shared when merchant inovkes the OTP submit or resend API type OrderAuthenticateEntity struct { // The payment id for which this request was sent - CfPaymentId *float32 `json:"cf_payment_id,omitempty"` + CfPaymentId *string `json:"cf_payment_id,omitempty"` // The action that was invoked for this request. Action *string `json:"action,omitempty"` // Status of the is action. Will be either failed or successful. If the action is successful, you should still call the authorization status to verify the final payment status. diff --git a/model_order_authenticate_payment_request.go b/model_order_authenticate_payment_request.go index ffb6729..77dd212 100644 --- a/model_order_authenticate_payment_request.go +++ b/model_order_authenticate_payment_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_order_create_refund_request.go b/model_order_create_refund_request.go index 0aa815b..12d8c73 100644 --- a/model_order_create_refund_request.go +++ b/model_order_create_refund_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_order_entity.go b/model_order_entity.go index a6dd32b..8c4a5ea 100644 --- a/model_order_entity.go +++ b/model_order_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -22,7 +22,7 @@ var _ MappedNullable = &OrderEntity{} // OrderEntity The complete order entity type OrderEntity struct { // unique id generated by cashfree for your order - CfOrderId *int64 `json:"cf_order_id,omitempty"` + CfOrderId *string `json:"cf_order_id,omitempty"` // order_id sent during the api request OrderId *string `json:"order_id,omitempty"` // Type of the entity. @@ -30,7 +30,7 @@ type OrderEntity struct { // Currency of the order. Example INR OrderCurrency *string `json:"order_currency,omitempty"` OrderAmount *float32 `json:"order_amount,omitempty"` - // Possible values are - `ACTIVE`: Order does not have a sucessful transaction yet - `PAID`: Order is PAID with one successful transaction - `EXPIRED`: Order was not PAID and not it has expired. No transaction can be initiated for an EXPIRED order. + // Possible values are - `ACTIVE`: Order does not have a sucessful transaction yet - `PAID`: Order is PAID with one successful transaction - `EXPIRED`: Order was not PAID and not it has expired. No transaction can be initiated for an EXPIRED order. `TERMINATED`: Order terminated `TERMINATION_REQUESTED`: Order termination requested OrderStatus *string `json:"order_status,omitempty"` PaymentSessionId *string `json:"payment_session_id,omitempty"` OrderExpiryTime *time.Time `json:"order_expiry_time,omitempty"` @@ -41,9 +41,6 @@ type OrderEntity struct { OrderSplits []VendorSplit `json:"order_splits,omitempty"` CustomerDetails *CustomerDetails `json:"customer_details,omitempty"` OrderMeta *OrderMeta `json:"order_meta,omitempty"` - Payments *PaymentURLObject `json:"payments,omitempty"` - Settlements *SettlementURLObject `json:"settlements,omitempty"` - Refunds *RefundURLObject `json:"refunds,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"` } @@ -98,15 +95,6 @@ func (o OrderEntity) ToMap() (map[string]interface{}, error) { if !IsNil(o.OrderMeta) { toSerialize["order_meta"] = o.OrderMeta } - if !IsNil(o.Payments) { - toSerialize["payments"] = o.Payments - } - if !IsNil(o.Settlements) { - toSerialize["settlements"] = o.Settlements - } - if !IsNil(o.Refunds) { - toSerialize["refunds"] = o.Refunds - } if !IsNil(o.OrderTags) { toSerialize["order_tags"] = o.OrderTags } diff --git a/model_order_meta.go b/model_order_meta.go index 47e7594..93da2ad 100644 --- a/model_order_meta.go +++ b/model_order_meta.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -20,7 +20,7 @@ var _ MappedNullable = &OrderMeta{} // OrderMeta Optional meta details to control how the customer pays and how payment journey completes type OrderMeta struct { - // The URL to which user will be redirected to after the payment on bank OTP page. Maximum length: 250. The return_url must contain placeholder {order_id}. When redirecting the customer back to the return url from the bank’s OTP page, Cashfree will replace this placeholder with the actual value for that order. + // The URL to which user will be redirected to after the payment on bank OTP page. Maximum length: 250. We suggest to keep context of order_id in your return_url so that you can identify the order when customer lands on your page. Example of return_url format could be https://example.com/return?order_id=myOrderId ReturnUrl *string `json:"return_url,omitempty"` // Notification URL for server-server communication. Useful when user's connection drops while re-directing. NotifyUrl should be an https URL. Maximum length: 250. NotifyUrl *string `json:"notify_url,omitempty"` diff --git a/model_order_pay_data.go b/model_order_pay_data.go index 6701355..939e8fe 100644 --- a/model_order_pay_data.go +++ b/model_order_pay_data.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_pay_order_entity.go b/model_pay_order_entity.go index f4de110..0e8e74d 100644 --- a/model_pay_order_entity.go +++ b/model_pay_order_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -23,7 +23,7 @@ type PayOrderEntity struct { // total amount payable PaymentAmount *float32 `json:"payment_amount,omitempty"` // Payment identifier created by Cashfree - CfPaymentId *int64 `json:"cf_payment_id,omitempty"` + CfPaymentId *string `json:"cf_payment_id,omitempty"` // One of [\"upi\", \"netbanking\", \"card\", \"app\", \"cardless_emi\", \"paylater\", \"banktransfer\"] PaymentMethod *string `json:"payment_method,omitempty"` // One of [\"link\", \"collect\", \"qrcode\"]. In an older version we used to support different channels like 'gpay', 'phonepe' etc. However, we now support only the following channels - link, collect and qrcode. To process payments using gpay, you will have to provide channel as 'link' and provider as 'gpay' diff --git a/model_pay_order_request.go b/model_pay_order_request.go index 4552fde..624b668 100644 --- a/model_pay_order_request.go +++ b/model_pay_order_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_pay_order_request_payment_method.go b/model_pay_order_request_payment_method.go index 846d5d5..e363579 100644 --- a/model_pay_order_request_payment_method.go +++ b/model_pay_order_request_payment_method.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_paylater.go b/model_paylater.go index 40779ce..68630ec 100644 --- a/model_paylater.go +++ b/model_paylater.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_paylater_entity.go b/model_paylater_entity.go index b987dae..779c715 100644 --- a/model_paylater_entity.go +++ b/model_paylater_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_paylater_offer.go b/model_paylater_offer.go index 07d2073..17185e9 100644 --- a/model_paylater_offer.go +++ b/model_paylater_offer.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_paylater_payment_method.go b/model_paylater_payment_method.go index 585b1f5..a9d110b 100644 --- a/model_paylater_payment_method.go +++ b/model_paylater_payment_method.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_payment_entity.go b/model_payment_entity.go index 9b91b9f..522be0d 100644 --- a/model_payment_entity.go +++ b/model_payment_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -20,7 +20,7 @@ var _ MappedNullable = &PaymentEntity{} // PaymentEntity payment entity full object type PaymentEntity struct { - CfPaymentId *int64 `json:"cf_payment_id,omitempty"` + CfPaymentId *string `json:"cf_payment_id,omitempty"` OrderId *string `json:"order_id,omitempty"` Entity *string `json:"entity,omitempty"` ErrorDetails *ErrorDetailsInPaymentsEntity `json:"error_details,omitempty"` diff --git a/model_payment_method_app_in_payments_entity.go b/model_payment_method_app_in_payments_entity.go index 25abb11..33ab9fe 100644 --- a/model_payment_method_app_in_payments_entity.go +++ b/model_payment_method_app_in_payments_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_payment_method_card_in_payments_entity.go b/model_payment_method_card_in_payments_entity.go index 5c89808..c68afb9 100644 --- a/model_payment_method_card_in_payments_entity.go +++ b/model_payment_method_card_in_payments_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_payment_method_cardless_emiin_payments_entity.go b/model_payment_method_cardless_emiin_payments_entity.go index 1a6c26e..ed41b05 100644 --- a/model_payment_method_cardless_emiin_payments_entity.go +++ b/model_payment_method_cardless_emiin_payments_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_payment_method_in_payments_entity.go b/model_payment_method_in_payments_entity.go index da1da57..a63fac6 100644 --- a/model_payment_method_in_payments_entity.go +++ b/model_payment_method_in_payments_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_payment_method_in_payments_entity_payment_method.go b/model_payment_method_in_payments_entity_payment_method.go index 691d81c..cbe0388 100644 --- a/model_payment_method_in_payments_entity_payment_method.go +++ b/model_payment_method_in_payments_entity_payment_method.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_payment_method_net_banking_in_payments_entity.go b/model_payment_method_net_banking_in_payments_entity.go index 027949e..50349be 100644 --- a/model_payment_method_net_banking_in_payments_entity.go +++ b/model_payment_method_net_banking_in_payments_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_payment_method_paylater_in_payments_entity.go b/model_payment_method_paylater_in_payments_entity.go index 4f3267a..f6325eb 100644 --- a/model_payment_method_paylater_in_payments_entity.go +++ b/model_payment_method_paylater_in_payments_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_payment_method_upiin_payments_entity.go b/model_payment_method_upiin_payments_entity.go index f099b9d..2bdb562 100644 --- a/model_payment_method_upiin_payments_entity.go +++ b/model_payment_method_upiin_payments_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_payment_methods_filters.go b/model_payment_methods_filters.go index b6812dc..e9fd137 100644 --- a/model_payment_methods_filters.go +++ b/model_payment_methods_filters.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -18,7 +18,7 @@ import ( // checks if the PaymentMethodsFilters type satisfies the MappedNullable interface at compile time var _ MappedNullable = &PaymentMethodsFilters{} -// PaymentMethodsFilters Filter for specific Payment Methods +// PaymentMethodsFilters Filter for Payment Methods type PaymentMethodsFilters struct { // Array of payment methods to be filtered. This is optional, by default all payment methods will be returned. Possible values in [ 'debit_card', 'credit_card', 'prepaid_card', 'corporate_credit_card', 'upi', 'wallet', 'netbanking', 'banktransfer', 'paylater', 'paypal', 'debit_card_emi', 'credit_card_emi', 'upi_credit_card', 'upi_ppi', 'cardless_emi', 'account_based_payment' ] PaymentMethods []string `json:"payment_methods,omitempty"` diff --git a/model_payment_methods_queries.go b/model_payment_methods_queries.go index ce8c0b6..b4d93a5 100644 --- a/model_payment_methods_queries.go +++ b/model_payment_methods_queries.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_payment_mode_details.go b/model_payment_mode_details.go index 3644b37..8115313 100644 --- a/model_payment_mode_details.go +++ b/model_payment_mode_details.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_payment_success_webhook.go b/model_payment_success_webhook.go index 0db7ecf..e1553c0 100644 --- a/model_payment_success_webhook.go +++ b/model_payment_success_webhook.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_rate_limit_error.go b/model_rate_limit_error.go index 3a95b10..e86d4f9 100644 --- a/model_rate_limit_error.go +++ b/model_rate_limit_error.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_recon_entity.go b/model_recon_entity.go index f11fde7..a0c57ab 100644 --- a/model_recon_entity.go +++ b/model_recon_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_recon_entity_data_inner.go b/model_recon_entity_data_inner.go index e868d60..bb75d0a 100644 --- a/model_recon_entity_data_inner.go +++ b/model_recon_entity_data_inner.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -59,9 +59,9 @@ type ReconEntityDataInner struct { // Service tax applicable on the payment. PaymentServiceTax *float32 `json:"payment_service_tax,omitempty"` // Cashfree Payments unique ID to identify a payment. - CfPaymentId *int64 `json:"cf_payment_id,omitempty"` + CfPaymentId *string `json:"cf_payment_id,omitempty"` // Unique ID to identify the settlement. - CfSettlementId *int32 `json:"cf_settlement_id,omitempty"` + CfSettlementId *string `json:"cf_settlement_id,omitempty"` // Date and time when the settlement was processed. SettlementDate *string `json:"settlement_date,omitempty"` // Unique transaction reference number of the settlement. diff --git a/model_refund_entity.go b/model_refund_entity.go index ba737cc..bd586c8 100644 --- a/model_refund_entity.go +++ b/model_refund_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -21,7 +21,7 @@ var _ MappedNullable = &RefundEntity{} // RefundEntity The refund entity type RefundEntity struct { // Cashfree Payments ID of the payment for which refund is initiated - CfPaymentId *int64 `json:"cf_payment_id,omitempty"` + CfPaymentId *string `json:"cf_payment_id,omitempty"` // Cashfree Payments ID for a refund CfRefundId *string `json:"cf_refund_id,omitempty"` // Merchant’s order Id of the order for which refund is initiated diff --git a/model_refund_speed.go b/model_refund_speed.go index 9d21e0a..e575ff5 100644 --- a/model_refund_speed.go +++ b/model_refund_speed.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_saved_instrument_meta.go b/model_saved_instrument_meta.go index fd90c6e..ced2930 100644 --- a/model_saved_instrument_meta.go +++ b/model_saved_instrument_meta.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_settlement_entity.go b/model_settlement_entity.go index e957a37..e391f79 100644 --- a/model_settlement_entity.go +++ b/model_settlement_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -20,8 +20,8 @@ var _ MappedNullable = &SettlementEntity{} // SettlementEntity Settlement entity object type SettlementEntity struct { - CfPaymentId *int64 `json:"cf_payment_id,omitempty"` - CfSettlementId *int64 `json:"cf_settlement_id,omitempty"` + CfPaymentId *string `json:"cf_payment_id,omitempty"` + CfSettlementId *string `json:"cf_settlement_id,omitempty"` SettlementCurrency *string `json:"settlement_currency,omitempty"` OrderId *string `json:"order_id,omitempty"` Entity *string `json:"entity,omitempty"` diff --git a/model_settlement_fetch_recon_request.go b/model_settlement_fetch_recon_request.go index 7cc4c99..2aae19c 100644 --- a/model_settlement_fetch_recon_request.go +++ b/model_settlement_fetch_recon_request.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -21,7 +21,7 @@ var _ MappedNullable = &SettlementFetchReconRequest{} // SettlementFetchReconRequest Recon Request Object type SettlementFetchReconRequest struct { Pagination FetchSettlementsRequestPagination `json:"pagination"` - Filters SettlementFetchReconRequestFilters `json:"filters"` + Filters FetchSettlementsRequestFilters `json:"filters"` } diff --git a/model_settlement_recon_entity.go b/model_settlement_recon_entity.go index 5883e30..47d9ebe 100644 --- a/model_settlement_recon_entity.go +++ b/model_settlement_recon_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_settlement_recon_entity_data_inner.go b/model_settlement_recon_entity_data_inner.go index 7461f57..692269b 100644 --- a/model_settlement_recon_entity_data_inner.go +++ b/model_settlement_recon_entity_data_inner.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -59,9 +59,9 @@ type SettlementReconEntityDataInner struct { // Service tax applicable on the payment. PaymentServiceTax *float32 `json:"payment_service_tax,omitempty"` // Cashfree Payments unique ID to identify a payment. - CfPaymentId *int64 `json:"cf_payment_id,omitempty"` + CfPaymentId *string `json:"cf_payment_id,omitempty"` // Unique ID to identify the settlement. - CfSettlementId *int32 `json:"cf_settlement_id,omitempty"` + CfSettlementId *string `json:"cf_settlement_id,omitempty"` // Date and time when the settlement was processed. SettlementDate *string `json:"settlement_date,omitempty"` // Unique transaction reference number of the settlement. diff --git a/model_terminal_details.go b/model_terminal_details.go index 3aa927b..28b65e0 100644 --- a/model_terminal_details.go +++ b/model_terminal_details.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -23,7 +23,7 @@ type TerminalDetails struct { // date time at which terminal is added AddedOn *string `json:"added_on,omitempty"` // cashfree terminal id - CfTerminalId *int32 `json:"cf_terminal_id,omitempty"` + CfTerminalId *string `json:"cf_terminal_id,omitempty"` // last instant when this terminal was updated LastUpdatedOn *string `json:"last_updated_on,omitempty"` // location of terminal diff --git a/model_terminal_entity.go b/model_terminal_entity.go index 2c8bcac..4d9ca4e 100644 --- a/model_terminal_entity.go +++ b/model_terminal_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_terminal_transaction_entity.go b/model_terminal_transaction_entity.go index bb41bf1..ca7f2d0 100644 --- a/model_terminal_transaction_entity.go +++ b/model_terminal_transaction_entity.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ @@ -20,7 +20,7 @@ var _ MappedNullable = &TerminalTransactionEntity{} // TerminalTransactionEntity Create terminal response object type TerminalTransactionEntity struct { - CfPaymentId *int64 `json:"cf_payment_id,omitempty"` + CfPaymentId *int32 `json:"cf_payment_id,omitempty"` PaymentAmount *int32 `json:"payment_amount,omitempty"` PaymentMethod *string `json:"payment_method,omitempty"` PaymentUrl *string `json:"payment_url,omitempty"` diff --git a/model_terminate_order_request.go b/model_terminate_order_request.go new file mode 100644 index 0000000..4cacc26 --- /dev/null +++ b/model_terminate_order_request.go @@ -0,0 +1,43 @@ +/* +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" +) + +// checks if the TerminateOrderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TerminateOrderRequest{} + +// TerminateOrderRequest Request to terminate an active order at Cashfree +type TerminateOrderRequest struct { + // To terminate an order, pass order_status as \"TERMINATE\". Please note, order might not be terminated - confirm with the order_status in response. \"TERMINATION_REQUESTED\" states that the request is recieved and we are working on it. If the order terminates successfully, status will change to \"TERMINATED\". Incase there's any active transaction which moved to success - order might not get terminated. + OrderStatus string `json:"order_status"` +} + + +func (o TerminateOrderRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TerminateOrderRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["order_status"] = o.OrderStatus + return toSerialize, nil +} + + + diff --git a/model_upi.go b/model_upi.go index a05cdc8..69749af 100644 --- a/model_upi.go +++ b/model_upi.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_upi_authorize_details.go b/model_upi_authorize_details.go index 83a7af2..931423a 100644 --- a/model_upi_authorize_details.go +++ b/model_upi_authorize_details.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_upi_payment_method.go b/model_upi_payment_method.go index 0bd7394..f6aa765 100644 --- a/model_upi_payment_method.go +++ b/model_upi_payment_method.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_vendor_split.go b/model_vendor_split.go index 1be45b0..574703c 100644 --- a/model_vendor_split.go +++ b/model_vendor_split.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_w_hcustomer_details.go b/model_w_hcustomer_details.go index 28aa0df..15e0a64 100644 --- a/model_w_hcustomer_details.go +++ b/model_w_hcustomer_details.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_w_hdata.go b/model_w_hdata.go index 140f111..bab7030 100644 --- a/model_w_hdata.go +++ b/model_w_hdata.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_w_horder.go b/model_w_horder.go index dee3469..f33fd00 100644 --- a/model_w_horder.go +++ b/model_w_horder.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/model_wallet_offer.go b/model_wallet_offer.go index 4b9f74b..609d88d 100644 --- a/model_wallet_offer.go +++ b/model_wallet_offer.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/offers_test.go b/offers_test.go index d3a56cf..abc6f0e 100644 --- a/offers_test.go +++ b/offers_test.go @@ -19,7 +19,7 @@ func Test_cashfree_pg_offers(t *testing.T) { cashfree.XClientId = &clientId cashfree.XClientSecret = &XClientSecret cashfree.XEnvironment = cashfree.SANDBOX - XApiVersion := "2022-09-01" + XApiVersion := "2023-08-01" offerId := "682beb8e-6a82-4c29-8f37-c2624b1febc9" ctx := context.Background() diff --git a/orders_test.go b/orders_test.go index e9a9980..01e2bba 100644 --- a/orders_test.go +++ b/orders_test.go @@ -18,7 +18,7 @@ func Test_cashfree_pg_orders(t *testing.T) { cashfree.XClientId = &clientId cashfree.XClientSecret = &XClientSecret cashfree.XEnvironment = cashfree.SANDBOX - XApiVersion := "2022-09-01" + XApiVersion := "2023-08-01" ctx := context.Background() t.Run("PGCreateOrder should give status 200", func(t *testing.T) { diff --git a/payments_test.go b/payments_test.go index e6ab3cb..e8cf40d 100644 --- a/payments_test.go +++ b/payments_test.go @@ -21,7 +21,7 @@ func Test_cashfree_pg_payments(t *testing.T) { cashfree.XEnvironment = cashfree.SANDBOX orderId := "order_342Z7ns5LWu4x4xIFvQqmF7x52Jc6" paymentId := "14909870498" - XApiVersion := "2022-09-01" + XApiVersion := "2023-08-01" ctx := context.Background() t.Run("PGOrderFetchPayments should give status code 200", func(t *testing.T) { diff --git a/refund_test.go b/refund_test.go index 7e12052..e6f7a72 100644 --- a/refund_test.go +++ b/refund_test.go @@ -20,7 +20,7 @@ func Test_cashfree_pg_refunds(t *testing.T) { cashfree.XClientId = &clientId cashfree.XClientSecret = &XClientSecret cashfree.XEnvironment = cashfree.SANDBOX - XApiVersion := "2022-09-01" + XApiVersion := "2023-08-01" ctx := context.Background() orderId := "order_342Z7qpz85EsLl3nj0DxSchfzzx19" refundId := "gosdktestrefund" diff --git a/response.go b/response.go index 3765465..66778d9 100644 --- a/response.go +++ b/response.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */ diff --git a/settlement_test.go b/settlement_test.go index 720dacb..0741569 100644 --- a/settlement_test.go +++ b/settlement_test.go @@ -21,7 +21,7 @@ func Test_cashfree_pg_settlement(t *testing.T) { cashfree.XEnvironment = cashfree.SANDBOX orderId := "order_342Z7ns5LWu4x4xIFvQqmF7x52Jc6" // amount := float32(1000.0) - XApiVersion := "2022-09-01" + XApiVersion := "2023-08-01" ctx := context.Background() t.Run("PGOrderFetchSettlement should give status code 404", func(t *testing.T) { diff --git a/utils.go b/utils.go index a955f1e..d23d36c 100644 --- a/utils.go +++ b/utils.go @@ -3,7 +3,7 @@ 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: 2022-09-01 +API version: 2023-08-01 Contact: developers@cashfree.com */