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,420 @@
|
|
|
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 CustomersApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create Customer
|
|
23
|
+
# @param customer_create_request [CustomerCreateRequest]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
26
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
27
|
+
# @return [CustomerResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
28
|
+
def create_customer(customer_create_request, opts = {})
|
|
29
|
+
if @api_client.config.debugging
|
|
30
|
+
@api_client.config.logger.debug 'Calling API: CustomersApi.create_customer ...'
|
|
31
|
+
end
|
|
32
|
+
# verify the required parameter 'customer_create_request' is set
|
|
33
|
+
if @api_client.config.client_side_validation && customer_create_request.nil?
|
|
34
|
+
raise ArgumentError, "Missing the required parameter 'customer_create_request' when calling CustomersApi.create_customer"
|
|
35
|
+
end
|
|
36
|
+
# resource path
|
|
37
|
+
local_var_path = '/v2/customers'
|
|
38
|
+
|
|
39
|
+
# query parameters
|
|
40
|
+
query_params = opts[:query_params] || {}
|
|
41
|
+
|
|
42
|
+
# header parameters
|
|
43
|
+
header_params = opts[:header_params] || {}
|
|
44
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
45
|
+
# HTTP header 'Accept' (if needed)
|
|
46
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
47
|
+
# HTTP header 'Content-Type'
|
|
48
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
49
|
+
if !content_type.nil?
|
|
50
|
+
header_params['Content-Type'] = content_type
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# form parameters
|
|
54
|
+
form_params = opts[:form_params] || {}
|
|
55
|
+
|
|
56
|
+
# http body (model)
|
|
57
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(customer_create_request)
|
|
58
|
+
|
|
59
|
+
# return_type
|
|
60
|
+
return_type = opts[:debug_return_type] || 'CustomerResponse'
|
|
61
|
+
|
|
62
|
+
# auth_names
|
|
63
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
64
|
+
|
|
65
|
+
new_options = opts.merge(
|
|
66
|
+
:operation => :"CustomersApi.create_customer",
|
|
67
|
+
:header_params => header_params,
|
|
68
|
+
:query_params => query_params,
|
|
69
|
+
:form_params => form_params,
|
|
70
|
+
:body => post_body,
|
|
71
|
+
:auth_names => auth_names,
|
|
72
|
+
:return_type => return_type
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
76
|
+
if @api_client.config.debugging
|
|
77
|
+
@api_client.config.logger.debug "API called: CustomersApi#create_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if opts[:include_http_info]
|
|
81
|
+
[data, status_code, headers]
|
|
82
|
+
else
|
|
83
|
+
data
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Delete Customer
|
|
88
|
+
# @param customer_id [String]
|
|
89
|
+
# @param [Hash] opts the optional parameters
|
|
90
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
91
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
92
|
+
# @return [CustomerResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
93
|
+
def delete_customer(customer_id, opts = {})
|
|
94
|
+
if @api_client.config.debugging
|
|
95
|
+
@api_client.config.logger.debug 'Calling API: CustomersApi.delete_customer ...'
|
|
96
|
+
end
|
|
97
|
+
# verify the required parameter 'customer_id' is set
|
|
98
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
99
|
+
raise ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.delete_customer"
|
|
100
|
+
end
|
|
101
|
+
# resource path
|
|
102
|
+
local_var_path = '/v2/customers/{customer_id}'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s))
|
|
103
|
+
|
|
104
|
+
# query parameters
|
|
105
|
+
query_params = opts[:query_params] || {}
|
|
106
|
+
|
|
107
|
+
# header parameters
|
|
108
|
+
header_params = opts[:header_params] || {}
|
|
109
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
110
|
+
# HTTP header 'Accept' (if needed)
|
|
111
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
112
|
+
|
|
113
|
+
# form parameters
|
|
114
|
+
form_params = opts[:form_params] || {}
|
|
115
|
+
|
|
116
|
+
# http body (model)
|
|
117
|
+
post_body = opts[:debug_body]
|
|
118
|
+
|
|
119
|
+
# return_type
|
|
120
|
+
return_type = opts[:debug_return_type] || 'CustomerResponse'
|
|
121
|
+
|
|
122
|
+
# auth_names
|
|
123
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
124
|
+
|
|
125
|
+
new_options = opts.merge(
|
|
126
|
+
:operation => :"CustomersApi.delete_customer",
|
|
127
|
+
:header_params => header_params,
|
|
128
|
+
:query_params => query_params,
|
|
129
|
+
:form_params => form_params,
|
|
130
|
+
:body => post_body,
|
|
131
|
+
:auth_names => auth_names,
|
|
132
|
+
:return_type => return_type
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
136
|
+
if @api_client.config.debugging
|
|
137
|
+
@api_client.config.logger.debug "API called: CustomersApi#delete_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if opts[:include_http_info]
|
|
141
|
+
[data, status_code, headers]
|
|
142
|
+
else
|
|
143
|
+
data
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Get All Customers
|
|
148
|
+
# @param [Hash] opts the optional parameters
|
|
149
|
+
# @option opts [Integer] :limit 取得するデータの最大件数 (default to 10)
|
|
150
|
+
# @option opts [String] :starting_after このIDより後のデータを取得
|
|
151
|
+
# @option opts [String] :ending_before このIDより前のデータを取得
|
|
152
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
153
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
154
|
+
# @return [CustomerListResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
155
|
+
def get_all_customers(opts = {})
|
|
156
|
+
if @api_client.config.debugging
|
|
157
|
+
@api_client.config.logger.debug 'Calling API: CustomersApi.get_all_customers ...'
|
|
158
|
+
end
|
|
159
|
+
if @api_client.config.client_side_validation && !opts[:limit].nil? && opts[:limit] > 100
|
|
160
|
+
raise ArgumentError, 'invalid value for "opts[:limit]" when calling CustomersApi.get_all_customers, must be smaller than or equal to 100.'
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if @api_client.config.client_side_validation && !opts[:limit].nil? && opts[:limit] < 1
|
|
164
|
+
raise ArgumentError, 'invalid value for "opts[:limit]" when calling CustomersApi.get_all_customers, must be greater than or equal to 1.'
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# resource path
|
|
168
|
+
local_var_path = '/v2/customers'
|
|
169
|
+
|
|
170
|
+
# query parameters
|
|
171
|
+
query_params = opts[:query_params] || {}
|
|
172
|
+
query_params[:limit] = opts[:limit] if !opts[:limit].nil?
|
|
173
|
+
query_params[:starting_after] = opts[:starting_after] if !opts[:starting_after].nil?
|
|
174
|
+
query_params[:ending_before] = opts[:ending_before] if !opts[:ending_before].nil?
|
|
175
|
+
|
|
176
|
+
# header parameters
|
|
177
|
+
header_params = opts[:header_params] || {}
|
|
178
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
179
|
+
# HTTP header 'Accept' (if needed)
|
|
180
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
181
|
+
|
|
182
|
+
# form parameters
|
|
183
|
+
form_params = opts[:form_params] || {}
|
|
184
|
+
|
|
185
|
+
# http body (model)
|
|
186
|
+
post_body = opts[:debug_body]
|
|
187
|
+
|
|
188
|
+
# return_type
|
|
189
|
+
return_type = opts[:debug_return_type] || 'CustomerListResponse'
|
|
190
|
+
|
|
191
|
+
# auth_names
|
|
192
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
193
|
+
|
|
194
|
+
new_options = opts.merge(
|
|
195
|
+
:operation => :"CustomersApi.get_all_customers",
|
|
196
|
+
:header_params => header_params,
|
|
197
|
+
:query_params => query_params,
|
|
198
|
+
:form_params => form_params,
|
|
199
|
+
:body => post_body,
|
|
200
|
+
:auth_names => auth_names,
|
|
201
|
+
:return_type => return_type
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
205
|
+
if @api_client.config.debugging
|
|
206
|
+
@api_client.config.logger.debug "API called: CustomersApi#get_all_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
if opts[:include_http_info]
|
|
210
|
+
[data, status_code, headers]
|
|
211
|
+
else
|
|
212
|
+
data
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Get Customer
|
|
217
|
+
# @param customer_id [String]
|
|
218
|
+
# @param [Hash] opts the optional parameters
|
|
219
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
220
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
221
|
+
# @return [CustomerResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
222
|
+
def get_customer(customer_id, opts = {})
|
|
223
|
+
if @api_client.config.debugging
|
|
224
|
+
@api_client.config.logger.debug 'Calling API: CustomersApi.get_customer ...'
|
|
225
|
+
end
|
|
226
|
+
# verify the required parameter 'customer_id' is set
|
|
227
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
228
|
+
raise ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_customer"
|
|
229
|
+
end
|
|
230
|
+
# resource path
|
|
231
|
+
local_var_path = '/v2/customers/{customer_id}'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s))
|
|
232
|
+
|
|
233
|
+
# query parameters
|
|
234
|
+
query_params = opts[:query_params] || {}
|
|
235
|
+
|
|
236
|
+
# header parameters
|
|
237
|
+
header_params = opts[:header_params] || {}
|
|
238
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
239
|
+
# HTTP header 'Accept' (if needed)
|
|
240
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
241
|
+
|
|
242
|
+
# form parameters
|
|
243
|
+
form_params = opts[:form_params] || {}
|
|
244
|
+
|
|
245
|
+
# http body (model)
|
|
246
|
+
post_body = opts[:debug_body]
|
|
247
|
+
|
|
248
|
+
# return_type
|
|
249
|
+
return_type = opts[:debug_return_type] || 'CustomerResponse'
|
|
250
|
+
|
|
251
|
+
# auth_names
|
|
252
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
253
|
+
|
|
254
|
+
new_options = opts.merge(
|
|
255
|
+
:operation => :"CustomersApi.get_customer",
|
|
256
|
+
:header_params => header_params,
|
|
257
|
+
:query_params => query_params,
|
|
258
|
+
:form_params => form_params,
|
|
259
|
+
:body => post_body,
|
|
260
|
+
:auth_names => auth_names,
|
|
261
|
+
:return_type => return_type
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
265
|
+
if @api_client.config.debugging
|
|
266
|
+
@api_client.config.logger.debug "API called: CustomersApi#get_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
if opts[:include_http_info]
|
|
270
|
+
[data, status_code, headers]
|
|
271
|
+
else
|
|
272
|
+
data
|
|
273
|
+
end
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Get Customer Payment Methods
|
|
277
|
+
# @param customer_id [String]
|
|
278
|
+
# @param [Hash] opts the optional parameters
|
|
279
|
+
# @option opts [Integer] :limit 取得するデータの最大件数 (default to 10)
|
|
280
|
+
# @option opts [String] :starting_after このIDより後のデータを取得
|
|
281
|
+
# @option opts [String] :ending_before このIDより前のデータを取得
|
|
282
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
283
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
284
|
+
# @return [PaymentMethodListResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
285
|
+
def get_customer_payment_methods(customer_id, opts = {})
|
|
286
|
+
if @api_client.config.debugging
|
|
287
|
+
@api_client.config.logger.debug 'Calling API: CustomersApi.get_customer_payment_methods ...'
|
|
288
|
+
end
|
|
289
|
+
# verify the required parameter 'customer_id' is set
|
|
290
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
291
|
+
raise ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_customer_payment_methods"
|
|
292
|
+
end
|
|
293
|
+
if @api_client.config.client_side_validation && !opts[:limit].nil? && opts[:limit] > 100
|
|
294
|
+
raise ArgumentError, 'invalid value for "opts[:limit]" when calling CustomersApi.get_customer_payment_methods, must be smaller than or equal to 100.'
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
if @api_client.config.client_side_validation && !opts[:limit].nil? && opts[:limit] < 1
|
|
298
|
+
raise ArgumentError, 'invalid value for "opts[:limit]" when calling CustomersApi.get_customer_payment_methods, must be greater than or equal to 1.'
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# resource path
|
|
302
|
+
local_var_path = '/v2/customers/{customer_id}/payment_methods'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s))
|
|
303
|
+
|
|
304
|
+
# query parameters
|
|
305
|
+
query_params = opts[:query_params] || {}
|
|
306
|
+
query_params[:limit] = opts[:limit] if !opts[:limit].nil?
|
|
307
|
+
query_params[:starting_after] = opts[:starting_after] if !opts[:starting_after].nil?
|
|
308
|
+
query_params[:ending_before] = opts[:ending_before] if !opts[:ending_before].nil?
|
|
309
|
+
|
|
310
|
+
# header parameters
|
|
311
|
+
header_params = opts[:header_params] || {}
|
|
312
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
313
|
+
# HTTP header 'Accept' (if needed)
|
|
314
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
315
|
+
|
|
316
|
+
# form parameters
|
|
317
|
+
form_params = opts[:form_params] || {}
|
|
318
|
+
|
|
319
|
+
# http body (model)
|
|
320
|
+
post_body = opts[:debug_body]
|
|
321
|
+
|
|
322
|
+
# return_type
|
|
323
|
+
return_type = opts[:debug_return_type] || 'PaymentMethodListResponse'
|
|
324
|
+
|
|
325
|
+
# auth_names
|
|
326
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
327
|
+
|
|
328
|
+
new_options = opts.merge(
|
|
329
|
+
:operation => :"CustomersApi.get_customer_payment_methods",
|
|
330
|
+
:header_params => header_params,
|
|
331
|
+
:query_params => query_params,
|
|
332
|
+
:form_params => form_params,
|
|
333
|
+
:body => post_body,
|
|
334
|
+
:auth_names => auth_names,
|
|
335
|
+
:return_type => return_type
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
339
|
+
if @api_client.config.debugging
|
|
340
|
+
@api_client.config.logger.debug "API called: CustomersApi#get_customer_payment_methods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
if opts[:include_http_info]
|
|
344
|
+
[data, status_code, headers]
|
|
345
|
+
else
|
|
346
|
+
data
|
|
347
|
+
end
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# Update Customer
|
|
351
|
+
# @param customer_id [String]
|
|
352
|
+
# @param customer_update_request [CustomerUpdateRequest]
|
|
353
|
+
# @param [Hash] opts the optional parameters
|
|
354
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
355
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
356
|
+
# @return [CustomerResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
357
|
+
def update_customer(customer_id, customer_update_request, opts = {})
|
|
358
|
+
if @api_client.config.debugging
|
|
359
|
+
@api_client.config.logger.debug 'Calling API: CustomersApi.update_customer ...'
|
|
360
|
+
end
|
|
361
|
+
# verify the required parameter 'customer_id' is set
|
|
362
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
363
|
+
raise ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.update_customer"
|
|
364
|
+
end
|
|
365
|
+
# verify the required parameter 'customer_update_request' is set
|
|
366
|
+
if @api_client.config.client_side_validation && customer_update_request.nil?
|
|
367
|
+
raise ArgumentError, "Missing the required parameter 'customer_update_request' when calling CustomersApi.update_customer"
|
|
368
|
+
end
|
|
369
|
+
# resource path
|
|
370
|
+
local_var_path = '/v2/customers/{customer_id}'.sub('{' + 'customer_id' + '}', CGI.escape(customer_id.to_s))
|
|
371
|
+
|
|
372
|
+
# query parameters
|
|
373
|
+
query_params = opts[:query_params] || {}
|
|
374
|
+
|
|
375
|
+
# header parameters
|
|
376
|
+
header_params = opts[:header_params] || {}
|
|
377
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
378
|
+
# HTTP header 'Accept' (if needed)
|
|
379
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
380
|
+
# HTTP header 'Content-Type'
|
|
381
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
382
|
+
if !content_type.nil?
|
|
383
|
+
header_params['Content-Type'] = content_type
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
# form parameters
|
|
387
|
+
form_params = opts[:form_params] || {}
|
|
388
|
+
|
|
389
|
+
# http body (model)
|
|
390
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(customer_update_request)
|
|
391
|
+
|
|
392
|
+
# return_type
|
|
393
|
+
return_type = opts[:debug_return_type] || 'CustomerResponse'
|
|
394
|
+
|
|
395
|
+
# auth_names
|
|
396
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
397
|
+
|
|
398
|
+
new_options = opts.merge(
|
|
399
|
+
:operation => :"CustomersApi.update_customer",
|
|
400
|
+
:header_params => header_params,
|
|
401
|
+
:query_params => query_params,
|
|
402
|
+
:form_params => form_params,
|
|
403
|
+
:body => post_body,
|
|
404
|
+
:auth_names => auth_names,
|
|
405
|
+
:return_type => return_type
|
|
406
|
+
)
|
|
407
|
+
|
|
408
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
409
|
+
if @api_client.config.debugging
|
|
410
|
+
@api_client.config.logger.debug "API called: CustomersApi#update_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
if opts[:include_http_info]
|
|
414
|
+
[data, status_code, headers]
|
|
415
|
+
else
|
|
416
|
+
data
|
|
417
|
+
end
|
|
418
|
+
end
|
|
419
|
+
end
|
|
420
|
+
end
|
|
@@ -0,0 +1,157 @@
|
|
|
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 EventsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get All Events
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @option opts [Integer] :limit 取得するデータの最大件数 (default to 10)
|
|
25
|
+
# @option opts [String] :starting_after このIDより後のデータを取得
|
|
26
|
+
# @option opts [String] :ending_before このIDより前のデータを取得
|
|
27
|
+
# @option opts [String] :resource_id 取得する event に紐づく API リソースの ID
|
|
28
|
+
# @option opts [String] :object 取得する event に紐づく API リソースの object。値はリソース名 (e.g. customer, payment_flow)
|
|
29
|
+
# @option opts [String] :type 取得する event の type
|
|
30
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
31
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
32
|
+
# @return [EventListResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
33
|
+
def get_all_events(opts = {})
|
|
34
|
+
if @api_client.config.debugging
|
|
35
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.get_all_events ...'
|
|
36
|
+
end
|
|
37
|
+
if @api_client.config.client_side_validation && !opts[:limit].nil? && opts[:limit] > 100
|
|
38
|
+
raise ArgumentError, 'invalid value for "opts[:limit]" when calling EventsApi.get_all_events, must be smaller than or equal to 100.'
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
if @api_client.config.client_side_validation && !opts[:limit].nil? && opts[:limit] < 1
|
|
42
|
+
raise ArgumentError, 'invalid value for "opts[:limit]" when calling EventsApi.get_all_events, must be greater than or equal to 1.'
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/v2/events'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
query_params[:limit] = opts[:limit] if !opts[:limit].nil?
|
|
51
|
+
query_params[:starting_after] = opts[:starting_after] if !opts[:starting_after].nil?
|
|
52
|
+
query_params[:ending_before] = opts[:ending_before] if !opts[:ending_before].nil?
|
|
53
|
+
query_params[:resource_id] = opts[:resource_id] if !opts[:resource_id].nil?
|
|
54
|
+
query_params[:object] = opts[:object] if !opts[:object].nil?
|
|
55
|
+
query_params[:type] = opts[:type] if !opts[:type].nil?
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
60
|
+
# HTTP header 'Accept' (if needed)
|
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
62
|
+
|
|
63
|
+
# form parameters
|
|
64
|
+
form_params = opts[:form_params] || {}
|
|
65
|
+
|
|
66
|
+
# http body (model)
|
|
67
|
+
post_body = opts[:debug_body]
|
|
68
|
+
|
|
69
|
+
# return_type
|
|
70
|
+
return_type = opts[:debug_return_type] || 'EventListResponse'
|
|
71
|
+
|
|
72
|
+
# auth_names
|
|
73
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
74
|
+
|
|
75
|
+
new_options = opts.merge(
|
|
76
|
+
:operation => :"EventsApi.get_all_events",
|
|
77
|
+
:header_params => header_params,
|
|
78
|
+
:query_params => query_params,
|
|
79
|
+
:form_params => form_params,
|
|
80
|
+
:body => post_body,
|
|
81
|
+
:auth_names => auth_names,
|
|
82
|
+
:return_type => return_type
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
86
|
+
if @api_client.config.debugging
|
|
87
|
+
@api_client.config.logger.debug "API called: EventsApi#get_all_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if opts[:include_http_info]
|
|
91
|
+
[data, status_code, headers]
|
|
92
|
+
else
|
|
93
|
+
data
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Get Event
|
|
98
|
+
# @param event_id [String]
|
|
99
|
+
# @param [Hash] opts the optional parameters
|
|
100
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
101
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
102
|
+
# @return [EventResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
103
|
+
def get_event(event_id, opts = {})
|
|
104
|
+
if @api_client.config.debugging
|
|
105
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.get_event ...'
|
|
106
|
+
end
|
|
107
|
+
# verify the required parameter 'event_id' is set
|
|
108
|
+
if @api_client.config.client_side_validation && event_id.nil?
|
|
109
|
+
raise ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.get_event"
|
|
110
|
+
end
|
|
111
|
+
# resource path
|
|
112
|
+
local_var_path = '/v2/events/{event_id}'.sub('{' + 'event_id' + '}', CGI.escape(event_id.to_s))
|
|
113
|
+
|
|
114
|
+
# query parameters
|
|
115
|
+
query_params = opts[:query_params] || {}
|
|
116
|
+
|
|
117
|
+
# header parameters
|
|
118
|
+
header_params = opts[:header_params] || {}
|
|
119
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
120
|
+
# HTTP header 'Accept' (if needed)
|
|
121
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
122
|
+
|
|
123
|
+
# form parameters
|
|
124
|
+
form_params = opts[:form_params] || {}
|
|
125
|
+
|
|
126
|
+
# http body (model)
|
|
127
|
+
post_body = opts[:debug_body]
|
|
128
|
+
|
|
129
|
+
# return_type
|
|
130
|
+
return_type = opts[:debug_return_type] || 'EventResponse'
|
|
131
|
+
|
|
132
|
+
# auth_names
|
|
133
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
134
|
+
|
|
135
|
+
new_options = opts.merge(
|
|
136
|
+
:operation => :"EventsApi.get_event",
|
|
137
|
+
:header_params => header_params,
|
|
138
|
+
:query_params => query_params,
|
|
139
|
+
:form_params => form_params,
|
|
140
|
+
:body => post_body,
|
|
141
|
+
:auth_names => auth_names,
|
|
142
|
+
:return_type => return_type
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
146
|
+
if @api_client.config.debugging
|
|
147
|
+
@api_client.config.logger.debug "API called: EventsApi#get_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if opts[:include_http_info]
|
|
151
|
+
[data, status_code, headers]
|
|
152
|
+
else
|
|
153
|
+
data
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
end
|