Class: TerminalShop::Models::CartAPI
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- TerminalShop::Models::CartAPI
- Defined in:
- lib/terminal_shop/models/cart.rb
Defined Under Namespace
Classes: Amount, Item, Shipping
Instance Attribute Summary collapse
-
#address_id ⇒ String?
ID of the shipping address selected on the current user’s cart.
-
#amount ⇒ TerminalShop::Models::CartAPI::Amount
The subtotal and shipping amounts for the current user’s cart.
-
#card_id ⇒ String?
ID of the card selected on the current user’s cart.
-
#items ⇒ Array<TerminalShop::Models::CartAPI::Item>
An array of items in the current user’s cart.
-
#shipping ⇒ TerminalShop::Models::CartAPI::Shipping?
Shipping information for the current user’s cart.
-
#subtotal ⇒ Integer
The subtotal of all items in the current user’s cart, in cents (USD).
Instance Method Summary collapse
-
#initialize(id: , product_variant_id: , quantity: , subtotal: ) ⇒ Object
constructor
Some parameter documentations has been truncated, see Item for more details.
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: , product_variant_id: , quantity: , subtotal: ) ⇒ Object
Some parameter documentations has been truncated, see Item for more details.
An item in the current Terminal shop user’s cart.
|
|
# File 'lib/terminal_shop/models/cart.rb', line 42
|
Instance Attribute Details
#address_id ⇒ String?
ID of the shipping address selected on the current user’s cart.
28 |
# File 'lib/terminal_shop/models/cart.rb', line 28 optional :address_id, String, api_name: :addressID |
#amount ⇒ TerminalShop::Models::CartAPI::Amount
The subtotal and shipping amounts for the current user’s cart.
10 |
# File 'lib/terminal_shop/models/cart.rb', line 10 required :amount, -> { TerminalShop::CartAPI::Amount } |
#card_id ⇒ String?
ID of the card selected on the current user’s cart.
34 |
# File 'lib/terminal_shop/models/cart.rb', line 34 optional :card_id, String, api_name: :cardID |
#items ⇒ Array<TerminalShop::Models::CartAPI::Item>
An array of items in the current user’s cart.
16 |
# File 'lib/terminal_shop/models/cart.rb', line 16 required :items, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::CartAPI::Item] } |
#shipping ⇒ TerminalShop::Models::CartAPI::Shipping?
Shipping information for the current user’s cart.
40 |
# File 'lib/terminal_shop/models/cart.rb', line 40 optional :shipping, -> { TerminalShop::CartAPI::Shipping } |
#subtotal ⇒ Integer
The subtotal of all items in the current user’s cart, in cents (USD).
22 |
# File 'lib/terminal_shop/models/cart.rb', line 22 required :subtotal, Integer |