Sha256: dee6a760a02c4dbe6aefe1797547e4cae2a2380d6df2c92c8fe6983e0370a938

Contents?: true

Size: 1.62 KB

Versions: 27

Compression:

Stored size: 1.62 KB

Contents

# frozen_string_literal: true

module MuffinMan
  module RequestHelpers
    module OutboundFulfillment
      class V20200701
        def self.address_request(name, address_line1, state_or_region, country_code, optional_params = {})
          Address.new({
            "name" => name,
            "address_line1" => address_line1,
            "state_or_region" => state_or_region,
            "country_code" => country_code
          }.merge(optional_params))
        end

        def self.item_request(seller_sku, seller_fulfillment_order_item_id, quantity, optional_params = {})
          Item.new({
            "seller_sku" => seller_sku,
            "seller_fulfillment_order_item_id" => seller_fulfillment_order_item_id,
            "quantity" => quantity
          }.merge(optional_params))
        end

        def self.fulfillment_order_request(seller_fulfillment_order_id, displayable_order_id,
                                           displayable_order_date_time,
                                           displayable_order_comment, shipping_speed_category,
                                           destination_address, items, optional_params = {})
          FulfillmentOrderRequest.new(seller_fulfillment_order_id, displayable_order_id, displayable_order_date_time,
                                      displayable_order_comment, shipping_speed_category, destination_address,
                                      items, optional_params)
        end

        def self.fulfillment_preview_request(address, items, optional_params = {})
          FulfillmentPreviewRequest.new(address, items, optional_params)
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
muffin_man-1.5.11 lib/muffin_man/request_helpers/outbound_fulfillment/v20200701.rb
muffin_man-1.5.10 lib/muffin_man/request_helpers/outbound_fulfillment/v20200701.rb
muffin_man-1.5.9 lib/muffin_man/request_helpers/outbound_fulfillment/v20200701.rb
muffin_man-1.5.8 lib/muffin_man/request_helpers/outbound_fulfillment/v20200701.rb
muffin_man-1.5.7 lib/muffin_man/request_helpers/outbound_fulfillment/v20200701.rb
muffin_man-1.5.6 lib/muffin_man/request_helpers/outbound_fulfillment/v20200701.rb
muffin_man-1.5.5 lib/muffin_man/request_helpers/outbound_fulfillment/v20200701.rb