flowcommerce 0.0.35 → 0.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/lib/flow_commerce/flow_api_v0_client.rb +42 -5
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: d6f8ae36bc5d0a9e7fe2da3e099fdfd4692e3235
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 7491b54b5429bb7854aae5765885e922fc47ef4e
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 4f3ca2732ba4d4402e247436d0b5a7b8682c6a3960722eb22a4f1c12b13abcefeef286971ee5daedaf659746b397fd28c9af608bd8b8646dfb9e807d7123f2f8
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 7393abcfdf9712d5166d7bf6d1678687e7fa95e5a6b2ec82896a249845cb034f9430e1ff111eda236cfe53a6aef0c8e87819aa2d95539d7dda28a0e42b1d9d02
         
     | 
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # Generated by apidoc - http://www.apidoc.me
         
     | 
| 
       2 
     | 
    
         
            -
            # Service version: 0.1. 
     | 
| 
       3 
     | 
    
         
            -
            # apidoc:0.11.33 http://www.apidoc.me/flow/api/0.1. 
     | 
| 
      
 2 
     | 
    
         
            +
            # Service version: 0.1.4
         
     | 
| 
      
 3 
     | 
    
         
            +
            # apidoc:0.11.33 http://www.apidoc.me/flow/api/0.1.4/ruby_client
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            require 'cgi'
         
     | 
| 
       6 
6 
     | 
    
         
             
            require 'net/http'
         
     | 
| 
         @@ -25,8 +25,8 @@ module Io 
     | 
|
| 
       25 
25 
     | 
    
         | 
| 
       26 
26 
     | 
    
         
             
                      BASE_URL = 'https://api.flow.io' unless defined?(Constants::BASE_URL)
         
     | 
| 
       27 
27 
     | 
    
         
             
                      NAMESPACE = 'io.flow.v0' unless defined?(Constants::NAMESPACE)
         
     | 
| 
       28 
     | 
    
         
            -
                      USER_AGENT = 'apidoc:0.11.33 http://www.apidoc.me/flow/api/0.1. 
     | 
| 
       29 
     | 
    
         
            -
                      VERSION = '0.1. 
     | 
| 
      
 28 
     | 
    
         
            +
                      USER_AGENT = 'apidoc:0.11.33 http://www.apidoc.me/flow/api/0.1.4/ruby_client' unless defined?(Constants::USER_AGENT)
         
     | 
| 
      
 29 
     | 
    
         
            +
                      VERSION = '0.1.4' unless defined?(Constants::VERSION)
         
     | 
| 
       30 
30 
     | 
    
         
             
                      VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
         
     | 
| 
       31 
31 
     | 
    
         | 
| 
       32 
32 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -10710,6 +10710,43 @@ module Io 
     | 
|
| 
       10710 
10710 
     | 
    
         | 
| 
       10711 
10711 
     | 
    
         
             
                    end
         
     | 
| 
       10712 
10712 
     | 
    
         | 
| 
      
 10713 
     | 
    
         
            +
                    # Line items on the order, with localized pricing information
         
     | 
| 
      
 10714 
     | 
    
         
            +
                    class LocalizedLineItem
         
     | 
| 
      
 10715 
     | 
    
         
            +
             
     | 
| 
      
 10716 
     | 
    
         
            +
                      attr_reader :number, :quantity, :center, :price, :discount, :local
         
     | 
| 
      
 10717 
     | 
    
         
            +
             
     | 
| 
      
 10718 
     | 
    
         
            +
                      def initialize(incoming={})
         
     | 
| 
      
 10719 
     | 
    
         
            +
                        opts = HttpClient::Helper.symbolize_keys(incoming)
         
     | 
| 
      
 10720 
     | 
    
         
            +
                        HttpClient::Preconditions.require_keys(opts, [:number, :quantity, :local], 'LocalizedLineItem')
         
     | 
| 
      
 10721 
     | 
    
         
            +
                        @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
         
     | 
| 
      
 10722 
     | 
    
         
            +
                        @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
         
     | 
| 
      
 10723 
     | 
    
         
            +
                        @center = (x = opts.delete(:center); x.nil? ? nil : HttpClient::Preconditions.assert_class('center', x, String))
         
     | 
| 
      
 10724 
     | 
    
         
            +
                        @price = (x = opts.delete(:price); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)))
         
     | 
| 
      
 10725 
     | 
    
         
            +
                        @discount = (x = opts.delete(:discount); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)))
         
     | 
| 
      
 10726 
     | 
    
         
            +
                        @local = (x = opts.delete(:local); x.is_a?(::Io::Flow::V0::Models::Local) ? x : ::Io::Flow::V0::Models::Local.new(x))
         
     | 
| 
      
 10727 
     | 
    
         
            +
                      end
         
     | 
| 
      
 10728 
     | 
    
         
            +
             
     | 
| 
      
 10729 
     | 
    
         
            +
                      def to_json
         
     | 
| 
      
 10730 
     | 
    
         
            +
                        JSON.dump(to_hash)
         
     | 
| 
      
 10731 
     | 
    
         
            +
                      end
         
     | 
| 
      
 10732 
     | 
    
         
            +
             
     | 
| 
      
 10733 
     | 
    
         
            +
                      def copy(incoming={})
         
     | 
| 
      
 10734 
     | 
    
         
            +
                        LocalizedLineItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
         
     | 
| 
      
 10735 
     | 
    
         
            +
                      end
         
     | 
| 
      
 10736 
     | 
    
         
            +
             
     | 
| 
      
 10737 
     | 
    
         
            +
                      def to_hash
         
     | 
| 
      
 10738 
     | 
    
         
            +
                        {
         
     | 
| 
      
 10739 
     | 
    
         
            +
                          :number => number,
         
     | 
| 
      
 10740 
     | 
    
         
            +
                          :quantity => quantity,
         
     | 
| 
      
 10741 
     | 
    
         
            +
                          :center => center,
         
     | 
| 
      
 10742 
     | 
    
         
            +
                          :price => price.nil? ? nil : price.to_hash,
         
     | 
| 
      
 10743 
     | 
    
         
            +
                          :discount => discount.nil? ? nil : discount.to_hash,
         
     | 
| 
      
 10744 
     | 
    
         
            +
                          :local => local.to_hash
         
     | 
| 
      
 10745 
     | 
    
         
            +
                        }
         
     | 
| 
      
 10746 
     | 
    
         
            +
                      end
         
     | 
| 
      
 10747 
     | 
    
         
            +
             
     | 
| 
      
 10748 
     | 
    
         
            +
                    end
         
     | 
| 
      
 10749 
     | 
    
         
            +
             
     | 
| 
       10713 
10750 
     | 
    
         
             
                    class LocalizedPrice
         
     | 
| 
       10714 
10751 
     | 
    
         | 
| 
       10715 
10752 
     | 
    
         
             
                      attr_reader :key, :currency, :amount, :label
         
     | 
| 
         @@ -11054,7 +11091,7 @@ module Io 
     | 
|
| 
       11054 
11091 
     | 
    
         
             
                        @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
         
     | 
| 
       11055 
11092 
     | 
    
         
             
                        @customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::Customer) ? x : ::Io::Flow::V0::Models::Customer.new(x))
         
     | 
| 
       11056 
11093 
     | 
    
         
             
                        @expires_at = HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expires_at)), DateTime)
         
     | 
| 
       11057 
     | 
    
         
            -
                        @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models:: 
     | 
| 
      
 11094 
     | 
    
         
            +
                        @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LocalizedLineItem) ? x : ::Io::Flow::V0::Models::LocalizedLineItem.new(x)) }
         
     | 
| 
       11058 
11095 
     | 
    
         
             
                        @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x))
         
     | 
| 
       11059 
11096 
     | 
    
         
             
                        @deliveries = HttpClient::Preconditions.assert_class('deliveries', opts.delete(:deliveries), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Delivery) ? x : ::Io::Flow::V0::Models::Delivery.new(x)) }
         
     | 
| 
       11060 
11097 
     | 
    
         
             
                        @selections = HttpClient::Preconditions.assert_class('selections', opts.delete(:selections), Array).map { |v| HttpClient::Preconditions.assert_class('selections', v, String) }
         
     |