Class: Courier::Models::ProviderPatchParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/courier/models/provider_patch_params.rb,
sig/courier/models/provider_patch_params.rbs

Overview

See Also:

  • Courier::Resources::Providers#patch

Defined Under Namespace

Classes: Patch

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize ⇒ ProviderPatchParams

Returns a new instance of ProviderPatchParams.

Parameters:



15
16
17
18
19
# File 'sig/courier/models/provider_patch_params.rbs', line 15

def initialize: (
  id: String,
  patch: ::Array[Courier::ProviderPatchParams::Patch],
  ?request_options: Courier::request_opts
) -> void

Instance Attribute Details

#id ⇒ String

Parameters:

Returns:



13
# File 'lib/courier/models/provider_patch_params.rb', line 13

required :id, String

#patch ⇒ Array<Courier::Models::ProviderPatchParams::Patch>

Operations to apply, in order. Paths address the provider as it is returned: /title, /alias, /provider, and /settings/<key> with the snake_case setting keys, including nested paths such as /settings/rate_limit/rate. If any operation fails, for example a test, nothing is saved and the request returns a 400. The result can't change provider, remove title, or add other top-level fields. Removing /alias clears it.

Parameters:

Returns:



24
# File 'lib/courier/models/provider_patch_params.rb', line 24

required :patch, -> { Courier::Internal::Type::ArrayOf[Courier::ProviderPatchParams::Patch] }

Instance Method Details

#to_hash ⇒ { id: String, patch: ::Array[Courier::ProviderPatchParams::Patch], request_options: Courier::RequestOptions }

Returns:



21
22
23
24
25
# File 'sig/courier/models/provider_patch_params.rbs', line 21

def to_hash: -> {
  id: String,
  patch: ::Array[Courier::ProviderPatchParams::Patch],
  request_options: Courier::RequestOptions
}