Class: TerminalShop::Models::CardAPI

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/terminal_shop/models/card.rb

Defined Under Namespace

Classes: Expiration

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(id: , brand: , created: , expiration: , last4: ) ⇒ Object

Some parameter documentations has been truncated, see TerminalShop::Models::CardAPI for more details.

Credit card used for payments in the Terminal shop.

Parameters:

  • id (String) (defaults to: )

    Unique object identifier.

  • brand (String) (defaults to: )

    Brand of the card.

  • created (String) (defaults to: )

    Date the card was created.

  • expiration (TerminalShop::Models::CardAPI::Expiration) (defaults to: )

    Expiration of the card.

  • last4 (String) (defaults to: )

    Last four digits of the card.



# File 'lib/terminal_shop/models/card.rb', line 36

Instance Attribute Details

#brandString

Brand of the card.

Returns:

  • (String)


16
# File 'lib/terminal_shop/models/card.rb', line 16

required :brand, String

#createdString

Date the card was created.

Returns:

  • (String)


22
# File 'lib/terminal_shop/models/card.rb', line 22

required :created, String

#expirationTerminalShop::Models::CardAPI::Expiration

Expiration of the card.



28
# File 'lib/terminal_shop/models/card.rb', line 28

required :expiration, -> { TerminalShop::CardAPI::Expiration }

#idString

Unique object identifier. The format and length of IDs may change over time.

Returns:

  • (String)


10
# File 'lib/terminal_shop/models/card.rb', line 10

required :id, String

#last4String

Last four digits of the card.

Returns:

  • (String)


34
# File 'lib/terminal_shop/models/card.rb', line 34

required :last4, String