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,105 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for PAYJPv2::PaymentDisputesApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'PaymentDisputesApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = PAYJPv2::PaymentDisputesApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of PaymentDisputesApi' do
|
|
30
|
+
it 'should create an instance of PaymentDisputesApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(PAYJPv2::PaymentDisputesApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for get_all_payment_disputes
|
|
36
|
+
# Get All Payment Disputes
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @option opts [Integer] :limit 取得するデータの最大件数
|
|
39
|
+
# @option opts [String] :starting_after このIDより後のデータを取得
|
|
40
|
+
# @option opts [String] :ending_before このIDより前のデータを取得
|
|
41
|
+
# @option opts [String] :payment_flow_id 取得する payment_dispute に紐づく payment_flow の ID
|
|
42
|
+
# @option opts [Array<PaymentDisputeStatus>] :status 取得する payment_dispute のステータス。複数指定可能
|
|
43
|
+
# @return [PaymentDisputeListResponse]
|
|
44
|
+
describe 'get_all_payment_disputes test' do
|
|
45
|
+
it 'should work' do
|
|
46
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
describe 'with mocked api_client' do
|
|
50
|
+
let(:mock_data) { double('data') }
|
|
51
|
+
let(:mock_status) { 200 }
|
|
52
|
+
let(:mock_headers) { { 'Content-Type' => 'application/json' } }
|
|
53
|
+
|
|
54
|
+
before do
|
|
55
|
+
@api_instance.api_client.config.client_side_validation = false
|
|
56
|
+
allow(@api_instance.api_client).to receive(:call_api)
|
|
57
|
+
.and_return([mock_data, mock_status, mock_headers])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
it 'returns data only by default' do
|
|
61
|
+
result = @api_instance.get_all_payment_disputes()
|
|
62
|
+
expect(result).to eq(mock_data)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
it 'returns [data, status, headers] with include_http_info: true' do
|
|
66
|
+
result = @api_instance.get_all_payment_disputes(include_http_info: true)
|
|
67
|
+
expect(result).to eq([mock_data, mock_status, mock_headers])
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# unit tests for get_payment_dispute
|
|
73
|
+
# Get Payment Dispute
|
|
74
|
+
# @param payment_dispute_id
|
|
75
|
+
# @param [Hash] opts the optional parameters
|
|
76
|
+
# @return [PaymentDisputeResponse]
|
|
77
|
+
describe 'get_payment_dispute test' do
|
|
78
|
+
it 'should work' do
|
|
79
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
describe 'with mocked api_client' do
|
|
83
|
+
let(:mock_data) { double('data') }
|
|
84
|
+
let(:mock_status) { 200 }
|
|
85
|
+
let(:mock_headers) { { 'Content-Type' => 'application/json' } }
|
|
86
|
+
|
|
87
|
+
before do
|
|
88
|
+
@api_instance.api_client.config.client_side_validation = false
|
|
89
|
+
allow(@api_instance.api_client).to receive(:call_api)
|
|
90
|
+
.and_return([mock_data, mock_status, mock_headers])
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
it 'returns data only by default' do
|
|
94
|
+
result = @api_instance.get_payment_dispute(nil)
|
|
95
|
+
expect(result).to eq(mock_data)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
it 'returns [data, status, headers] with include_http_info: true' do
|
|
99
|
+
result = @api_instance.get_payment_dispute(nil, include_http_info: true)
|
|
100
|
+
expect(result).to eq([mock_data, mock_status, mock_headers])
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
end
|
|
@@ -0,0 +1,310 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for PAYJPv2::PaymentFlowsApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'PaymentFlowsApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = PAYJPv2::PaymentFlowsApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of PaymentFlowsApi' do
|
|
30
|
+
it 'should create an instance of PaymentFlowsApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(PAYJPv2::PaymentFlowsApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for cancel_payment_flow
|
|
36
|
+
# Cancel Payment Flow
|
|
37
|
+
# @param payment_flow_id
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [PaymentFlowCancelRequest] :payment_flow_cancel_request
|
|
40
|
+
# @return [PaymentFlowResponse]
|
|
41
|
+
describe 'cancel_payment_flow test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
describe 'with mocked api_client' do
|
|
47
|
+
let(:mock_data) { double('data') }
|
|
48
|
+
let(:mock_status) { 200 }
|
|
49
|
+
let(:mock_headers) { { 'Content-Type' => 'application/json' } }
|
|
50
|
+
|
|
51
|
+
before do
|
|
52
|
+
@api_instance.api_client.config.client_side_validation = false
|
|
53
|
+
allow(@api_instance.api_client).to receive(:call_api)
|
|
54
|
+
.and_return([mock_data, mock_status, mock_headers])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
it 'returns data only by default' do
|
|
58
|
+
result = @api_instance.cancel_payment_flow(nil)
|
|
59
|
+
expect(result).to eq(mock_data)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
it 'returns [data, status, headers] with include_http_info: true' do
|
|
63
|
+
result = @api_instance.cancel_payment_flow(nil, include_http_info: true)
|
|
64
|
+
expect(result).to eq([mock_data, mock_status, mock_headers])
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# unit tests for capture_payment_flow
|
|
70
|
+
# Capture Payment Flow
|
|
71
|
+
# @param payment_flow_id
|
|
72
|
+
# @param [Hash] opts the optional parameters
|
|
73
|
+
# @option opts [PaymentFlowCaptureRequest] :payment_flow_capture_request
|
|
74
|
+
# @return [PaymentFlowResponse]
|
|
75
|
+
describe 'capture_payment_flow test' do
|
|
76
|
+
it 'should work' do
|
|
77
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
describe 'with mocked api_client' do
|
|
81
|
+
let(:mock_data) { double('data') }
|
|
82
|
+
let(:mock_status) { 200 }
|
|
83
|
+
let(:mock_headers) { { 'Content-Type' => 'application/json' } }
|
|
84
|
+
|
|
85
|
+
before do
|
|
86
|
+
@api_instance.api_client.config.client_side_validation = false
|
|
87
|
+
allow(@api_instance.api_client).to receive(:call_api)
|
|
88
|
+
.and_return([mock_data, mock_status, mock_headers])
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
it 'returns data only by default' do
|
|
92
|
+
result = @api_instance.capture_payment_flow(nil)
|
|
93
|
+
expect(result).to eq(mock_data)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
it 'returns [data, status, headers] with include_http_info: true' do
|
|
97
|
+
result = @api_instance.capture_payment_flow(nil, include_http_info: true)
|
|
98
|
+
expect(result).to eq([mock_data, mock_status, mock_headers])
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# unit tests for confirm_payment_flow
|
|
104
|
+
# Confirm Payment Flow
|
|
105
|
+
# @param payment_flow_id
|
|
106
|
+
# @param [Hash] opts the optional parameters
|
|
107
|
+
# @option opts [PaymentFlowConfirmRequest] :payment_flow_confirm_request
|
|
108
|
+
# @return [PaymentFlowResponse]
|
|
109
|
+
describe 'confirm_payment_flow test' do
|
|
110
|
+
it 'should work' do
|
|
111
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
describe 'with mocked api_client' do
|
|
115
|
+
let(:mock_data) { double('data') }
|
|
116
|
+
let(:mock_status) { 200 }
|
|
117
|
+
let(:mock_headers) { { 'Content-Type' => 'application/json' } }
|
|
118
|
+
|
|
119
|
+
before do
|
|
120
|
+
@api_instance.api_client.config.client_side_validation = false
|
|
121
|
+
allow(@api_instance.api_client).to receive(:call_api)
|
|
122
|
+
.and_return([mock_data, mock_status, mock_headers])
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
it 'returns data only by default' do
|
|
126
|
+
result = @api_instance.confirm_payment_flow(nil)
|
|
127
|
+
expect(result).to eq(mock_data)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
it 'returns [data, status, headers] with include_http_info: true' do
|
|
131
|
+
result = @api_instance.confirm_payment_flow(nil, include_http_info: true)
|
|
132
|
+
expect(result).to eq([mock_data, mock_status, mock_headers])
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# unit tests for create_payment_flow
|
|
138
|
+
# Create Payment Flow
|
|
139
|
+
# @param payment_flow_create_request
|
|
140
|
+
# @param [Hash] opts the optional parameters
|
|
141
|
+
# @return [PaymentFlowResponse]
|
|
142
|
+
describe 'create_payment_flow test' do
|
|
143
|
+
it 'should work' do
|
|
144
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
describe 'with mocked api_client' do
|
|
148
|
+
let(:mock_data) { double('data') }
|
|
149
|
+
let(:mock_status) { 200 }
|
|
150
|
+
let(:mock_headers) { { 'Content-Type' => 'application/json' } }
|
|
151
|
+
|
|
152
|
+
before do
|
|
153
|
+
@api_instance.api_client.config.client_side_validation = false
|
|
154
|
+
allow(@api_instance.api_client).to receive(:call_api)
|
|
155
|
+
.and_return([mock_data, mock_status, mock_headers])
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
it 'returns data only by default' do
|
|
159
|
+
result = @api_instance.create_payment_flow(nil)
|
|
160
|
+
expect(result).to eq(mock_data)
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
it 'returns [data, status, headers] with include_http_info: true' do
|
|
164
|
+
result = @api_instance.create_payment_flow(nil, include_http_info: true)
|
|
165
|
+
expect(result).to eq([mock_data, mock_status, mock_headers])
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# unit tests for get_all_payment_flows
|
|
171
|
+
# Get All Payment Flows
|
|
172
|
+
# @param [Hash] opts the optional parameters
|
|
173
|
+
# @option opts [Integer] :limit 取得するデータの最大件数
|
|
174
|
+
# @option opts [String] :starting_after このIDより後のデータを取得
|
|
175
|
+
# @option opts [String] :ending_before このIDより前のデータを取得
|
|
176
|
+
# @option opts [String] :customer_id 指定した顧客のデータのみを取得
|
|
177
|
+
# @return [PaymentFlowListResponse]
|
|
178
|
+
describe 'get_all_payment_flows test' do
|
|
179
|
+
it 'should work' do
|
|
180
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
describe 'with mocked api_client' do
|
|
184
|
+
let(:mock_data) { double('data') }
|
|
185
|
+
let(:mock_status) { 200 }
|
|
186
|
+
let(:mock_headers) { { 'Content-Type' => 'application/json' } }
|
|
187
|
+
|
|
188
|
+
before do
|
|
189
|
+
@api_instance.api_client.config.client_side_validation = false
|
|
190
|
+
allow(@api_instance.api_client).to receive(:call_api)
|
|
191
|
+
.and_return([mock_data, mock_status, mock_headers])
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
it 'returns data only by default' do
|
|
195
|
+
result = @api_instance.get_all_payment_flows()
|
|
196
|
+
expect(result).to eq(mock_data)
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
it 'returns [data, status, headers] with include_http_info: true' do
|
|
200
|
+
result = @api_instance.get_all_payment_flows(include_http_info: true)
|
|
201
|
+
expect(result).to eq([mock_data, mock_status, mock_headers])
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# unit tests for get_payment_flow
|
|
207
|
+
# Get Payment Flow
|
|
208
|
+
# @param payment_flow_id
|
|
209
|
+
# @param [Hash] opts the optional parameters
|
|
210
|
+
# @return [PaymentFlowResponse]
|
|
211
|
+
describe 'get_payment_flow test' do
|
|
212
|
+
it 'should work' do
|
|
213
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
describe 'with mocked api_client' do
|
|
217
|
+
let(:mock_data) { double('data') }
|
|
218
|
+
let(:mock_status) { 200 }
|
|
219
|
+
let(:mock_headers) { { 'Content-Type' => 'application/json' } }
|
|
220
|
+
|
|
221
|
+
before do
|
|
222
|
+
@api_instance.api_client.config.client_side_validation = false
|
|
223
|
+
allow(@api_instance.api_client).to receive(:call_api)
|
|
224
|
+
.and_return([mock_data, mock_status, mock_headers])
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
it 'returns data only by default' do
|
|
228
|
+
result = @api_instance.get_payment_flow(nil)
|
|
229
|
+
expect(result).to eq(mock_data)
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
it 'returns [data, status, headers] with include_http_info: true' do
|
|
233
|
+
result = @api_instance.get_payment_flow(nil, include_http_info: true)
|
|
234
|
+
expect(result).to eq([mock_data, mock_status, mock_headers])
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# unit tests for get_payment_flow_refunds
|
|
240
|
+
# Get Payment Flow Refunds
|
|
241
|
+
# Payment Flowに紐づくRefundsをリスト取得する
|
|
242
|
+
# @param payment_flow_id
|
|
243
|
+
# @param [Hash] opts the optional parameters
|
|
244
|
+
# @option opts [Integer] :limit 取得するデータの最大件数
|
|
245
|
+
# @option opts [String] :starting_after このIDより後のデータを取得
|
|
246
|
+
# @option opts [String] :ending_before このIDより前のデータを取得
|
|
247
|
+
# @return [PaymentRefundListResponse]
|
|
248
|
+
describe 'get_payment_flow_refunds test' do
|
|
249
|
+
it 'should work' do
|
|
250
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
describe 'with mocked api_client' do
|
|
254
|
+
let(:mock_data) { double('data') }
|
|
255
|
+
let(:mock_status) { 200 }
|
|
256
|
+
let(:mock_headers) { { 'Content-Type' => 'application/json' } }
|
|
257
|
+
|
|
258
|
+
before do
|
|
259
|
+
@api_instance.api_client.config.client_side_validation = false
|
|
260
|
+
allow(@api_instance.api_client).to receive(:call_api)
|
|
261
|
+
.and_return([mock_data, mock_status, mock_headers])
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
it 'returns data only by default' do
|
|
265
|
+
result = @api_instance.get_payment_flow_refunds(nil)
|
|
266
|
+
expect(result).to eq(mock_data)
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
it 'returns [data, status, headers] with include_http_info: true' do
|
|
270
|
+
result = @api_instance.get_payment_flow_refunds(nil, include_http_info: true)
|
|
271
|
+
expect(result).to eq([mock_data, mock_status, mock_headers])
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# unit tests for update_payment_flow
|
|
277
|
+
# Update Payment Flow
|
|
278
|
+
# @param payment_flow_id
|
|
279
|
+
# @param payment_flow_update_request
|
|
280
|
+
# @param [Hash] opts the optional parameters
|
|
281
|
+
# @return [PaymentFlowResponse]
|
|
282
|
+
describe 'update_payment_flow test' do
|
|
283
|
+
it 'should work' do
|
|
284
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
describe 'with mocked api_client' do
|
|
288
|
+
let(:mock_data) { double('data') }
|
|
289
|
+
let(:mock_status) { 200 }
|
|
290
|
+
let(:mock_headers) { { 'Content-Type' => 'application/json' } }
|
|
291
|
+
|
|
292
|
+
before do
|
|
293
|
+
@api_instance.api_client.config.client_side_validation = false
|
|
294
|
+
allow(@api_instance.api_client).to receive(:call_api)
|
|
295
|
+
.and_return([mock_data, mock_status, mock_headers])
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
it 'returns data only by default' do
|
|
299
|
+
result = @api_instance.update_payment_flow(nil, nil)
|
|
300
|
+
expect(result).to eq(mock_data)
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
it 'returns [data, status, headers] with include_http_info: true' do
|
|
304
|
+
result = @api_instance.update_payment_flow(nil, nil, include_http_info: true)
|
|
305
|
+
expect(result).to eq([mock_data, mock_status, mock_headers])
|
|
306
|
+
end
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
end
|
|
@@ -0,0 +1,137 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for PAYJPv2::PaymentMethodConfigurationsApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'PaymentMethodConfigurationsApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = PAYJPv2::PaymentMethodConfigurationsApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of PaymentMethodConfigurationsApi' do
|
|
30
|
+
it 'should create an instance of PaymentMethodConfigurationsApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(PAYJPv2::PaymentMethodConfigurationsApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for get_all_payment_method_configurations
|
|
36
|
+
# Get All Payment Method Configurations
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @option opts [Integer] :limit 取得するデータの最大件数
|
|
39
|
+
# @option opts [String] :starting_after このIDより後のデータを取得
|
|
40
|
+
# @option opts [String] :ending_before このIDより前のデータを取得
|
|
41
|
+
# @return [PaymentMethodConfigurationListResponse]
|
|
42
|
+
describe 'get_all_payment_method_configurations test' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
describe 'with mocked api_client' do
|
|
48
|
+
let(:mock_data) { double('data') }
|
|
49
|
+
let(:mock_status) { 200 }
|
|
50
|
+
let(:mock_headers) { { 'Content-Type' => 'application/json' } }
|
|
51
|
+
|
|
52
|
+
before do
|
|
53
|
+
@api_instance.api_client.config.client_side_validation = false
|
|
54
|
+
allow(@api_instance.api_client).to receive(:call_api)
|
|
55
|
+
.and_return([mock_data, mock_status, mock_headers])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
it 'returns data only by default' do
|
|
59
|
+
result = @api_instance.get_all_payment_method_configurations()
|
|
60
|
+
expect(result).to eq(mock_data)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
it 'returns [data, status, headers] with include_http_info: true' do
|
|
64
|
+
result = @api_instance.get_all_payment_method_configurations(include_http_info: true)
|
|
65
|
+
expect(result).to eq([mock_data, mock_status, mock_headers])
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# unit tests for get_payment_method_configuration
|
|
71
|
+
# Get Payment Method Configuration
|
|
72
|
+
# @param payment_method_configuration_id
|
|
73
|
+
# @param [Hash] opts the optional parameters
|
|
74
|
+
# @return [PaymentMethodConfigurationDetailsResponse]
|
|
75
|
+
describe 'get_payment_method_configuration test' do
|
|
76
|
+
it 'should work' do
|
|
77
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
describe 'with mocked api_client' do
|
|
81
|
+
let(:mock_data) { double('data') }
|
|
82
|
+
let(:mock_status) { 200 }
|
|
83
|
+
let(:mock_headers) { { 'Content-Type' => 'application/json' } }
|
|
84
|
+
|
|
85
|
+
before do
|
|
86
|
+
@api_instance.api_client.config.client_side_validation = false
|
|
87
|
+
allow(@api_instance.api_client).to receive(:call_api)
|
|
88
|
+
.and_return([mock_data, mock_status, mock_headers])
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
it 'returns data only by default' do
|
|
92
|
+
result = @api_instance.get_payment_method_configuration(nil)
|
|
93
|
+
expect(result).to eq(mock_data)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
it 'returns [data, status, headers] with include_http_info: true' do
|
|
97
|
+
result = @api_instance.get_payment_method_configuration(nil, include_http_info: true)
|
|
98
|
+
expect(result).to eq([mock_data, mock_status, mock_headers])
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# unit tests for update_payment_method_configuration
|
|
104
|
+
# Update Payment Method Configuration
|
|
105
|
+
# @param payment_method_configuration_id
|
|
106
|
+
# @param payment_method_configuration_update_request
|
|
107
|
+
# @param [Hash] opts the optional parameters
|
|
108
|
+
# @return [PaymentMethodConfigurationDetailsResponse]
|
|
109
|
+
describe 'update_payment_method_configuration test' do
|
|
110
|
+
it 'should work' do
|
|
111
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
describe 'with mocked api_client' do
|
|
115
|
+
let(:mock_data) { double('data') }
|
|
116
|
+
let(:mock_status) { 200 }
|
|
117
|
+
let(:mock_headers) { { 'Content-Type' => 'application/json' } }
|
|
118
|
+
|
|
119
|
+
before do
|
|
120
|
+
@api_instance.api_client.config.client_side_validation = false
|
|
121
|
+
allow(@api_instance.api_client).to receive(:call_api)
|
|
122
|
+
.and_return([mock_data, mock_status, mock_headers])
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
it 'returns data only by default' do
|
|
126
|
+
result = @api_instance.update_payment_method_configuration(nil, nil)
|
|
127
|
+
expect(result).to eq(mock_data)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
it 'returns [data, status, headers] with include_http_info: true' do
|
|
131
|
+
result = @api_instance.update_payment_method_configuration(nil, nil, include_http_info: true)
|
|
132
|
+
expect(result).to eq([mock_data, mock_status, mock_headers])
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
end
|