Module: Lithic::Models::AuthRules::V2UpdateParams::Body

Extended by:
Internal::Type::Union
Defined in:
lib/lithic/models/auth_rules/v2_update_params.rb

Defined Under Namespace

Classes: AccountLevelRule, CardLevelRule, ProgramLevelRule

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, dump, hash, inspect, to_sorbet_type, variants

Methods included from Internal::Util::SorbetRuntimeSupport

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

Methods included from Internal::Type::Converter

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/lithic/models/auth_rules/v2_update_params.rb', line 89

Instance Method Details

#initialize(auth_rule_token:, body:, request_options: {}) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/lithic/models/auth_rules/v2_update_params.rb', line 26

module Body
  extend Lithic::Internal::Type::Union

  variant -> { Lithic::AuthRules::V2UpdateParams::Body::AccountLevelRule }

  variant -> { Lithic::AuthRules::V2UpdateParams::Body::CardLevelRule }

  variant -> { Lithic::AuthRules::V2UpdateParams::Body::ProgramLevelRule }

  class AccountLevelRule < Lithic::Internal::Type::BaseModel
    # @!attribute account_tokens
    #   Account tokens to which the Auth Rule applies.
    #
    #   @return [Array<String>, nil]
    optional :account_tokens, Lithic::Internal::Type::ArrayOf[String]

    # @!attribute business_account_tokens
    #   Business Account tokens to which the Auth Rule applies.
    #
    #   @return [Array<String>, nil]
    optional :business_account_tokens, Lithic::Internal::Type::ArrayOf[String]

    # @!attribute name
    #   Auth Rule Name
    #
    #   @return [String, nil]
    optional :name, String, nil?: true

    # @!attribute state
    #   The desired state of the Auth Rule.
    #
    #   Note that only deactivating an Auth Rule through this endpoint is supported at
    #   this time. If you need to (re-)activate an Auth Rule the /promote endpoint
    #   should be used to promote a draft to the currently active version.
    #
    #   @return [Symbol, Lithic::Models::AuthRules::V2UpdateParams::Body::AccountLevelRule::State, nil]
    optional :state, enum: -> { Lithic::AuthRules::V2UpdateParams::Body::AccountLevelRule::State }

    # @!method initialize(account_tokens: nil, business_account_tokens: nil, name: nil, state: nil)
    #   Some parameter documentations has been truncated, see
    #   {Lithic::Models::AuthRules::V2UpdateParams::Body::AccountLevelRule} for more
    #   details.
    #
    #   @param account_tokens [Array<String>] Account tokens to which the Auth Rule applies.
    #
    #   @param business_account_tokens [Array<String>] Business Account tokens to which the Auth Rule applies.
    #
    #   @param name [String, nil] Auth Rule Name
    #
    #   @param state [Symbol, Lithic::Models::AuthRules::V2UpdateParams::Body::AccountLevelRule::State] The desired state of the Auth Rule.

    # The desired state of the Auth Rule.
    #
    # Note that only deactivating an Auth Rule through this endpoint is supported at
    # this time. If you need to (re-)activate an Auth Rule the /promote endpoint
    # should be used to promote a draft to the currently active version.
    #
    # @see Lithic::Models::AuthRules::V2UpdateParams::Body::AccountLevelRule#state
    module State
      extend Lithic::Internal::Type::Enum

      INACTIVE = :INACTIVE

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class CardLevelRule < Lithic::Internal::Type::BaseModel
    # @!attribute card_tokens
    #   Card tokens to which the Auth Rule applies.
    #
    #   @return [Array<String>, nil]
    optional :card_tokens, Lithic::Internal::Type::ArrayOf[String]

    # @!attribute name
    #   Auth Rule Name
    #
    #   @return [String, nil]
    optional :name, String, nil?: true

    # @!attribute state
    #   The desired state of the Auth Rule.
    #
    #   Note that only deactivating an Auth Rule through this endpoint is supported at
    #   this time. If you need to (re-)activate an Auth Rule the /promote endpoint
    #   should be used to promote a draft to the currently active version.
    #
    #   @return [Symbol, Lithic::Models::AuthRules::V2UpdateParams::Body::CardLevelRule::State, nil]
    optional :state, enum: -> { Lithic::AuthRules::V2UpdateParams::Body::CardLevelRule::State }

    # @!method initialize(card_tokens: nil, name: nil, state: nil)
    #   Some parameter documentations has been truncated, see
    #   {Lithic::Models::AuthRules::V2UpdateParams::Body::CardLevelRule} for more
    #   details.
    #
    #   @param card_tokens [Array<String>] Card tokens to which the Auth Rule applies.
    #
    #   @param name [String, nil] Auth Rule Name
    #
    #   @param state [Symbol, Lithic::Models::AuthRules::V2UpdateParams::Body::CardLevelRule::State] The desired state of the Auth Rule.

    # The desired state of the Auth Rule.
    #
    # Note that only deactivating an Auth Rule through this endpoint is supported at
    # this time. If you need to (re-)activate an Auth Rule the /promote endpoint
    # should be used to promote a draft to the currently active version.
    #
    # @see Lithic::Models::AuthRules::V2UpdateParams::Body::CardLevelRule#state
    module State
      extend Lithic::Internal::Type::Enum

      INACTIVE = :INACTIVE

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  class ProgramLevelRule < Lithic::Internal::Type::BaseModel
    # @!attribute excluded_account_tokens
    #   Account tokens to which the Auth Rule does not apply.
    #
    #   @return [Array<String>, nil]
    optional :excluded_account_tokens, Lithic::Internal::Type::ArrayOf[String]

    # @!attribute excluded_business_account_tokens
    #   Business account tokens to which the Auth Rule does not apply.
    #
    #   @return [Array<String>, nil]
    optional :excluded_business_account_tokens, Lithic::Internal::Type::ArrayOf[String]

    # @!attribute excluded_card_tokens
    #   Card tokens to which the Auth Rule does not apply.
    #
    #   @return [Array<String>, nil]
    optional :excluded_card_tokens, Lithic::Internal::Type::ArrayOf[String]

    # @!attribute name
    #   Auth Rule Name
    #
    #   @return [String, nil]
    optional :name, String, nil?: true

    # @!attribute program_level
    #   Whether the Auth Rule applies to all authorizations on the card program.
    #
    #   @return [Boolean, nil]
    optional :program_level, Lithic::Internal::Type::Boolean

    # @!attribute state
    #   The desired state of the Auth Rule.
    #
    #   Note that only deactivating an Auth Rule through this endpoint is supported at
    #   this time. If you need to (re-)activate an Auth Rule the /promote endpoint
    #   should be used to promote a draft to the currently active version.
    #
    #   @return [Symbol, Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule::State, nil]
    optional :state, enum: -> { Lithic::AuthRules::V2UpdateParams::Body::ProgramLevelRule::State }

    # @!method initialize(excluded_account_tokens: nil, excluded_business_account_tokens: nil, excluded_card_tokens: nil, name: nil, program_level: nil, state: nil)
    #   Some parameter documentations has been truncated, see
    #   {Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule} for more
    #   details.
    #
    #   @param excluded_account_tokens [Array<String>] Account tokens to which the Auth Rule does not apply.
    #
    #   @param excluded_business_account_tokens [Array<String>] Business account tokens to which the Auth Rule does not apply.
    #
    #   @param excluded_card_tokens [Array<String>] Card tokens to which the Auth Rule does not apply.
    #
    #   @param name [String, nil] Auth Rule Name
    #
    #   @param program_level [Boolean] Whether the Auth Rule applies to all authorizations on the card program.
    #
    #   @param state [Symbol, Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule::State] The desired state of the Auth Rule.

    # The desired state of the Auth Rule.
    #
    # Note that only deactivating an Auth Rule through this endpoint is supported at
    # this time. If you need to (re-)activate an Auth Rule the /promote endpoint
    # should be used to promote a draft to the currently active version.
    #
    # @see Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule#state
    module State
      extend Lithic::Internal::Type::Enum

      INACTIVE = :INACTIVE

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  # @!method self.variants
  #   @return [Array(Lithic::Models::AuthRules::V2UpdateParams::Body::AccountLevelRule, Lithic::Models::AuthRules::V2UpdateParams::Body::CardLevelRule, Lithic::Models::AuthRules::V2UpdateParams::Body::ProgramLevelRule)]
end