Class: WhopSDK::Models::CardListResponse::Data
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::CardListResponse::Data
- Defined in:
- lib/whop_sdk/models/card_list_response.rb,
sig/whop_sdk/models/card_list_response.rbs
Defined Under Namespace
Modules: Object, Status, Type Classes: Billing, Limit, Secrets
Instance Attribute Summary collapse
-
#billing ⇒ WhopSDK::Models::CardListResponse::Data::Billing?
The billing address.
-
#canceled_at ⇒ Time?
When the card was canceled.
-
#created_at ⇒ Time?
When the card was created.
-
#expiration_month ⇒ String?
Card expiration month.
-
#expiration_year ⇒ String?
Card expiration year.
-
#id ⇒ String
Card ID, prefixed
icrd_. -
#last4 ⇒ String?
Last four digits of the card number.
-
#limit ⇒ WhopSDK::Models::CardListResponse::Data::Limit?
The spending limit configuration.
-
#name ⇒ String?
Card display name.
- #object ⇒ Symbol, WhopSDK::Models::CardListResponse::Data::Object
-
#secrets ⇒ WhopSDK::Models::CardListResponse::Data::Secrets?
Sensitive card details.
-
#spent_last_month ⇒ Integer?
Total spend in the last 30 days, in cents.
-
#status ⇒ Symbol, ...
The card status.
-
#type ⇒ Symbol, ...
The card type.
-
#user_id ⇒ String?
Cardholder user ID, prefixed
user_, when assigned.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(amount:, frequency:) ⇒ Object
constructor
The spending limit configuration.
- #to_hash ⇒ {
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(amount:, frequency:) ⇒ Object
The spending limit configuration.
15 16 17 18 19 20 21 22 23 24 25 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 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 15 class Data < WhopSDK::Internal::Type::BaseModel # @!attribute id # Card ID, prefixed `icrd_`. # # @return [String] required :id, String # @!attribute billing # The billing address. # # @return [WhopSDK::Models::CardListResponse::Data::Billing, nil] required :billing, -> { WhopSDK::Models::CardListResponse::Data::Billing }, nil?: true # @!attribute canceled_at # When the card was canceled. # # @return [Time, nil] required :canceled_at, Time, nil?: true # @!attribute created_at # When the card was created. # # @return [Time, nil] required :created_at, Time, nil?: true # @!attribute expiration_month # Card expiration month. # # @return [String, nil] required :expiration_month, String, nil?: true # @!attribute expiration_year # Card expiration year. # # @return [String, nil] required :expiration_year, String, nil?: true # @!attribute last4 # Last four digits of the card number. `null` for pending invitation cards. # # @return [String, nil] required :last4, String, nil?: true # @!attribute limit # The spending limit configuration. # # @return [WhopSDK::Models::CardListResponse::Data::Limit, nil] required :limit, -> { WhopSDK::Models::CardListResponse::Data::Limit }, nil?: true # @!attribute name # Card display name. # # @return [String, nil] required :name, String, nil?: true # @!attribute object # # @return [Symbol, WhopSDK::Models::CardListResponse::Data::Object] required :object, enum: -> { WhopSDK::Models::CardListResponse::Data::Object } # @!attribute spent_last_month # Total spend in the last 30 days, in cents. # # @return [Integer, nil] required :spent_last_month, Integer, nil?: true # @!attribute status # The card status. # # @return [Symbol, WhopSDK::Models::CardListResponse::Data::Status, nil] required :status, enum: -> { WhopSDK::Models::CardListResponse::Data::Status }, nil?: true # @!attribute type # The card type. # # @return [Symbol, WhopSDK::Models::CardListResponse::Data::Type, nil] required :type, enum: -> { WhopSDK::Models::CardListResponse::Data::Type }, nil?: true # @!attribute user_id # Cardholder user ID, prefixed `user_`, when assigned. # # @return [String, nil] required :user_id, String, nil?: true # @!attribute secrets # Sensitive card details. Present only on `GET /cards/:card_id` for active cards; # `null` when the card is inactive or details cannot be retrieved. # # @return [WhopSDK::Models::CardListResponse::Data::Secrets, nil] optional :secrets, -> { WhopSDK::Models::CardListResponse::Data::Secrets }, nil?: true # @!method initialize(id:, billing:, canceled_at:, created_at:, expiration_month:, expiration_year:, last4:, limit:, name:, object:, spent_last_month:, status:, type:, user_id:, secrets: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CardListResponse::Data} for more details. # # @param id [String] Card ID, prefixed `icrd_`. # # @param billing [WhopSDK::Models::CardListResponse::Data::Billing, nil] The billing address. # # @param canceled_at [Time, nil] When the card was canceled. # # @param created_at [Time, nil] When the card was created. # # @param expiration_month [String, nil] Card expiration month. # # @param expiration_year [String, nil] Card expiration year. # # @param last4 [String, nil] Last four digits of the card number. `null` for pending invitation cards. # # @param limit [WhopSDK::Models::CardListResponse::Data::Limit, nil] The spending limit configuration. # # @param name [String, nil] Card display name. # # @param object [Symbol, WhopSDK::Models::CardListResponse::Data::Object] # # @param spent_last_month [Integer, nil] Total spend in the last 30 days, in cents. # # @param status [Symbol, WhopSDK::Models::CardListResponse::Data::Status, nil] The card status. # # @param type [Symbol, WhopSDK::Models::CardListResponse::Data::Type, nil] The card type. # # @param user_id [String, nil] Cardholder user ID, prefixed `user_`, when assigned. # # @param secrets [WhopSDK::Models::CardListResponse::Data::Secrets, nil] Sensitive card details. Present only on `GET /cards/:card_id` for active cards; # @see WhopSDK::Models::CardListResponse::Data#billing class Billing < WhopSDK::Internal::Type::BaseModel # @!attribute city # Billing city. # # @return [String, nil] required :city, String, nil?: true # @!attribute country_code # Billing country code. # # @return [String, nil] required :country_code, String, nil?: true # @!attribute line1 # Street address line 1. # # @return [String, nil] required :line1, String, nil?: true # @!attribute line2 # Street address line 2. # # @return [String, nil] required :line2, String, nil?: true # @!attribute postal_code # Billing postal code. # # @return [String, nil] required :postal_code, String, nil?: true # @!attribute region # Billing region or state. # # @return [String, nil] required :region, String, nil?: true # @!method initialize(city:, country_code:, line1:, line2:, postal_code:, region:) # The billing address. # # @param city [String, nil] Billing city. # # @param country_code [String, nil] Billing country code. # # @param line1 [String, nil] Street address line 1. # # @param line2 [String, nil] Street address line 2. # # @param postal_code [String, nil] Billing postal code. # # @param region [String, nil] Billing region or state. end # @see WhopSDK::Models::CardListResponse::Data#limit class Limit < WhopSDK::Internal::Type::BaseModel # @!attribute amount # The limit amount in dollars. # # @return [Float] required :amount, Float # @!attribute frequency # Limit window, for example `per24HourPeriod` or `perAuthorization`. # # @return [String] required :frequency, String # @!method initialize(amount:, frequency:) # The spending limit configuration. # # @param amount [Float] The limit amount in dollars. # # @param frequency [String] Limit window, for example `per24HourPeriod` or `perAuthorization`. end # @see WhopSDK::Models::CardListResponse::Data#object module Object extend WhopSDK::Internal::Type::Enum CARD = :card # @!method self.values # @return [Array<Symbol>] end # The card status. # # @see WhopSDK::Models::CardListResponse::Data#status module Status extend WhopSDK::Internal::Type::Enum ACTIVE = :active FROZEN = :frozen CANCELED = :canceled INVITED = :invited # @!method self.values # @return [Array<Symbol>] end # The card type. # # @see WhopSDK::Models::CardListResponse::Data#type module Type extend WhopSDK::Internal::Type::Enum VIRTUAL = :virtual PHYSICAL = :physical # @!method self.values # @return [Array<Symbol>] end # @see WhopSDK::Models::CardListResponse::Data#secrets class Secrets < WhopSDK::Internal::Type::BaseModel # @!attribute card_number # Full card number. # # @return [String] required :card_number, String # @!attribute cvc # Card verification code. # # @return [String] required :cvc, String # @!attribute name_on_card # Cardholder name printed on the card. # # @return [String, nil] required :name_on_card, String, nil?: true # @!method initialize(card_number:, cvc:, name_on_card:) # Sensitive card details. Present only on `GET /cards/:card_id` for active cards; # `null` when the card is inactive or details cannot be retrieved. # # @param card_number [String] Full card number. # # @param cvc [String] Card verification code. # # @param name_on_card [String, nil] Cardholder name printed on the card. end end |
Instance Attribute Details
#billing ⇒ WhopSDK::Models::CardListResponse::Data::Billing?
The billing address.
26 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 26 required :billing, -> { WhopSDK::Models::CardListResponse::Data::Billing }, nil?: true |
#canceled_at ⇒ Time?
When the card was canceled.
32 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 32 required :canceled_at, Time, nil?: true |
#created_at ⇒ Time?
When the card was created.
38 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 38 required :created_at, Time, nil?: true |
#expiration_month ⇒ String?
Card expiration month.
44 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 44 required :expiration_month, String, nil?: true |
#expiration_year ⇒ String?
Card expiration year.
50 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 50 required :expiration_year, String, nil?: true |
#id ⇒ String
Card ID, prefixed icrd_.
20 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 20 required :id, String |
#last4 ⇒ String?
Last four digits of the card number. null for pending invitation cards.
56 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 56 required :last4, String, nil?: true |
#limit ⇒ WhopSDK::Models::CardListResponse::Data::Limit?
The spending limit configuration.
62 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 62 required :limit, -> { WhopSDK::Models::CardListResponse::Data::Limit }, nil?: true |
#name ⇒ String?
Card display name.
68 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 68 required :name, String, nil?: true |
#object ⇒ Symbol, WhopSDK::Models::CardListResponse::Data::Object
73 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 73 required :object, enum: -> { WhopSDK::Models::CardListResponse::Data::Object } |
#secrets ⇒ WhopSDK::Models::CardListResponse::Data::Secrets?
Sensitive card details. Present only on GET /cards/:card_id for active cards;
null when the card is inactive or details cannot be retrieved.
104 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 104 optional :secrets, -> { WhopSDK::Models::CardListResponse::Data::Secrets }, nil?: true |
#spent_last_month ⇒ Integer?
Total spend in the last 30 days, in cents.
79 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 79 required :spent_last_month, Integer, nil?: true |
#status ⇒ Symbol, ...
The card status.
85 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 85 required :status, enum: -> { WhopSDK::Models::CardListResponse::Data::Status }, nil?: true |
#type ⇒ Symbol, ...
The card type.
91 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 91 required :type, enum: -> { WhopSDK::Models::CardListResponse::Data::Type }, nil?: true |
#user_id ⇒ String?
Cardholder user ID, prefixed user_, when assigned.
97 |
# File 'lib/whop_sdk/models/card_list_response.rb', line 97 required :user_id, String, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/whop_sdk/models/card_list_response.rb', line 222
|
Instance Method Details
#to_hash ⇒ {
83 |
# File 'sig/whop_sdk/models/card_list_response.rbs', line 83
def to_hash: -> {
|