Class: HighLevel::Resources::Store
- Defined in:
- lib/high_level/resources/store.rb
Instance Method Summary collapse
-
#create_shipping_carrier(body:, authorization: nil, **_opts) ⇒ Object
Create Shipping Carrier.
-
#create_shipping_rate(shipping_zone_id:, body:, authorization: nil, **_opts) ⇒ Object
Create Shipping Rate.
-
#create_shipping_zone(body:, authorization: nil, **_opts) ⇒ Object
Create Shipping Zone.
-
#create_store_setting(body:, authorization: nil, **_opts) ⇒ Object
Create/Update Store Settings.
-
#delete_shipping_carrier(shipping_carrier_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) ⇒ Object
Delete shipping carrier.
-
#delete_shipping_rate(shipping_zone_id:, shipping_rate_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) ⇒ Object
Delete shipping rate.
-
#delete_shipping_zone(shipping_zone_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) ⇒ Object
Delete shipping zone.
-
#get_available_shipping_zones(body:, authorization: nil, **_opts) ⇒ Object
Get available shipping rates.
-
#get_shipping_carriers(shipping_carrier_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) ⇒ Object
Get Shipping Carrier.
-
#get_shipping_rates(shipping_zone_id:, shipping_rate_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) ⇒ Object
Get Shipping Rate.
-
#get_shipping_zones(shipping_zone_id:, alt_id: nil, alt_type: nil, with_shipping_rate: nil, authorization: nil, **_opts) ⇒ Object
Get Shipping Zone.
-
#get_store_settings(alt_id: nil, alt_type: nil, authorization: nil, **_opts) ⇒ Object
Get Store Settings.
-
#list_shipping_carriers(alt_id: nil, alt_type: nil, authorization: nil, **_opts) ⇒ Object
List Shipping Carriers.
-
#list_shipping_rates(shipping_zone_id:, alt_id: nil, alt_type: nil, limit: nil, offset: nil, authorization: nil, **_opts) ⇒ Object
List Shipping Rates.
-
#list_shipping_zones(alt_id: nil, alt_type: nil, limit: nil, offset: nil, with_shipping_rate: nil, authorization: nil, **_opts) ⇒ Object
List Shipping Zones.
-
#update_shipping_carrier(shipping_carrier_id:, body:, authorization: nil, **_opts) ⇒ Object
Update Shipping Carrier.
-
#update_shipping_rate(shipping_zone_id:, shipping_rate_id:, body:, authorization: nil, **_opts) ⇒ Object
Update Shipping Rate.
-
#update_shipping_zone(shipping_zone_id:, body:, authorization: nil, **_opts) ⇒ Object
Update Shipping Zone.
Methods inherited from Base
Constructor Details
This class inherits a constructor from HighLevel::Resources::Base
Instance Method Details
#create_shipping_carrier(body:, authorization: nil, **_opts) ⇒ Object
Create Shipping Carrier
The “Create Shipping Carrier” API allows adding a new shipping carrier.
168 169 170 171 172 173 174 175 176 |
# File 'lib/high_level/resources/store.rb', line 168 def create_shipping_carrier(body:, authorization: nil, **_opts) request( method: :post, path: "/store/shipping-carrier", security: ["Location-Access"], headers: { "Authorization" => }.compact, body: body ) end |
#create_shipping_rate(shipping_zone_id:, body:, authorization: nil, **_opts) ⇒ Object
Create Shipping Rate
The “Create Shipping Rate” API allows adding a new shipping rate.
103 104 105 106 107 108 109 110 111 |
# File 'lib/high_level/resources/store.rb', line 103 def create_shipping_rate(shipping_zone_id:, body:, authorization: nil, **_opts) request( method: :post, path: "/store/shipping-zone/#{shipping_zone_id}/shipping-rate", security: ["Location-Access"], headers: { "Authorization" => }.compact, body: body ) end |
#create_shipping_zone(body:, authorization: nil, **_opts) ⇒ Object
Create Shipping Zone
The “Create Shipping Zone” API allows adding a new shipping zone.
25 26 27 28 29 30 31 32 33 |
# File 'lib/high_level/resources/store.rb', line 25 def create_shipping_zone(body:, authorization: nil, **_opts) request( method: :post, path: "/store/shipping-zone", security: ["Location-Access"], headers: { "Authorization" => }.compact, body: body ) end |
#create_store_setting(body:, authorization: nil, **_opts) ⇒ Object
Create/Update Store Settings
Create or update store settings by altId and altType.
233 234 235 236 237 238 239 240 241 |
# File 'lib/high_level/resources/store.rb', line 233 def create_store_setting(body:, authorization: nil, **_opts) request( method: :post, path: "/store/store-setting", security: ["Location-Access"], headers: { "Authorization" => }.compact, body: body ) end |
#delete_shipping_carrier(shipping_carrier_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) ⇒ Object
Delete shipping carrier
Delete specific shipping carrier with Id :shippingCarrierId
207 208 209 210 211 212 213 214 215 |
# File 'lib/high_level/resources/store.rb', line 207 def delete_shipping_carrier(shipping_carrier_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) request( method: :delete, path: "/store/shipping-carrier/#{shipping_carrier_id}", security: ["Location-Access"], params: { "altId" => alt_id, "altType" => alt_type }.compact, headers: { "Authorization" => }.compact ) end |
#delete_shipping_rate(shipping_zone_id:, shipping_rate_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) ⇒ Object
Delete shipping rate
Delete specific shipping rate with Id :shippingRateId
142 143 144 145 146 147 148 149 150 |
# File 'lib/high_level/resources/store.rb', line 142 def delete_shipping_rate(shipping_zone_id:, shipping_rate_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) request( method: :delete, path: "/store/shipping-zone/#{shipping_zone_id}/shipping-rate/#{shipping_rate_id}", security: ["Location-Access"], params: { "altId" => alt_id, "altType" => alt_type }.compact, headers: { "Authorization" => }.compact ) end |
#delete_shipping_zone(shipping_zone_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) ⇒ Object
Delete shipping zone
Delete specific shipping zone with Id :shippingZoneId
64 65 66 67 68 69 70 71 72 |
# File 'lib/high_level/resources/store.rb', line 64 def delete_shipping_zone(shipping_zone_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) request( method: :delete, path: "/store/shipping-zone/#{shipping_zone_id}", security: ["Location-Access"], params: { "altId" => alt_id, "altType" => alt_type }.compact, headers: { "Authorization" => }.compact ) end |
#get_available_shipping_zones(body:, authorization: nil, **_opts) ⇒ Object
Get available shipping rates
This return available shipping rates for country based on order amount
77 78 79 80 81 82 83 84 85 |
# File 'lib/high_level/resources/store.rb', line 77 def get_available_shipping_zones(body:, authorization: nil, **_opts) request( method: :post, path: "/store/shipping-zone/shipping-rates", security: [], headers: { "Authorization" => }.compact, body: body ) end |
#get_shipping_carriers(shipping_carrier_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) ⇒ Object
Get Shipping Carrier
The “List Shipping Carrier” API allows to retrieve a paginated list of shipping carrier.
181 182 183 184 185 186 187 188 189 |
# File 'lib/high_level/resources/store.rb', line 181 def get_shipping_carriers(shipping_carrier_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) request( method: :get, path: "/store/shipping-carrier/#{shipping_carrier_id}", security: ["Location-Access"], params: { "altId" => alt_id, "altType" => alt_type }.compact, headers: { "Authorization" => }.compact ) end |
#get_shipping_rates(shipping_zone_id:, shipping_rate_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) ⇒ Object
Get Shipping Rate
The “List Shipping Rate” API allows to retrieve a paginated list of shipping rate.
116 117 118 119 120 121 122 123 124 |
# File 'lib/high_level/resources/store.rb', line 116 def get_shipping_rates(shipping_zone_id:, shipping_rate_id:, alt_id: nil, alt_type: nil, authorization: nil, **_opts) request( method: :get, path: "/store/shipping-zone/#{shipping_zone_id}/shipping-rate/#{shipping_rate_id}", security: ["Location-Access"], params: { "altId" => alt_id, "altType" => alt_type }.compact, headers: { "Authorization" => }.compact ) end |
#get_shipping_zones(shipping_zone_id:, alt_id: nil, alt_type: nil, with_shipping_rate: nil, authorization: nil, **_opts) ⇒ Object
Get Shipping Zone
The “List Shipping Zone” API allows to retrieve a paginated list of shipping zone.
38 39 40 41 42 43 44 45 46 |
# File 'lib/high_level/resources/store.rb', line 38 def get_shipping_zones(shipping_zone_id:, alt_id: nil, alt_type: nil, with_shipping_rate: nil, authorization: nil, **_opts) request( method: :get, path: "/store/shipping-zone/#{shipping_zone_id}", security: ["Location-Access"], params: { "altId" => alt_id, "altType" => alt_type, "withShippingRate" => with_shipping_rate }.compact, headers: { "Authorization" => }.compact ) end |
#get_store_settings(alt_id: nil, alt_type: nil, authorization: nil, **_opts) ⇒ Object
Get Store Settings
Get store settings by altId and altType.
220 221 222 223 224 225 226 227 228 |
# File 'lib/high_level/resources/store.rb', line 220 def get_store_settings(alt_id: nil, alt_type: nil, authorization: nil, **_opts) request( method: :get, path: "/store/store-setting", security: ["Location-Access"], params: { "altId" => alt_id, "altType" => alt_type }.compact, headers: { "Authorization" => }.compact ) end |
#list_shipping_carriers(alt_id: nil, alt_type: nil, authorization: nil, **_opts) ⇒ Object
List Shipping Carriers
The “List Shipping Carrier” API allows to retrieve a list of shipping carrier.
155 156 157 158 159 160 161 162 163 |
# File 'lib/high_level/resources/store.rb', line 155 def list_shipping_carriers(alt_id: nil, alt_type: nil, authorization: nil, **_opts) request( method: :get, path: "/store/shipping-carrier", security: ["Location-Access"], params: { "altId" => alt_id, "altType" => alt_type }.compact, headers: { "Authorization" => }.compact ) end |
#list_shipping_rates(shipping_zone_id:, alt_id: nil, alt_type: nil, limit: nil, offset: nil, authorization: nil, **_opts) ⇒ Object
List Shipping Rates
The “List Shipping Rate” API allows to retrieve a list of shipping rate.
90 91 92 93 94 95 96 97 98 |
# File 'lib/high_level/resources/store.rb', line 90 def list_shipping_rates(shipping_zone_id:, alt_id: nil, alt_type: nil, limit: nil, offset: nil, authorization: nil, **_opts) request( method: :get, path: "/store/shipping-zone/#{shipping_zone_id}/shipping-rate", security: ["Location-Access"], params: { "altId" => alt_id, "altType" => alt_type, "limit" => limit, "offset" => offset }.compact, headers: { "Authorization" => }.compact ) end |
#list_shipping_zones(alt_id: nil, alt_type: nil, limit: nil, offset: nil, with_shipping_rate: nil, authorization: nil, **_opts) ⇒ Object
List Shipping Zones
The “List Shipping Zone” API allows to retrieve a list of shipping zone.
12 13 14 15 16 17 18 19 20 |
# File 'lib/high_level/resources/store.rb', line 12 def list_shipping_zones(alt_id: nil, alt_type: nil, limit: nil, offset: nil, with_shipping_rate: nil, authorization: nil, **_opts) request( method: :get, path: "/store/shipping-zone", security: ["Location-Access"], params: { "altId" => alt_id, "altType" => alt_type, "limit" => limit, "offset" => offset, "withShippingRate" => with_shipping_rate }.compact, headers: { "Authorization" => }.compact ) end |
#update_shipping_carrier(shipping_carrier_id:, body:, authorization: nil, **_opts) ⇒ Object
Update Shipping Carrier
The “update Shipping Carrier” API allows update a shipping carrier to the system.
194 195 196 197 198 199 200 201 202 |
# File 'lib/high_level/resources/store.rb', line 194 def update_shipping_carrier(shipping_carrier_id:, body:, authorization: nil, **_opts) request( method: :put, path: "/store/shipping-carrier/#{shipping_carrier_id}", security: ["Location-Access"], headers: { "Authorization" => }.compact, body: body ) end |
#update_shipping_rate(shipping_zone_id:, shipping_rate_id:, body:, authorization: nil, **_opts) ⇒ Object
Update Shipping Rate
The “update Shipping Rate” API allows update a shipping rate to the system.
129 130 131 132 133 134 135 136 137 |
# File 'lib/high_level/resources/store.rb', line 129 def update_shipping_rate(shipping_zone_id:, shipping_rate_id:, body:, authorization: nil, **_opts) request( method: :put, path: "/store/shipping-zone/#{shipping_zone_id}/shipping-rate/#{shipping_rate_id}", security: ["Location-Access"], headers: { "Authorization" => }.compact, body: body ) end |
#update_shipping_zone(shipping_zone_id:, body:, authorization: nil, **_opts) ⇒ Object
Update Shipping Zone
The “update Shipping Zone” API allows update a shipping zone to the system.
51 52 53 54 55 56 57 58 59 |
# File 'lib/high_level/resources/store.rb', line 51 def update_shipping_zone(shipping_zone_id:, body:, authorization: nil, **_opts) request( method: :put, path: "/store/shipping-zone/#{shipping_zone_id}", security: ["Location-Access"], headers: { "Authorization" => }.compact, body: body ) end |