taxjar-ruby 1.2.1 → 1.2.2
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/README.md +12 -3
- data/lib/taxjar/order.rb +5 -0
- data/lib/taxjar/refund.rb +5 -0
- data/lib/taxjar/version.rb +1 -1
- data/spec/fixtures/order.json +5 -0
- data/spec/fixtures/refund.json +5 -0
- data/spec/taxjar/api/order_spec.rb +20 -0
- data/spec/taxjar/api/refund_spec.rb +20 -0
- 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: a24105fb53dc4c4d32428f281018b7d38462860b
         | 
| 4 | 
            +
              data.tar.gz: cbf114a54aa13bcc1e0bd16b2d05e743a74970dd
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: aac27c83a06389a8fde8dca6e51ea7cd8446bea7693a32a2d4ea6c5fd2f04113f158850a09d02f5ae19b9d929705868e67c9a533bb4833bfa7cea3e42127858f
         | 
| 7 | 
            +
              data.tar.gz: 9913a9425272d1d1be3608c754d01eead9bd3d56bc50126f3e4ad360136b89002123d79b8dfcc1d78ef21abecc168dd7770cb714a3f1ee43826a9758a86ee83e
         | 
    
        data/README.md
    CHANGED
    
    | @@ -332,7 +332,7 @@ client.create_order | |
| 332 332 | 
             
            require 'taxjar'
         | 
| 333 333 | 
             
            client = Taxjar::Client.new(api_key: '48ceecccc8af930bd02597aec0f84a78')
         | 
| 334 334 |  | 
| 335 | 
            -
            client.create_order({
         | 
| 335 | 
            +
            order = client.create_order({
         | 
| 336 336 | 
             
                :transaction_id => '123',
         | 
| 337 337 | 
             
                :transaction_date => '2015/05/14',
         | 
| 338 338 | 
             
                :from_state => 'CA',
         | 
| @@ -403,7 +403,10 @@ client.update_order | |
| 403 403 | 
             
            #### Example Request
         | 
| 404 404 |  | 
| 405 405 | 
             
            ```ruby
         | 
| 406 | 
            -
             | 
| 406 | 
            +
            require 'taxjar'
         | 
| 407 | 
            +
            client = Taxjar::Client.new(api_key: '48ceecccc8af930bd02597aec0f84a78')
         | 
| 408 | 
            +
             | 
| 409 | 
            +
            order = client.update_order({
         | 
| 407 410 | 
             
                :transaction_id => '123',
         | 
| 408 411 | 
             
                :amount => 17.95,
         | 
| 409 412 | 
             
                :shipping => 2.0,
         | 
| @@ -668,7 +671,10 @@ client.update_refund | |
| 668 671 | 
             
            #### Example Request
         | 
| 669 672 |  | 
| 670 673 | 
             
            ```ruby
         | 
| 671 | 
            -
             | 
| 674 | 
            +
            require 'taxjar'
         | 
| 675 | 
            +
            client = Taxjar::Client.new(api_key: '48ceecccc8af930bd02597aec0f84a78')
         | 
| 676 | 
            +
             | 
| 677 | 
            +
            refund = client.update_refund({
         | 
| 672 678 | 
             
                :transaction_id => '321',
         | 
| 673 679 | 
             
                :amount => 17.95,
         | 
| 674 680 | 
             
                :shipping => 2.0,
         | 
| @@ -728,6 +734,9 @@ client.delete_refund | |
| 728 734 | 
             
            #### Example Request
         | 
| 729 735 |  | 
| 730 736 | 
             
            ```ruby
         | 
| 737 | 
            +
            require 'taxjar'
         | 
| 738 | 
            +
            client = Taxjar::Client.new(api_key: '48ceecccc8af930bd02597aec0f84a78')
         | 
| 739 | 
            +
             | 
| 731 740 | 
             
            client.delete_refund(321)
         | 
| 732 741 | 
             
            ```
         | 
| 733 742 |  | 
    
        data/lib/taxjar/order.rb
    CHANGED
    
    | @@ -7,6 +7,11 @@ module Taxjar | |
| 7 7 | 
             
                attribute :transaction_id,   :string
         | 
| 8 8 | 
             
                attribute :user_id,          :integer
         | 
| 9 9 | 
             
                attribute :transaction_date, :string
         | 
| 10 | 
            +
                attribute :from_country,     :string
         | 
| 11 | 
            +
                attribute :from_zip,         :string
         | 
| 12 | 
            +
                attribute :from_state,       :string
         | 
| 13 | 
            +
                attribute :from_city,        :string
         | 
| 14 | 
            +
                attribute :from_street,      :string
         | 
| 10 15 | 
             
                attribute :to_country,       :string
         | 
| 11 16 | 
             
                attribute :to_zip,           :string
         | 
| 12 17 | 
             
                attribute :to_state,         :string
         | 
    
        data/lib/taxjar/refund.rb
    CHANGED
    
    | @@ -8,6 +8,11 @@ module Taxjar | |
| 8 8 | 
             
                attribute :user_id,                  :integer
         | 
| 9 9 | 
             
                attribute :transaction_date,         :string
         | 
| 10 10 | 
             
                attribute :transaction_reference_id, :string
         | 
| 11 | 
            +
                attribute :from_country,             :string
         | 
| 12 | 
            +
                attribute :from_zip,                 :string
         | 
| 13 | 
            +
                attribute :from_state,               :string
         | 
| 14 | 
            +
                attribute :from_city,                :string
         | 
| 15 | 
            +
                attribute :from_street,              :string
         | 
| 11 16 | 
             
                attribute :to_country,               :string
         | 
| 12 17 | 
             
                attribute :to_zip,                   :string
         | 
| 13 18 | 
             
                attribute :to_state,                 :string
         | 
    
        data/lib/taxjar/version.rb
    CHANGED
    
    
    
        data/spec/fixtures/order.json
    CHANGED
    
    | @@ -3,6 +3,11 @@ | |
| 3 3 | 
             
                "transaction_id": "123",
         | 
| 4 4 | 
             
                "user_id": 10649,
         | 
| 5 5 | 
             
                "transaction_date": "2015-05-14T00:00:00Z",
         | 
| 6 | 
            +
                "from_country": "US",
         | 
| 7 | 
            +
                "from_zip": "93107",
         | 
| 8 | 
            +
                "from_state": "CA",
         | 
| 9 | 
            +
                "from_city": "SANTA BARBARA",
         | 
| 10 | 
            +
                "from_street": "1281 State St",
         | 
| 6 11 | 
             
                "to_country": "US",
         | 
| 7 12 | 
             
                "to_zip": "90002",
         | 
| 8 13 | 
             
                "to_state": "CA",
         | 
    
        data/spec/fixtures/refund.json
    CHANGED
    
    | @@ -4,6 +4,11 @@ | |
| 4 4 | 
             
                "user_id": 10649,
         | 
| 5 5 | 
             
                "transaction_date": "2015-05-14T00:00:00Z",
         | 
| 6 6 | 
             
                "transaction_reference_id": "123",
         | 
| 7 | 
            +
                "from_country": "US",
         | 
| 8 | 
            +
                "from_zip": "93107",
         | 
| 9 | 
            +
                "from_state": "CA",
         | 
| 10 | 
            +
                "from_city": "SANTA BARBARA",
         | 
| 11 | 
            +
                "from_street": "1281 State St",
         | 
| 7 12 | 
             
                "to_country": "US",
         | 
| 8 13 | 
             
                "to_zip": "90002",
         | 
| 9 14 | 
             
                "to_state": "CA",
         | 
| @@ -68,6 +68,11 @@ describe Taxjar::API::Order do | |
| 68 68 | 
             
                  expect(order.transaction_id).to eq('123')
         | 
| 69 69 | 
             
                  expect(order.user_id).to eq(10649)
         | 
| 70 70 | 
             
                  expect(order.transaction_date).to eq('2015-05-14T00:00:00Z')
         | 
| 71 | 
            +
                  expect(order.from_country).to eq('US')
         | 
| 72 | 
            +
                  expect(order.from_zip).to eq('93107')
         | 
| 73 | 
            +
                  expect(order.from_state).to eq('CA')
         | 
| 74 | 
            +
                  expect(order.from_city).to eq('SANTA BARBARA')
         | 
| 75 | 
            +
                  expect(order.from_street).to eq('1281 State St')
         | 
| 71 76 | 
             
                  expect(order.to_country).to eq('US')
         | 
| 72 77 | 
             
                  expect(order.to_zip).to eq('90002')
         | 
| 73 78 | 
             
                  expect(order.to_state).to eq('CA')
         | 
| @@ -123,6 +128,11 @@ describe Taxjar::API::Order do | |
| 123 128 | 
             
                  expect(order.transaction_id).to eq('123')
         | 
| 124 129 | 
             
                  expect(order.user_id).to eq(10649)
         | 
| 125 130 | 
             
                  expect(order.transaction_date).to eq("2015-05-14T00:00:00Z")
         | 
| 131 | 
            +
                  expect(order.from_country).to eq('US')
         | 
| 132 | 
            +
                  expect(order.from_zip).to eq('93107')
         | 
| 133 | 
            +
                  expect(order.from_state).to eq('CA')
         | 
| 134 | 
            +
                  expect(order.from_city).to eq('SANTA BARBARA')
         | 
| 135 | 
            +
                  expect(order.from_street).to eq('1281 State St')
         | 
| 126 136 | 
             
                  expect(order.to_country).to eq('US')
         | 
| 127 137 | 
             
                  expect(order.to_zip).to eq('90002')
         | 
| 128 138 | 
             
                  expect(order.to_state).to eq('CA')
         | 
| @@ -174,6 +184,11 @@ describe Taxjar::API::Order do | |
| 174 184 | 
             
                  expect(order.transaction_id).to eq('123')
         | 
| 175 185 | 
             
                  expect(order.user_id).to eq(10649)
         | 
| 176 186 | 
             
                  expect(order.transaction_date).to eq("2015-05-14T00:00:00Z")
         | 
| 187 | 
            +
                  expect(order.from_country).to eq('US')
         | 
| 188 | 
            +
                  expect(order.from_zip).to eq('93107')
         | 
| 189 | 
            +
                  expect(order.from_state).to eq('CA')
         | 
| 190 | 
            +
                  expect(order.from_city).to eq('SANTA BARBARA')
         | 
| 191 | 
            +
                  expect(order.from_street).to eq('1281 State St')
         | 
| 177 192 | 
             
                  expect(order.to_country).to eq('US')
         | 
| 178 193 | 
             
                  expect(order.to_zip).to eq('90002')
         | 
| 179 194 | 
             
                  expect(order.to_state).to eq('CA')
         | 
| @@ -213,6 +228,11 @@ describe Taxjar::API::Order do | |
| 213 228 | 
             
                  expect(order.transaction_id).to eq('123')
         | 
| 214 229 | 
             
                  expect(order.user_id).to eq(10649)
         | 
| 215 230 | 
             
                  expect(order.transaction_date).to eq("2015-05-14T00:00:00Z")
         | 
| 231 | 
            +
                  expect(order.from_country).to eq('US')
         | 
| 232 | 
            +
                  expect(order.from_zip).to eq('93107')
         | 
| 233 | 
            +
                  expect(order.from_state).to eq('CA')
         | 
| 234 | 
            +
                  expect(order.from_city).to eq('SANTA BARBARA')
         | 
| 235 | 
            +
                  expect(order.from_street).to eq('1281 State St')
         | 
| 216 236 | 
             
                  expect(order.to_country).to eq('US')
         | 
| 217 237 | 
             
                  expect(order.to_zip).to eq('90002')
         | 
| 218 238 | 
             
                  expect(order.to_state).to eq('CA')
         | 
| @@ -69,6 +69,11 @@ describe Taxjar::API::Refund do | |
| 69 69 | 
             
                  expect(refund.user_id).to eq(10649)
         | 
| 70 70 | 
             
                  expect(refund.transaction_date).to eq("2015-05-14T00:00:00Z")
         | 
| 71 71 | 
             
                  expect(refund.transaction_reference_id).to eq("123")
         | 
| 72 | 
            +
                  expect(refund.from_country).to eq('US')
         | 
| 73 | 
            +
                  expect(refund.from_zip).to eq('93107')
         | 
| 74 | 
            +
                  expect(refund.from_state).to eq('CA')
         | 
| 75 | 
            +
                  expect(refund.from_city).to eq('SANTA BARBARA')
         | 
| 76 | 
            +
                  expect(refund.from_street).to eq('1281 State St')
         | 
| 72 77 | 
             
                  expect(refund.to_country).to eq('US')
         | 
| 73 78 | 
             
                  expect(refund.to_zip).to eq('90002')
         | 
| 74 79 | 
             
                  expect(refund.to_state).to eq('CA')
         | 
| @@ -127,6 +132,11 @@ describe Taxjar::API::Refund do | |
| 127 132 | 
             
                  expect(refund.user_id).to eq(10649)
         | 
| 128 133 | 
             
                  expect(refund.transaction_date).to eq("2015-05-14T00:00:00Z")
         | 
| 129 134 | 
             
                  expect(refund.transaction_reference_id).to eq("123")
         | 
| 135 | 
            +
                  expect(refund.from_country).to eq('US')
         | 
| 136 | 
            +
                  expect(refund.from_zip).to eq('93107')
         | 
| 137 | 
            +
                  expect(refund.from_state).to eq('CA')
         | 
| 138 | 
            +
                  expect(refund.from_city).to eq('SANTA BARBARA')
         | 
| 139 | 
            +
                  expect(refund.from_street).to eq('1281 State St')
         | 
| 130 140 | 
             
                  expect(refund.to_country).to eq('US')
         | 
| 131 141 | 
             
                  expect(refund.to_zip).to eq('90002')
         | 
| 132 142 | 
             
                  expect(refund.to_state).to eq('CA')
         | 
| @@ -179,6 +189,11 @@ describe Taxjar::API::Refund do | |
| 179 189 | 
             
                  expect(refund.user_id).to eq(10649)
         | 
| 180 190 | 
             
                  expect(refund.transaction_date).to eq("2015-05-14T00:00:00Z")
         | 
| 181 191 | 
             
                  expect(refund.transaction_reference_id).to eq("123")
         | 
| 192 | 
            +
                  expect(refund.from_country).to eq('US')
         | 
| 193 | 
            +
                  expect(refund.from_zip).to eq('93107')
         | 
| 194 | 
            +
                  expect(refund.from_state).to eq('CA')
         | 
| 195 | 
            +
                  expect(refund.from_city).to eq('SANTA BARBARA')
         | 
| 196 | 
            +
                  expect(refund.from_street).to eq('1281 State St')
         | 
| 182 197 | 
             
                  expect(refund.to_country).to eq('US')
         | 
| 183 198 | 
             
                  expect(refund.to_zip).to eq('90002')
         | 
| 184 199 | 
             
                  expect(refund.to_state).to eq('CA')
         | 
| @@ -220,6 +235,11 @@ describe Taxjar::API::Refund do | |
| 220 235 | 
             
                  expect(refund.user_id).to eq(10649)
         | 
| 221 236 | 
             
                  expect(refund.transaction_date).to eq("2015-05-14T00:00:00Z")
         | 
| 222 237 | 
             
                  expect(refund.transaction_reference_id).to eq("123")
         | 
| 238 | 
            +
                  expect(refund.from_country).to eq('US')
         | 
| 239 | 
            +
                  expect(refund.from_zip).to eq('93107')
         | 
| 240 | 
            +
                  expect(refund.from_state).to eq('CA')
         | 
| 241 | 
            +
                  expect(refund.from_city).to eq('SANTA BARBARA')
         | 
| 242 | 
            +
                  expect(refund.from_street).to eq('1281 State St')
         | 
| 223 243 | 
             
                  expect(refund.to_country).to eq('US')
         | 
| 224 244 | 
             
                  expect(refund.to_zip).to eq('90002')
         | 
| 225 245 | 
             
                  expect(refund.to_state).to eq('CA')
         |