payjpv2 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.github/workflows/ci.yml +33 -0
- data/.github/workflows/release.yml +46 -0
- data/.gitignore +39 -0
- data/.rspec +2 -0
- data/.rubocop.yml +111 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +94 -0
- data/README.md +399 -0
- data/Rakefile +10 -0
- data/docs/ApplePayConfigRequest.md +18 -0
- data/docs/BalanceListResponse.md +24 -0
- data/docs/BalanceResponse.md +40 -0
- data/docs/BalanceState.md +15 -0
- data/docs/BalanceURLResponse.md +22 -0
- data/docs/BalancesApi.md +235 -0
- data/docs/BankInfoResponse.md +28 -0
- data/docs/CaptureMethod.md +15 -0
- data/docs/CardConfigRequest.md +18 -0
- data/docs/CheckoutSessionCreateRequest.md +52 -0
- data/docs/CheckoutSessionCustomerDetailsAddressResponse.md +28 -0
- data/docs/CheckoutSessionCustomerDetailsResponse.md +24 -0
- data/docs/CheckoutSessionDetailsResponse.md +66 -0
- data/docs/CheckoutSessionLineItemDataResponse.md +34 -0
- data/docs/CheckoutSessionLineItemListResponse.md +24 -0
- data/docs/CheckoutSessionListResponse.md +24 -0
- data/docs/CheckoutSessionMode.md +15 -0
- data/docs/CheckoutSessionPaymentMethodOptionsCardRequest.md +20 -0
- data/docs/CheckoutSessionPaymentMethodOptionsRequest.md +18 -0
- data/docs/CheckoutSessionStatus.md +15 -0
- data/docs/CheckoutSessionSubmitType.md +15 -0
- data/docs/CheckoutSessionUIMode.md +15 -0
- data/docs/CheckoutSessionUpdateRequest.md +18 -0
- data/docs/CheckoutSessionsApi.md +373 -0
- data/docs/Country.md +15 -0
- data/docs/Currency.md +15 -0
- data/docs/CustomerCreateRequest.md +26 -0
- data/docs/CustomerCreation.md +15 -0
- data/docs/CustomerListResponse.md +24 -0
- data/docs/CustomerResponse.md +34 -0
- data/docs/CustomerUpdateRequest.md +24 -0
- data/docs/CustomersApi.md +443 -0
- data/docs/DisplayPreferenceRequest.md +18 -0
- data/docs/ErrorResponse.md +28 -0
- data/docs/EventListResponse.md +24 -0
- data/docs/EventResponse.md +32 -0
- data/docs/EventsApi.md +159 -0
- data/docs/LineItemRequest.md +22 -0
- data/docs/Locale.md +15 -0
- data/docs/MetadataValue.md +15 -0
- data/docs/PayPayConfigRequest.md +18 -0
- data/docs/PaymentDisputeListResponse.md +24 -0
- data/docs/PaymentDisputeReason.md +15 -0
- data/docs/PaymentDisputeResponse.md +42 -0
- data/docs/PaymentDisputeStatus.md +15 -0
- data/docs/PaymentDisputesApi.md +157 -0
- data/docs/PaymentFlowCancelRequest.md +18 -0
- data/docs/PaymentFlowCancellationReason.md +15 -0
- data/docs/PaymentFlowCaptureRequest.md +18 -0
- data/docs/PaymentFlowConfirmRequest.md +28 -0
- data/docs/PaymentFlowCreateRequest.md +38 -0
- data/docs/PaymentFlowDataRequest.md +22 -0
- data/docs/PaymentFlowListResponse.md +24 -0
- data/docs/PaymentFlowPaymentMethodOptionsCardRequest.md +20 -0
- data/docs/PaymentFlowPaymentMethodOptionsRequest.md +18 -0
- data/docs/PaymentFlowResponse.md +62 -0
- data/docs/PaymentFlowStatus.md +15 -0
- data/docs/PaymentFlowUpdateRequest.md +32 -0
- data/docs/PaymentFlowsApi.md +599 -0
- data/docs/PaymentMethodApplePayCreateRequest.md +26 -0
- data/docs/PaymentMethodApplePayUpdateRequest.md +22 -0
- data/docs/PaymentMethodAttachRequest.md +18 -0
- data/docs/PaymentMethodBillingAddressRequest.md +28 -0
- data/docs/PaymentMethodBillingAddressResponse.md +28 -0
- data/docs/PaymentMethodBillingDetailsRequest.md +24 -0
- data/docs/PaymentMethodBillingDetailsResponse.md +24 -0
- data/docs/PaymentMethodCardBillingDetailsRequest.md +24 -0
- data/docs/PaymentMethodCardCreateRequest.md +26 -0
- data/docs/PaymentMethodCardDetailsResponse.md +28 -0
- data/docs/PaymentMethodCardResponse.md +38 -0
- data/docs/PaymentMethodCardUpdateRequest.md +22 -0
- data/docs/PaymentMethodConfigurationDetailsResponse.md +32 -0
- data/docs/PaymentMethodConfigurationDisplayPreference.md +20 -0
- data/docs/PaymentMethodConfigurationListResponse.md +24 -0
- data/docs/PaymentMethodConfigurationSettingResponse.md +20 -0
- data/docs/PaymentMethodConfigurationUpdateRequest.md +26 -0
- data/docs/PaymentMethodConfigurationsApi.md +225 -0
- data/docs/PaymentMethodCreateCardDetailsRequest.md +24 -0
- data/docs/PaymentMethodCreateRequest.md +82 -0
- data/docs/PaymentMethodListResponse.md +24 -0
- data/docs/PaymentMethodPayPayCreateRequest.md +24 -0
- data/docs/PaymentMethodPayPayResponse.md +36 -0
- data/docs/PaymentMethodPayPayUpdateRequest.md +22 -0
- data/docs/PaymentMethodResponse.md +38 -0
- data/docs/PaymentMethodTypes.md +15 -0
- data/docs/PaymentMethodUpdateRequest.md +82 -0
- data/docs/PaymentMethodsApi.md +507 -0
- data/docs/PaymentRefundCreateRequest.md +24 -0
- data/docs/PaymentRefundListResponse.md +24 -0
- data/docs/PaymentRefundReason.md +15 -0
- data/docs/PaymentRefundResponse.md +36 -0
- data/docs/PaymentRefundStatus.md +15 -0
- data/docs/PaymentRefundUpdateRequest.md +18 -0
- data/docs/PaymentRefundsApi.md +295 -0
- data/docs/PaymentTransactionListResponse.md +24 -0
- data/docs/PaymentTransactionResponse.md +42 -0
- data/docs/PaymentTransactionType.md +15 -0
- data/docs/PaymentTransactionsApi.md +159 -0
- data/docs/PriceCreateRequest.md +32 -0
- data/docs/PriceDetailsResponse.md +42 -0
- data/docs/PriceListResponse.md +24 -0
- data/docs/PriceType.md +15 -0
- data/docs/PriceUpdateRequest.md +24 -0
- data/docs/PricesApi.md +297 -0
- data/docs/ProductCreateRequest.md +28 -0
- data/docs/ProductDeletedResponse.md +22 -0
- data/docs/ProductDetailsResponse.md +32 -0
- data/docs/ProductListResponse.md +24 -0
- data/docs/ProductUpdateRequest.md +28 -0
- data/docs/ProductsApi.md +365 -0
- data/docs/SetupFlowCancelRequest.md +18 -0
- data/docs/SetupFlowCancellationReason.md +15 -0
- data/docs/SetupFlowCreateRequest.md +28 -0
- data/docs/SetupFlowDataRequest.md +20 -0
- data/docs/SetupFlowListResponse.md +24 -0
- data/docs/SetupFlowPaymentMethodOptionsCardRequest.md +18 -0
- data/docs/SetupFlowPaymentMethodOptionsRequest.md +18 -0
- data/docs/SetupFlowResponse.md +50 -0
- data/docs/SetupFlowStatus.md +15 -0
- data/docs/SetupFlowUpdateRequest.md +26 -0
- data/docs/SetupFlowsApi.md +371 -0
- data/docs/StatementItemResponse.md +24 -0
- data/docs/StatementListResponse.md +24 -0
- data/docs/StatementResponse.md +38 -0
- data/docs/StatementSubject.md +15 -0
- data/docs/StatementType.md +15 -0
- data/docs/StatementURLResponse.md +22 -0
- data/docs/StatementsApi.md +231 -0
- data/docs/TaxRateCreateRequest.md +30 -0
- data/docs/TaxRateDetailsResponse.md +34 -0
- data/docs/TaxRateListResponse.md +24 -0
- data/docs/TaxRateUpdateRequest.md +26 -0
- data/docs/TaxRatesApi.md +295 -0
- data/docs/TermListResponse.md +24 -0
- data/docs/TermResponse.md +28 -0
- data/docs/TermsApi.md +157 -0
- data/docs/Usage.md +15 -0
- data/example.rb +157 -0
- data/lib/payjpv2/api/balances_api.rb +223 -0
- data/lib/payjpv2/api/checkout_sessions_api.rb +360 -0
- data/lib/payjpv2/api/customers_api.rb +420 -0
- data/lib/payjpv2/api/events_api.rb +157 -0
- data/lib/payjpv2/api/payment_disputes_api.rb +155 -0
- data/lib/payjpv2/api/payment_flows_api.rb +561 -0
- data/lib/payjpv2/api/payment_method_configurations_api.rb +221 -0
- data/lib/payjpv2/api/payment_methods_api.rb +476 -0
- data/lib/payjpv2/api/payment_refunds_api.rb +286 -0
- data/lib/payjpv2/api/payment_transactions_api.rb +157 -0
- data/lib/payjpv2/api/prices_api.rb +288 -0
- data/lib/payjpv2/api/products_api.rb +346 -0
- data/lib/payjpv2/api/setup_flows_api.rb +348 -0
- data/lib/payjpv2/api/statements_api.rb +219 -0
- data/lib/payjpv2/api/tax_rates_api.rb +286 -0
- data/lib/payjpv2/api/terms_api.rb +155 -0
- data/lib/payjpv2/api_client.rb +410 -0
- data/lib/payjpv2/api_error.rb +58 -0
- data/lib/payjpv2/configuration.rb +315 -0
- data/lib/payjpv2/models/apple_pay_config_request.rb +206 -0
- data/lib/payjpv2/models/balance_list_response.rb +306 -0
- data/lib/payjpv2/models/balance_response.rb +453 -0
- data/lib/payjpv2/models/balance_state.rb +41 -0
- data/lib/payjpv2/models/balance_url_response.rb +283 -0
- data/lib/payjpv2/models/bank_info_response.rb +328 -0
- data/lib/payjpv2/models/capture_method.rb +40 -0
- data/lib/payjpv2/models/card_config_request.rb +206 -0
- data/lib/payjpv2/models/checkout_session_create_request.rb +430 -0
- data/lib/payjpv2/models/checkout_session_customer_details_address_response.rb +269 -0
- data/lib/payjpv2/models/checkout_session_customer_details_response.rb +245 -0
- data/lib/payjpv2/models/checkout_session_details_response.rb +627 -0
- data/lib/payjpv2/models/checkout_session_line_item_data_response.rb +405 -0
- data/lib/payjpv2/models/checkout_session_line_item_list_response.rb +306 -0
- data/lib/payjpv2/models/checkout_session_list_response.rb +306 -0
- data/lib/payjpv2/models/checkout_session_mode.rb +40 -0
- data/lib/payjpv2/models/checkout_session_payment_method_options_card_request.rb +258 -0
- data/lib/payjpv2/models/checkout_session_payment_method_options_request.rb +206 -0
- data/lib/payjpv2/models/checkout_session_status.rb +41 -0
- data/lib/payjpv2/models/checkout_session_submit_type.rb +42 -0
- data/lib/payjpv2/models/checkout_session_ui_mode.rb +39 -0
- data/lib/payjpv2/models/checkout_session_update_request.rb +208 -0
- data/lib/payjpv2/models/country.rb +39 -0
- data/lib/payjpv2/models/currency.rb +39 -0
- data/lib/payjpv2/models/customer_create_request.rb +295 -0
- data/lib/payjpv2/models/customer_creation.rb +40 -0
- data/lib/payjpv2/models/customer_list_response.rb +306 -0
- data/lib/payjpv2/models/customer_response.rb +387 -0
- data/lib/payjpv2/models/customer_update_request.rb +266 -0
- data/lib/payjpv2/models/display_preference_request.rb +240 -0
- data/lib/payjpv2/models/error_response.rb +291 -0
- data/lib/payjpv2/models/event_list_response.rb +307 -0
- data/lib/payjpv2/models/event_response.rb +395 -0
- data/lib/payjpv2/models/line_item_request.rb +252 -0
- data/lib/payjpv2/models/locale.rb +40 -0
- data/lib/payjpv2/models/metadata_value.rb +105 -0
- data/lib/payjpv2/models/pay_pay_config_request.rb +206 -0
- data/lib/payjpv2/models/payment_dispute_list_response.rb +307 -0
- data/lib/payjpv2/models/payment_dispute_reason.rb +53 -0
- data/lib/payjpv2/models/payment_dispute_response.rb +485 -0
- data/lib/payjpv2/models/payment_dispute_status.rb +46 -0
- data/lib/payjpv2/models/payment_flow_cancel_request.rb +238 -0
- data/lib/payjpv2/models/payment_flow_cancellation_reason.rb +46 -0
- data/lib/payjpv2/models/payment_flow_capture_request.rb +224 -0
- data/lib/payjpv2/models/payment_flow_confirm_request.rb +280 -0
- data/lib/payjpv2/models/payment_flow_create_request.rb +366 -0
- data/lib/payjpv2/models/payment_flow_data_request.rb +250 -0
- data/lib/payjpv2/models/payment_flow_list_response.rb +307 -0
- data/lib/payjpv2/models/payment_flow_payment_method_options_card_request.rb +258 -0
- data/lib/payjpv2/models/payment_flow_payment_method_options_request.rb +206 -0
- data/lib/payjpv2/models/payment_flow_response.rb +623 -0
- data/lib/payjpv2/models/payment_flow_status.rb +45 -0
- data/lib/payjpv2/models/payment_flow_update_request.rb +298 -0
- data/lib/payjpv2/models/payment_method_apple_pay_create_request.rb +294 -0
- data/lib/payjpv2/models/payment_method_apple_pay_update_request.rb +262 -0
- data/lib/payjpv2/models/payment_method_attach_request.rb +218 -0
- data/lib/payjpv2/models/payment_method_billing_address_request.rb +256 -0
- data/lib/payjpv2/models/payment_method_billing_address_response.rb +268 -0
- data/lib/payjpv2/models/payment_method_billing_details_request.rb +236 -0
- data/lib/payjpv2/models/payment_method_billing_details_response.rb +254 -0
- data/lib/payjpv2/models/payment_method_card_billing_details_request.rb +237 -0
- data/lib/payjpv2/models/payment_method_card_create_request.rb +306 -0
- data/lib/payjpv2/models/payment_method_card_details_response.rb +318 -0
- data/lib/payjpv2/models/payment_method_card_response.rb +440 -0
- data/lib/payjpv2/models/payment_method_card_update_request.rb +262 -0
- data/lib/payjpv2/models/payment_method_configuration_details_response.rb +383 -0
- data/lib/payjpv2/models/payment_method_configuration_display_preference.rb +258 -0
- data/lib/payjpv2/models/payment_method_configuration_list_response.rb +306 -0
- data/lib/payjpv2/models/payment_method_configuration_setting_response.rb +216 -0
- data/lib/payjpv2/models/payment_method_configuration_update_request.rb +246 -0
- data/lib/payjpv2/models/payment_method_create_card_details_request.rb +310 -0
- data/lib/payjpv2/models/payment_method_create_request.rb +57 -0
- data/lib/payjpv2/models/payment_method_list_response.rb +306 -0
- data/lib/payjpv2/models/payment_method_pay_pay_create_request.rb +272 -0
- data/lib/payjpv2/models/payment_method_pay_pay_response.rb +418 -0
- data/lib/payjpv2/models/payment_method_pay_pay_update_request.rb +262 -0
- data/lib/payjpv2/models/payment_method_response.rb +104 -0
- data/lib/payjpv2/models/payment_method_types.rb +41 -0
- data/lib/payjpv2/models/payment_method_update_request.rb +57 -0
- data/lib/payjpv2/models/payment_refund_create_request.rb +286 -0
- data/lib/payjpv2/models/payment_refund_list_response.rb +307 -0
- data/lib/payjpv2/models/payment_refund_reason.rb +41 -0
- data/lib/payjpv2/models/payment_refund_response.rb +429 -0
- data/lib/payjpv2/models/payment_refund_status.rb +43 -0
- data/lib/payjpv2/models/payment_refund_update_request.rb +208 -0
- data/lib/payjpv2/models/payment_transaction_list_response.rb +307 -0
- data/lib/payjpv2/models/payment_transaction_response.rb +508 -0
- data/lib/payjpv2/models/payment_transaction_type.rb +42 -0
- data/lib/payjpv2/models/price_create_request.rb +342 -0
- data/lib/payjpv2/models/price_details_response.rb +485 -0
- data/lib/payjpv2/models/price_list_response.rb +306 -0
- data/lib/payjpv2/models/price_type.rb +39 -0
- data/lib/payjpv2/models/price_update_request.rb +238 -0
- data/lib/payjpv2/models/product_create_request.rb +270 -0
- data/lib/payjpv2/models/product_deleted_response.rb +273 -0
- data/lib/payjpv2/models/product_details_response.rb +353 -0
- data/lib/payjpv2/models/product_list_response.rb +306 -0
- data/lib/payjpv2/models/product_update_request.rb +256 -0
- data/lib/payjpv2/models/setup_flow_cancel_request.rb +228 -0
- data/lib/payjpv2/models/setup_flow_cancellation_reason.rb +41 -0
- data/lib/payjpv2/models/setup_flow_create_request.rb +282 -0
- data/lib/payjpv2/models/setup_flow_data_request.rb +218 -0
- data/lib/payjpv2/models/setup_flow_list_response.rb +306 -0
- data/lib/payjpv2/models/setup_flow_payment_method_options_card_request.rb +238 -0
- data/lib/payjpv2/models/setup_flow_payment_method_options_request.rb +206 -0
- data/lib/payjpv2/models/setup_flow_response.rb +521 -0
- data/lib/payjpv2/models/setup_flow_status.rb +44 -0
- data/lib/payjpv2/models/setup_flow_update_request.rb +272 -0
- data/lib/payjpv2/models/statement_item_response.rb +297 -0
- data/lib/payjpv2/models/statement_list_response.rb +306 -0
- data/lib/payjpv2/models/statement_response.rb +431 -0
- data/lib/payjpv2/models/statement_subject.rb +55 -0
- data/lib/payjpv2/models/statement_type.rb +43 -0
- data/lib/payjpv2/models/statement_url_response.rb +283 -0
- data/lib/payjpv2/models/tax_rate_create_request.rb +336 -0
- data/lib/payjpv2/models/tax_rate_details_response.rb +397 -0
- data/lib/payjpv2/models/tax_rate_list_response.rb +306 -0
- data/lib/payjpv2/models/tax_rate_update_request.rb +270 -0
- data/lib/payjpv2/models/term_list_response.rb +306 -0
- data/lib/payjpv2/models/term_response.rb +349 -0
- data/lib/payjpv2/models/usage.rb +40 -0
- data/lib/payjpv2/version.rb +15 -0
- data/lib/payjpv2.rb +176 -0
- data/payjpv2.gemspec +45 -0
- data/spec/api/balances_api_spec.rb +142 -0
- data/spec/api/checkout_sessions_api_spec.rb +206 -0
- data/spec/api/customers_api_spec.rb +239 -0
- data/spec/api/events_api_spec.rb +106 -0
- data/spec/api/payment_disputes_api_spec.rb +105 -0
- data/spec/api/payment_flows_api_spec.rb +310 -0
- data/spec/api/payment_method_configurations_api_spec.rb +137 -0
- data/spec/api/payment_methods_api_spec.rb +270 -0
- data/spec/api/payment_refunds_api_spec.rb +170 -0
- data/spec/api/payment_transactions_api_spec.rb +106 -0
- data/spec/api/prices_api_spec.rb +171 -0
- data/spec/api/products_api_spec.rb +203 -0
- data/spec/api/setup_flows_api_spec.rb +204 -0
- data/spec/api/statements_api_spec.rb +140 -0
- data/spec/api/tax_rates_api_spec.rb +170 -0
- data/spec/api/terms_api_spec.rb +105 -0
- data/spec/models/apple_pay_config_request_spec.rb +36 -0
- data/spec/models/balance_list_response_spec.rb +58 -0
- data/spec/models/balance_response_spec.rb +106 -0
- data/spec/models/balance_state_spec.rb +30 -0
- data/spec/models/balance_url_response_spec.rb +52 -0
- data/spec/models/bank_info_response_spec.rb +66 -0
- data/spec/models/capture_method_spec.rb +30 -0
- data/spec/models/card_config_request_spec.rb +36 -0
- data/spec/models/checkout_session_create_request_spec.rb +138 -0
- data/spec/models/checkout_session_customer_details_address_response_spec.rb +66 -0
- data/spec/models/checkout_session_customer_details_response_spec.rb +54 -0
- data/spec/models/checkout_session_details_response_spec.rb +184 -0
- data/spec/models/checkout_session_line_item_data_response_spec.rb +88 -0
- data/spec/models/checkout_session_line_item_list_response_spec.rb +58 -0
- data/spec/models/checkout_session_list_response_spec.rb +58 -0
- data/spec/models/checkout_session_mode_spec.rb +30 -0
- data/spec/models/checkout_session_payment_method_options_card_request_spec.rb +50 -0
- data/spec/models/checkout_session_payment_method_options_request_spec.rb +36 -0
- data/spec/models/checkout_session_status_spec.rb +30 -0
- data/spec/models/checkout_session_submit_type_spec.rb +30 -0
- data/spec/models/checkout_session_ui_mode_spec.rb +30 -0
- data/spec/models/checkout_session_update_request_spec.rb +36 -0
- data/spec/models/country_spec.rb +30 -0
- data/spec/models/currency_spec.rb +30 -0
- data/spec/models/customer_create_request_spec.rb +60 -0
- data/spec/models/customer_creation_spec.rb +30 -0
- data/spec/models/customer_list_response_spec.rb +58 -0
- data/spec/models/customer_response_spec.rb +88 -0
- data/spec/models/customer_update_request_spec.rb +54 -0
- data/spec/models/display_preference_request_spec.rb +40 -0
- data/spec/models/error_response_spec.rb +66 -0
- data/spec/models/event_list_response_spec.rb +58 -0
- data/spec/models/event_response_spec.rb +82 -0
- data/spec/models/line_item_request_spec.rb +48 -0
- data/spec/models/locale_spec.rb +30 -0
- data/spec/models/metadata_value_spec.rb +21 -0
- data/spec/models/pay_pay_config_request_spec.rb +36 -0
- data/spec/models/payment_dispute_list_response_spec.rb +58 -0
- data/spec/models/payment_dispute_reason_spec.rb +30 -0
- data/spec/models/payment_dispute_response_spec.rb +112 -0
- data/spec/models/payment_dispute_status_spec.rb +30 -0
- data/spec/models/payment_flow_cancel_request_spec.rb +40 -0
- data/spec/models/payment_flow_cancellation_reason_spec.rb +30 -0
- data/spec/models/payment_flow_capture_request_spec.rb +36 -0
- data/spec/models/payment_flow_confirm_request_spec.rb +66 -0
- data/spec/models/payment_flow_create_request_spec.rb +96 -0
- data/spec/models/payment_flow_data_request_spec.rb +48 -0
- data/spec/models/payment_flow_list_response_spec.rb +58 -0
- data/spec/models/payment_flow_payment_method_options_card_request_spec.rb +50 -0
- data/spec/models/payment_flow_payment_method_options_request_spec.rb +36 -0
- data/spec/models/payment_flow_response_spec.rb +172 -0
- data/spec/models/payment_flow_status_spec.rb +30 -0
- data/spec/models/payment_flow_update_request_spec.rb +78 -0
- data/spec/models/payment_method_apple_pay_create_request_spec.rb +64 -0
- data/spec/models/payment_method_apple_pay_update_request_spec.rb +52 -0
- data/spec/models/payment_method_attach_request_spec.rb +36 -0
- data/spec/models/payment_method_billing_address_request_spec.rb +66 -0
- data/spec/models/payment_method_billing_address_response_spec.rb +66 -0
- data/spec/models/payment_method_billing_details_request_spec.rb +54 -0
- data/spec/models/payment_method_billing_details_response_spec.rb +54 -0
- data/spec/models/payment_method_card_billing_details_request_spec.rb +54 -0
- data/spec/models/payment_method_card_create_request_spec.rb +64 -0
- data/spec/models/payment_method_card_details_response_spec.rb +66 -0
- data/spec/models/payment_method_card_response_spec.rb +104 -0
- data/spec/models/payment_method_card_update_request_spec.rb +52 -0
- data/spec/models/payment_method_configuration_details_response_spec.rb +82 -0
- data/spec/models/payment_method_configuration_display_preference_spec.rb +50 -0
- data/spec/models/payment_method_configuration_list_response_spec.rb +58 -0
- data/spec/models/payment_method_configuration_setting_response_spec.rb +42 -0
- data/spec/models/payment_method_configuration_update_request_spec.rb +60 -0
- data/spec/models/payment_method_create_card_details_request_spec.rb +54 -0
- data/spec/models/payment_method_create_request_spec.rb +44 -0
- data/spec/models/payment_method_list_response_spec.rb +58 -0
- data/spec/models/payment_method_pay_pay_create_request_spec.rb +58 -0
- data/spec/models/payment_method_pay_pay_response_spec.rb +98 -0
- data/spec/models/payment_method_pay_pay_update_request_spec.rb +52 -0
- data/spec/models/payment_method_response_spec.rb +21 -0
- data/spec/models/payment_method_types_spec.rb +30 -0
- data/spec/models/payment_method_update_request_spec.rb +44 -0
- data/spec/models/payment_refund_create_request_spec.rb +54 -0
- data/spec/models/payment_refund_list_response_spec.rb +58 -0
- data/spec/models/payment_refund_reason_spec.rb +30 -0
- data/spec/models/payment_refund_response_spec.rb +94 -0
- data/spec/models/payment_refund_status_spec.rb +30 -0
- data/spec/models/payment_refund_update_request_spec.rb +36 -0
- data/spec/models/payment_transaction_list_response_spec.rb +58 -0
- data/spec/models/payment_transaction_response_spec.rb +112 -0
- data/spec/models/payment_transaction_type_spec.rb +30 -0
- data/spec/models/price_create_request_spec.rb +78 -0
- data/spec/models/price_details_response_spec.rb +112 -0
- data/spec/models/price_list_response_spec.rb +58 -0
- data/spec/models/price_type_spec.rb +30 -0
- data/spec/models/price_update_request_spec.rb +54 -0
- data/spec/models/product_create_request_spec.rb +66 -0
- data/spec/models/product_deleted_response_spec.rb +52 -0
- data/spec/models/product_details_response_spec.rb +82 -0
- data/spec/models/product_list_response_spec.rb +58 -0
- data/spec/models/product_update_request_spec.rb +66 -0
- data/spec/models/setup_flow_cancel_request_spec.rb +36 -0
- data/spec/models/setup_flow_cancellation_reason_spec.rb +30 -0
- data/spec/models/setup_flow_create_request_spec.rb +70 -0
- data/spec/models/setup_flow_data_request_spec.rb +42 -0
- data/spec/models/setup_flow_list_response_spec.rb +58 -0
- data/spec/models/setup_flow_payment_method_options_card_request_spec.rb +40 -0
- data/spec/models/setup_flow_payment_method_options_request_spec.rb +36 -0
- data/spec/models/setup_flow_response_spec.rb +136 -0
- data/spec/models/setup_flow_status_spec.rb +30 -0
- data/spec/models/setup_flow_update_request_spec.rb +64 -0
- data/spec/models/statement_item_response_spec.rb +54 -0
- data/spec/models/statement_list_response_spec.rb +58 -0
- data/spec/models/statement_response_spec.rb +100 -0
- data/spec/models/statement_subject_spec.rb +30 -0
- data/spec/models/statement_type_spec.rb +30 -0
- data/spec/models/statement_url_response_spec.rb +52 -0
- data/spec/models/tax_rate_create_request_spec.rb +72 -0
- data/spec/models/tax_rate_details_response_spec.rb +88 -0
- data/spec/models/tax_rate_list_response_spec.rb +58 -0
- data/spec/models/tax_rate_update_request_spec.rb +60 -0
- data/spec/models/term_list_response_spec.rb +58 -0
- data/spec/models/term_response_spec.rb +70 -0
- data/spec/models/usage_spec.rb +30 -0
- data/spec/spec_helper.rb +111 -0
- metadata +651 -0
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PAY.JP API v2
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.14.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module PAYJPv2
|
|
16
|
+
class PaymentFlowsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Cancel Payment Flow
|
|
23
|
+
# @param payment_flow_id [String]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [PaymentFlowCancelRequest] :payment_flow_cancel_request
|
|
26
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
27
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
28
|
+
# @return [PaymentFlowResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
29
|
+
def cancel_payment_flow(payment_flow_id, opts = {})
|
|
30
|
+
if @api_client.config.debugging
|
|
31
|
+
@api_client.config.logger.debug 'Calling API: PaymentFlowsApi.cancel_payment_flow ...'
|
|
32
|
+
end
|
|
33
|
+
# verify the required parameter 'payment_flow_id' is set
|
|
34
|
+
if @api_client.config.client_side_validation && payment_flow_id.nil?
|
|
35
|
+
raise ArgumentError, "Missing the required parameter 'payment_flow_id' when calling PaymentFlowsApi.cancel_payment_flow"
|
|
36
|
+
end
|
|
37
|
+
# resource path
|
|
38
|
+
local_var_path = '/v2/payment_flows/{payment_flow_id}/cancel'.sub('{' + 'payment_flow_id' + '}', CGI.escape(payment_flow_id.to_s))
|
|
39
|
+
|
|
40
|
+
# query parameters
|
|
41
|
+
query_params = opts[:query_params] || {}
|
|
42
|
+
|
|
43
|
+
# header parameters
|
|
44
|
+
header_params = opts[:header_params] || {}
|
|
45
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
46
|
+
# HTTP header 'Accept' (if needed)
|
|
47
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
48
|
+
# HTTP header 'Content-Type'
|
|
49
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
50
|
+
if !content_type.nil?
|
|
51
|
+
header_params['Content-Type'] = content_type
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# form parameters
|
|
55
|
+
form_params = opts[:form_params] || {}
|
|
56
|
+
|
|
57
|
+
# http body (model)
|
|
58
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:payment_flow_cancel_request])
|
|
59
|
+
|
|
60
|
+
# return_type
|
|
61
|
+
return_type = opts[:debug_return_type] || 'PaymentFlowResponse'
|
|
62
|
+
|
|
63
|
+
# auth_names
|
|
64
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
65
|
+
|
|
66
|
+
new_options = opts.merge(
|
|
67
|
+
:operation => :"PaymentFlowsApi.cancel_payment_flow",
|
|
68
|
+
:header_params => header_params,
|
|
69
|
+
:query_params => query_params,
|
|
70
|
+
:form_params => form_params,
|
|
71
|
+
:body => post_body,
|
|
72
|
+
:auth_names => auth_names,
|
|
73
|
+
:return_type => return_type
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
77
|
+
if @api_client.config.debugging
|
|
78
|
+
@api_client.config.logger.debug "API called: PaymentFlowsApi#cancel_payment_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if opts[:include_http_info]
|
|
82
|
+
[data, status_code, headers]
|
|
83
|
+
else
|
|
84
|
+
data
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Capture Payment Flow
|
|
89
|
+
# @param payment_flow_id [String]
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @option opts [PaymentFlowCaptureRequest] :payment_flow_capture_request
|
|
92
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
93
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
94
|
+
# @return [PaymentFlowResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
95
|
+
def capture_payment_flow(payment_flow_id, opts = {})
|
|
96
|
+
if @api_client.config.debugging
|
|
97
|
+
@api_client.config.logger.debug 'Calling API: PaymentFlowsApi.capture_payment_flow ...'
|
|
98
|
+
end
|
|
99
|
+
# verify the required parameter 'payment_flow_id' is set
|
|
100
|
+
if @api_client.config.client_side_validation && payment_flow_id.nil?
|
|
101
|
+
raise ArgumentError, "Missing the required parameter 'payment_flow_id' when calling PaymentFlowsApi.capture_payment_flow"
|
|
102
|
+
end
|
|
103
|
+
# resource path
|
|
104
|
+
local_var_path = '/v2/payment_flows/{payment_flow_id}/capture'.sub('{' + 'payment_flow_id' + '}', CGI.escape(payment_flow_id.to_s))
|
|
105
|
+
|
|
106
|
+
# query parameters
|
|
107
|
+
query_params = opts[:query_params] || {}
|
|
108
|
+
|
|
109
|
+
# header parameters
|
|
110
|
+
header_params = opts[:header_params] || {}
|
|
111
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
112
|
+
# HTTP header 'Accept' (if needed)
|
|
113
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
114
|
+
# HTTP header 'Content-Type'
|
|
115
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
116
|
+
if !content_type.nil?
|
|
117
|
+
header_params['Content-Type'] = content_type
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# form parameters
|
|
121
|
+
form_params = opts[:form_params] || {}
|
|
122
|
+
|
|
123
|
+
# http body (model)
|
|
124
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:payment_flow_capture_request])
|
|
125
|
+
|
|
126
|
+
# return_type
|
|
127
|
+
return_type = opts[:debug_return_type] || 'PaymentFlowResponse'
|
|
128
|
+
|
|
129
|
+
# auth_names
|
|
130
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
131
|
+
|
|
132
|
+
new_options = opts.merge(
|
|
133
|
+
:operation => :"PaymentFlowsApi.capture_payment_flow",
|
|
134
|
+
:header_params => header_params,
|
|
135
|
+
:query_params => query_params,
|
|
136
|
+
:form_params => form_params,
|
|
137
|
+
:body => post_body,
|
|
138
|
+
:auth_names => auth_names,
|
|
139
|
+
:return_type => return_type
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
143
|
+
if @api_client.config.debugging
|
|
144
|
+
@api_client.config.logger.debug "API called: PaymentFlowsApi#capture_payment_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if opts[:include_http_info]
|
|
148
|
+
[data, status_code, headers]
|
|
149
|
+
else
|
|
150
|
+
data
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Confirm Payment Flow
|
|
155
|
+
# @param payment_flow_id [String]
|
|
156
|
+
# @param [Hash] opts the optional parameters
|
|
157
|
+
# @option opts [PaymentFlowConfirmRequest] :payment_flow_confirm_request
|
|
158
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
159
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
160
|
+
# @return [PaymentFlowResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
161
|
+
def confirm_payment_flow(payment_flow_id, opts = {})
|
|
162
|
+
if @api_client.config.debugging
|
|
163
|
+
@api_client.config.logger.debug 'Calling API: PaymentFlowsApi.confirm_payment_flow ...'
|
|
164
|
+
end
|
|
165
|
+
# verify the required parameter 'payment_flow_id' is set
|
|
166
|
+
if @api_client.config.client_side_validation && payment_flow_id.nil?
|
|
167
|
+
raise ArgumentError, "Missing the required parameter 'payment_flow_id' when calling PaymentFlowsApi.confirm_payment_flow"
|
|
168
|
+
end
|
|
169
|
+
# resource path
|
|
170
|
+
local_var_path = '/v2/payment_flows/{payment_flow_id}/confirm'.sub('{' + 'payment_flow_id' + '}', CGI.escape(payment_flow_id.to_s))
|
|
171
|
+
|
|
172
|
+
# query parameters
|
|
173
|
+
query_params = opts[:query_params] || {}
|
|
174
|
+
|
|
175
|
+
# header parameters
|
|
176
|
+
header_params = opts[:header_params] || {}
|
|
177
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
178
|
+
# HTTP header 'Accept' (if needed)
|
|
179
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
180
|
+
# HTTP header 'Content-Type'
|
|
181
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
182
|
+
if !content_type.nil?
|
|
183
|
+
header_params['Content-Type'] = content_type
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# form parameters
|
|
187
|
+
form_params = opts[:form_params] || {}
|
|
188
|
+
|
|
189
|
+
# http body (model)
|
|
190
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:payment_flow_confirm_request])
|
|
191
|
+
|
|
192
|
+
# return_type
|
|
193
|
+
return_type = opts[:debug_return_type] || 'PaymentFlowResponse'
|
|
194
|
+
|
|
195
|
+
# auth_names
|
|
196
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
197
|
+
|
|
198
|
+
new_options = opts.merge(
|
|
199
|
+
:operation => :"PaymentFlowsApi.confirm_payment_flow",
|
|
200
|
+
:header_params => header_params,
|
|
201
|
+
:query_params => query_params,
|
|
202
|
+
:form_params => form_params,
|
|
203
|
+
:body => post_body,
|
|
204
|
+
:auth_names => auth_names,
|
|
205
|
+
:return_type => return_type
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
209
|
+
if @api_client.config.debugging
|
|
210
|
+
@api_client.config.logger.debug "API called: PaymentFlowsApi#confirm_payment_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
if opts[:include_http_info]
|
|
214
|
+
[data, status_code, headers]
|
|
215
|
+
else
|
|
216
|
+
data
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Create Payment Flow
|
|
221
|
+
# @param payment_flow_create_request [PaymentFlowCreateRequest]
|
|
222
|
+
# @param [Hash] opts the optional parameters
|
|
223
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
224
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
225
|
+
# @return [PaymentFlowResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
226
|
+
def create_payment_flow(payment_flow_create_request, opts = {})
|
|
227
|
+
if @api_client.config.debugging
|
|
228
|
+
@api_client.config.logger.debug 'Calling API: PaymentFlowsApi.create_payment_flow ...'
|
|
229
|
+
end
|
|
230
|
+
# verify the required parameter 'payment_flow_create_request' is set
|
|
231
|
+
if @api_client.config.client_side_validation && payment_flow_create_request.nil?
|
|
232
|
+
raise ArgumentError, "Missing the required parameter 'payment_flow_create_request' when calling PaymentFlowsApi.create_payment_flow"
|
|
233
|
+
end
|
|
234
|
+
# resource path
|
|
235
|
+
local_var_path = '/v2/payment_flows'
|
|
236
|
+
|
|
237
|
+
# query parameters
|
|
238
|
+
query_params = opts[:query_params] || {}
|
|
239
|
+
|
|
240
|
+
# header parameters
|
|
241
|
+
header_params = opts[:header_params] || {}
|
|
242
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
243
|
+
# HTTP header 'Accept' (if needed)
|
|
244
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
245
|
+
# HTTP header 'Content-Type'
|
|
246
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
247
|
+
if !content_type.nil?
|
|
248
|
+
header_params['Content-Type'] = content_type
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# form parameters
|
|
252
|
+
form_params = opts[:form_params] || {}
|
|
253
|
+
|
|
254
|
+
# http body (model)
|
|
255
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_flow_create_request)
|
|
256
|
+
|
|
257
|
+
# return_type
|
|
258
|
+
return_type = opts[:debug_return_type] || 'PaymentFlowResponse'
|
|
259
|
+
|
|
260
|
+
# auth_names
|
|
261
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
262
|
+
|
|
263
|
+
new_options = opts.merge(
|
|
264
|
+
:operation => :"PaymentFlowsApi.create_payment_flow",
|
|
265
|
+
:header_params => header_params,
|
|
266
|
+
:query_params => query_params,
|
|
267
|
+
:form_params => form_params,
|
|
268
|
+
:body => post_body,
|
|
269
|
+
:auth_names => auth_names,
|
|
270
|
+
:return_type => return_type
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
274
|
+
if @api_client.config.debugging
|
|
275
|
+
@api_client.config.logger.debug "API called: PaymentFlowsApi#create_payment_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
if opts[:include_http_info]
|
|
279
|
+
[data, status_code, headers]
|
|
280
|
+
else
|
|
281
|
+
data
|
|
282
|
+
end
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Get All Payment Flows
|
|
286
|
+
# @param [Hash] opts the optional parameters
|
|
287
|
+
# @option opts [Integer] :limit 取得するデータの最大件数 (default to 10)
|
|
288
|
+
# @option opts [String] :starting_after このIDより後のデータを取得
|
|
289
|
+
# @option opts [String] :ending_before このIDより前のデータを取得
|
|
290
|
+
# @option opts [String] :customer_id 指定した顧客のデータのみを取得
|
|
291
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
292
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
293
|
+
# @return [PaymentFlowListResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
294
|
+
def get_all_payment_flows(opts = {})
|
|
295
|
+
if @api_client.config.debugging
|
|
296
|
+
@api_client.config.logger.debug 'Calling API: PaymentFlowsApi.get_all_payment_flows ...'
|
|
297
|
+
end
|
|
298
|
+
if @api_client.config.client_side_validation && !opts[:limit].nil? && opts[:limit] > 100
|
|
299
|
+
raise ArgumentError, 'invalid value for "opts[:limit]" when calling PaymentFlowsApi.get_all_payment_flows, must be smaller than or equal to 100.'
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
if @api_client.config.client_side_validation && !opts[:limit].nil? && opts[:limit] < 1
|
|
303
|
+
raise ArgumentError, 'invalid value for "opts[:limit]" when calling PaymentFlowsApi.get_all_payment_flows, must be greater than or equal to 1.'
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# resource path
|
|
307
|
+
local_var_path = '/v2/payment_flows'
|
|
308
|
+
|
|
309
|
+
# query parameters
|
|
310
|
+
query_params = opts[:query_params] || {}
|
|
311
|
+
query_params[:limit] = opts[:limit] if !opts[:limit].nil?
|
|
312
|
+
query_params[:starting_after] = opts[:starting_after] if !opts[:starting_after].nil?
|
|
313
|
+
query_params[:ending_before] = opts[:ending_before] if !opts[:ending_before].nil?
|
|
314
|
+
query_params[:customer_id] = opts[:customer_id] if !opts[:customer_id].nil?
|
|
315
|
+
|
|
316
|
+
# header parameters
|
|
317
|
+
header_params = opts[:header_params] || {}
|
|
318
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
319
|
+
# HTTP header 'Accept' (if needed)
|
|
320
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
321
|
+
|
|
322
|
+
# form parameters
|
|
323
|
+
form_params = opts[:form_params] || {}
|
|
324
|
+
|
|
325
|
+
# http body (model)
|
|
326
|
+
post_body = opts[:debug_body]
|
|
327
|
+
|
|
328
|
+
# return_type
|
|
329
|
+
return_type = opts[:debug_return_type] || 'PaymentFlowListResponse'
|
|
330
|
+
|
|
331
|
+
# auth_names
|
|
332
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
333
|
+
|
|
334
|
+
new_options = opts.merge(
|
|
335
|
+
:operation => :"PaymentFlowsApi.get_all_payment_flows",
|
|
336
|
+
:header_params => header_params,
|
|
337
|
+
:query_params => query_params,
|
|
338
|
+
:form_params => form_params,
|
|
339
|
+
:body => post_body,
|
|
340
|
+
:auth_names => auth_names,
|
|
341
|
+
:return_type => return_type
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
345
|
+
if @api_client.config.debugging
|
|
346
|
+
@api_client.config.logger.debug "API called: PaymentFlowsApi#get_all_payment_flows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
if opts[:include_http_info]
|
|
350
|
+
[data, status_code, headers]
|
|
351
|
+
else
|
|
352
|
+
data
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# Get Payment Flow
|
|
357
|
+
# @param payment_flow_id [String]
|
|
358
|
+
# @param [Hash] opts the optional parameters
|
|
359
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
360
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
361
|
+
# @return [PaymentFlowResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
362
|
+
def get_payment_flow(payment_flow_id, opts = {})
|
|
363
|
+
if @api_client.config.debugging
|
|
364
|
+
@api_client.config.logger.debug 'Calling API: PaymentFlowsApi.get_payment_flow ...'
|
|
365
|
+
end
|
|
366
|
+
# verify the required parameter 'payment_flow_id' is set
|
|
367
|
+
if @api_client.config.client_side_validation && payment_flow_id.nil?
|
|
368
|
+
raise ArgumentError, "Missing the required parameter 'payment_flow_id' when calling PaymentFlowsApi.get_payment_flow"
|
|
369
|
+
end
|
|
370
|
+
# resource path
|
|
371
|
+
local_var_path = '/v2/payment_flows/{payment_flow_id}'.sub('{' + 'payment_flow_id' + '}', CGI.escape(payment_flow_id.to_s))
|
|
372
|
+
|
|
373
|
+
# query parameters
|
|
374
|
+
query_params = opts[:query_params] || {}
|
|
375
|
+
|
|
376
|
+
# header parameters
|
|
377
|
+
header_params = opts[:header_params] || {}
|
|
378
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
379
|
+
# HTTP header 'Accept' (if needed)
|
|
380
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
381
|
+
|
|
382
|
+
# form parameters
|
|
383
|
+
form_params = opts[:form_params] || {}
|
|
384
|
+
|
|
385
|
+
# http body (model)
|
|
386
|
+
post_body = opts[:debug_body]
|
|
387
|
+
|
|
388
|
+
# return_type
|
|
389
|
+
return_type = opts[:debug_return_type] || 'PaymentFlowResponse'
|
|
390
|
+
|
|
391
|
+
# auth_names
|
|
392
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
393
|
+
|
|
394
|
+
new_options = opts.merge(
|
|
395
|
+
:operation => :"PaymentFlowsApi.get_payment_flow",
|
|
396
|
+
:header_params => header_params,
|
|
397
|
+
:query_params => query_params,
|
|
398
|
+
:form_params => form_params,
|
|
399
|
+
:body => post_body,
|
|
400
|
+
:auth_names => auth_names,
|
|
401
|
+
:return_type => return_type
|
|
402
|
+
)
|
|
403
|
+
|
|
404
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
405
|
+
if @api_client.config.debugging
|
|
406
|
+
@api_client.config.logger.debug "API called: PaymentFlowsApi#get_payment_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
if opts[:include_http_info]
|
|
410
|
+
[data, status_code, headers]
|
|
411
|
+
else
|
|
412
|
+
data
|
|
413
|
+
end
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
# Get Payment Flow Refunds
|
|
417
|
+
# Payment Flowに紐づくRefundsをリスト取得する
|
|
418
|
+
# @param payment_flow_id [String]
|
|
419
|
+
# @param [Hash] opts the optional parameters
|
|
420
|
+
# @option opts [Integer] :limit 取得するデータの最大件数 (default to 10)
|
|
421
|
+
# @option opts [String] :starting_after このIDより後のデータを取得
|
|
422
|
+
# @option opts [String] :ending_before このIDより前のデータを取得
|
|
423
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
424
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
425
|
+
# @return [PaymentRefundListResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
426
|
+
def get_payment_flow_refunds(payment_flow_id, opts = {})
|
|
427
|
+
if @api_client.config.debugging
|
|
428
|
+
@api_client.config.logger.debug 'Calling API: PaymentFlowsApi.get_payment_flow_refunds ...'
|
|
429
|
+
end
|
|
430
|
+
# verify the required parameter 'payment_flow_id' is set
|
|
431
|
+
if @api_client.config.client_side_validation && payment_flow_id.nil?
|
|
432
|
+
raise ArgumentError, "Missing the required parameter 'payment_flow_id' when calling PaymentFlowsApi.get_payment_flow_refunds"
|
|
433
|
+
end
|
|
434
|
+
if @api_client.config.client_side_validation && !opts[:limit].nil? && opts[:limit] > 100
|
|
435
|
+
raise ArgumentError, 'invalid value for "opts[:limit]" when calling PaymentFlowsApi.get_payment_flow_refunds, must be smaller than or equal to 100.'
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
if @api_client.config.client_side_validation && !opts[:limit].nil? && opts[:limit] < 1
|
|
439
|
+
raise ArgumentError, 'invalid value for "opts[:limit]" when calling PaymentFlowsApi.get_payment_flow_refunds, must be greater than or equal to 1.'
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
# resource path
|
|
443
|
+
local_var_path = '/v2/payment_flows/{payment_flow_id}/refunds'.sub('{' + 'payment_flow_id' + '}', CGI.escape(payment_flow_id.to_s))
|
|
444
|
+
|
|
445
|
+
# query parameters
|
|
446
|
+
query_params = opts[:query_params] || {}
|
|
447
|
+
query_params[:limit] = opts[:limit] if !opts[:limit].nil?
|
|
448
|
+
query_params[:starting_after] = opts[:starting_after] if !opts[:starting_after].nil?
|
|
449
|
+
query_params[:ending_before] = opts[:ending_before] if !opts[:ending_before].nil?
|
|
450
|
+
|
|
451
|
+
# header parameters
|
|
452
|
+
header_params = opts[:header_params] || {}
|
|
453
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
454
|
+
# HTTP header 'Accept' (if needed)
|
|
455
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
456
|
+
|
|
457
|
+
# form parameters
|
|
458
|
+
form_params = opts[:form_params] || {}
|
|
459
|
+
|
|
460
|
+
# http body (model)
|
|
461
|
+
post_body = opts[:debug_body]
|
|
462
|
+
|
|
463
|
+
# return_type
|
|
464
|
+
return_type = opts[:debug_return_type] || 'PaymentRefundListResponse'
|
|
465
|
+
|
|
466
|
+
# auth_names
|
|
467
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
468
|
+
|
|
469
|
+
new_options = opts.merge(
|
|
470
|
+
:operation => :"PaymentFlowsApi.get_payment_flow_refunds",
|
|
471
|
+
:header_params => header_params,
|
|
472
|
+
:query_params => query_params,
|
|
473
|
+
:form_params => form_params,
|
|
474
|
+
:body => post_body,
|
|
475
|
+
:auth_names => auth_names,
|
|
476
|
+
:return_type => return_type
|
|
477
|
+
)
|
|
478
|
+
|
|
479
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
480
|
+
if @api_client.config.debugging
|
|
481
|
+
@api_client.config.logger.debug "API called: PaymentFlowsApi#get_payment_flow_refunds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
if opts[:include_http_info]
|
|
485
|
+
[data, status_code, headers]
|
|
486
|
+
else
|
|
487
|
+
data
|
|
488
|
+
end
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
# Update Payment Flow
|
|
492
|
+
# @param payment_flow_id [String]
|
|
493
|
+
# @param payment_flow_update_request [PaymentFlowUpdateRequest]
|
|
494
|
+
# @param [Hash] opts the optional parameters
|
|
495
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
496
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
497
|
+
# @return [PaymentFlowResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
498
|
+
def update_payment_flow(payment_flow_id, payment_flow_update_request, opts = {})
|
|
499
|
+
if @api_client.config.debugging
|
|
500
|
+
@api_client.config.logger.debug 'Calling API: PaymentFlowsApi.update_payment_flow ...'
|
|
501
|
+
end
|
|
502
|
+
# verify the required parameter 'payment_flow_id' is set
|
|
503
|
+
if @api_client.config.client_side_validation && payment_flow_id.nil?
|
|
504
|
+
raise ArgumentError, "Missing the required parameter 'payment_flow_id' when calling PaymentFlowsApi.update_payment_flow"
|
|
505
|
+
end
|
|
506
|
+
# verify the required parameter 'payment_flow_update_request' is set
|
|
507
|
+
if @api_client.config.client_side_validation && payment_flow_update_request.nil?
|
|
508
|
+
raise ArgumentError, "Missing the required parameter 'payment_flow_update_request' when calling PaymentFlowsApi.update_payment_flow"
|
|
509
|
+
end
|
|
510
|
+
# resource path
|
|
511
|
+
local_var_path = '/v2/payment_flows/{payment_flow_id}'.sub('{' + 'payment_flow_id' + '}', CGI.escape(payment_flow_id.to_s))
|
|
512
|
+
|
|
513
|
+
# query parameters
|
|
514
|
+
query_params = opts[:query_params] || {}
|
|
515
|
+
|
|
516
|
+
# header parameters
|
|
517
|
+
header_params = opts[:header_params] || {}
|
|
518
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
519
|
+
# HTTP header 'Accept' (if needed)
|
|
520
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
521
|
+
# HTTP header 'Content-Type'
|
|
522
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
523
|
+
if !content_type.nil?
|
|
524
|
+
header_params['Content-Type'] = content_type
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
# form parameters
|
|
528
|
+
form_params = opts[:form_params] || {}
|
|
529
|
+
|
|
530
|
+
# http body (model)
|
|
531
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_flow_update_request)
|
|
532
|
+
|
|
533
|
+
# return_type
|
|
534
|
+
return_type = opts[:debug_return_type] || 'PaymentFlowResponse'
|
|
535
|
+
|
|
536
|
+
# auth_names
|
|
537
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
538
|
+
|
|
539
|
+
new_options = opts.merge(
|
|
540
|
+
:operation => :"PaymentFlowsApi.update_payment_flow",
|
|
541
|
+
:header_params => header_params,
|
|
542
|
+
:query_params => query_params,
|
|
543
|
+
:form_params => form_params,
|
|
544
|
+
:body => post_body,
|
|
545
|
+
:auth_names => auth_names,
|
|
546
|
+
:return_type => return_type
|
|
547
|
+
)
|
|
548
|
+
|
|
549
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
550
|
+
if @api_client.config.debugging
|
|
551
|
+
@api_client.config.logger.debug "API called: PaymentFlowsApi#update_payment_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
if opts[:include_http_info]
|
|
555
|
+
[data, status_code, headers]
|
|
556
|
+
else
|
|
557
|
+
data
|
|
558
|
+
end
|
|
559
|
+
end
|
|
560
|
+
end
|
|
561
|
+
end
|