Module: Straddle::Internal::Type::RequestParameters::Converter Private

Included in:
Models::AccountCreateParams, Models::AccountListParams, Models::AccountOnboardParams, Models::AccountRetrieveParams, Models::AccountSettingRetrieveParams, Models::AccountSimulateOnboardingParams, Models::AccountUpdateParams, Models::BridgeCreateBankAccountPaykeyParams, Models::BridgeCreatePlaidPaykeyParams, Models::BridgeCreateQuilttPaykeyParams, Models::BridgeCreateTokenParams, Models::CapabilityRequestCreateParams, Models::CapabilityRequestListParams, Models::ChargeCancelParams, Models::ChargeCreateParams, Models::ChargeHoldParams, Models::ChargeListUnmaskedParams, Models::ChargeRefundParams, Models::ChargeReleaseParams, Models::ChargeResubmitParams, Models::ChargeRetrieveParams, Models::ChargeUpdateParams, Models::ChargeUploadAuthorizationProofParams, Models::CustomerCreateParams, Models::CustomerDeleteParams, Models::CustomerListParams, Models::CustomerListUnmaskedParams, Models::CustomerRefreshReviewParams, Models::CustomerRetrieveParams, Models::CustomerUpdateParams, Models::Customers::ReviewListParams, Models::Customers::ReviewSetVerificationDecisionParams, Models::FundingEventListParams, Models::FundingEventListPaymentsParams, Models::FundingEventRetrieveParams, Models::FundingEventSimulateParams, Models::LinkedBankAccountCancelParams, Models::LinkedBankAccountCreateParams, Models::LinkedBankAccountListParams, Models::LinkedBankAccountListUnmaskedParams, Models::LinkedBankAccountRetrieveParams, Models::LinkedBankAccountUpdateParams, Models::OrganizationCreateParams, Models::OrganizationListParams, Models::OrganizationRetrieveParams, Models::PaykeyCancelParams, Models::PaykeyListParams, Models::PaykeyListUnmaskedParams, Models::PaykeyRefreshBalanceParams, Models::PaykeyRefreshReviewParams, Models::PaykeyRetrieveParams, Models::PaykeyRevealParams, Models::PaykeyUnblockParams, Models::Paykeys::ReviewListParams, Models::Paykeys::ReviewSetVerificationDecisionParams, Models::PaymentListParams, Models::PayoutCancelParams, Models::PayoutCreateParams, Models::PayoutHoldParams, Models::PayoutListUnmaskedParams, Models::PayoutReleaseParams, Models::PayoutResubmitParams, Models::PayoutRetrieveParams, Models::PayoutUpdateParams, Models::PayoutUploadAuthorizationProofParams, Models::RepresentativeCreateParams, Models::RepresentativeListParams, Models::RepresentativeListUnmaskedParams, Models::RepresentativeRetrieveParams, Models::RepresentativeUpdateParams, Models::WebhookUnwrapParams
Defined in:
lib/straddle/internal/type/request_parameters.rb,
sig/straddle/internal/type/request_parameters.rbs

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#dump_request(params) ⇒ Array(Object, Hash{Symbol=>Object})

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • params (Object)

Returns:

  • (Array(Object, Hash{Symbol=>Object}))


27
28
29
30
31
32
33
34
35
36
37
# File 'lib/straddle/internal/type/request_parameters.rb', line 27

def dump_request(params)
  state = {can_retry: true}
  case (dumped = dump(params, state: state))
  in Hash
    options = Straddle::Internal::Util.coerce_hash!(dumped[:request_options]).to_h
    request_options = state.fetch(:can_retry) ? options : {**options, max_retries: 0}
    [dumped.except(:request_options), request_options]
  else
    [dumped, nil]
  end
end