Module: GrowsurfRuby::Internal::Type::RequestParameters::Converter Private

Included in:
Models::AccountCreateParams, Models::AccountUpdateParams, Models::Campaign::CommissionApproveParams, Models::Campaign::CommissionDeleteParams, Models::Campaign::ParticipantAddParams, Models::Campaign::ParticipantBulkDeleteParams, Models::Campaign::ParticipantCancelDelayedReferralParams, Models::Campaign::ParticipantDeleteParams, Models::Campaign::ParticipantEmailParams, Models::Campaign::ParticipantListActivityLogsParams, Models::Campaign::ParticipantListCommissionsParams, Models::Campaign::ParticipantListPayoutsParams, Models::Campaign::ParticipantListReferralsParams, Models::Campaign::ParticipantListRewardsParams, Models::Campaign::ParticipantRecordTransactionParams, Models::Campaign::ParticipantRefundTransactionParams, Models::Campaign::ParticipantRetrieveAnalyticsParams, Models::Campaign::ParticipantRetrieveParams, Models::Campaign::ParticipantSendInvitesParams, Models::Campaign::ParticipantTriggerReferralParams, Models::Campaign::ParticipantUpdateParams, Models::Campaign::RewardApproveParams, Models::Campaign::RewardCreateParams, Models::Campaign::RewardDeleteParams, Models::Campaign::RewardFulfillParams, Models::Campaign::RewardUpdateParams, Models::Campaign::WebhookCreateParams, Models::Campaign::WebhookDeleteParams, Models::Campaign::WebhookTestParams, Models::Campaign::WebhookUpdateParams, Models::CampaignCreateMobileParticipantTokenParams, Models::CampaignCreateParams, Models::CampaignListCommissionsParams, Models::CampaignListLeaderboardParams, Models::CampaignListParams, Models::CampaignListParticipantsParams, Models::CampaignListPayoutsParams, Models::CampaignListReferralsParams, Models::CampaignRetrieveAnalyticsParams, Models::CampaignRetrieveParams, Models::CampaignUpdateParams
Defined in:
lib/growsurf_ruby/internal/type/request_parameters.rb,
sig/growsurf_ruby/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/growsurf_ruby/internal/type/request_parameters.rb', line 27

def dump_request(params)
  state = {can_retry: true}
  case (dumped = dump(params, state: state))
  in Hash
    options = GrowsurfRuby::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