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,283 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PAYJPv2
|
|
17
|
+
class BalanceURLResponse
|
|
18
|
+
attr_accessor :object
|
|
19
|
+
|
|
20
|
+
# 残高明細書ダウンロード URL
|
|
21
|
+
attr_accessor :url
|
|
22
|
+
|
|
23
|
+
# 有効期限の日付 有効期限は発行から1時間です。
|
|
24
|
+
attr_accessor :expires
|
|
25
|
+
|
|
26
|
+
class EnumAttributeValidator
|
|
27
|
+
attr_reader :datatype
|
|
28
|
+
attr_reader :allowable_values
|
|
29
|
+
|
|
30
|
+
def initialize(datatype, allowable_values)
|
|
31
|
+
@allowable_values = allowable_values.map do |value|
|
|
32
|
+
case datatype.to_s
|
|
33
|
+
when /Integer/i
|
|
34
|
+
value.to_i
|
|
35
|
+
when /Float/i
|
|
36
|
+
value.to_f
|
|
37
|
+
else
|
|
38
|
+
value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def valid?(value)
|
|
44
|
+
!value || allowable_values.include?(value)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
|
+
def self.attribute_map
|
|
50
|
+
{
|
|
51
|
+
:object => :object,
|
|
52
|
+
:url => :url,
|
|
53
|
+
:expires => :expires
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns attribute mapping this model knows about
|
|
58
|
+
def self.acceptable_attribute_map
|
|
59
|
+
attribute_map
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Returns all the JSON keys this model knows about
|
|
63
|
+
def self.acceptable_attributes
|
|
64
|
+
acceptable_attribute_map.values
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Attribute type mapping.
|
|
68
|
+
def self.openapi_types
|
|
69
|
+
{
|
|
70
|
+
:object => :'String',
|
|
71
|
+
:url => :'String',
|
|
72
|
+
:expires => :'Time'
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# List of attributes with nullable: true
|
|
77
|
+
def self.openapi_nullable
|
|
78
|
+
Set.new([
|
|
79
|
+
])
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Initializes the object
|
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
84
|
+
def initialize(attributes = {})
|
|
85
|
+
if (!attributes.is_a?(Hash))
|
|
86
|
+
raise ArgumentError, "The input argument (attributes) must be a hash in `PAYJPv2::BalanceURLResponse` initialize method"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
90
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
91
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
92
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
93
|
+
raise ArgumentError, "`#{k}` is not a valid attribute in `PAYJPv2::BalanceURLResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
94
|
+
end
|
|
95
|
+
h[k.to_sym] = v
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:object)
|
|
99
|
+
self.object = attributes[:object]
|
|
100
|
+
else
|
|
101
|
+
self.object = 'balance_url'
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:url)
|
|
105
|
+
self.url = attributes[:url]
|
|
106
|
+
else
|
|
107
|
+
self.url = nil
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:expires)
|
|
111
|
+
self.expires = attributes[:expires]
|
|
112
|
+
else
|
|
113
|
+
self.expires = nil
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
118
|
+
# @param [Object] object Object to be assigned
|
|
119
|
+
def object=(object)
|
|
120
|
+
validator = EnumAttributeValidator.new('String', ["balance_url"])
|
|
121
|
+
unless validator.valid?(object)
|
|
122
|
+
raise ArgumentError, "invalid value for \"object\", must be one of #{validator.allowable_values}."
|
|
123
|
+
end
|
|
124
|
+
@object = object
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Custom attribute writer method with validation
|
|
128
|
+
# @param [Object] url Value to be assigned
|
|
129
|
+
def url=(url)
|
|
130
|
+
if url.nil?
|
|
131
|
+
raise ArgumentError, 'url cannot be nil'
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
@url = url
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Custom attribute writer method with validation
|
|
138
|
+
# @param [Object] expires Value to be assigned
|
|
139
|
+
def expires=(expires)
|
|
140
|
+
if expires.nil?
|
|
141
|
+
raise ArgumentError, 'expires cannot be nil'
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
@expires = expires
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Checks equality by comparing each attribute.
|
|
148
|
+
# @param [Object] Object to be compared
|
|
149
|
+
def ==(o)
|
|
150
|
+
return true if self.equal?(o)
|
|
151
|
+
self.class == o.class &&
|
|
152
|
+
object == o.object &&
|
|
153
|
+
url == o.url &&
|
|
154
|
+
expires == o.expires
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# @see the `==` method
|
|
158
|
+
# @param [Object] Object to be compared
|
|
159
|
+
def eql?(o)
|
|
160
|
+
self == o
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Calculates hash code according to all attributes.
|
|
164
|
+
# @return [Integer] Hash code
|
|
165
|
+
def hash
|
|
166
|
+
[object, url, expires].hash
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Builds the object from hash
|
|
170
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
171
|
+
# @return [Object] Returns the model itself
|
|
172
|
+
def self.build_from_hash(attributes)
|
|
173
|
+
return nil unless attributes.is_a?(Hash)
|
|
174
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
175
|
+
transformed_hash = {}
|
|
176
|
+
openapi_types.each_pair do |key, type|
|
|
177
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
178
|
+
transformed_hash["#{key}"] = nil
|
|
179
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
180
|
+
# check to ensure the input is an array given that the attribute
|
|
181
|
+
# is documented as an array but the input is not
|
|
182
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
183
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
184
|
+
end
|
|
185
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
186
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
new(transformed_hash)
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Deserializes the data based on type
|
|
193
|
+
# @param string type Data type
|
|
194
|
+
# @param string value Value to be deserialized
|
|
195
|
+
# @return [Object] Deserialized data
|
|
196
|
+
def self._deserialize(type, value)
|
|
197
|
+
case type.to_sym
|
|
198
|
+
when :Time
|
|
199
|
+
Time.parse(value)
|
|
200
|
+
when :Date
|
|
201
|
+
Date.parse(value)
|
|
202
|
+
when :String
|
|
203
|
+
value.to_s
|
|
204
|
+
when :Integer
|
|
205
|
+
value.to_i
|
|
206
|
+
when :Float
|
|
207
|
+
value.to_f
|
|
208
|
+
when :Boolean
|
|
209
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
210
|
+
true
|
|
211
|
+
else
|
|
212
|
+
false
|
|
213
|
+
end
|
|
214
|
+
when :Object
|
|
215
|
+
# generic object (usually a Hash), return directly
|
|
216
|
+
value
|
|
217
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
218
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
219
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
220
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
221
|
+
k_type = Regexp.last_match[:k_type]
|
|
222
|
+
v_type = Regexp.last_match[:v_type]
|
|
223
|
+
{}.tap do |hash|
|
|
224
|
+
value.each do |k, v|
|
|
225
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
else # model
|
|
229
|
+
# models (e.g. Pet) or oneOf
|
|
230
|
+
klass = PAYJPv2.const_get(type)
|
|
231
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Returns the string representation of the object
|
|
236
|
+
# @return [String] String presentation of the object
|
|
237
|
+
def to_s
|
|
238
|
+
to_hash.to_s
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
242
|
+
# @return [Hash] Returns the object in the form of hash
|
|
243
|
+
def to_body
|
|
244
|
+
to_hash
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Returns the object in the form of hash
|
|
248
|
+
# @return [Hash] Returns the object in the form of hash
|
|
249
|
+
def to_hash
|
|
250
|
+
hash = {}
|
|
251
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
252
|
+
value = self.send(attr)
|
|
253
|
+
if value.nil?
|
|
254
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
255
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
hash[param] = _to_hash(value)
|
|
259
|
+
end
|
|
260
|
+
hash
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Outputs non-array value in the form of hash
|
|
264
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
265
|
+
# @param [Object] value Any valid value
|
|
266
|
+
# @return [Hash] Returns the value in the form of hash
|
|
267
|
+
def _to_hash(value)
|
|
268
|
+
if value.is_a?(Array)
|
|
269
|
+
value.compact.map { |v| _to_hash(v) }
|
|
270
|
+
elsif value.is_a?(Hash)
|
|
271
|
+
{}.tap do |hash|
|
|
272
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
273
|
+
end
|
|
274
|
+
elsif value.respond_to? :to_hash
|
|
275
|
+
value.to_hash
|
|
276
|
+
else
|
|
277
|
+
value
|
|
278
|
+
end
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
end
|
|
@@ -0,0 +1,328 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PAYJPv2
|
|
17
|
+
class BankInfoResponse
|
|
18
|
+
# 銀行コード
|
|
19
|
+
attr_accessor :bank_code
|
|
20
|
+
|
|
21
|
+
# 支店番号
|
|
22
|
+
attr_accessor :bank_branch_code
|
|
23
|
+
|
|
24
|
+
# 口座種別
|
|
25
|
+
attr_accessor :bank_account_type
|
|
26
|
+
|
|
27
|
+
# 口座番号
|
|
28
|
+
attr_accessor :bank_account_number
|
|
29
|
+
|
|
30
|
+
# 口座名義
|
|
31
|
+
attr_accessor :bank_account_holder_name
|
|
32
|
+
|
|
33
|
+
# 最新振込結果 | 値 | |:---| | **success**: 成功 | | **failed**: 失敗 | | **pending**: 初回振込み前 |
|
|
34
|
+
attr_accessor :bank_account_status
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:bank_code => :bank_code,
|
|
40
|
+
:bank_branch_code => :bank_branch_code,
|
|
41
|
+
:bank_account_type => :bank_account_type,
|
|
42
|
+
:bank_account_number => :bank_account_number,
|
|
43
|
+
:bank_account_holder_name => :bank_account_holder_name,
|
|
44
|
+
:bank_account_status => :bank_account_status
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Returns attribute mapping this model knows about
|
|
49
|
+
def self.acceptable_attribute_map
|
|
50
|
+
attribute_map
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns all the JSON keys this model knows about
|
|
54
|
+
def self.acceptable_attributes
|
|
55
|
+
acceptable_attribute_map.values
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Attribute type mapping.
|
|
59
|
+
def self.openapi_types
|
|
60
|
+
{
|
|
61
|
+
:bank_code => :'String',
|
|
62
|
+
:bank_branch_code => :'String',
|
|
63
|
+
:bank_account_type => :'String',
|
|
64
|
+
:bank_account_number => :'String',
|
|
65
|
+
:bank_account_holder_name => :'String',
|
|
66
|
+
:bank_account_status => :'String'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
73
|
+
])
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Initializes the object
|
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
78
|
+
def initialize(attributes = {})
|
|
79
|
+
if (!attributes.is_a?(Hash))
|
|
80
|
+
raise ArgumentError, "The input argument (attributes) must be a hash in `PAYJPv2::BankInfoResponse` initialize method"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
84
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
86
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
87
|
+
raise ArgumentError, "`#{k}` is not a valid attribute in `PAYJPv2::BankInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
88
|
+
end
|
|
89
|
+
h[k.to_sym] = v
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:bank_code)
|
|
93
|
+
self.bank_code = attributes[:bank_code]
|
|
94
|
+
else
|
|
95
|
+
self.bank_code = nil
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:bank_branch_code)
|
|
99
|
+
self.bank_branch_code = attributes[:bank_branch_code]
|
|
100
|
+
else
|
|
101
|
+
self.bank_branch_code = nil
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:bank_account_type)
|
|
105
|
+
self.bank_account_type = attributes[:bank_account_type]
|
|
106
|
+
else
|
|
107
|
+
self.bank_account_type = nil
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:bank_account_number)
|
|
111
|
+
self.bank_account_number = attributes[:bank_account_number]
|
|
112
|
+
else
|
|
113
|
+
self.bank_account_number = nil
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:bank_account_holder_name)
|
|
117
|
+
self.bank_account_holder_name = attributes[:bank_account_holder_name]
|
|
118
|
+
else
|
|
119
|
+
self.bank_account_holder_name = nil
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:bank_account_status)
|
|
123
|
+
self.bank_account_status = attributes[:bank_account_status]
|
|
124
|
+
else
|
|
125
|
+
self.bank_account_status = nil
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Custom attribute writer method with validation
|
|
130
|
+
# @param [Object] bank_code Value to be assigned
|
|
131
|
+
def bank_code=(bank_code)
|
|
132
|
+
if bank_code.nil?
|
|
133
|
+
raise ArgumentError, 'bank_code cannot be nil'
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
@bank_code = bank_code
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Custom attribute writer method with validation
|
|
140
|
+
# @param [Object] bank_branch_code Value to be assigned
|
|
141
|
+
def bank_branch_code=(bank_branch_code)
|
|
142
|
+
if bank_branch_code.nil?
|
|
143
|
+
raise ArgumentError, 'bank_branch_code cannot be nil'
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
@bank_branch_code = bank_branch_code
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Custom attribute writer method with validation
|
|
150
|
+
# @param [Object] bank_account_type Value to be assigned
|
|
151
|
+
def bank_account_type=(bank_account_type)
|
|
152
|
+
if bank_account_type.nil?
|
|
153
|
+
raise ArgumentError, 'bank_account_type cannot be nil'
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
@bank_account_type = bank_account_type
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Custom attribute writer method with validation
|
|
160
|
+
# @param [Object] bank_account_number Value to be assigned
|
|
161
|
+
def bank_account_number=(bank_account_number)
|
|
162
|
+
if bank_account_number.nil?
|
|
163
|
+
raise ArgumentError, 'bank_account_number cannot be nil'
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
@bank_account_number = bank_account_number
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Custom attribute writer method with validation
|
|
170
|
+
# @param [Object] bank_account_holder_name Value to be assigned
|
|
171
|
+
def bank_account_holder_name=(bank_account_holder_name)
|
|
172
|
+
if bank_account_holder_name.nil?
|
|
173
|
+
raise ArgumentError, 'bank_account_holder_name cannot be nil'
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
@bank_account_holder_name = bank_account_holder_name
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Custom attribute writer method with validation
|
|
180
|
+
# @param [Object] bank_account_status Value to be assigned
|
|
181
|
+
def bank_account_status=(bank_account_status)
|
|
182
|
+
if bank_account_status.nil?
|
|
183
|
+
raise ArgumentError, 'bank_account_status cannot be nil'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
@bank_account_status = bank_account_status
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Checks equality by comparing each attribute.
|
|
190
|
+
# @param [Object] Object to be compared
|
|
191
|
+
def ==(o)
|
|
192
|
+
return true if self.equal?(o)
|
|
193
|
+
self.class == o.class &&
|
|
194
|
+
bank_code == o.bank_code &&
|
|
195
|
+
bank_branch_code == o.bank_branch_code &&
|
|
196
|
+
bank_account_type == o.bank_account_type &&
|
|
197
|
+
bank_account_number == o.bank_account_number &&
|
|
198
|
+
bank_account_holder_name == o.bank_account_holder_name &&
|
|
199
|
+
bank_account_status == o.bank_account_status
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# @see the `==` method
|
|
203
|
+
# @param [Object] Object to be compared
|
|
204
|
+
def eql?(o)
|
|
205
|
+
self == o
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Calculates hash code according to all attributes.
|
|
209
|
+
# @return [Integer] Hash code
|
|
210
|
+
def hash
|
|
211
|
+
[bank_code, bank_branch_code, bank_account_type, bank_account_number, bank_account_holder_name, bank_account_status].hash
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Builds the object from hash
|
|
215
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
216
|
+
# @return [Object] Returns the model itself
|
|
217
|
+
def self.build_from_hash(attributes)
|
|
218
|
+
return nil unless attributes.is_a?(Hash)
|
|
219
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
220
|
+
transformed_hash = {}
|
|
221
|
+
openapi_types.each_pair do |key, type|
|
|
222
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
223
|
+
transformed_hash["#{key}"] = nil
|
|
224
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
225
|
+
# check to ensure the input is an array given that the attribute
|
|
226
|
+
# is documented as an array but the input is not
|
|
227
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
228
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
229
|
+
end
|
|
230
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
231
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
new(transformed_hash)
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Deserializes the data based on type
|
|
238
|
+
# @param string type Data type
|
|
239
|
+
# @param string value Value to be deserialized
|
|
240
|
+
# @return [Object] Deserialized data
|
|
241
|
+
def self._deserialize(type, value)
|
|
242
|
+
case type.to_sym
|
|
243
|
+
when :Time
|
|
244
|
+
Time.parse(value)
|
|
245
|
+
when :Date
|
|
246
|
+
Date.parse(value)
|
|
247
|
+
when :String
|
|
248
|
+
value.to_s
|
|
249
|
+
when :Integer
|
|
250
|
+
value.to_i
|
|
251
|
+
when :Float
|
|
252
|
+
value.to_f
|
|
253
|
+
when :Boolean
|
|
254
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
255
|
+
true
|
|
256
|
+
else
|
|
257
|
+
false
|
|
258
|
+
end
|
|
259
|
+
when :Object
|
|
260
|
+
# generic object (usually a Hash), return directly
|
|
261
|
+
value
|
|
262
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
263
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
264
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
265
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
266
|
+
k_type = Regexp.last_match[:k_type]
|
|
267
|
+
v_type = Regexp.last_match[:v_type]
|
|
268
|
+
{}.tap do |hash|
|
|
269
|
+
value.each do |k, v|
|
|
270
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
else # model
|
|
274
|
+
# models (e.g. Pet) or oneOf
|
|
275
|
+
klass = PAYJPv2.const_get(type)
|
|
276
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Returns the string representation of the object
|
|
281
|
+
# @return [String] String presentation of the object
|
|
282
|
+
def to_s
|
|
283
|
+
to_hash.to_s
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
287
|
+
# @return [Hash] Returns the object in the form of hash
|
|
288
|
+
def to_body
|
|
289
|
+
to_hash
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# Returns the object in the form of hash
|
|
293
|
+
# @return [Hash] Returns the object in the form of hash
|
|
294
|
+
def to_hash
|
|
295
|
+
hash = {}
|
|
296
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
297
|
+
value = self.send(attr)
|
|
298
|
+
if value.nil?
|
|
299
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
300
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
hash[param] = _to_hash(value)
|
|
304
|
+
end
|
|
305
|
+
hash
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Outputs non-array value in the form of hash
|
|
309
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
310
|
+
# @param [Object] value Any valid value
|
|
311
|
+
# @return [Hash] Returns the value in the form of hash
|
|
312
|
+
def _to_hash(value)
|
|
313
|
+
if value.is_a?(Array)
|
|
314
|
+
value.compact.map { |v| _to_hash(v) }
|
|
315
|
+
elsif value.is_a?(Hash)
|
|
316
|
+
{}.tap do |hash|
|
|
317
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
318
|
+
end
|
|
319
|
+
elsif value.respond_to? :to_hash
|
|
320
|
+
value.to_hash
|
|
321
|
+
else
|
|
322
|
+
value
|
|
323
|
+
end
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PAYJPv2
|
|
17
|
+
class CaptureMethod
|
|
18
|
+
AUTOMATIC = "automatic".freeze
|
|
19
|
+
MANUAL = "manual".freeze
|
|
20
|
+
|
|
21
|
+
def self.all_vars
|
|
22
|
+
@all_vars ||= [AUTOMATIC, MANUAL].freeze
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Builds the enum from string
|
|
26
|
+
# @param [String] The enum value in the form of the string
|
|
27
|
+
# @return [String] The enum value
|
|
28
|
+
def self.build_from_hash(value)
|
|
29
|
+
new.build_from_hash(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Builds the enum from string
|
|
33
|
+
# @param [String] The enum value in the form of the string
|
|
34
|
+
# @return [String] The enum value
|
|
35
|
+
def build_from_hash(value)
|
|
36
|
+
return value if CaptureMethod.all_vars.include?(value)
|
|
37
|
+
raise "Invalid ENUM value #{value} for class #CaptureMethod"
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|