Class: WhopSDK::Models::CardUpdateParams::Billing

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/card_update_params.rb,
sig/whop_sdk/models/card_update_params.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

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(card_id:, account_id: nil, billing: nil, canceled: nil, frozen: nil, name: nil, pin: nil, remove_limit: nil, spend_limit: nil, spend_limit_frequency: nil, transaction_limit: nil, user_id: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::CardUpdateParams for more details.

Parameters:

  • card_id (String)
  • account_id (String) (defaults to: nil)

    The owning account ID (a biz_ identifier). Provide this or user_id.

  • billing (WhopSDK::Models::CardUpdateParams::Billing) (defaults to: nil)

    New billing address. Requires line1, city, region, postal_code, and country_code

  • canceled (Boolean) (defaults to: nil)

    Pass true to permanently cancel the card. A canceled card cannot be uncanceled

  • frozen (Boolean) (defaults to: nil)

    Pass true to freeze the card, false to unfreeze it.

  • name (String) (defaults to: nil)

    A display name for the card.

  • pin (String) (defaults to: nil)

    New 4-digit PIN. Can only be set on a card assigned to the acting user.

  • remove_limit (Boolean) (defaults to: nil)

    Pass true to remove the spending limit (make the card unlimited).

  • spend_limit (Float) (defaults to: nil)

    Spending limit amount, in dollars.

  • spend_limit_frequency (Symbol, WhopSDK::Models::CardUpdateParams::SpendLimitFrequency) (defaults to: nil)

    The spending limit window.

  • transaction_limit (Float) (defaults to: nil)

    Per-transaction limit amount, in dollars.

  • user_id (String) (defaults to: nil)

    The owning user ID (a user_ identifier). Provide this or account_id.

  • request_options (WhopSDK::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


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
# File 'lib/whop_sdk/models/card_update_params.rb', line 113

class Billing < WhopSDK::Internal::Type::BaseModel
  # @!attribute city
  #   Billing city.
  #
  #   @return [String]
  required :city, String

  # @!attribute country_code
  #   Billing country code, ISO 3166-1 alpha-2.
  #
  #   @return [String]
  required :country_code, String

  # @!attribute line1
  #   Street address line 1.
  #
  #   @return [String]
  required :line1, String

  # @!attribute postal_code
  #   Billing postal code.
  #
  #   @return [String]
  required :postal_code, String

  # @!attribute region
  #   Billing region or state.
  #
  #   @return [String]
  required :region, String

  # @!attribute line2
  #   Street address line 2.
  #
  #   @return [String, nil]
  optional :line2, String

  # @!method initialize(city:, country_code:, line1:, postal_code:, region:, line2: nil)
  #   New billing address. Requires line1, city, region, postal_code, and
  #   country_code.
  #
  #   @param city [String] Billing city.
  #
  #   @param country_code [String] Billing country code, ISO 3166-1 alpha-2.
  #
  #   @param line1 [String] Street address line 1.
  #
  #   @param postal_code [String] Billing postal code.
  #
  #   @param region [String] Billing region or state.
  #
  #   @param line2 [String] Street address line 2.
end

Instance Attribute Details

#cityString

Billing city.

Parameters:

  • value (String)

Returns:

  • (String)


118
# File 'lib/whop_sdk/models/card_update_params.rb', line 118

required :city, String

#country_codeString

Billing country code, ISO 3166-1 alpha-2.

Parameters:

  • value (String)

Returns:

  • (String)


124
# File 'lib/whop_sdk/models/card_update_params.rb', line 124

required :country_code, String

#line1String

Street address line 1.

Parameters:

  • value (String)

Returns:

  • (String)


130
# File 'lib/whop_sdk/models/card_update_params.rb', line 130

required :line1, String

#line2String?

Street address line 2.

Parameters:

  • (String)

Returns:

  • (String, nil)


148
# File 'lib/whop_sdk/models/card_update_params.rb', line 148

optional :line2, String

#postal_codeString

Billing postal code.

Parameters:

  • value (String)

Returns:

  • (String)


136
# File 'lib/whop_sdk/models/card_update_params.rb', line 136

required :postal_code, String

#regionString

Billing region or state.

Parameters:

  • value (String)

Returns:

  • (String)


142
# File 'lib/whop_sdk/models/card_update_params.rb', line 142

required :region, String

Instance Method Details

#to_hash{

Returns:

  • ({)


140
# File 'sig/whop_sdk/models/card_update_params.rbs', line 140

def to_hash: -> {