Sha256: 721b521779a25aa41b71f91e4f82789c807a758477f7df08cf8264b8caeb7f39

Contents?: true

Size: 835 Bytes

Versions: 11

Compression:

Stored size: 835 Bytes

Contents

module Etsy
  class ShippingTemplate
    include Etsy::Model

    attribute :id, :from => :shipping_template_id

    attributes :title, :user_id

    def self.create(options = {})
      options.merge!(:require_secure => true)
      post("/shipping/templates", options)
    end
 
    def self.find(id, credentials = {})
      options = {
        :access_token => credentials[:access_token],
        :access_secret => credentials[:access_secret],
        :require_secure => true
      }
      get("/shipping/templates/#{id}", options)
    end

    def self.find_by_user(user, credentials = {})
      options = {
        :access_token => credentials[:access_token],
        :access_secret => credentials[:access_secret],
        :require_secure => true
      }
      get("/users/#{user.id}/shipping/templates", options)
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
etsy-0.3.2 lib/etsy/shipping_template.rb
etsy-0.3.1 lib/etsy/shipping_template.rb
etsy-0.3.0 lib/etsy/shipping_template.rb
etsy-0.2.7 lib/etsy/shipping_template.rb
etsy-0.2.6 lib/etsy/shipping_template.rb
etsy-0.2.5 lib/etsy/shipping_template.rb
etsy-0.2.4 lib/etsy/shipping_template.rb
etsy-0.2.3 lib/etsy/shipping_template.rb
etsy-0.2.2 lib/etsy/shipping_template.rb
tailored-etsy-0.2.2 lib/etsy/shipping_template.rb
etsy-0.2.1 lib/etsy/shipping_template.rb