Class: ShopifyAPI::ShippingZone
- Inherits:
-
Rest::Base
- Object
- Rest::Base
- ShopifyAPI::ShippingZone
- Extended by:
- T::Sig
- Defined in:
- lib/shopify_api/rest/resources/2022_04/shipping_zone.rb,
lib/shopify_api/rest/resources/2022_07/shipping_zone.rb,
lib/shopify_api/rest/resources/2022_10/shipping_zone.rb,
lib/shopify_api/rest/resources/2023_01/shipping_zone.rb,
lib/shopify_api/rest/resources/2023_04/shipping_zone.rb,
lib/shopify_api/rest/resources/2023_07/shipping_zone.rb,
lib/shopify_api/rest/resources/2023_10/shipping_zone.rb,
lib/shopify_api/rest/resources/2024_01/shipping_zone.rb,
lib/shopify_api/rest/resources/2024_04/shipping_zone.rb,
lib/shopify_api/rest/resources/2024_07/shipping_zone.rb,
lib/shopify_api/rest/resources/2024_10/shipping_zone.rb
Instance Attribute Summary collapse
-
#carrier_shipping_rate_providers ⇒ Object
readonly
Returns the value of attribute carrier_shipping_rate_providers.
-
#countries ⇒ Object
readonly
Returns the value of attribute countries.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#location_group_id ⇒ Object
readonly
Returns the value of attribute location_group_id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#price_based_shipping_rates ⇒ Object
readonly
Returns the value of attribute price_based_shipping_rates.
-
#profile_id ⇒ Object
readonly
Returns the value of attribute profile_id.
-
#provinces ⇒ Object
readonly
Returns the value of attribute provinces.
-
#weight_based_shipping_rates ⇒ Object
readonly
Returns the value of attribute weight_based_shipping_rates.
Attributes inherited from Rest::Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ ShippingZone
constructor
A new instance of ShippingZone.
Methods inherited from Rest::Base
api_call_limit, base_find, class_name, create_instance, create_instances_from_response, #delete, get_path, get_path_ids, has_many?, has_one?, inherited, json_body_name, json_response_body_names, #method_missing, next_page?, next_page_info, prev_page?, prev_page_info, primary_key, read_only_attributes, request, #respond_to_missing?, retry_request_after, #save, #save!, #to_hash
Constructor Details
#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ ShippingZone
Returns a new instance of ShippingZone.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/shopify_api/rest/resources/2022_04/shipping_zone.rb', line 19 def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) @carrier_shipping_rate_providers = T.let(nil, T.untyped) @countries = T.let(nil, T.nilable(T::Array[T.untyped])) @id = T.let(nil, T.nilable(Integer)) @location_group_id = T.let(nil, T.nilable(String)) @name = T.let(nil, T.nilable(String)) @price_based_shipping_rates = T.let(nil, T.nilable(T::Array[T.untyped])) @profile_id = T.let(nil, T.nilable(String)) @provinces = T.let(nil, T.nilable(T::Array[T.untyped])) @weight_based_shipping_rates = T.let(nil, T.nilable(T::Array[T.untyped])) super(session: session, from_hash: from_hash) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ShopifyAPI::Rest::Base
Instance Attribute Details
#carrier_shipping_rate_providers ⇒ Object (readonly)
Returns the value of attribute carrier_shipping_rate_providers.
44 45 46 |
# File 'lib/shopify_api/rest/resources/2022_04/shipping_zone.rb', line 44 def carrier_shipping_rate_providers @carrier_shipping_rate_providers end |
#countries ⇒ Object (readonly)
Returns the value of attribute countries.
46 47 48 |
# File 'lib/shopify_api/rest/resources/2022_04/shipping_zone.rb', line 46 def countries @countries end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
48 49 50 |
# File 'lib/shopify_api/rest/resources/2022_04/shipping_zone.rb', line 48 def id @id end |
#location_group_id ⇒ Object (readonly)
Returns the value of attribute location_group_id.
50 51 52 |
# File 'lib/shopify_api/rest/resources/2022_04/shipping_zone.rb', line 50 def location_group_id @location_group_id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
52 53 54 |
# File 'lib/shopify_api/rest/resources/2022_04/shipping_zone.rb', line 52 def name @name end |
#price_based_shipping_rates ⇒ Object (readonly)
Returns the value of attribute price_based_shipping_rates.
54 55 56 |
# File 'lib/shopify_api/rest/resources/2022_04/shipping_zone.rb', line 54 def price_based_shipping_rates @price_based_shipping_rates end |
#profile_id ⇒ Object (readonly)
Returns the value of attribute profile_id.
56 57 58 |
# File 'lib/shopify_api/rest/resources/2022_04/shipping_zone.rb', line 56 def profile_id @profile_id end |
#provinces ⇒ Object (readonly)
Returns the value of attribute provinces.
58 59 60 |
# File 'lib/shopify_api/rest/resources/2022_04/shipping_zone.rb', line 58 def provinces @provinces end |
#weight_based_shipping_rates ⇒ Object (readonly)
Returns the value of attribute weight_based_shipping_rates.
60 61 62 |
# File 'lib/shopify_api/rest/resources/2022_04/shipping_zone.rb', line 60 def weight_based_shipping_rates @weight_based_shipping_rates end |
Class Method Details
.all(fields: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/shopify_api/rest/resources/2022_04/shipping_zone.rb', line 70 def all( fields: nil, session: ShopifyAPI::Context.active_session, **kwargs ) response = base_find( session: session, ids: {}, params: {fields: fields}.merge(kwargs).compact, ) T.cast(response, T::Array[ShippingZone]) end |