diff --git a/.gitignore b/.gitignore index 5139c76..b642bc1 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,8 @@ Gemfile.lock # jeweler generated pkg +/Gemfile.lock + # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore: # # * Create a file at ~/.gitignore diff --git a/.rspec b/.rspec new file mode 100644 index 0000000..8c18f1a --- /dev/null +++ b/.rspec @@ -0,0 +1,2 @@ +--format documentation +--color diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a21a21d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +language: ruby +rvm: + - 2.1.1 +before_install: gem install bundler -v 1.11.2 diff --git a/Gemfile b/Gemfile index ef59192..176197c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,17 +1,4 @@ source 'http://rubygems.org' -gem 'httparty', '~> 0.13.1' - -group :development do - gem 'jeweler', '~> 2.0.1' - gem 'rdoc', '~> 3.12' -end - -group :test do - gem 'bundler', '>= 1.0.0' - gem 'fakeweb' - gem 'minitest', '~> 4.7.5 ' - gem 'simplecov', '>= 0' - gem 'shoulda', '>= 0' - gem 'vcr', :require => 'vcr' -end +# Specify your gem's dependencies in valabn.gemspec +gemspec diff --git a/Gemfile.lock b/Gemfile.lock index 6ab7348..94ea1e1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,91 +1,71 @@ +PATH + remote: . + specs: + quaderno (1.14.1) + httparty (~> 0.13.1) + GEM remote: http://rubygems.org/ specs: - activesupport (4.0.5) - i18n (~> 0.6, >= 0.6.9) - minitest (~> 4.2) - multi_json (~> 1.3) - thread_safe (~> 0.1) - tzinfo (~> 0.3.37) - addressable (2.3.6) - builder (3.2.2) - descendants_tracker (0.0.4) - thread_safe (~> 0.3, >= 0.3.1) - docile (1.1.5) - fakeweb (1.3.0) - faraday (0.9.0) - multipart-post (>= 1.2, < 3) - git (1.2.7) - github_api (0.11.3) - addressable (~> 2.3) - descendants_tracker (~> 0.0.1) - faraday (~> 0.8, < 0.10) - hashie (>= 1.2) - multi_json (>= 1.7.5, < 2.0) - nokogiri (~> 1.6.0) - oauth2 - hashie (3.0.0) - highline (1.6.21) - httparty (0.13.1) + activesupport (4.2.10) + i18n (~> 0.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) + concurrent-ruby (1.0.5) + crack (0.4.3) + safe_yaml (~> 1.0.0) + diff-lcs (1.3) + hashdiff (0.3.7) + httparty (0.13.7) json (~> 1.8) multi_xml (>= 0.5.2) - i18n (0.7.0) - jeweler (2.0.1) - builder - bundler (>= 1.0) - git (>= 1.2.5) - github_api - highline (>= 1.6.15) - nokogiri (>= 1.5.10) - rake - rdoc - json (1.8.1) - jwt (1.0.0) - mini_portile (0.6.0) - minitest (4.7.5) - multi_json (1.10.1) - multi_xml (0.5.5) - multipart-post (2.0.0) - nokogiri (1.6.2.1) - mini_portile (= 0.6.0) - oauth2 (0.9.4) - faraday (>= 0.8, < 0.10) - jwt (~> 1.0) - multi_json (~> 1.3) - multi_xml (~> 0.5) - rack (~> 1.2) - rack (1.5.2) - rake (10.3.2) + i18n (0.9.1) + concurrent-ruby (~> 1.0) + json (1.8.6) + minitest (5.10.3) + multi_xml (0.6.0) + public_suffix (3.0.1) + rake (10.5.0) rdoc (3.12.2) json (~> 1.4) - shoulda (3.5.0) - shoulda-context (~> 1.0, >= 1.0.1) - shoulda-matchers (>= 1.4.1, < 3.0) - shoulda-context (1.2.1) - shoulda-matchers (2.6.1) - activesupport (>= 3.0.0) - simplecov (0.11.2) - docile (~> 1.1.0) - json (~> 1.8) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) - thread_safe (0.3.4) - tzinfo (0.3.39) - vcr (2.9.2) + rspec (3.7.0) + rspec-core (~> 3.7.0) + rspec-expectations (~> 3.7.0) + rspec-mocks (~> 3.7.0) + rspec-core (3.7.0) + rspec-support (~> 3.7.0) + rspec-expectations (3.7.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.7.0) + rspec-mocks (3.7.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.7.0) + rspec-support (3.7.0) + safe_yaml (1.0.4) + thread_safe (0.3.6) + tzinfo (1.2.4) + thread_safe (~> 0.1) + vcr (4.0.0) + webmock (1.22.6) + addressable (>= 2.3.6) + crack (>= 0.3.2) + hashdiff PLATFORMS ruby DEPENDENCIES - bundler (>= 1.0.0) - fakeweb - httparty (~> 0.13.1) - jeweler (~> 2.0.1) - minitest (~> 4.7.5) + activesupport (~> 4.2.0) + bundler (~> 1.11) + quaderno! + rake (~> 10.0) rdoc (~> 3.12) - shoulda - simplecov + rspec (~> 3.0) vcr + webmock (~> 1.22.6) BUNDLED WITH 1.11.2 diff --git a/Rakefile b/Rakefile index 29e2af7..b7e9ed5 100644 --- a/Rakefile +++ b/Rakefile @@ -1,52 +1,6 @@ -# encoding: utf-8 +require "bundler/gem_tasks" +require "rspec/core/rake_task" -require 'rubygems' -require 'bundler' -begin - Bundler.setup(:default, :development) -rescue Bundler::BundlerError => e - $stderr.puts e.message - $stderr.puts "Run `bundle install` to install missing gems" - exit e.status_code -end -require 'rake' +RSpec::Core::RakeTask.new(:spec) -require 'jeweler' -Jeweler::Tasks.new do |gem| - # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options - gem.name = "quaderno" - gem.homepage = "http://github.com/quaderno/quaderno-ruby" - gem.license = "MIT" - gem.summary = %Q{one-line summary of your gem} - gem.description = %Q{ A ruby wrapper for Quaderno API } - gem.email = "carlos@recrea.es" - gem.authors = ["Recrea"] - # dependencies defined in Gemfile -end -Jeweler::RubygemsDotOrgTasks.new - -require 'rake/testtask' -Rake::TestTask.new(:test) do |test| - test.libs << 'lib' << 'test' - test.pattern = 'test/**/test_*.rb' - test.verbose = true -end - -desc "Code coverage detail" -task :simplecov do - ENV['COVERAGE'] = "true" - Rake::Task['test'].execute -end - - -task :default => :test - -require 'rdoc/task' -Rake::RDocTask.new do |rdoc| - version = File.exist?('VERSION') ? File.read('VERSION') : "" - - rdoc.rdoc_dir = 'rdoc' - rdoc.title = "quaderno-ruby #{version}" - rdoc.rdoc_files.include('README*') - rdoc.rdoc_files.include('lib/**/*.rb') -end +task :default => :spec diff --git a/VERSION b/VERSION deleted file mode 100644 index cd99d38..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.14.0 \ No newline at end of file diff --git a/lib/quaderno-ruby.rb b/lib/quaderno-ruby.rb index a4ce2fb..087e56c 100644 --- a/lib/quaderno-ruby.rb +++ b/lib/quaderno-ruby.rb @@ -7,6 +7,5 @@ %w(block crud deliver payment retrieve).each { |filename| require "quaderno-ruby/behavior/#{filename}" } %w(base contact item invoice receipt credit income estimate expense recurring document_item report evidence payment webhook tax).each { |filename| require "quaderno-ruby/#{ filename }" } -module Quaderno - +class Quaderno end \ No newline at end of file diff --git a/lib/quaderno-ruby/base.rb b/lib/quaderno-ruby/base.rb index c670c0f..9a7a63e 100644 --- a/lib/quaderno-ruby/base.rb +++ b/lib/quaderno-ruby/base.rb @@ -1,136 +1,134 @@ -module Quaderno - require 'httparty' - require 'json' - - class Base < OpenStruct - include HTTParty - include Quaderno::Exceptions - include Quaderno::Behavior::Crud - include Quaderno::Helpers::Authentication - - PRODUCTION_URL = 'https://quadernoapp.com/api/' - SANDBOX_URL = 'http://sandbox-quadernoapp.com/api/' - - @@auth_token = nil - @@rate_limit_info = nil - @@api_version = nil - @@url = PRODUCTION_URL - - # Class methods - def self.api_model(klass) - instance_eval <<-END - def api_model - #{klass} - end - END - class_eval <<-END - def api_model - #{klass} - end - END - end - - def self.configure - yield self - end - - def self.api_version=(api_version) - @@api_version = api_version - end - - def self.auth_token=(auth_token) - @@auth_token = auth_token - end - - def self.url=(url) - @@url = url - end +require 'httparty' +require 'json' + +class Quaderno::Base < OpenStruct + include HTTParty + include Quaderno::Exceptions + include Quaderno::Behavior::Crud + include Quaderno::Helpers::Authentication + + PRODUCTION_URL = 'https://quadernoapp.com/api/' + SANDBOX_URL = 'http://sandbox-quadernoapp.com/api/' + + @@auth_token = nil + @@rate_limit_info = nil + @@api_version = nil + @@url = PRODUCTION_URL + + # Class methods + def self.api_model(klass) + instance_eval <<-END + def api_model + #{klass} + end + END + class_eval <<-END + def api_model + #{klass} + end + END + end - def self.authorization(auth_token, mode = nil) - mode ||= :production - url = mode == :sandbox ? SANDBOX_URL : PRODUCTION_URL - response = get("#{url}authorization.json", basic_auth: { username: auth_token }, headers: version_header) + def self.configure + yield self + end - if response.code == 200 - response.parsed_response - else - raise(Quaderno::Exceptions::InvalidSubdomainOrToken, 'Invalid subdomain or token') - end - end + def self.api_version=(api_version) + @@api_version = api_version + end - #Check the connection - def self.ping(options = {}) - begin - options[:auth_token] ||= auth_token - options[:api_url] ||= url + def self.auth_token=(auth_token) + @@auth_token = auth_token + end - authentication = get_authentication(options) + def self.url=(url) + @@url = url + end - party_response = get("#{authentication[:url]}ping.json", - basic_auth: authentication[:basic_auth], - headers: version_header.merge(authentication[:headers]) - ) + def self.authorization(auth_token, mode = nil) + mode ||= :production + url = mode == :sandbox ? SANDBOX_URL : PRODUCTION_URL + response = get("#{url}authorization.json", basic_auth: { username: auth_token }, headers: version_header) - check_exception_for(party_response, { subdomain_or_token: true }) - rescue Errno::ECONNREFUSED - return false - end - true + if response.code == 200 + response.parsed_response + else + raise(Quaderno::Exceptions::InvalidSubdomainOrToken, 'Invalid subdomain or token') end + end - def self.me(options = {}) + #Check the connection + def self.ping(options = {}) + begin options[:auth_token] ||= auth_token options[:api_url] ||= url authentication = get_authentication(options) - party_response = get("#{authentication[:url]}me.json", + party_response = get("#{authentication[:url]}ping.json", basic_auth: authentication[:basic_auth], headers: version_header.merge(authentication[:headers]) ) check_exception_for(party_response, { subdomain_or_token: true }) - - party_response.parsed_response + rescue Errno::ECONNREFUSED + return false end + true + end - #Returns the rate limit information: limit and remaining requests - def self.rate_limit_info - party_response = get("#{@@url}ping.json", basic_auth: { username: auth_token }, headers: version_header) - check_exception_for(party_response, { subdomain_or_token: true }) - @@rate_limit_info = { reset: party_response.headers['x-ratelimit-reset'].to_i, remaining: party_response.headers["x-ratelimit-remaining"].to_i } - end + def self.me(options = {}) + options[:auth_token] ||= auth_token + options[:api_url] ||= url - # Instance methods - def to_hash - self.marshal_dump - end + authentication = get_authentication(options) - private - # Class methods - def self.auth_token - @@auth_token - end + party_response = get("#{authentication[:url]}me.json", + basic_auth: authentication[:basic_auth], + headers: version_header.merge(authentication[:headers]) + ) - def self.url - @@url - end + check_exception_for(party_response, { subdomain_or_token: true }) - def self.subdomain - @_subdomain = @@subdomain - end + party_response.parsed_response + end - #Set or returns the model path for the url - def self.api_path(api_path = nil) - @_api_path ||= api_path - end + #Returns the rate limit information: limit and remaining requests + def self.rate_limit_info + party_response = get("#{@@url}ping.json", basic_auth: { username: auth_token }, headers: version_header) + check_exception_for(party_response, { subdomain_or_token: true }) + @@rate_limit_info = { reset: party_response.headers['x-ratelimit-reset'].to_i, remaining: party_response.headers["x-ratelimit-remaining"].to_i } + end - def self.is_a_document?(document = nil) - @_document ||= document - end + # Instance methods + def to_hash + self.marshal_dump + end - def self.version_header - { 'Accept' => @@api_version.to_i.zero? ? "application/json" : "application/json; api_version=#{@@api_version.to_i}"} - end + private + # Class methods + def self.auth_token + @@auth_token + end + + def self.url + @@url + end + + def self.subdomain + @_subdomain = @@subdomain + end + + #Set or returns the model path for the url + def self.api_path(api_path = nil) + @_api_path ||= api_path + end + + def self.is_a_document?(document = nil) + @_document ||= document + end + + def self.version_header + { 'Accept' => @@api_version.to_i.zero? ? "application/json" : "application/json; api_version=#{@@api_version.to_i}"} end -end \ No newline at end of file +end diff --git a/lib/quaderno-ruby/behavior/block.rb b/lib/quaderno-ruby/behavior/block.rb index c3a6a16..f3ed685 100644 --- a/lib/quaderno-ruby/behavior/block.rb +++ b/lib/quaderno-ruby/behavior/block.rb @@ -1,28 +1,26 @@ -module Quaderno - module Behavior - module Block - def self.included(receiver) - receiver.send :extend, ClassMethods - end +module Quaderno::Behavior + module Block + def self.included(receiver) + receiver.send :extend, ClassMethods + end - module ClassMethods - include Quaderno::Helpers::Authentication + module ClassMethods + include Quaderno::Helpers::Authentication - def block(id, options = {}) - authentication = get_authentication(options.merge(api_model: api_model)) + def block(id, options = {}) + authentication = get_authentication(options.merge(api_model: api_model)) - response = put("#{authentication[:url]}#{api_model.api_path}/#{id}/block.json", - basic_auth: authentication[:basic_auth], - headers: version_header.merge(authentication[:headers]) - ) + response = put("#{authentication[:url]}#{api_model.api_path}/#{id}/block.json", + basic_auth: authentication[:basic_auth], + headers: version_header.merge(authentication[:headers]) + ) - check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true }) - doc = response.parsed_response + check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true }) + doc = response.parsed_response - new doc - end + new doc end end end -end \ No newline at end of file +end diff --git a/lib/quaderno-ruby/behavior/crud.rb b/lib/quaderno-ruby/behavior/crud.rb index d591f22..b032165 100644 --- a/lib/quaderno-ruby/behavior/crud.rb +++ b/lib/quaderno-ruby/behavior/crud.rb @@ -1,125 +1,123 @@ -module Quaderno - module Behavior - module Crud +module Quaderno::Behavior + module Crud - def self.included(receiver) - receiver.send :extend, ClassMethods - end + def self.included(receiver) + receiver.send :extend, ClassMethods + end - module ClassMethods - include Quaderno::Helpers::Authentication + module ClassMethods + include Quaderno::Helpers::Authentication - def parse_nested(element) - if element.has_key?('payments') - payments_collection = Array.new - (element['payments'] || Array.new).each { |payment| payments_collection << Quaderno::Payment.new(payment) } - element['payments'] = payments_collection - end + def parse_nested(element) + if element.has_key?('payments') + payments_collection = Array.new + (element['payments'] || Array.new).each { |payment| payments_collection << Quaderno::Payment.new(payment) } + element['payments'] = payments_collection + end - items_collection = Array.new - element['items'].each { |item| items_collection << Quaderno::DocumentItem.new(item) } - element['items'] = items_collection - element['contact'] = Quaderno::Contact.new(element['contact']) + items_collection = Array.new + element['items'].each { |item| items_collection << Quaderno::DocumentItem.new(item) } + element['items'] = items_collection + element['contact'] = Quaderno::Contact.new(element['contact']) - element - end + element + end - def all(options = {}) - authentication = get_authentication(options.merge(api_model: api_model)) - filter = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } - - response = get("#{authentication[:url]}#{api_model.api_path}.json", - query: filter, - basic_auth: authentication[:basic_auth], - headers: version_header.merge(authentication[:headers]) - ) - - check_exception_for(response, { rate_limit: true, subdomain_or_token: true }) - array = response.parsed_response - collection = Quaderno::Collection.new - - if is_a_document? - array.each do |element| - element[:authentication_data] = authentication - api_model.parse_nested(element) - collection << (new element) - end - else - array.each { |element| collection << (new element) } + def all(options = {}) + authentication = get_authentication(options.merge(api_model: api_model)) + filter = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } + + response = get("#{authentication[:url]}#{api_model.api_path}.json", + query: filter, + basic_auth: authentication[:basic_auth], + headers: version_header.merge(authentication[:headers]) + ) + + check_exception_for(response, { rate_limit: true, subdomain_or_token: true }) + array = response.parsed_response + collection = Quaderno::Collection.new + + if is_a_document? + array.each do |element| + element[:authentication_data] = authentication + api_model.parse_nested(element) + collection << (new element) end + else + array.each { |element| collection << (new element) } + end - collection.current_page = response.headers['x-pages-currentpage'] - collection.total_pages = response.headers['x-pages-totalpages'] + collection.current_page = response.headers['x-pages-currentpage'] + collection.total_pages = response.headers['x-pages-totalpages'] - collection - end + collection + end - def find(id, options = {}) - authentication = get_authentication(options.merge(api_model: api_model)) + def find(id, options = {}) + authentication = get_authentication(options.merge(api_model: api_model)) - response = get("#{authentication[:url]}#{api_model.api_path}/#{id}.json", - basic_auth: authentication[:basic_auth], - headers: version_header.merge(authentication[:headers]) - ) + response = get("#{authentication[:url]}#{api_model.api_path}/#{id}.json", + basic_auth: authentication[:basic_auth], + headers: version_header.merge(authentication[:headers]) + ) - check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true }) - hash = response.parsed_response - hash[:authentication_data] = authentication + check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true }) + hash = response.parsed_response + hash[:authentication_data] = authentication - api_model.parse_nested(hash) if is_a_document? + api_model.parse_nested(hash) if is_a_document? - new hash - end + new hash + end - def create(params = {}) - authentication = get_authentication(params.merge(api_model: api_model)) - params.delete_if { |k,v| %w(auth_token access_token api_url mode api_model').include? k.to_s } + def create(params = {}) + authentication = get_authentication(params.merge(api_model: api_model)) + params.delete_if { |k,v| %w(auth_token access_token api_url mode api_model').include? k.to_s } - response = post("#{authentication[:url]}#{api_model.api_path}.json", - body: params.to_json, - basic_auth: authentication[:basic_auth], - headers: version_header.merge(authentication[:headers]).merge('Content-Type' => 'application/json') - ) + response = post("#{authentication[:url]}#{api_model.api_path}.json", + body: params.to_json, + basic_auth: authentication[:basic_auth], + headers: version_header.merge(authentication[:headers]).merge('Content-Type' => 'application/json') + ) - check_exception_for(response, { rate_limit: true, subdomain_or_token: true, required_fields: true }) - hash = response.parsed_response - hash[:authentication_data] = authentication + check_exception_for(response, { rate_limit: true, subdomain_or_token: true, required_fields: true }) + hash = response.parsed_response + hash[:authentication_data] = authentication - api_model.parse_nested(hash) if is_a_document? + api_model.parse_nested(hash) if is_a_document? - new hash - end + new hash + end - def update(id, params = {}) - authentication = get_authentication(params.merge(api_model: api_model)) - params = params.delete_if { |k,v| %w(auth_token access_token api_url mode api_model').include? k.to_s } + def update(id, params = {}) + authentication = get_authentication(params.merge(api_model: api_model)) + params = params.delete_if { |k,v| %w(auth_token access_token api_url mode api_model').include? k.to_s } - response = put("#{authentication[:url]}#{api_model.api_path}/#{id}.json", - body: params.to_json, - basic_auth: authentication[:basic_auth], - headers: version_header.merge(authentication[:headers]).merge('Content-Type' => 'application/json') - ) + response = put("#{authentication[:url]}#{api_model.api_path}/#{id}.json", + body: params.to_json, + basic_auth: authentication[:basic_auth], + headers: version_header.merge(authentication[:headers]).merge('Content-Type' => 'application/json') + ) - check_exception_for(response, { rate_limit: true, required_fields: true, subdomain_or_token: true, id: true }) - hash = response.parsed_response - hash[:authentication_data] = authentication + check_exception_for(response, { rate_limit: true, required_fields: true, subdomain_or_token: true, id: true }) + hash = response.parsed_response + hash[:authentication_data] = authentication - api_model.parse_nested(hash) if is_a_document? + api_model.parse_nested(hash) if is_a_document? - new hash - end + new hash + end - def delete(id, options = {}) - authentication = get_authentication(options.merge(api_model: api_model)) + def delete(id, options = {}) + authentication = get_authentication(options.merge(api_model: api_model)) - response = HTTParty.delete("#{authentication[:url]}#{ api_model.api_path }/#{ id }.json", - basic_auth: authentication[:basic_auth], - headers: version_header.merge(authentication[:headers]) - ) - check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true, has_documents: true }) + response = HTTParty.delete("#{authentication[:url]}#{ api_model.api_path }/#{ id }.json", + basic_auth: authentication[:basic_auth], + headers: version_header.merge(authentication[:headers]) + ) + check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true, has_documents: true }) - true - end + true end end end diff --git a/lib/quaderno-ruby/behavior/deliver.rb b/lib/quaderno-ruby/behavior/deliver.rb index ab7164c..69a6b55 100644 --- a/lib/quaderno-ruby/behavior/deliver.rb +++ b/lib/quaderno-ruby/behavior/deliver.rb @@ -1,26 +1,24 @@ -module Quaderno - module Behavior - module Deliver +module Quaderno::Behavior + module Deliver - def self.included(base) - base.send :include, InstanceMethods - end + def self.included(base) + base.send :include, InstanceMethods + end - module InstanceMethods - include Quaderno::Helpers::Authentication + module InstanceMethods + include Quaderno::Helpers::Authentication - def deliver(options = nil) - self.authentication_data = get_authentication(options.merge(api_model: api_model)) if options.is_a?(Hash) + def deliver(options = nil) + self.authentication_data = get_authentication(options.merge(api_model: api_model)) if options.is_a?(Hash) - party_response = api_model.get("#{authentication_data[:url]}#{api_model.api_path}/#{id}/deliver.json", - basic_auth: authentication_data[:basic_auth], - headers: self.class.version_header.merge(authentication_data[:headers]) - ) + party_response = api_model.get("#{authentication_data[:url]}#{api_model.api_path}/#{id}/deliver.json", + basic_auth: authentication_data[:basic_auth], + headers: self.class.version_header.merge(authentication_data[:headers]) + ) - api_model.check_exception_for(party_response, { rate_limit: true, subdomain_or_token: true, id: true, required_fields: true }) - { limit: party_response.headers["x-ratelimit-limit"].to_i, remaining: party_response.headers["x-ratelimit-remaining"].to_i } - end + api_model.check_exception_for(party_response, { rate_limit: true, subdomain_or_token: true, id: true, required_fields: true }) + { limit: party_response.headers["x-ratelimit-limit"].to_i, remaining: party_response.headers["x-ratelimit-remaining"].to_i } end end end -end \ No newline at end of file +end diff --git a/lib/quaderno-ruby/behavior/payment.rb b/lib/quaderno-ruby/behavior/payment.rb index 6b51012..ba2cffd6 100644 --- a/lib/quaderno-ruby/behavior/payment.rb +++ b/lib/quaderno-ruby/behavior/payment.rb @@ -1,50 +1,48 @@ -module Quaderno - module Behavior - module Payment +module Quaderno::Behavior + module Payment - def self.included(base) - base.send :include, InstanceMethods - end + def self.included(base) + base.send :include, InstanceMethods + end - module InstanceMethods - include Quaderno::Helpers::Authentication + module InstanceMethods + include Quaderno::Helpers::Authentication - def add_payment(params = {}) - if (params.keys.map(&:to_s) & %w(auth_token access_token api_url mode api_model)).any? - self.authentication_data = get_authentication(params.merge(api_model: api_model)) - params = params.delete_if { |k, _| %w(auth_token access_token api_url mode api_model).include? k.to_s } - end + def add_payment(params = {}) + if (params.keys.map(&:to_s) & %w(auth_token access_token api_url mode api_model)).any? + self.authentication_data = get_authentication(params.merge(api_model: api_model)) + params = params.delete_if { |k, _| %w(auth_token access_token api_url mode api_model).include? k.to_s } + end - response = api_model.post("#{authentication_data[:url]}#{api_model.api_path}/#{id}/payments.json", - body: params, - basic_auth: authentication_data[:basic_auth], - headers: self.class.version_header.merge(authentication_data[:headers]) - ) + response = api_model.post("#{authentication_data[:url]}#{api_model.api_path}/#{id}/payments.json", + body: params, + basic_auth: authentication_data[:basic_auth], + headers: self.class.version_header.merge(authentication_data[:headers]) + ) - api_model.check_exception_for(response, { rate_limit: true, subdomain_or_token: true, required_fields: true }) + api_model.check_exception_for(response, { rate_limit: true, subdomain_or_token: true, required_fields: true }) - instance = Quaderno::Payment.new(response.parsed_response) - self.payments << instance + instance = Quaderno::Payment.new(response.parsed_response) + self.payments << instance - Quaderno::Payment.new instance - end + Quaderno::Payment.new instance + end - def remove_payment(payment_id, options = nil) - self.authentication_data = get_authentication(options.merge(api_model: api_model)) if options.is_a?(Hash) + def remove_payment(payment_id, options = nil) + self.authentication_data = get_authentication(options.merge(api_model: api_model)) if options.is_a?(Hash) - response = HTTParty.delete("#{authentication_data[:url]}#{api_model.api_path}/#{id}/payments/#{payment_id}.json", - basic_auth: authentication_data[:basic_auth], - headers: self.class.version_header.merge(authentication_data[:headers]) - ) + response = HTTParty.delete("#{authentication_data[:url]}#{api_model.api_path}/#{id}/payments/#{payment_id}.json", + basic_auth: authentication_data[:basic_auth], + headers: self.class.version_header.merge(authentication_data[:headers]) + ) - api_model.check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true }) + api_model.check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true }) - self.payments.delete_if { |payment| payment.id == payment_id } + self.payments.delete_if { |payment| payment.id == payment_id } - true - end + true end end end -end \ No newline at end of file +end diff --git a/lib/quaderno-ruby/behavior/retrieve.rb b/lib/quaderno-ruby/behavior/retrieve.rb index 6766698..8f9bad9 100644 --- a/lib/quaderno-ruby/behavior/retrieve.rb +++ b/lib/quaderno-ruby/behavior/retrieve.rb @@ -1,35 +1,33 @@ -module Quaderno - module Behavior - module Retrieve +module Quaderno::Behavior + module Retrieve - def self.included(receiver) - receiver.send :extend, ClassMethods - end + def self.included(receiver) + receiver.send :extend, ClassMethods + end - module ClassMethods - include Quaderno::Helpers::Authentication + module ClassMethods + include Quaderno::Helpers::Authentication - def retrieve(gateway_id, gateway = 'stripe', options = {}) - authentication = get_authentication(options.merge(api_model: api_model)) + def retrieve(gateway_id, gateway = 'stripe', options = {}) + authentication = get_authentication(options.merge(api_model: api_model)) - response = get("#{authentication[:url]}#{gateway}/#{@_retrieve_path}/#{gateway_id}.json", - basic_auth: authentication[:basic_auth], - headers: version_header.merge(authentication[:headers]) - ) + response = get("#{authentication[:url]}#{gateway}/#{@_retrieve_path}/#{gateway_id}.json", + basic_auth: authentication[:basic_auth], + headers: version_header.merge(authentication[:headers]) + ) - check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true }) - hash = response.parsed_response - hash[:authentication_data] = authentication + check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true }) + hash = response.parsed_response + hash[:authentication_data] = authentication - new hash - end - alias_method :retrieve_customer, :retrieve + new hash + end + alias_method :retrieve_customer, :retrieve - private - def retrieve_path(path) - @_retrieve_path = path - end + private + def retrieve_path(path) + @_retrieve_path = path end end end -end \ No newline at end of file +end diff --git a/lib/quaderno-ruby/contact.rb b/lib/quaderno-ruby/contact.rb index 26f3189..db26d95 100644 --- a/lib/quaderno-ruby/contact.rb +++ b/lib/quaderno-ruby/contact.rb @@ -1,9 +1,7 @@ -module Quaderno - class Contact < Base - include Quaderno::Behavior::Retrieve +class Quaderno::Contact < Quaderno::Base + include Quaderno::Behavior::Retrieve - api_model Quaderno::Contact - api_path 'contacts' - retrieve_path 'customers' - end -end \ No newline at end of file + api_model Quaderno::Contact + api_path 'contacts' + retrieve_path 'customers' +end diff --git a/lib/quaderno-ruby/credit.rb b/lib/quaderno-ruby/credit.rb index 383ecba..cbb30cb 100644 --- a/lib/quaderno-ruby/credit.rb +++ b/lib/quaderno-ruby/credit.rb @@ -1,13 +1,11 @@ -module Quaderno - class Credit < Base - include Quaderno::Behavior::Deliver - include Quaderno::Behavior::Payment - include Quaderno::Behavior::Retrieve - include Quaderno::Behavior::Block +class Quaderno::Credit < Quaderno::Base + include Quaderno::Behavior::Deliver + include Quaderno::Behavior::Payment + include Quaderno::Behavior::Retrieve + include Quaderno::Behavior::Block - api_model Quaderno::Credit - api_path 'credits' - retrieve_path 'refunds' - is_a_document? true - end -end \ No newline at end of file + api_model Quaderno::Credit + api_path 'credits' + retrieve_path 'refunds' + is_a_document? true +end diff --git a/lib/quaderno-ruby/document_item.rb b/lib/quaderno-ruby/document_item.rb index 27a44ce..d37d7c5 100644 --- a/lib/quaderno-ruby/document_item.rb +++ b/lib/quaderno-ruby/document_item.rb @@ -1,4 +1,2 @@ -module Quaderno - class DocumentItem < OpenStruct - end +class Quaderno::DocumentItem < OpenStruct end diff --git a/lib/quaderno-ruby/estimate.rb b/lib/quaderno-ruby/estimate.rb index 2a315ef..a2c77f7 100644 --- a/lib/quaderno-ruby/estimate.rb +++ b/lib/quaderno-ruby/estimate.rb @@ -1,9 +1,7 @@ -module Quaderno - class Estimate < Base - include Quaderno::Behavior::Deliver +class Quaderno::Estimate < Quaderno::Base + include Quaderno::Behavior::Deliver - api_model Quaderno::Estimate - api_path 'estimates' - is_a_document? true - end + api_model Quaderno::Estimate + api_path 'estimates' + is_a_document? true end \ No newline at end of file diff --git a/lib/quaderno-ruby/evidence.rb b/lib/quaderno-ruby/evidence.rb index e3ac2ff..487c258 100644 --- a/lib/quaderno-ruby/evidence.rb +++ b/lib/quaderno-ruby/evidence.rb @@ -1,10 +1,8 @@ -module Quaderno - class Evidence < Base - api_model Quaderno::Evidence - api_path 'evidences' +class Quaderno::Evidence < Quaderno::Base + api_model Quaderno::Evidence + api_path 'evidences' - class << self - undef :all, :find, :update, :delete, :parse_nested - end + class << self + undef :all, :find, :update, :delete, :parse_nested end end \ No newline at end of file diff --git a/lib/quaderno-ruby/exceptions/exceptions.rb b/lib/quaderno-ruby/exceptions/exceptions.rb index 3addb4d..9b0be40 100644 --- a/lib/quaderno-ruby/exceptions/exceptions.rb +++ b/lib/quaderno-ruby/exceptions/exceptions.rb @@ -1,56 +1,54 @@ -module Quaderno - module Exceptions - class BaseException < StandardError - end +module Quaderno::Exceptions + class BaseException < StandardError + end - class InvalidSubdomainOrToken < BaseException - end + class InvalidSubdomainOrToken < BaseException + end - class InvalidID < BaseException - end + class InvalidID < BaseException + end - class RateLimitExceeded < BaseException - end + class RateLimitExceeded < BaseException + end - class HasAssociatedDocuments < BaseException - end + class HasAssociatedDocuments < BaseException + end - class RequiredFieldsEmptyOrInvalid < BaseException - end + class RequiredFieldsEmptyOrInvalid < BaseException + end - class ThrottleLimitExceeded < BaseException - end + class ThrottleLimitExceeded < BaseException + end - class UnsupportedApiVersion < BaseException - end + class UnsupportedApiVersion < BaseException + end - def self.included(receiver) - receiver.send :extend, ClassMethods - end + def self.included(receiver) + receiver.send :extend, ClassMethods + end - module ClassMethods - def check_exception_for(party_response, params = {}) - raise(Quaderno::Exceptions::UnsupportedApiVersion, 'Unsupported API version') if !!(party_response.body =~ /Unsupported API version/) - - if params[:throttle_limit].nil? == false - raise(Quaderno::Exceptions::ThrottleLimitExceeded, 'Throttle limit exceeded, please try again later') if party_response.response.class == Net::HTTPServiceUnavailable - end - if params[:rate_limit].nil? == false - raise(Quaderno::Exceptions::RateLimitExceeded, 'Rate limit exceeded') if party_response.response.class == Net::HTTPForbidden - end - if params[:subdomain_or_token].nil? == false - raise(Quaderno::Exceptions::InvalidSubdomainOrToken, 'Invalid subdomain or token') if party_response.response.class == Net::HTTPUnauthorized - end - if params[:id].nil? == false - raise(Quaderno::Exceptions::InvalidID, "Invalid #{ api_model } instance identifier") if (party_response.response.class == Net::HTTPInternalServerError) || (party_response.response.class == Net::HTTPNotFound) - end - if params[:required_fields].nil? == false - raise(Quaderno::Exceptions::RequiredFieldsEmptyOrInvalid, party_response.body) if party_response.response.class == Net::HTTPUnprocessableEntity - end - if params[:has_documents].nil? == false - raise(Quaderno::Exceptions::HasAssociatedDocuments, party_response.body) if party_response.response.class == Net::HTTPClientError - end + module ClassMethods + def check_exception_for(party_response, params = {}) + raise(Quaderno::Exceptions::UnsupportedApiVersion, 'Unsupported API version') if !!(party_response.body =~ /Unsupported API version/) + + if params[:throttle_limit].nil? == false + raise(Quaderno::Exceptions::ThrottleLimitExceeded, 'Throttle limit exceeded, please try again later') if party_response.response.class == Net::HTTPServiceUnavailable + end + if params[:rate_limit].nil? == false + raise(Quaderno::Exceptions::RateLimitExceeded, 'Rate limit exceeded') if party_response.response.class == Net::HTTPForbidden + end + if params[:subdomain_or_token].nil? == false + raise(Quaderno::Exceptions::InvalidSubdomainOrToken, 'Invalid subdomain or token') if party_response.response.class == Net::HTTPUnauthorized + end + if params[:id].nil? == false + raise(Quaderno::Exceptions::InvalidID, "Invalid #{ api_model } instance identifier") if (party_response.response.class == Net::HTTPInternalServerError) || (party_response.response.class == Net::HTTPNotFound) + end + if params[:required_fields].nil? == false + raise(Quaderno::Exceptions::RequiredFieldsEmptyOrInvalid, party_response.body) if party_response.response.class == Net::HTTPUnprocessableEntity + end + if params[:has_documents].nil? == false + raise(Quaderno::Exceptions::HasAssociatedDocuments, party_response.body) if party_response.response.class == Net::HTTPClientError end end end -end \ No newline at end of file +end diff --git a/lib/quaderno-ruby/expense.rb b/lib/quaderno-ruby/expense.rb index 223ecca..6bf9941 100644 --- a/lib/quaderno-ruby/expense.rb +++ b/lib/quaderno-ruby/expense.rb @@ -1,10 +1,8 @@ -module Quaderno - class Expense < Base - include Quaderno::Behavior::Payment - include Quaderno::Behavior::Block +class Quaderno::Expense < Quaderno::Base + include Quaderno::Behavior::Payment + include Quaderno::Behavior::Block - api_model Quaderno::Expense - api_path 'expenses' - is_a_document? true - end + api_model Quaderno::Expense + api_path 'expenses' + is_a_document? true end \ No newline at end of file diff --git a/lib/quaderno-ruby/helpers/authentication.rb b/lib/quaderno-ruby/helpers/authentication.rb index 68aa4a9..d776c32 100644 --- a/lib/quaderno-ruby/helpers/authentication.rb +++ b/lib/quaderno-ruby/helpers/authentication.rb @@ -1,26 +1,24 @@ -module Quaderno - module Helpers - module Authentication +module Quaderno::Helpers + module Authentication - def get_authentication(options = {}) - mode = options[:mode] || :production + def get_authentication(options = {}) + mode = options[:mode] || :production - local_api_model = options[:api_model] - url = options[:api_url] || (local_api_model && local_api_model.url) || (mode == :production ? 'https://quadernoapp.com/api/' : 'http://sandbox-quadernoapp.com/api/') + local_api_model = options[:api_model] + url = options[:api_url] || (local_api_model && local_api_model.url) || (mode == :production ? 'https://quadernoapp.com/api/' : 'http://sandbox-quadernoapp.com/api/') - auth_token = options[:auth_token] || options['auth_token'] || (local_api_model && local_api_model.auth_token) - access_token = options[:access_token] || options['access_token'] + auth_token = options[:auth_token] || options['auth_token'] || (local_api_model && local_api_model.auth_token) + access_token = options[:access_token] || options['access_token'] - authentication = { url: url, headers: {}, basic_auth: nil } + authentication = { url: url, headers: {}, basic_auth: nil } - if access_token - authentication[:headers] = { 'Authorization' => "Bearer #{access_token}" } - elsif auth_token - authentication[:basic_auth] = { username: auth_token } - end - - authentication + if access_token + authentication[:headers] = { 'Authorization' => "Bearer #{access_token}" } + elsif auth_token + authentication[:basic_auth] = { username: auth_token } end + + authentication end end -end \ No newline at end of file +end diff --git a/lib/quaderno-ruby/income.rb b/lib/quaderno-ruby/income.rb index 782a4e2..906212a 100644 --- a/lib/quaderno-ruby/income.rb +++ b/lib/quaderno-ruby/income.rb @@ -1,13 +1,11 @@ -module Quaderno - class Income < Base - include Quaderno::Behavior::Block +class Quaderno::Income < Quaderno::Base + include Quaderno::Behavior::Block - class << self - undef :find, :update, :delete - end - - api_model Quaderno::Income - api_path 'income' - is_a_document? true + class << self + undef :find, :update, :delete end + + api_model Quaderno::Income + api_path 'income' + is_a_document? true end \ No newline at end of file diff --git a/lib/quaderno-ruby/invoice.rb b/lib/quaderno-ruby/invoice.rb index 92ea5c2..3b1d360 100644 --- a/lib/quaderno-ruby/invoice.rb +++ b/lib/quaderno-ruby/invoice.rb @@ -1,13 +1,11 @@ -module Quaderno - class Invoice < Base - include Quaderno::Behavior::Deliver - include Quaderno::Behavior::Payment - include Quaderno::Behavior::Retrieve - include Quaderno::Behavior::Block +class Quaderno::Invoice < Quaderno::Base + include Quaderno::Behavior::Deliver + include Quaderno::Behavior::Payment + include Quaderno::Behavior::Retrieve + include Quaderno::Behavior::Block - api_model Quaderno::Invoice - api_path 'invoices' - retrieve_path 'charges' - is_a_document? true - end + api_model Quaderno::Invoice + api_path 'invoices' + retrieve_path 'charges' + is_a_document? true end \ No newline at end of file diff --git a/lib/quaderno-ruby/item.rb b/lib/quaderno-ruby/item.rb index c30a03a..54a31ac 100644 --- a/lib/quaderno-ruby/item.rb +++ b/lib/quaderno-ruby/item.rb @@ -1,7 +1,4 @@ -module Quaderno - class Item < Base - - api_model Quaderno::Item - api_path 'items' - end +class Quaderno::Item < Quaderno::Base + api_model Quaderno::Item + api_path 'items' end \ No newline at end of file diff --git a/lib/quaderno-ruby/payment.rb b/lib/quaderno-ruby/payment.rb index 43066db..02ed67f 100644 --- a/lib/quaderno-ruby/payment.rb +++ b/lib/quaderno-ruby/payment.rb @@ -1,4 +1,2 @@ -module Quaderno - class Payment < OpenStruct - end +class Quaderno::Payment < OpenStruct end \ No newline at end of file diff --git a/lib/quaderno-ruby/receipt.rb b/lib/quaderno-ruby/receipt.rb index 6e66b01..e29e88c 100644 --- a/lib/quaderno-ruby/receipt.rb +++ b/lib/quaderno-ruby/receipt.rb @@ -1,10 +1,8 @@ -module Quaderno - class Receipt < Base - include Quaderno::Behavior::Deliver - include Quaderno::Behavior::Block +class Quaderno::Receipt < Quaderno::Base + include Quaderno::Behavior::Deliver + include Quaderno::Behavior::Block - api_model Quaderno::Receipt - api_path 'receipts' - is_a_document? true - end + api_model Quaderno::Receipt + api_path 'receipts' + is_a_document? true end \ No newline at end of file diff --git a/lib/quaderno-ruby/recurring.rb b/lib/quaderno-ruby/recurring.rb index 499f5aa..134b7ed 100644 --- a/lib/quaderno-ruby/recurring.rb +++ b/lib/quaderno-ruby/recurring.rb @@ -1,8 +1,5 @@ -module Quaderno - class Recurring < Base - - api_model Quaderno::Recurring - api_path 'recurring' - is_a_document? true - end +class Quaderno::Recurring < Quaderno::Base + api_model Quaderno::Recurring + api_path 'recurring' + is_a_document? true end \ No newline at end of file diff --git a/lib/quaderno-ruby/report.rb b/lib/quaderno-ruby/report.rb index 024a2dc..4971000 100644 --- a/lib/quaderno-ruby/report.rb +++ b/lib/quaderno-ruby/report.rb @@ -1,80 +1,78 @@ -module Quaderno - class Report < Base - api_model Quaderno::Report - api_path 'reports' +class Quaderno::Report < Quaderno::Base + api_model Quaderno::Report + api_path 'reports' - class << self - undef :all, :find, :create, :update, :delete, :parse_nested - end + class << self + undef :all, :find, :create, :update, :delete, :parse_nested + end - def self.journal(options = {}) - authentication = get_authentication(options.merge(api_model: api_model)) - filter = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } + def self.journal(options = {}) + authentication = get_authentication(options.merge(api_model: api_model)) + filter = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } - response = get("#{authentication[:url]}#{api_model.api_path}/journal.json", - query: filter, - basic_auth: authentication[:basic_auth], - headers: version_header.merge(authentication[:headers]) - ) + response = get("#{authentication[:url]}#{api_model.api_path}/journal.json", + query: filter, + basic_auth: authentication[:basic_auth], + headers: version_header.merge(authentication[:headers]) + ) - check_exception_for(response, { rate_limit: true, subdomain_or_token: true }) + check_exception_for(response, { rate_limit: true, subdomain_or_token: true }) - response.parsed_response - end + response.parsed_response + end - def self.taxes(options = {}) - authentication = get_authentication(options.merge(api_model: api_model)) - filter = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } + def self.taxes(options = {}) + authentication = get_authentication(options.merge(api_model: api_model)) + filter = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } - response = get("#{authentication[:url]}#{api_model.api_path}/taxes.json", - query: filter, - basic_auth: authentication[:basic_auth], - headers: version_header.merge(authentication[:headers]) - ) + response = get("#{authentication[:url]}#{api_model.api_path}/taxes.json", + query: filter, + basic_auth: authentication[:basic_auth], + headers: version_header.merge(authentication[:headers]) + ) - check_exception_for(response, { rate_limit: true, subdomain_or_token: true }) + check_exception_for(response, { rate_limit: true, subdomain_or_token: true }) - response.parsed_response - end + response.parsed_response + end - def self.domestic_taxes(options = {}) - request_tax_report('domestic_taxes', options) - end + def self.domestic_taxes(options = {}) + request_tax_report('domestic_taxes', options) + end - def self.sales_taxes(options = {}) - request_tax_report('sales_taxes', options) - end + def self.sales_taxes(options = {}) + request_tax_report('sales_taxes', options) + end - def self.vat_moss(options = {}) - request_tax_report('vat_moss', options) - end + def self.vat_moss(options = {}) + request_tax_report('vat_moss', options) + end - def self.ec_sales(options = {}) - request_tax_report('ec_sales', options) - end + def self.ec_sales(options = {}) + request_tax_report('ec_sales', options) + end - def self.international_taxes(options = {}) - request_tax_report('international_taxes', options) - end + def self.international_taxes(options = {}) + request_tax_report('international_taxes', options) + end - private + private - def self.request_tax_report(tax_report_type, options) - authentication = get_authentication(options.merge(api_model: api_model)) - filter = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } + def self.request_tax_report(tax_report_type, options) + authentication = get_authentication(options.merge(api_model: api_model)) + filter = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } - response = get("#{authentication[:url]}#{api_model.api_path}/#{tax_report_type}.json", - query: filter, - basic_auth: authentication[:basic_auth], - headers: version_header.merge(authentication[:headers]) - ) + response = get("#{authentication[:url]}#{api_model.api_path}/#{tax_report_type}.json", + query: filter, + basic_auth: authentication[:basic_auth], + headers: version_header.merge(authentication[:headers]) + ) - check_exception_for(response, { rate_limit: true, subdomain_or_token: true }) + check_exception_for(response, { rate_limit: true, subdomain_or_token: true }) - collection = Array.new - response.parsed_response.each { |tax_report| collection << self.new(tax_report) } + collection = Array.new + response.parsed_response.each { |tax_report| collection << self.new(tax_report) } - collection - end + collection end end \ No newline at end of file diff --git a/lib/quaderno-ruby/tax.rb b/lib/quaderno-ruby/tax.rb index 162eb26..5d5824f 100644 --- a/lib/quaderno-ruby/tax.rb +++ b/lib/quaderno-ruby/tax.rb @@ -1,63 +1,61 @@ -module Quaderno - class TaxReport < OpenStruct - end +class Quaderno::TaxReport < OpenStruct +end - class Tax < Base - api_model Quaderno::Tax - api_path 'taxes' +class Quaderno::Tax < Quaderno::Base + api_model Quaderno::Tax + api_path 'taxes' - class << self - undef :find, :create, :update, :delete, :parse_nested - end + class << self + undef :find, :create, :update, :delete, :parse_nested + end - def self.calculate(options = {}) - authentication = get_authentication(options.merge(api_model: api_model)) - params = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } + def self.calculate(options = {}) + authentication = get_authentication(options.merge(api_model: api_model)) + params = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } - response = get("#{authentication[:url]}taxes/calculate.json", - query: params, - basic_auth: authentication[:basic_auth], - headers: version_header.merge(authentication[:headers]) - ) + response = get("#{authentication[:url]}taxes/calculate.json", + query: params, + basic_auth: authentication[:basic_auth], + headers: version_header.merge(authentication[:headers]) + ) - check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true }) - new response.parsed_response - end + check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true }) + new response.parsed_response + end - def self.validate_vat_number(country, vat_number, options = {}) - authentication = get_authentication(options.merge(api_model: api_model)) + def self.validate_vat_number(country, vat_number, options = {}) + authentication = get_authentication(options.merge(api_model: api_model)) - response = get("#{authentication[:url]}taxes/validate.json", - query: { country: country, vat_number: vat_number }, - basic_auth: authentication[:basic_auth], - headers: version_header.merge(authentication[:headers]) - ) + response = get("#{authentication[:url]}taxes/validate.json", + query: { country: country, vat_number: vat_number }, + basic_auth: authentication[:basic_auth], + headers: version_header.merge(authentication[:headers]) + ) - check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true }) + check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true }) - response.parsed_response['valid'] - end + response.parsed_response['valid'] + end - def self.reports(options = {}) - authentication = get_authentication(options.merge(api_model: api_model)) - params = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } + def self.reports(options = {}) + authentication = get_authentication(options.merge(api_model: api_model)) + params = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } - response = get("#{authentication[:url]}taxes/reports.json", - query: params, - basic_auth: authentication[:basic_auth], - headers: version_header.merge(authentication[:headers]) - ) + response = get("#{authentication[:url]}taxes/reports.json", + query: params, + basic_auth: authentication[:basic_auth], + headers: version_header.merge(authentication[:headers]) + ) - array = response.parsed_response - collection = Quaderno::Collection.new - collection.current_page = response.headers['x-pages-currentpage'] - collection.total_pages = response.headers['x-pages-totalpages'] + array = response.parsed_response + collection = Quaderno::Collection.new + collection.current_page = response.headers['x-pages-currentpage'] + collection.total_pages = response.headers['x-pages-totalpages'] - array.each { |report| collection << Quaderno::TaxReport.new(report) } + array.each { |report| collection << Quaderno::TaxReport.new(report) } - check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true }) + check_exception_for(response, { rate_limit: true, subdomain_or_token: true, id: true }) - collection - end + collection end -end \ No newline at end of file +end diff --git a/lib/quaderno-ruby/version.rb b/lib/quaderno-ruby/version.rb new file mode 100644 index 0000000..fd8dc22 --- /dev/null +++ b/lib/quaderno-ruby/version.rb @@ -0,0 +1,3 @@ +class Quaderno + VERSION = "1.14.1" +end diff --git a/lib/quaderno-ruby/webhook.rb b/lib/quaderno-ruby/webhook.rb index 8e2911e..2023b9d 100644 --- a/lib/quaderno-ruby/webhook.rb +++ b/lib/quaderno-ruby/webhook.rb @@ -1,6 +1,4 @@ -module Quaderno - class Webhook < Base - api_model Quaderno::Webhook - api_path 'webhooks' - end +class Quaderno::Webhook < Quaderno::Base + api_model Quaderno::Webhook + api_path 'webhooks' end \ No newline at end of file diff --git a/quaderno.gemspec b/quaderno.gemspec index 8d3ecc6..7cb8166 100644 --- a/quaderno.gemspec +++ b/quaderno.gemspec @@ -1,153 +1,33 @@ -# Generated by jeweler -# DO NOT EDIT THIS FILE DIRECTLY -# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' -# -*- encoding: utf-8 -*- -# stub: quaderno 1.14.0 ruby lib +# coding: utf-8 +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'quaderno-ruby/version' -Gem::Specification.new do |s| - s.name = "quaderno" - s.version = "1.14.0" +Gem::Specification.new do |spec| + spec.name = "quaderno" + spec.version = Quaderno::VERSION + spec.authors = ["Recrea"] + spec.email = "carlos@recrea.es" - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.require_paths = ["lib"] - s.authors = ["Recrea"] - s.date = "2017-12-21" - s.description = " A ruby wrapper for Quaderno API " - s.email = "carlos@recrea.es" - s.extra_rdoc_files = [ - "LICENSE.txt", - "README.md" - ] - s.files = [ - ".document", - "Gemfile", - "Gemfile.lock", - "LICENSE.txt", - "README.md", - "Rakefile", - "VERSION", - "changelog.md", - "lib/quaderno-ruby.rb", - "lib/quaderno-ruby/base.rb", - "lib/quaderno-ruby/behavior/block.rb", - "lib/quaderno-ruby/behavior/crud.rb", - "lib/quaderno-ruby/behavior/deliver.rb", - "lib/quaderno-ruby/behavior/payment.rb", - "lib/quaderno-ruby/behavior/retrieve.rb", - "lib/quaderno-ruby/collection.rb", - "lib/quaderno-ruby/contact.rb", - "lib/quaderno-ruby/credit.rb", - "lib/quaderno-ruby/document_item.rb", - "lib/quaderno-ruby/estimate.rb", - "lib/quaderno-ruby/evidence.rb", - "lib/quaderno-ruby/exceptions/exceptions.rb", - "lib/quaderno-ruby/expense.rb", - "lib/quaderno-ruby/helpers/authentication.rb", - "lib/quaderno-ruby/income.rb", - "lib/quaderno-ruby/invoice.rb", - "lib/quaderno-ruby/item.rb", - "lib/quaderno-ruby/payment.rb", - "lib/quaderno-ruby/receipt.rb", - "lib/quaderno-ruby/recurring.rb", - "lib/quaderno-ruby/report.rb", - "lib/quaderno-ruby/tax.rb", - "lib/quaderno-ruby/webhook.rb", - "quaderno.gemspec", - "test/fixtures/quaderno_cassettes/.DS_Store", - "test/fixtures/quaderno_cassettes/all_contacts.yml", - "test/fixtures/quaderno_cassettes/all_contacts_by_access_token.yml", - "test/fixtures/quaderno_cassettes/all_contacts_by_authentication_token.yml", - "test/fixtures/quaderno_cassettes/all_estimates.yml", - "test/fixtures/quaderno_cassettes/all_expenses.yml", - "test/fixtures/quaderno_cassettes/all_invoices.yml", - "test/fixtures/quaderno_cassettes/all_items.yml", - "test/fixtures/quaderno_cassettes/all_receipts.yml", - "test/fixtures/quaderno_cassettes/all_webhooks.yml", - "test/fixtures/quaderno_cassettes/create_estimate_on_downgraded_API.yml", - "test/fixtures/quaderno_cassettes/create_expense_on_downgraded_API.yml", - "test/fixtures/quaderno_cassettes/create_invoice_on_downgraded_API.yml", - "test/fixtures/quaderno_cassettes/create_receipt_on_downgraded_API.yml", - "test/fixtures/quaderno_cassettes/deleted_contact.yml", - "test/fixtures/quaderno_cassettes/deleted_contact_by_access_token.yml", - "test/fixtures/quaderno_cassettes/deleted_contact_by_authentication_token.yml", - "test/fixtures/quaderno_cassettes/deleted_estimate.yml", - "test/fixtures/quaderno_cassettes/deleted_expense.yml", - "test/fixtures/quaderno_cassettes/deleted_invoice.yml", - "test/fixtures/quaderno_cassettes/deleted_item.yml", - "test/fixtures/quaderno_cassettes/deleted_receipt.yml", - "test/fixtures/quaderno_cassettes/deleted_webhook.yml", - "test/fixtures/quaderno_cassettes/delivered_estimate.yml", - "test/fixtures/quaderno_cassettes/delivered_invoice.yml", - "test/fixtures/quaderno_cassettes/delivered_receipt.yml", - "test/fixtures/quaderno_cassettes/evidence_invoice.yml", - "test/fixtures/quaderno_cassettes/found_contact.yml", - "test/fixtures/quaderno_cassettes/found_contact_by_access_token.yml", - "test/fixtures/quaderno_cassettes/found_contact_by_authentication_token.yml", - "test/fixtures/quaderno_cassettes/found_estimate.yml", - "test/fixtures/quaderno_cassettes/found_expense.yml", - "test/fixtures/quaderno_cassettes/found_invoice.yml", - "test/fixtures/quaderno_cassettes/found_item.yml", - "test/fixtures/quaderno_cassettes/found_receipt.yml", - "test/fixtures/quaderno_cassettes/found_webhook.yml", - "test/fixtures/quaderno_cassettes/new_contact.yml", - "test/fixtures/quaderno_cassettes/new_contact_by_access_token.yml", - "test/fixtures/quaderno_cassettes/new_contact_by_authentication_token.yml", - "test/fixtures/quaderno_cassettes/new_estimate.yml", - "test/fixtures/quaderno_cassettes/new_evidence.yml", - "test/fixtures/quaderno_cassettes/new_expense.yml", - "test/fixtures/quaderno_cassettes/new_invoice.yml", - "test/fixtures/quaderno_cassettes/new_item.yml", - "test/fixtures/quaderno_cassettes/new_receipt.yml", - "test/fixtures/quaderno_cassettes/new_webhook.yml", - "test/fixtures/quaderno_cassettes/paid_expense.yml", - "test/fixtures/quaderno_cassettes/paid_invoice.yml", - "test/fixtures/quaderno_cassettes/rate_limit.yml", - "test/fixtures/quaderno_cassettes/unpay_an_expense.yml", - "test/fixtures/quaderno_cassettes/unpay_an_invoice.yml", - "test/fixtures/quaderno_cassettes/updated_contact.yml", - "test/fixtures/quaderno_cassettes/updated_contact_by_access_token.yml", - "test/fixtures/quaderno_cassettes/updated_contact_by_authentication_token.yml", - "test/fixtures/quaderno_cassettes/updated_estimate.yml", - "test/fixtures/quaderno_cassettes/updated_expense.yml", - "test/fixtures/quaderno_cassettes/updated_invoice.yml", - "test/fixtures/quaderno_cassettes/updated_item.yml", - "test/fixtures/quaderno_cassettes/updated_receipt.yml", - "test/fixtures/quaderno_cassettes/updated_webhook.yml", - "test/fixtures/quaderno_cassettes/validate_invalid_VAT_number.yml", - "test/fixtures/quaderno_cassettes/validate_valid_VAT_number.yml", - "test/helper.rb", - "test/unit/test_quaderno_contacts.rb", - "test/unit/test_quaderno_contacts_thread_safe.rb", - "test/unit/test_quaderno_estimates.rb", - "test/unit/test_quaderno_evidences.rb", - "test/unit/test_quaderno_expenses.rb", - "test/unit/test_quaderno_invoices.rb", - "test/unit/test_quaderno_items.rb", - "test/unit/test_quaderno_receipts.rb", - "test/unit/test_quaderno_tax.rb", - "test/unit/test_quaderno_webhooks.rb" - ] - s.homepage = "http://github.com/quaderno/quaderno-ruby" - s.licenses = ["MIT"] - s.rubygems_version = "2.4.8" - s.summary = "one-line summary of your gem" + spec.summary = "Ruby wrapper for the Quaderno API (https://quaderno.io/docs/api)" + spec.description = " A ruby wrapper for Quaderno API " + spec.homepage = "http://github.com/quaderno/quaderno-ruby" + spec.licenses = ["MIT"] - if s.respond_to? :specification_version then - s.specification_version = 4 + spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + spec.bindir = "exe" + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = %w(lib) + spec.date = "2017-12-21" + spec.extra_rdoc_files = %w(LICENSE.txt README.md) - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_runtime_dependency(%q, ["~> 0.13.1"]) - s.add_development_dependency(%q, ["~> 2.0.1"]) - s.add_development_dependency(%q, ["~> 3.12"]) - else - s.add_dependency(%q, ["~> 0.13.1"]) - s.add_dependency(%q, ["~> 2.0.1"]) - s.add_dependency(%q, ["~> 3.12"]) - end - else - s.add_dependency(%q, ["~> 0.13.1"]) - s.add_dependency(%q, ["~> 2.0.1"]) - s.add_dependency(%q, ["~> 3.12"]) - end -end + spec.add_dependency('httparty', "~> 0.13.1") + spec.add_development_dependency('rdoc', "~> 3.12") + spec.add_development_dependency('activesupport', "~> 4.2.0") + spec.add_development_dependency('webmock', "~> 1.22.6") + spec.add_development_dependency('vcr', ">= 0") + spec.add_development_dependency("bundler", "~> 1.11") + spec.add_development_dependency("rake", "~> 10.0") + spec.add_development_dependency("rspec", "~> 3.0") +end diff --git a/spec/fixtures/quaderno_cassettes/all_contacts.yml b/spec/fixtures/quaderno_cassettes/all_contacts.yml new file mode 100644 index 0000000..4706bfc --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/all_contacts.yml @@ -0,0 +1,186 @@ +--- +http_interactions: +- request: + method: get + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '15' + X-Ratelimit-Remaining: + - '100' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"98e7a84077de79c07b61648700087a54"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 19d69ca1-2f5d-4978-8b55-e131333e2c4e + X-Runtime: + - '0.304710' + Connection: + - close + Server: + - thin + body: + encoding: ASCII-8BIT + string: !binary |- + W3siaWQiOjY3Nywia2luZCI6InBlcnNvbiIsImNyZWF0ZWRfYXQiOjE1MTMw + NzgyNzgsImZpcnN0X25hbWUiOiJhc2Rhc2QiLCJsYXN0X25hbWUiOiJzZGFz + ZCIsImZ1bGxfbmFtZSI6ImFzZGFzZCBzZGFzZCIsInN0cmVldF9saW5lXzEi + Om51bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjoiMjIw + NiIsImNpdHkiOm51bGwsInJlZ2lvbiI6Ik5TVyIsImNvdW50cnkiOiJBVSIs + InBob25lXzEiOm51bGwsInBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1h + aWwiOm51bGwsIndlYiI6bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6 + IjUwIDEyMCAyNzYgNDMxIiwidmF0X251bWJlciI6IjkxMTM0OTk4MDIwIiwi + bGFuZ3VhZ2UiOiJFUyIsIm5vdGVzIjpudWxsLCJzZWN1cmVfaWQiOiIwMDc5 + ZGQ4ZmMxMWU5M2NiNzZhZmEzNmZmNWQ4ZTEwOGMyNzMyNjgyIiwicGVybWFs + aW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2aC5tZTozMDAwL2JpbGxpbmcvMDA3 + OWRkOGZjMTFlOTNjYjc2YWZhMzZmZjVkOGUxMDhjMjczMjY4MiIsInVybCI6 + Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAwMC9hcGkvY29udGFjdHMvNjc3 + In0seyJpZCI6Njc4LCJraW5k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cwMGVhMzVhOWI4 + MmQ2NmM3MGUzNWJiZmQzNGZjNTgyZmU2OCIsInVybCI6Imh0dHA6Ly9xdWFk + ZXJuby5sdmgubWU6MzAwMC9hcGkvY29udGFjdHMvNjc2In1d + http_version: + recorded_at: Thu, 21 Dec 2017 11:23:12 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/all_contacts_by_access_token.yml b/spec/fixtures/quaderno_cassettes/all_contacts_by_access_token.yml new file mode 100644 index 0000000..c672bed --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/all_contacts_by_access_token.yml @@ -0,0 +1,213 @@ +--- +http_interactions: +- request: + method: get + uri: http://quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Authorization: + - Bearer afa16c7478f0ba3be222e627c2571d4dd5dca47924996b13a3af377feca47ff0 + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '15' + X-Ratelimit-Remaining: + - '99' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"b841128b2b1e425ca44a00eaecc1d3e9"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - ebc2d34f-edb6-4606-802f-fe3ef34a1ff8 + X-Runtime: + - '24.752304' + Connection: + - close + Server: + - thin + body: + encoding: ASCII-8BIT + string: !binary |- + W3siaWQiOjY3Nywia2luZCI6InBlcnNvbiIsImNyZWF0ZWRfYXQiOjE1MTMw + NzgyNzgsImZpcnN0X25hbWUiOiJhc2Rhc2QiLCJsYXN0X25hbWUiOiJzZGFz + ZCIsImZ1bGxfbmFtZSI6ImFzZGFzZCBzZGFzZCIsInN0cmVldF9saW5lXzEi + Om51bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjoiMjIw + NiIsImNpdHkiOm51bGwsInJlZ2lvb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MzMzIyNzhjNTE0ODYyMTViNWJjYTc4N2MxIiwidXJsIjoiaHR0cDov + L3F1YWRlcm5vLmx2aC5tZTozMDAwL2FwaS9jb250YWN0cy82ODMifV0= + http_version: + recorded_at: Thu, 21 Dec 2017 13:23:01 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/all_contacts_by_authentication_token.yml b/spec/fixtures/quaderno_cassettes/all_contacts_by_authentication_token.yml new file mode 100644 index 0000000..1a522df --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/all_contacts_by_authentication_token.yml @@ -0,0 +1,199 @@ +--- +http_interactions: +- request: + method: get + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '15' + X-Ratelimit-Remaining: + - '100' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"c76bfed4fe851e73924f7a85140bc1ae"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - a629b761-b08c-40ef-b1f9-fac85c722a5e + X-Runtime: + - '0.299150' + Connection: + - close + Server: + - thin + body: + encoding: ASCII-8BIT + string: !binary |- + W3siaWQiOjY3Nywia2luZCI6InBlcnNvbiIsImNyZWF0ZWRfYXQiOjE1MTMw + NzgyNzgsImZpcnN0X25hbWUiOiJhc2Rhc2QiLCJsYXN0X25hbWUiOiJzZGFz + ZCIsImZ1bGxfbmFtZSI6ImFzZGFzZCBzZGFzZCIsInN0cmVldF9saW5lXzEi + Om51bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjoiMjIw + NiIsImNpdHkiOm51bGwsInJlZ2lvbiI6Ik5TVyIsImNvdW50cnkiOiJBVSIs + InBob25lXzEiOm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OiIxMzhhNzJmYWUzMjkyNjk4MzQ0YzJjZGNjZTNm + ZmNhMzU5ZjU3NTQxIiwicGVybWFsaW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2 + aC5tZTozMDAwL2JpbGxpbmcvMTM4YTcyZmFlMzI5MjY5ODM0NGMyY2RjY2Uz + ZmZjYTM1OWY1NzU0MSIsInVybCI6Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6 + MzAwMC9hcGkvY29udGFjdHMvNjgxIn1d + http_version: + recorded_at: Thu, 21 Dec 2017 11:32:03 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/deleted_contact.yml b/spec/fixtures/quaderno_cassettes/deleted_contact.yml new file mode 100644 index 0000000..6e31abf --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/deleted_contact.yml @@ -0,0 +1,488 @@ +--- +http_interactions: +- request: + method: post + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts.json + body: + encoding: UTF-8 + string: '{"kind":"company","first_name":"Z, Mazinger Z","email":"koji@kabuto.ftw"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + response: + status: + code: 201 + message: Created + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '12' + X-Ratelimit-Remaining: + - '94' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"1c7a1398b32bd62ca685c2266b6c0872"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 60fd0121-5965-4a7a-bcb4-c82057f0eb32 + X-Runtime: + - '0.314616' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '{"id":682,"kind":"company","created_at":1513855394,"full_name":"Z, + Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"ES","notes":null,"secure_id":"43e46d5bc89ec97eb20d492351ed1c2c5b22e4a8","permalink":"http://quaderno.lvh.me:3000/billing/43e46d5bc89ec97eb20d492351ed1c2c5b22e4a8","url":"http://quaderno.lvh.me:3000/api/contacts/682"}' + http_version: + recorded_at: Thu, 21 Dec 2017 11:23:14 GMT +- request: + method: get + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '12' + X-Ratelimit-Remaining: + - '93' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"c37fe9e2d3d0939630d198e8a30bb7ca"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 318d3764-0cbc-4d7f-a862-646ff13f2760 + X-Runtime: + - '0.384387' + Connection: + - close + Server: + - thin + body: + encoding: ASCII-8BIT + string: !binary |- + W3siaWQiOjY3Nywia2luZCI6InBlcnNvbiIsImNyZWF0ZWRfYXQiOjE1MTMw + NzgyNzgsImZpcnN0X25hbWUiOiJhc2Rhc2QiLCJsYXN0X25hbWUiOiJzZGFz + ZCIsImZ1bGxfbmFtZSI6ImFzZGFzZCBzZGFzZCIsInN0cmVldF9saW5lXzEi + Om51bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjoiMjIw + NiIsImNpdHkiOm51bGwsInJlZ2lvbiI6Ik5TVyIsImNvdW50cnkiOiJBVSIs + InBob25lXzEiOm51bGwsInBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1h + aWwiOm51bGwsIndlYiI6bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6 + IjUwIDEyMCAyNzYgNDMxIiwidmF0X251bWJlciI6IjkxMTM0OTk4MDIwIiwi + b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Oi8vcXVhZGVybm8ubHZoLm1lOjMwMDAvYXBp + L2NvbnRhY3RzLzY3OCJ9LHsiaWQiOjY3OSwia2luZCI6InBlcnNvbiIsImNy + ZWF0ZWRfYXQiOjE1MTM3NzE1NDQsImZpcnN0X25hbWUiOiJFbCBDaWQgT3du + ZWFkb3IiLCJsYXN0X25hbWUiOm51bGwsImZ1bGxfbmFtZSI6IkVsIENpZCBP + d25lYWRvciIsInN0cmVldF9saW5lXzEiOm51bGwsInN0cmVldF9saW5lXzIi + Om51bGwsInBvc3RhbF9jb2RlIjpudWxsLCJjaXR5IjpudWxsLCJyZWdpb24i + Om51bGwsImNvdW50cnkiOiJFUyIsInBob25lXzEiOm51bGwsInBob25lXzIi + Om51bGwsImZheCI6bnVsbCwiZW1haWwiOm51bGwsIndlYiI6bnVsbCwiZGlz + Y291bnQiOm51bGwsInRheF9pZCI6IiIsInZhdF9udW1iZXIiOm51bGwsImJh + bmtfYWNjb3VudCI6bnVsbCwibGFuZ3VhZ2UiOiJFUyIsIm5vdGVzIjpudWxs + LCJzZWN1cmVfaWQiOiJjNWIzMTI5MzM3Njc0NjFhZWUwNTk2YjE1MTNjZTFl + ZDNmZTI1M2EwIiwicGVybWFsaW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2aC5t + ZTozMDAwL2JpbGxpbmcvYzViMzEyOTMzNzY3NDYxYWVlMDU5NmIxNTEzY2Ux + ZWQzZmUyNTNhMCIsInVybCI6Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAw + MC9hcGkvY29udGFjdHMvNjc5In0seyJpZCI6NjgwLCJraW5kIjoiY29tcGFu + eSIsImNyZWF0ZWRfYXQiOjE1MTM3NzE1NjQsImZ1bGxfbmFtZSI6IkZyYW7D + p29pc2UiLCJjb250YWN0X25hbWUiOm51bGwsInN0cmVldF9saW5lXzEiOm51 + bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjpudWxsLCJj + aXR5IjpudWxsLCJyZWdpb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yY2RjY2Uz + ZmZjYTM1OWY1NzU0MSIsInVybCI6Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6 + MzAwMC9hcGkvY29udGFjdHMvNjgxIn0seyJpZCI6NjgyLCJraW5kIjoiY29t + cGFueSIsImNyZWF0ZWRfYXQiOjE1MTM4NTUzOTQsImZ1bGxfbmFtZSI6Ilos + IE1hemluZ2VyIFoiLCJjb250YWN0X25hbWUiOm51bGwsInN0cmVldF9saW5l + XzEiOm51bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjpu + dWxsLCJjaXR5IjpudWxsLCJyZWdpb24iOm51bGwsImNvdW50cnkiOiJGUiIs + InBob25lXzEiOm51bGwsInBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1h + aWwiOiJrb2ppQGthYnV0by5mdHciLCJ3ZWIiOm51bGwsImRpc2NvdW50Ijpu + dWxsLCJ0YXhfaWQiOm51bGwsInZhdF9udW1iZXIiOm51bGwsImxhbmd1YWdl + IjoiRVMiLCJub3RlcyI6bnVsbCwic2VjdXJlX2lkIjoiNDNlNDZkNWJjODll + Yzk3ZWIyMGQ0OTIzNTFlZDFjMmM1YjIyZTRhOCIsInBlcm1hbGluayI6Imh0 + dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAwMC9iaWxsaW5nLzQzZTQ2ZDViYzg5 + ZWM5N2ViMjBkNDkyMzUxZWQxYzJjNWIyMmU0YTgiLCJ1cmwiOiJodHRwOi8v + cXVhZGVybm8ubHZoLm1lOjMwMDAvYXBpL2NvbnRhY3RzLzY4MiJ9XQ== + http_version: + recorded_at: Thu, 21 Dec 2017 11:23:15 GMT +- request: + method: delete + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts/682.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 204 + message: No Content + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '12' + X-Ratelimit-Remaining: + - '92' + Cache-Control: + - no-cache + X-Request-Id: + - 2e5af6d9-3209-4524-8184-3638522741e9 + X-Runtime: + - '0.240452' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '' + http_version: + recorded_at: Thu, 21 Dec 2017 11:23:15 GMT +- request: + method: get + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '11' + X-Ratelimit-Remaining: + - '91' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"c76bfed4fe851e73924f7a85140bc1ae"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 15611f19-0d9c-4266-9068-81cd2257204b + X-Runtime: + - '0.302535' + Connection: + - close + Server: + - thin + body: + encoding: ASCII-8BIT + string: !binary |- + W3siaWQiOjY3Nywia2luZCI6InBlcnNvbiIsImNyZWF0ZWRfYXQiOjE1MTMw + NzgyNzgsImZpcnN0X25hbWUiOiJhc2Rhc2QiLCJsYXN0X25hbWUiOiJzZGFz + ZCIsImZ1bGxfbmFtZSI6ImFzZGFzZCBzZGFzZCIsInN0cmVldF9saW5lXzEi + Om51bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjoiMjIw + NiIsImNpdHkiOm51bGwsInJlZ2lvbiI6Ik5TVyIsImNvdW50cnkiOiJBVSIs + InBob25lXzEiOm51bGwsInBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1h + aWwiOm51bGwsIndlYiI6bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6 + IjUwIDEyMCAyNzYgNDMxIiwidmF0X251bWJlciI6IjkxMTM0OTk4MDIwIiwi + bGFuZ3Vh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ZGVybm8ubHZoLm1lOjMwMDAvYXBp + L2NvbnRhY3RzLzY3OCJ9LHsiaWQiOjY3OSwia2luZCI6InBlcnNvbiIsImNy + ZWF0ZWRfYXQiOjE1MTM3NzE1NDQsImZpcnN0X25hbWUiOiJFbCBDaWQgT3du + ZWFkb3IiLCJsYXN0X25hbWUiOm51bGwsImZ1bGxfbmFtZSI6IkVsIENpZCBP + d25lYWRvciIsInN0cmVldF9saW5lXzEiOm51bGwsInN0cmVldF9saW5lXzIi + Om51bGwsInBvc3RhbF9jb2RlIjpudWxsLCJjaXR5IjpudWxsLCJyZWdpb24i + Om51bGwsImNvdW50cnkiOiJFUyIsInBob25lXzEiOm51bGwsInBob25lXzIi + Om51bGwsImZheCI6bnVsbCwiZW1haWwiOm51bGwsIndlYiI6bnVsbCwiZGlz + Y291bnQiOm51bGwsInRheF9pZCI6IiIsInZhdF9udW1iZXIiOm51bGwsImJh + bmtfYWNjb3VudCI6bnVsbCwibGFuZ3VhZ2UiOiJFUyIsIm5vdGVzIjpudWxs + LCJzZWN1cmVfaWQiOiJjNWIzMTI5MzM3Njc0NjFhZWUwNTk2YjE1MTNjZTFl + ZDNmZTI1M2EwIiwicGVybWFsaW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2aC5t + ZTozMDAwL2JpbGxpbmcvYzViMzEyOTMzNzY3NDYxYWVlMDU5NmIxNTEzY2Ux + ZWQzZmUyNTNhMCIsInVybCI6Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAw + MC9hcGkvY29udGFjdHMvNjc5In0seyJpZCI6NjgwLCJraW5kIjoiY29tcGFu + eSIsImNyZWF0ZWRfYXQiOjE1MTM3NzE1NjQsImZ1bGxfbmFtZSI6IkZyYW7D + p29pc2UiLCJjb250YWN0X25hbWUiOm51bGwsInN0cmVldF9saW5lXzEiOm51 + bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjpudWxsLCJj + aXR5IjpudWxsLCJyZWdpb24iOm51bGw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uz + ZmZjYTM1OWY1NzU0MSIsInVybCI6Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6 + MzAwMC9hcGkvY29udGFjdHMvNjgxIn1d + http_version: + recorded_at: Thu, 21 Dec 2017 11:23:15 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/deleted_contact_by_access_token.yml b/spec/fixtures/quaderno_cassettes/deleted_contact_by_access_token.yml new file mode 100644 index 0000000..3204381 --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/deleted_contact_by_access_token.yml @@ -0,0 +1,195 @@ +--- +http_interactions: +- request: + method: post + uri: http://quaderno.lvh.me:3000/api/contacts.json + body: + encoding: UTF-8 + string: '{"kind":"company","first_name":"Z, Mazinger Z","email":"koji@kabuto.ftw"}' + headers: + Accept: + - application/json + Authorization: + - Bearer afa16c7478f0ba3be222e627c2571d4dd5dca47924996b13a3af377feca47ff0 + Content-Type: + - application/json + response: + status: + code: 201 + message: Created + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '10' + X-Ratelimit-Remaining: + - '95' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"ad5c7f8f7874b15e8ae2c84b30cef43c"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 3c88ae5b-7349-4842-8feb-78826080039d + X-Runtime: + - '1.286040' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '{"id":686,"kind":"company","created_at":1513863391,"full_name":"Z, + Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"ES","notes":null,"secure_id":"8df7ee0294af9939e708c6fa0cc754968e919a50","permalink":"http://quaderno.lvh.me:3000/billing/8df7ee0294af9939e708c6fa0cc754968e919a50","url":"http://quaderno.lvh.me:3000/api/contacts/686"}' + http_version: + recorded_at: Thu, 21 Dec 2017 13:36:32 GMT +- request: + method: get + uri: http://quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Authorization: + - Bearer afa16c7478f0ba3be222e627c2571d4dd5dca47924996b13a3af377feca47ff0 + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '9' + X-Ratelimit-Remaining: + - '94' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"987300b02b084aa8d8855ebb09b209f1"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 7a453c6f-5a98-4206-9f0e-ddf1528f099f + X-Runtime: + - '1.197503' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '[{"id":677,"kind":"person","created_at":1513078278,"first_name":"asdasd","last_name":"sdasd","full_name":"asdasd + sdasd","street_line_1":null,"street_line_2":null,"postal_code":"2206","city":null,"region":"NSW","country":"AU","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"50 + 120 276 431","vat_number":"91134998020","language":"ES","notes":null,"secure_id":"0079dd8fc11e93cb76afa36ff5d8e108c2732682","permalink":"http://quaderno.lvh.me:3000/billing/0079dd8fc11e93cb76afa36ff5d8e108c2732682","url":"http://quaderno.lvh.me:3000/api/contacts/677"},{"id":678,"kind":"person","created_at":1513594244,"first_name":"Daphne","last_name":null,"full_name":"Daphne","street_line_1":"9TH + FLOOR 107 CHEAPSIDE LONDON EC2V 6DN","street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"GB","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":"GB222161751","language":"ES","notes":null,"secure_id":"7b8e6c1e4b8b793152312d7be65a64efc584ca33","permalink":"http://quaderno.lvh.me:3000/billing/7b8e6c1e4b8b793152312d7be65a64efc584ca33","url":"http://quaderno.lvh.me:3000/api/contacts/678"},{"id":671,"kind":"company","created_at":1510654395,"full_name":"James","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"AU","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"EN","notes":null,"secure_id":"f2783cb57860c8bfe343683edd6c52da26866886","permalink":"http://quaderno.lvh.me:3000/billing/f2783cb57860c8bfe343683edd6c52da26866886","url":"http://quaderno.lvh.me:3000/api/contacts/671"},{"id":672,"kind":"company","created_at":1510654706,"full_name":"James","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"AU","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":null,"vat_number":"12042168743","language":"EN","notes":null,"secure_id":"06ab8c3cbee828a803fc6d4b4e1fcceff93f52e3","permalink":"http://quaderno.lvh.me:3000/billing/06ab8c3cbee828a803fc6d4b4e1fcceff93f52e3","url":"http://quaderno.lvh.me:3000/api/contacts/672"},{"id":675,"kind":"person","created_at":1513076256,"first_name":"James","last_name":"Joyce","full_name":"James + Joyce","street_line_1":"Cheapside 107","street_line_2":"9th floor","postal_code":"EC2V + 6DN","city":"London","region":null,"country":"GB","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":"GB222161751","language":"EN","notes":null,"secure_id":"946085de5a55ae52df75d7938e3e77dbb0ed4925","permalink":"http://quaderno.lvh.me:3000/billing/946085de5a55ae52df75d7938e3e77dbb0ed4925","url":"http://quaderno.lvh.me:3000/api/contacts/675"},{"id":668,"kind":"company","created_at":1510049679,"full_name":"Jimbowzz","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"GB","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":"GB531525177","language":"EN","notes":null,"secure_id":"9454863656572c1607ce69b12cf72b50181d736a","permalink":"http://quaderno.lvh.me:3000/billing/9454863656572c1607ce69b12cf72b50181d736a","url":"http://quaderno.lvh.me:3000/api/contacts/668"},{"id":674,"kind":"company","created_at":1510827249,"full_name":"MIguel","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"d6d7ff7d4c86409aa9d7b904d68a419d0c57b876","permalink":"http://quaderno.lvh.me:3000/billing/d6d7ff7d4c86409aa9d7b904d68a419d0c57b876","url":"http://quaderno.lvh.me:3000/api/contacts/674"},{"id":676,"kind":"person","created_at":1513078082,"first_name":"Paul","last_name":"Hogan","full_name":"Paul + Hogan","street_line_1":null,"street_line_2":null,"postal_code":"2114","city":null,"region":"NSW","country":"AU","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":"49165852362","language":"ES","notes":null,"secure_id":"6ebb700ea35a9b82d66c70e35bbfd34fc582fe68","permalink":"http://quaderno.lvh.me:3000/billing/6ebb700ea35a9b82d66c70e35bbfd34fc582fe68","url":"http://quaderno.lvh.me:3000/api/contacts/676"},{"id":673,"kind":"company","created_at":1510666591,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"AU","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"","vat_number":"518247535567","language":"ES","notes":null,"secure_id":"e69d905b6d7990fbe32ed21efdfb9ac8f591b91c","permalink":"http://quaderno.lvh.me:3000/billing/e69d905b6d7990fbe32ed21efdfb9ac8f591b91c","url":"http://quaderno.lvh.me:3000/api/contacts/673"},{"id":679,"kind":"person","created_at":1513771544,"first_name":"Test_OCP","last_name":null,"full_name":"Test_OCP","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"c5b312933767461aee0596b1513ce1ed3fe253a0","permalink":"http://quaderno.lvh.me:3000/billing/c5b312933767461aee0596b1513ce1ed3fe253a0","url":"http://quaderno.lvh.me:3000/api/contacts/679"},{"id":680,"kind":"company","created_at":1513771564,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"","vat_number":null,"language":"FR","notes":null,"secure_id":"07aad335ea4a28fece799c9594013e6c19023318","permalink":"http://quaderno.lvh.me:3000/billing/07aad335ea4a28fece799c9594013e6c19023318","url":"http://quaderno.lvh.me:3000/api/contacts/680"},{"id":681,"kind":"company","created_at":1513855393,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"ES","notes":null,"secure_id":"138a72fae3292698344c2cdcce3ffca359f57541","permalink":"http://quaderno.lvh.me:3000/billing/138a72fae3292698344c2cdcce3ffca359f57541","url":"http://quaderno.lvh.me:3000/api/contacts/681"},{"id":683,"kind":"company","created_at":1513855923,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"ES","notes":null,"secure_id":"ac5041d97a90d23332278c51486215b5bca787c1","permalink":"http://quaderno.lvh.me:3000/billing/ac5041d97a90d23332278c51486215b5bca787c1","url":"http://quaderno.lvh.me:3000/api/contacts/683"},{"id":685,"kind":"company","created_at":1513863388,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"ES","notes":null,"secure_id":"d2dad2da07440e6dcd2dd64b914df54ba50d8b2e","permalink":"http://quaderno.lvh.me:3000/billing/d2dad2da07440e6dcd2dd64b914df54ba50d8b2e","url":"http://quaderno.lvh.me:3000/api/contacts/685"},{"id":686,"kind":"company","created_at":1513863391,"full_name":"Z, + Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"ES","notes":null,"secure_id":"8df7ee0294af9939e708c6fa0cc754968e919a50","permalink":"http://quaderno.lvh.me:3000/billing/8df7ee0294af9939e708c6fa0cc754968e919a50","url":"http://quaderno.lvh.me:3000/api/contacts/686"}]' + http_version: + recorded_at: Thu, 21 Dec 2017 13:36:33 GMT +- request: + method: delete + uri: http://quaderno.lvh.me:3000/api/contacts/686.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Authorization: + - Bearer afa16c7478f0ba3be222e627c2571d4dd5dca47924996b13a3af377feca47ff0 + response: + status: + code: 204 + message: No Content + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '7' + X-Ratelimit-Remaining: + - '93' + Cache-Control: + - no-cache + X-Request-Id: + - c748bbfc-3a7f-47d3-9454-79f50e7d7748 + X-Runtime: + - '0.868076' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '' + http_version: + recorded_at: Thu, 21 Dec 2017 13:36:34 GMT +- request: + method: get + uri: http://quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Authorization: + - Bearer afa16c7478f0ba3be222e627c2571d4dd5dca47924996b13a3af377feca47ff0 + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '6' + X-Ratelimit-Remaining: + - '92' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"487d984a09c5c3fb113e09bf2ad28126"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 3f93e553-4b9c-42a6-a61b-fba5e939cd1f + X-Runtime: + - '1.171177' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '[{"id":677,"kind":"person","created_at":1513078278,"first_name":"asdasd","last_name":"sdasd","full_name":"asdasd + sdasd","street_line_1":null,"street_line_2":null,"postal_code":"2206","city":null,"region":"NSW","country":"AU","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"50 + 120 276 431","vat_number":"91134998020","language":"ES","notes":null,"secure_id":"0079dd8fc11e93cb76afa36ff5d8e108c2732682","permalink":"http://quaderno.lvh.me:3000/billing/0079dd8fc11e93cb76afa36ff5d8e108c2732682","url":"http://quaderno.lvh.me:3000/api/contacts/677"},{"id":678,"kind":"person","created_at":1513594244,"first_name":"Daphne","last_name":null,"full_name":"Daphne","street_line_1":"9TH + FLOOR 107 CHEAPSIDE LONDON EC2V 6DN","street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"GB","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":"GB222161751","language":"ES","notes":null,"secure_id":"7b8e6c1e4b8b793152312d7be65a64efc584ca33","permalink":"http://quaderno.lvh.me:3000/billing/7b8e6c1e4b8b793152312d7be65a64efc584ca33","url":"http://quaderno.lvh.me:3000/api/contacts/678"},{"id":671,"kind":"company","created_at":1510654395,"full_name":"James","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"AU","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"EN","notes":null,"secure_id":"f2783cb57860c8bfe343683edd6c52da26866886","permalink":"http://quaderno.lvh.me:3000/billing/f2783cb57860c8bfe343683edd6c52da26866886","url":"http://quaderno.lvh.me:3000/api/contacts/671"},{"id":672,"kind":"company","created_at":1510654706,"full_name":"James","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"AU","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":null,"vat_number":"12042168743","language":"EN","notes":null,"secure_id":"06ab8c3cbee828a803fc6d4b4e1fcceff93f52e3","permalink":"http://quaderno.lvh.me:3000/billing/06ab8c3cbee828a803fc6d4b4e1fcceff93f52e3","url":"http://quaderno.lvh.me:3000/api/contacts/672"},{"id":675,"kind":"person","created_at":1513076256,"first_name":"James","last_name":"Joyce","full_name":"James + Joyce","street_line_1":"Cheapside 107","street_line_2":"9th floor","postal_code":"EC2V + 6DN","city":"London","region":null,"country":"GB","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":"GB222161751","language":"EN","notes":null,"secure_id":"946085de5a55ae52df75d7938e3e77dbb0ed4925","permalink":"http://quaderno.lvh.me:3000/billing/946085de5a55ae52df75d7938e3e77dbb0ed4925","url":"http://quaderno.lvh.me:3000/api/contacts/675"},{"id":668,"kind":"company","created_at":1510049679,"full_name":"Jimbowzz","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"GB","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":"GB531525177","language":"EN","notes":null,"secure_id":"9454863656572c1607ce69b12cf72b50181d736a","permalink":"http://quaderno.lvh.me:3000/billing/9454863656572c1607ce69b12cf72b50181d736a","url":"http://quaderno.lvh.me:3000/api/contacts/668"},{"id":674,"kind":"company","created_at":1510827249,"full_name":"MIguel","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"d6d7ff7d4c86409aa9d7b904d68a419d0c57b876","permalink":"http://quaderno.lvh.me:3000/billing/d6d7ff7d4c86409aa9d7b904d68a419d0c57b876","url":"http://quaderno.lvh.me:3000/api/contacts/674"},{"id":676,"kind":"person","created_at":1513078082,"first_name":"Paul","last_name":"Hogan","full_name":"Paul + Hogan","street_line_1":null,"street_line_2":null,"postal_code":"2114","city":null,"region":"NSW","country":"AU","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":"49165852362","language":"ES","notes":null,"secure_id":"6ebb700ea35a9b82d66c70e35bbfd34fc582fe68","permalink":"http://quaderno.lvh.me:3000/billing/6ebb700ea35a9b82d66c70e35bbfd34fc582fe68","url":"http://quaderno.lvh.me:3000/api/contacts/676"},{"id":673,"kind":"company","created_at":1510666591,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"AU","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"","vat_number":"518247535567","language":"ES","notes":null,"secure_id":"e69d905b6d7990fbe32ed21efdfb9ac8f591b91c","permalink":"http://quaderno.lvh.me:3000/billing/e69d905b6d7990fbe32ed21efdfb9ac8f591b91c","url":"http://quaderno.lvh.me:3000/api/contacts/673"},{"id":679,"kind":"person","created_at":1513771544,"first_name":"Test_OCP","last_name":null,"full_name":"Test_OCP","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"c5b312933767461aee0596b1513ce1ed3fe253a0","permalink":"http://quaderno.lvh.me:3000/billing/c5b312933767461aee0596b1513ce1ed3fe253a0","url":"http://quaderno.lvh.me:3000/api/contacts/679"},{"id":680,"kind":"company","created_at":1513771564,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"","vat_number":null,"language":"FR","notes":null,"secure_id":"07aad335ea4a28fece799c9594013e6c19023318","permalink":"http://quaderno.lvh.me:3000/billing/07aad335ea4a28fece799c9594013e6c19023318","url":"http://quaderno.lvh.me:3000/api/contacts/680"},{"id":681,"kind":"company","created_at":1513855393,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"ES","notes":null,"secure_id":"138a72fae3292698344c2cdcce3ffca359f57541","permalink":"http://quaderno.lvh.me:3000/billing/138a72fae3292698344c2cdcce3ffca359f57541","url":"http://quaderno.lvh.me:3000/api/contacts/681"},{"id":683,"kind":"company","created_at":1513855923,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"ES","notes":null,"secure_id":"ac5041d97a90d23332278c51486215b5bca787c1","permalink":"http://quaderno.lvh.me:3000/billing/ac5041d97a90d23332278c51486215b5bca787c1","url":"http://quaderno.lvh.me:3000/api/contacts/683"},{"id":685,"kind":"company","created_at":1513863388,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"ES","notes":null,"secure_id":"d2dad2da07440e6dcd2dd64b914df54ba50d8b2e","permalink":"http://quaderno.lvh.me:3000/billing/d2dad2da07440e6dcd2dd64b914df54ba50d8b2e","url":"http://quaderno.lvh.me:3000/api/contacts/685"}]' + http_version: + recorded_at: Thu, 21 Dec 2017 13:36:35 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/deleted_contact_by_authentication_token.yml b/spec/fixtures/quaderno_cassettes/deleted_contact_by_authentication_token.yml new file mode 100644 index 0000000..3c3be77 --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/deleted_contact_by_authentication_token.yml @@ -0,0 +1,513 @@ +--- +http_interactions: +- request: + method: post + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts.json + body: + encoding: UTF-8 + string: '{"kind":"company","first_name":"Z, Mazinger Z","email":"koji@kabuto.ftw"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + response: + status: + code: 201 + message: Created + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '13' + X-Ratelimit-Remaining: + - '94' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"9c5f2d09fee30320dc038552f3dfad7b"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - ff35fbc9-63e7-4b82-8515-1507e6b8bda4 + X-Runtime: + - '0.331856' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '{"id":684,"kind":"company","created_at":1513855924,"full_name":"Z, + Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"ES","notes":null,"secure_id":"15c24f1b991afd1f7351900deb4fdeb48722286e","permalink":"http://quaderno.lvh.me:3000/billing/15c24f1b991afd1f7351900deb4fdeb48722286e","url":"http://quaderno.lvh.me:3000/api/contacts/684"}' + http_version: + recorded_at: Thu, 21 Dec 2017 11:32:05 GMT +- request: + method: get + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '13' + X-Ratelimit-Remaining: + - '93' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"af58c3beec15eac27804bb0a8c0bc54a"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 4a948a3b-2885-4aa2-9260-1300e67f64f8 + X-Runtime: + - '0.380663' + Connection: + - close + Server: + - thin + body: + encoding: ASCII-8BIT + string: !binary |- + W3siaWQiOjY3Nywia2luZCI6InBlcnNvbiIsImNyZWF0ZWRfYXQiOjE1MTMw + NzgyNzgsImZpcnN0X25hbWUiOiJhc2Rhc2QiLCJsYXN0X25hbWUiOiJzZGFz + ZCIsImZ1bGxfbmFtZSI6ImFzZGFzZCBzZGFzZCIsInN0cmVldF9saW5lXzEi + Om51bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjoiMjIw + NiIsImNpdHkiOm51bGwsInJlZ2lvbiI6Ik5TVyIsImNvdW50cnkiOiJBVSIs + InBob25lXzEiOm51bGwsInBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1h + aWwiOm51bGwsIndlYiI6bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6 + IjUwIDEyMCAyNzYgNDMxIiwidmF0X251bWJlciI6IjkxMTM0OTk4MDIwIiwi + bGFuZ3VhZ2UiOiJFUyIsIm5vdGVzIjpudWxsLCJzZWN1cmVfaWQiOiIwMDc5 + ZGQ4ZmMxMWU5M2NiNzZhZmEzNmZmNWQ4ZTEwOGMyNzMyNjgyIiwicGVybWFs + aW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2aC5tZTozMD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IiwicGhvbmVfMSI6bnVsbCwicGhvbmVfMiI6bnVs + bCwiZmF4IjpudWxsLCJlbWFpbCI6ImtvamlAa2FidXRvLmZ0dyIsIndlYiI6 + bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6bnVsbCwidmF0X251bWJl + ciI6bnVsbCwibGFuZ3VhZ2UiOiJFUyIsIm5vdGVzIjpudWxsLCJzZWN1cmVf + aWQiOiIxNWMyNGYxYjk5MWFmZDFmNzM1MTkwMGRlYjRmZGViNDg3MjIyODZl + IiwicGVybWFsaW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2aC5tZTozMDAwL2Jp + bGxpbmcvMTVjMjRmMWI5OTFhZmQxZjczNTE5MDBkZWI0ZmRlYjQ4NzIyMjg2 + ZSIsInVybCI6Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAwMC9hcGkvY29u + dGFjdHMvNjg0In1d + http_version: + recorded_at: Thu, 21 Dec 2017 11:32:05 GMT +- request: + method: delete + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts/684.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 204 + message: No Content + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '12' + X-Ratelimit-Remaining: + - '92' + Cache-Control: + - no-cache + X-Request-Id: + - a2c39dd2-8509-4819-83dd-dda5255b46c1 + X-Runtime: + - '0.226569' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '' + http_version: + recorded_at: Thu, 21 Dec 2017 11:32:05 GMT +- request: + method: get + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '12' + X-Ratelimit-Remaining: + - '91' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"b841128b2b1e425ca44a00eaecc1d3e9"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 777f4bbb-d564-4a7f-ac2a-329b715b2c20 + X-Runtime: + - '0.293708' + Connection: + - close + Server: + - thin + body: + encoding: ASCII-8BIT + string: !binary |- + W3siaWQiOjY3Nywia2luZCI6InBlcnNvbiIsImNyZWF0ZWRfYXQiOjE1MTMw + NzgyNzgsImZpcnN0X25hbWUiOiJhc2Rhc2QiLCJsYXN0X25hbWUiOiJzZGFz + ZCIsImZ1bGxfbmFtZSI6ImFzZGFzZCBzZGFzZCIsInN0cmVldF9saW5lXzEi + Om51bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjoiMjIw + NiIsImNpdHkiOm51bGwsInJlZ2lvbiI6Ik5TVyIsImNvdW50cnkiOiJBVSIs + InBob25lXzEiOm51bGwsInBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1h + aWwiOm51bGwsIndlYiI6bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6 + IjUwIDEyMCAyNzYgNDMxIiwidmF0X251bWJlciI6IjkxMTM0OTk4MDIwIiwi + bGFuZ3VhZ2UiOiJFUyIsIm5vdGVzIjpudWxsLCJzZWN1cmVfaWQiOiIwMDc5 + ZGQ4ZmMxMWU5M2NiNzZhZmEzNmZmNWQ4ZTEwOGMyNzMyNjgyIiwicGVybWFs + aW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2aC5tZTozMDAwL2JpbGxpbmcvMDA3 + OWRkOGZjMTFlOTNjYjc2YWZhMzZmZjVkOGUxMDhjMjczMjY4MiIsInVybCI6 + Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAwMC9hcGkvY29udGFjdHMvNjc3 + In0seyJpZCI6Njc4LCJraW5kIjoicGVyc29uIiwiY3JlYXRlZF9h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V8xIjpudWxsLCJzdHJlZXRfbGluZV8yIjpudWxsLCJwb3N0YWxfY29kZSI6 + bnVsbCwiY2l0eSI6bnVsbCwicmVnaW9uIjpudWxsLCJjb3VudHJ5IjoiRlIi + LCJwaG9uZV8xIjpudWxsLCJwaG9uZV8yIjpudWxsLCJmYXgiOm51bGwsImVt + YWlsIjoibXlfbGl0dGxlQHBvLm55Iiwid2ViIjpudWxsLCJkaXNjb3VudCI6 + bnVsbCwidGF4X2lkIjpudWxsLCJ2YXRfbnVtYmVyIjpudWxsLCJsYW5ndWFn + ZSI6IkVTIiwibm90ZXMiOm51bGwsInNlY3VyZV9pZCI6ImFjNTA0MWQ5N2E5 + MGQyMzMzMjI3OGM1MTQ4NjIxNWI1YmNhNzg3YzEiLCJwZXJtYWxpbmsiOiJo + dHRwOi8vcXVhZGVybm8ubHZoLm1lOjMwMDAvYmlsbGluZy9hYzUwNDFkOTdh + OTBkMjMzMzIyNzhjNTE0ODYyMTViNWJjYTc4N2MxIiwidXJsIjoiaHR0cDov + L3F1YWRlcm5vLmx2aC5tZTozMDAwL2FwaS9jb250YWN0cy82ODMifV0= + http_version: + recorded_at: Thu, 21 Dec 2017 11:32:05 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/found_contact.yml b/spec/fixtures/quaderno_cassettes/found_contact.yml new file mode 100644 index 0000000..72fd35a --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/found_contact.yml @@ -0,0 +1,227 @@ +--- +http_interactions: +- request: + method: get + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '15' + X-Ratelimit-Remaining: + - '99' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"98e7a84077de79c07b61648700087a54"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 8ae5c7b9-e206-47aa-b94b-741305be6a18 + X-Runtime: + - '0.551649' + Connection: + - close + Server: + - thin + body: + encoding: ASCII-8BIT + string: !binary |- + W3siaWQiOjY3Nywia2luZCI6InBlcnNvbiIsImNyZWF0ZWRfYXQiOjE1MTMw + NzgyNzgsImZpcnN0X25hbWUiOiJhc2Rhc2QiLCJsYXN0X25hbWUiOiJzZGFz + ZCIsImZ1bGxfbmFtZSI6ImFzZGFzZCBzZGFzZCIsInN0cmVldF9saW5lXzEi + Om51bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjoiMjIw + NiIsImNpdHkiOm51bGwsInJlZ2lvbiI6Ik5TVyIsImNvdW50cnkiOiJBVSIs + InBob25lXzEiOm51bGwsInBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1h + aWwiOm51bGwsIndlYiI6bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6 + IjUwIDEyMCAyNzYgNDMxIiwidmF0X251bWJlciI6IjkxMTM0OTk4MDIwIiwi + bGFuZ3VhZ2UiOiJFUyIsIm5vdGVzIjpudWxsLCJzZWN1cmVfaWQiOiIwMDc5 + ZGQ4ZmMxMWU5M2NiNzZhZmEzNmZmNWQ4ZTEwOGMyNzMyNjgyIiwicGVybWFs + aW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2aC5tZTozMDAwL2JpbGxpbmcvMDA3 + OWRkOGZjMTFlOTNjYjc2YWZhMzZmZjVkOGUxMDhjMjczMjY4MiIsInVybCI6 + Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAwMC9hcGkvY29udGFjdHMvNjc3 + In0seyJpZCI6Njc4LCJraW5kIjoicGVyc29uIiwiY3JlYXRlZF9hdCI6MTUx + MzU5NDI0NCwiZmlyc3RfbmFtZSI6IkRhcGhuZSIsImxhc3RfbmFtZSI6bnVs + bCwiZnVsbF9uYW1lIjoiRGFwaG5lIiwic3RyZWV0X2xpbmVfMSI6IjlUSCBG + TE9PUiAxMDcgQ0hFQVBTSURFIExPTkRPTiBFQzJWIDZETiIsInN0cmVldF9s + aW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjpudWxsLCJjaXR5IjpudWxsLCJy + ZWdpb24iOm51bGwsImNvdW50cnkiOiJHQiIsInBob25lXzEiOm51bGwsInBo + b25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1haWwiOm51bGwsIndlYiI6bnVs + bCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6IiIsInZhdF9udW1iZXIiOiJH + QjIyMjE2MTc1MSIsImxhbmd1YWdlIjoiRVMiLCJub3RlcyI6bnVsbCwic2Vj + dXJlX2lkIjoiN2I4ZTZjMWU0YjhiNzkzMTUyMzEyZDdiZTY1YTY0ZWZjNTg0 + Y2EzMyIsInBlcm1hbGluayI6Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAw + MC9iaWxsaW5nLzdiOGU2YzFlNGI4Yjc5MzE1MjMxMmQ3YmU2NWE2NGVmYzU4 + NGNhMzMiLCJ1cmwiOiJodHRwOi8vcXVhZGVybm8ubHZoLm1lOjMwMDAvYXBp + L2NvbnRhY3RzLzY3OCJ9LHsiaWQiOjY3Mywia2luZCI6ImNvbXBhbnkiLCJj + cmVhdGVkX2F0IjoxNTEwNjY2NTkxLCJmdWxsX25hbWUiOiJEdW5kZWUiLCJj + b250YWN0X25hbWUiOm51bGwsInN0cmVldF9saW5lXzEiOm51bGwsInN0cmVl + dF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjpudWxsLCJjaXR5IjpudWxs + LCJyZWdpb24iOm51bGwsImNvdW50cnkiOiJBVSIsInBob25lXzEiOm51bGws + InBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1haWwiOm51bGwsIndlYiI6 + bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6IiIsInZhdF9udW1iZXIi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C9hcGkvY29udGFjdHMvNjc2In1d + http_version: + recorded_at: Thu, 21 Dec 2017 11:23:13 GMT +- request: + method: get + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts/673.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '14' + X-Ratelimit-Remaining: + - '98' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"0eca424b43d9773dcc155c8fbb5cbd6f"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - c6c3b35f-7975-4aa6-b4ee-5746d9ff1476 + X-Runtime: + - '0.322263' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '{"id":673,"kind":"company","created_at":1510666591,"full_name":"Dundee","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"AU","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":"518247535567","language":"ES","notes":null,"secure_id":"e69d905b6d7990fbe32ed21efdfb9ac8f591b91c","permalink":"http://quaderno.lvh.me:3000/billing/e69d905b6d7990fbe32ed21efdfb9ac8f591b91c","url":"http://quaderno.lvh.me:3000/api/contacts/673"}' + http_version: + recorded_at: Thu, 21 Dec 2017 11:23:13 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/found_contact_by_access_token.yml b/spec/fixtures/quaderno_cassettes/found_contact_by_access_token.yml new file mode 100644 index 0000000..ba67a4e --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/found_contact_by_access_token.yml @@ -0,0 +1,268 @@ +--- +http_interactions: +- request: + method: get + uri: http://quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Authorization: + - Bearer afa16c7478f0ba3be222e627c2571d4dd5dca47924996b13a3af377feca47ff0 + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '15' + X-Ratelimit-Remaining: + - '100' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"b841128b2b1e425ca44a00eaecc1d3e9"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 5478964e-b893-400c-933c-110d7c7ed31b + X-Runtime: + - '2.545913' + Connection: + - close + Server: + - thin + body: + encoding: ASCII-8BIT + string: !binary |- + W3siaWQiOjY3Nywia2luZCI6InBlcnNvbiIsImNyZWF0ZWRfYXQiOjE1MTMw + NzgyNzgsImZpcnN0X25hbWUiOiJhc2Rhc2QiLCJsYXN0X25hbWUiOiJzZGFz + ZCIsImZ1bGxfbmFtZSI6ImFzZGFzZCBzZGFzZCIsInN0cmVldF9saW5lXzEi + Om51bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjoiMjIw + NiIsImNpdHkiOm51bGwsInJlZ2lvbiI6Ik5TVyIsImNvdW50cnkiOiJBVSIs + InBob25lXzEiOm51bGwsInBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1h + aWwiOm51bGwsIndlYiI6bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6 + IjUwIDEyMCAyNzYgNDMxIiwidmF0X251bWJlciI6IjkxMTM0OTk4MDIwIiwi + bGFuZ3VhZ2UiOiJFUyIsIm5vdGVzIjpudWxsLCJzZWN1cmVfaWQiOiIwMDc5 + ZGQ4ZmMxMWU5M2NiNzZhZmEzNmZmNWQ4ZTEwOGMyNzMyNjgyIiwicGVybWFs + aW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2aC5tZTozMDAwL2JpbGxpbmcvMDA3 + OWRkOGZjMTFlOTNjYjc2YWZhMzZmZjVkOGUxMDhjMjczMjY4MiIsInVybCI6 + Imh0dHA6Ly9xdW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1MTM4NTU5MjMsImZ1bGxfbmFtZSI6 + IlRlc3RfU2t5bmV0IiwiY29udGFjdF9uYW1lIjpudWxsLCJzdHJlZXRfbGlu + ZV8xIjpudWxsLCJzdHJlZXRfbGluZV8yIjpudWxsLCJwb3N0YWxfY29kZSI6 + bnVsbCwiY2l0eSI6bnVsbCwicmVnaW9uIjpudWxsLCJjb3VudHJ5IjoiRlIi + LCJwaG9uZV8xIjpudWxsLCJwaG9uZV8yIjpudWxsLCJmYXgiOm51bGwsImVt + YWlsIjoibXlfbGl0dGxlQHBvLm55Iiwid2ViIjpudWxsLCJkaXNjb3VudCI6 + bnVsbCwidGF4X2lkIjpudWxsLCJ2YXRfbnVtYmVyIjpudWxsLCJsYW5ndWFn + ZSI6IkVTIiwibm90ZXMiOm51bGwsInNlY3VyZV9pZCI6ImFjNTA0MWQ5N2E5 + MGQyMzMzMjI3OGM1MTQ4NjIxNWI1YmNhNzg3YzEiLCJwZXJtYWxpbmsiOiJo + dHRwOi8vcXVhZGVybm8ubHZoLm1lOjMwMDAvYmlsbGluZy9hYzUwNDFkOTdh + OTBkMjMzMzIyNzhjNTE0ODYyMTViNWJjYTc4N2MxIiwidXJsIjoiaHR0cDov + L3F1YWRlcm5vLmx2aC5tZTozMDAwL2FwaS9jb250YWN0cy82ODMifV0= + http_version: + recorded_at: Thu, 21 Dec 2017 13:36:26 GMT +- request: + method: get + uri: http://quaderno.lvh.me:3000/api/contacts/680.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Authorization: + - Bearer afa16c7478f0ba3be222e627c2571d4dd5dca47924996b13a3af377feca47ff0 + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '15' + X-Ratelimit-Remaining: + - '99' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"2f45ef805c70a888b5b8921dbc253374"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 3894c15f-30f2-4692-b238-e2a34aa8509b + X-Runtime: + - '0.725892' + Connection: + - close + Server: + - thin + body: + encoding: ASCII-8BIT + string: !binary |- + eyJpZCI6NjgwLCJraW5kIjoiY29tcGFueSIsImNyZWF0ZWRfYXQiOjE1MTM3 + NzE1NjQsImZ1bGxfbmFtZSI6IkZyYW7Dp29pc2UiLCJjb250YWN0X25hbWUi + Om51bGwsInN0cmVldF9saW5lXzEiOm51bGwsInN0cmVldF9saW5lXzIiOm51 + bGwsInBvc3RhbF9jb2RlIjpudWxsLCJjaXR5IjpudWxsLCJyZWdpb24iOm51 + bGwsImNvdW50cnkiOiJGUiIsInBob25lXzEiOm51bGwsInBob25lXzIiOm51 + bGwsImZheCI6bnVsbCwiZW1haWwiOm51bGwsIndlYiI6bnVsbCwiZGlzY291 + bnQiOm51bGwsInRheF9pZCI6IiIsInZhdF9udW1iZXIiOm51bGwsImxhbmd1 + YWdlIjoiRlIiLCJub3RlcyI6bnVsbCwic2VjdXJlX2lkIjoiMDdhYWQzMzVl + YTRhMjhmZWNlNzk5Yzk1OTQwMTNlNmMxOTAyMzMxOCIsInBlcm1hbGluayI6 + Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAwMC9iaWxsaW5nLzA3YWFkMzM1 + ZWE0YTI4ZmVjZTc5OWM5NTk0MDEzZTZjMTkwMjMzMTgiLCJ1cmwiOiJodHRw + Oi8vcXVhZGVybm8ubHZoLm1lOjMwMDAvYXBpL2NvbnRhY3RzLzY4MCJ9 + http_version: + recorded_at: Thu, 21 Dec 2017 13:36:26 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/found_contact_by_authentication_token.yml b/spec/fixtures/quaderno_cassettes/found_contact_by_authentication_token.yml new file mode 100644 index 0000000..c716600 --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/found_contact_by_authentication_token.yml @@ -0,0 +1,241 @@ +--- +http_interactions: +- request: + method: get + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '15' + X-Ratelimit-Remaining: + - '99' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"c76bfed4fe851e73924f7a85140bc1ae"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - bbfae2d3-42b8-493b-9302-39fe6e6b0b06 + X-Runtime: + - '0.317197' + Connection: + - close + Server: + - thin + body: + encoding: ASCII-8BIT + string: !binary |- + W3siaWQiOjY3Nywia2luZCI6InBlcnNvbiIsImNyZWF0ZWRfYXQiOjE1MTMw + NzgyNzgsImZpcnN0X25hbWUiOiJhc2Rhc2QiLCJsYXN0X25hbWUiOiJzZGFz + ZCIsImZ1bGxfbmFtZSI6ImFzZGFzZCBzZGFzZCIsInN0cmVldF9saW5lXzEi + Om51bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjoiMjIw + NiIsImNpdHkiOm51bGwsInJlZ2lvbiI6Ik5TVyIsImNvdW50cnkiOiJBVSIs + InBob25lXzEiOm51bGwsInBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1h + aWwiOm51bGwsIndlYiI6bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6 + IjUwIDEyMCAyNzYgNDMxIiwidmF0X251bWJlciI6IjkxMTM0OTk4MDIwIiwi + bGFuZ3VhZ2UiOiJFUyIsIm5vdGVzIjpudWxsLCJzZWN1cmVfaWQiOiIwMDc5 + ZGQ4ZmMxMWU5M2NiNzZhZmEzNmZmNWQ4ZTEwOGMyNzMyNjgyIiwicGVybWFs + aW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2aC5tZTozMDAwL2JpbGxpbmcvMDA3 + OWRkOGZjMTFlOTNjYjc2YW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ZCBP + d25lYWRvciIsInN0cmVldF9saW5lXzEiOm51bGwsInN0cmVldF9saW5lXzIi + Om51bGwsInBvc3RhbF9jb2RlIjpudWxsLCJjaXR5IjpudWxsLCJyZWdpb24i + Om51bGwsImNvdW50cnkiOiJFUyIsInBob25lXzEiOm51bGwsInBob25lXzIi + Om51bGwsImZheCI6bnVsbCwiZW1haWwiOm51bGwsIndlYiI6bnVsbCwiZGlz + Y291bnQiOm51bGwsInRheF9pZCI6IiIsInZhdF9udW1iZXIiOm51bGwsImJh + bmtfYWNjb3VudCI6bnVsbCwibGFuZ3VhZ2UiOiJFUyIsIm5vdGVzIjpudWxs + LCJzZWN1cmVfaWQiOiJjNWIzMTI5MzM3Njc0NjFhZWUwNTk2YjE1MTNjZTFl + ZDNmZTI1M2EwIiwicGVybWFsaW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2aC5t + ZTozMDAwL2JpbGxpbmcvYzViMzEyOTMzNzY3NDYxYWVlMDU5NmIxNTEzY2Ux + ZWQzZmUyNTNhMCIsInVybCI6Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAw + MC9hcGkvY29udGFjdHMvNjc5In0seyJpZCI6NjgwLCJraW5kIjoiY29tcGFu + eSIsImNyZWF0ZWRfYXQiOjE1MTM3NzE1NjQsImZ1bGxfbmFtZSI6IkZyYW7D + p29pc2UiLCJjb250YWN0X25hbWUiOm51bGwsInN0cmVldF9saW5lXzEiOm51 + bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjpudWxsLCJj + aXR5IjpudWxsLCJyZWdpb24iOm51bGwsImNvdW50cnkiOiJGUiIsInBob25l + XzEiOm51bGwsInBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1haWwiOm51 + bGwsIndlYiI6bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6IiIsInZh + dF9udW1iZXIiOm51bGwsImxhbmd1YWdlIjoiRlIiLCJub3RlcyI6bnVsbCwi + c2VjdXJlX2l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InBlcm1hbGluayI6Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAwMC9iaWxs + aW5nL2U2OWQ5MDViNmQ3OTkwZmJlMzJlZDIxZWZkZmI5YWM4ZjU5MWI5MWMi + LCJ1cmwiOiJodHRwOi8vcXVhZGVybm8ubHZoLm1lOjMwMDAvYXBpL2NvbnRh + Y3RzLzY3MyJ9LHsiaWQiOjY4MSwia2luZCI6ImNvbXBhbnkiLCJjcmVhdGVk + X2F0IjoxNTEzODU1MzkzLCJmdWxsX25hbWUiOiJUZXN0X1NreW5ldCIsImNv + bnRhY3RfbmFtZSI6bnVsbCwic3RyZWV0X2xpbmVfMSI6bnVsbCwic3RyZWV0 + X2xpbmVfMiI6bnVsbCwicG9zdGFsX2NvZGUiOm51bGwsImNpdHkiOm51bGws + InJlZ2lvbiI6bnVsbCwiY291bnRyeSI6IkZSIiwicGhvbmVfMSI6bnVsbCwi + cGhvbmVfMiI6bnVsbCwiZmF4IjpudWxsLCJlbWFpbCI6Im15X2xpdHRsZUBw + by5ueSIsIndlYiI6bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6bnVs + bCwidmF0X251bWJlciI6bnVsbCwibGFuZ3VhZ2UiOiJFUyIsIm5vdGVzIjpu + dWxsLCJzZWN1cmVfaWQiOiIxMzhhNzJmYWUzMjkyNjk4MzQ0YzJjZGNjZTNm + ZmNhMzU5ZjU3NTQxIiwicGVybWFsaW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2 + aC5tZTozMDAwL2JpbGxpbmcvMTM4YTcyZmFlMzI5MjY5ODM0NGMyY2RjY2Uz + ZmZjYTM1OWY1NzU0MSIsInVybCI6Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6 + MzAwMC9hcGkvY29udGFjdHMvNjgxIn1d + http_version: + recorded_at: Thu, 21 Dec 2017 11:32:03 GMT +- request: + method: get + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts/679.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '14' + X-Ratelimit-Remaining: + - '98' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"0ae83093255bd78fa576d03d616519a2"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 62a78667-59e5-4a93-8c62-3b1e856e90c2 + X-Runtime: + - '0.331213' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '{"id":679,"kind":"person","created_at":1513771544,"first_name":"El + Cid Owneador","last_name":null,"full_name":"El Cid Owneador","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"c5b312933767461aee0596b1513ce1ed3fe253a0","permalink":"http://quaderno.lvh.me:3000/billing/c5b312933767461aee0596b1513ce1ed3fe253a0","url":"http://quaderno.lvh.me:3000/api/contacts/679"}' + http_version: + recorded_at: Thu, 21 Dec 2017 11:32:03 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/new_contact.yml b/spec/fixtures/quaderno_cassettes/new_contact.yml new file mode 100644 index 0000000..3327ead --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/new_contact.yml @@ -0,0 +1,46 @@ +--- +http_interactions: +- request: + method: post + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts.json + body: + encoding: UTF-8 + string: '{"kind":"company","first_name":"Test_Skynet","email":"my_little@po.ny"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + response: + status: + code: 201 + message: Created + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '13' + X-Ratelimit-Remaining: + - '97' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"092cb049f00568e14a55d2587a6bd8b7"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - f78f0a68-ee2d-43ee-bdb8-48ce5514ca76 + X-Runtime: + - '0.367721' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '{"id":681,"kind":"company","created_at":1513855393,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"ES","notes":null,"secure_id":"138a72fae3292698344c2cdcce3ffca359f57541","permalink":"http://quaderno.lvh.me:3000/billing/138a72fae3292698344c2cdcce3ffca359f57541","url":"http://quaderno.lvh.me:3000/api/contacts/681"}' + http_version: + recorded_at: Thu, 21 Dec 2017 11:23:13 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/new_contact_by_access_token.yml b/spec/fixtures/quaderno_cassettes/new_contact_by_access_token.yml new file mode 100644 index 0000000..0c5de77 --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/new_contact_by_access_token.yml @@ -0,0 +1,48 @@ +--- +http_interactions: +- request: + method: post + uri: http://quaderno.lvh.me:3000/api/contacts.json + body: + encoding: UTF-8 + string: '{"kind":"company","first_name":"Test_Skynet","email":"my_little@po.ny"}' + headers: + Accept: + - application/json + Authorization: + - Bearer afa16c7478f0ba3be222e627c2571d4dd5dca47924996b13a3af377feca47ff0 + Content-Type: + - application/json + response: + status: + code: 201 + message: Created + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '14' + X-Ratelimit-Remaining: + - '98' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"e773b58fc0fedb615bb3ef0c08354393"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 87dd2b3a-6b1a-4660-b161-be0a86b526b5 + X-Runtime: + - '1.463753' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '{"id":685,"kind":"company","created_at":1513863388,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"ES","notes":null,"secure_id":"d2dad2da07440e6dcd2dd64b914df54ba50d8b2e","permalink":"http://quaderno.lvh.me:3000/billing/d2dad2da07440e6dcd2dd64b914df54ba50d8b2e","url":"http://quaderno.lvh.me:3000/api/contacts/685"}' + http_version: + recorded_at: Thu, 21 Dec 2017 13:36:28 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/new_contact_by_authentication_token.yml b/spec/fixtures/quaderno_cassettes/new_contact_by_authentication_token.yml new file mode 100644 index 0000000..6243c5f --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/new_contact_by_authentication_token.yml @@ -0,0 +1,46 @@ +--- +http_interactions: +- request: + method: post + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts.json + body: + encoding: UTF-8 + string: '{"kind":"company","first_name":"Test_Skynet","email":"my_little@po.ny"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + response: + status: + code: 201 + message: Created + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '14' + X-Ratelimit-Remaining: + - '97' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"14f4f9aa65a95fa6523d9f7c1c983fe6"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - ded73741-78a2-440a-87ac-61d42350b717 + X-Runtime: + - '0.322456' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '{"id":683,"kind":"company","created_at":1513855923,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"ES","notes":null,"secure_id":"ac5041d97a90d23332278c51486215b5bca787c1","permalink":"http://quaderno.lvh.me:3000/billing/ac5041d97a90d23332278c51486215b5bca787c1","url":"http://quaderno.lvh.me:3000/api/contacts/683"}' + http_version: + recorded_at: Thu, 21 Dec 2017 11:32:04 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/rate_limit.yml b/spec/fixtures/quaderno_cassettes/rate_limit.yml new file mode 100644 index 0000000..384f47e --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/rate_limit.yml @@ -0,0 +1,44 @@ +--- +http_interactions: +- request: + method: get + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/ping.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '11' + X-Ratelimit-Remaining: + - '90' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"0c776997933eb60833b37beaf43814c8"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - f015d840-476b-474e-98fc-67a4271c4199 + X-Runtime: + - '0.181127' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '{"status":"OK"}' + http_version: + recorded_at: Thu, 21 Dec 2017 11:23:16 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/updated_contact.yml b/spec/fixtures/quaderno_cassettes/updated_contact.yml new file mode 100644 index 0000000..ffac08c --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/updated_contact.yml @@ -0,0 +1,242 @@ +--- +http_interactions: +- request: + method: get + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '13' + X-Ratelimit-Remaining: + - '96' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"62432497459508563805a90b657188fc"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 718b1b06-f43d-413f-830a-89d2677294c0 + X-Runtime: + - '0.330464' + Connection: + - close + Server: + - thin + body: + encoding: ASCII-8BIT + string: !binary |- + W3siaWQiOjY3Nywia2luZCI6InBlcnNvbiIsImNyZWF0ZWRfYXQiOjE1MTMw + NzgyNzgsImZpcnN0X25hbWUiOiJhc2Rhc2QiLCJsYXN0X25hbWUiOiJzZGFz + ZCIsImZ1bGxfbmFtZSI6ImFzZGFzZCBzZGFzZCIsInN0cmVldF9saW5lXzEi + Om51bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjoiMjIw + NiIsImNpdHkiOm51bGwsInJlZ2lvbiI6Ik5TVyIsImNvdW50cnkiOiJBVSIs + InBob25lXzEiOm51bGwsInBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1h + aWwiOm51bGwsIndlYiI6bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6 + IjUwIDEyMCAyNzYgNDMxIiwidmF0X251bWJlciI6IjkxMTM0OTk4MDIwIiwi + bGFuZ3VhZ2UiOiJFUyIsIm5vdGVzIjpudWxsLCJzZWN1cmVfaWQiOiIwMDc5 + ZGQ4ZmMxMWU5M2NiNzZhZmEzNmZmNWQ4ZTEwOGMyNzMyNjgyIiwicGVybWFs + aW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2aC5tZTozMDAwL2JpbGxpbmcvMDA3 + OWRkOGZjMTFlOTNjYjc2YWZhMzZmZjVkOGUxMDhjMjczMjY4MiIsInVybCI6 + Imh0dHA6Ly9xdWFkZXJuby5sdmg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WN0X25hbWUiOm51bGwsInN0cmVldF9saW5lXzEiOm51bGws + InN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjpudWxsLCJjaXR5 + IjpudWxsLCJyZWdpb24iOm51bGwsImNvdW50cnkiOiJBVSIsInBob25lXzEi + Om51bGwsInBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1haWwiOm51bGws + IndlYiI6bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6bnVsbCwidmF0 + X251bWJlciI6bnVsbCwibGFuZ3VhZ2UiOiJFTiIsIm5vdGVzIjpudWxsLCJz + ZWN1cmVfaWQiOiJmMjc4M2NiNTc4NjBjOGJmZTM0MzY4M2VkZDZjNTJkYTI2 + ODY2ODg2IiwicGVybWFsaW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2aC5tZToz + MDAwL2JpbGxpbmcvZjI3ODNjYjU3ODYwYzhiZmUzNDM2ODNlZGQ2YzUyZGEy + Njg2Njg4NiIsInVybCI6Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAwMC9h + cGkvY29udGFjdHMvNjcxIn0seyJpZCI6NjcyLCJraW5kIjoiY29tcGFueSIs + ImNyZWF0ZWRfYXQiOjE1MTA2NTQ3MDYsImZ1bGxfbmFtZSI6IkphbWVzIiwi + Y29udGFjdF9uYW1lIjpudWxsLCJzdHJlZXRfbGluZV8xIjpudWxsLCJzdHJl + ZXRfbGluZV8yIjpudWxsLCJwb3N0YWxfY29kZSI6bnVsbCwiY2l0eSI6bnVs + bCwicmVnaW9uIjpudWxsLCJjb3VudHJ5IjoiQVUiLCJwaG9uZV8xIjpudWxs + LCJwaG9uZV8yIjpudWxsLCJmYXgiOm51bGwsImVtYWlsIjpudWxsLCJ3ZWIi + Om51bGwsImRpc2NvdW50IjpudWxsLCJ0YXhfaWQiOm51bGwsInZhdF9udW1i + ZXIiOiIxMjA0MjE2ODc0MyIsImxhbmd1YWdlIjoiRU4iLCJub3RlcyI6bnVs + bCwic2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iaHR0cDov + L3F1YWRlcm5vLmx2aC5tZTozMDAwL2JpbGxpbmcvNmViYjcwMGVhMzVhOWI4 + MmQ2NmM3MGUzNWJiZmQzNGZjNTgyZmU2OCIsInVybCI6Imh0dHA6Ly9xdWFk + ZXJuby5sdmgubWU6MzAwMC9hcGkvY29udGFjdHMvNjc2In0seyJpZCI6Njgx + LCJraW5kIjoiY29tcGFueSIsImNyZWF0ZWRfYXQiOjE1MTM4NTUzOTMsImZ1 + bGxfbmFtZSI6IlRlc3RfU2t5bmV0IiwiY29udGFjdF9uYW1lIjpudWxsLCJz + dHJlZXRfbGluZV8xIjpudWxsLCJzdHJlZXRfbGluZV8yIjpudWxsLCJwb3N0 + YWxfY29kZSI6bnVsbCwiY2l0eSI6bnVsbCwicmVnaW9uIjpudWxsLCJjb3Vu + dHJ5IjoiRlIiLCJwaG9uZV8xIjpudWxsLCJwaG9uZV8yIjpudWxsLCJmYXgi + Om51bGwsImVtYWlsIjoibXlfbGl0dGxlQHBvLm55Iiwid2ViIjpudWxsLCJk + aXNjb3VudCI6bnVsbCwidGF4X2lkIjpudWxsLCJ2YXRfbnVtYmVyIjpudWxs + LCJsYW5ndWFnZSI6IkVTIiwibm90ZXMiOm51bGwsInNlY3VyZV9pZCI6IjEz + OGE3MmZhZTMyOTI2OTgzNDRjMmNkY2NlM2ZmY2EzNTlmNTc1NDEiLCJwZXJt + YWxpbmsiOiJodHRwOi8vcXVhZGVybm8ubHZoLm1lOjMwMDAvYmlsbGluZy8x + MzhhNzJmYWUzMjkyNjk4MzQ0YzJjZGNjZTNmZmNhMzU5ZjU3NTQxIiwidXJs + IjoiaHR0cDovL3F1YWRlcm5vLmx2aC5tZTozMDAwL2FwaS9jb250YWN0cy82 + ODEifV0= + http_version: + recorded_at: Thu, 21 Dec 2017 11:23:14 GMT +- request: + method: put + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts/673.json + body: + encoding: UTF-8 + string: '{"first_name":"Test_OCP","email":"dont@stop.believing"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '13' + X-Ratelimit-Remaining: + - '95' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"aab6fb98fce246bc3c396e5a16a90ccd"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - bced80d4-d98c-4ede-ad6c-2b77eb449b68 + X-Runtime: + - '0.273897' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '{"id":673,"kind":"company","created_at":1510666591,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"AU","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"","vat_number":"518247535567","language":"ES","notes":null,"secure_id":"e69d905b6d7990fbe32ed21efdfb9ac8f591b91c","permalink":"http://quaderno.lvh.me:3000/billing/e69d905b6d7990fbe32ed21efdfb9ac8f591b91c","url":"http://quaderno.lvh.me:3000/api/contacts/673"}' + http_version: + recorded_at: Thu, 21 Dec 2017 11:23:14 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/updated_contact_by_access_token.yml b/spec/fixtures/quaderno_cassettes/updated_contact_by_access_token.yml new file mode 100644 index 0000000..abe1cf2 --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/updated_contact_by_access_token.yml @@ -0,0 +1,271 @@ +--- +http_interactions: +- request: + method: get + uri: http://quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + Authorization: + - Bearer afa16c7478f0ba3be222e627c2571d4dd5dca47924996b13a3af377feca47ff0 + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '12' + X-Ratelimit-Remaining: + - '97' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"6085e26aae2e0244a9e122a426c42cad"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 783af899-8000-437a-a0b8-57db9b47bd45 + X-Runtime: + - '1.223245' + Connection: + - close + Server: + - thin + body: + encoding: ASCII-8BIT + string: !binary |- + W3siaWQiOjY3Nywia2luZCI6InBlcnNvbiIsImNyZWF0ZWRfYXQiOjE1MTMw + NzgyNzgsImZpcnN0X25hbWUiOiJhc2Rhc2QiLCJsYXN0X25hbWUiOiJzZGFz + ZCIsImZ1bGxfbmFtZSI6ImFzZGFzZCBzZGFzZCIsInN0cmVldF9saW5lXzEi + Om51bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjoiMjIw + NiIsImNpdHkiOm51bGwsInJlZ2lvbiI6Ik5TVyIsImNvdW50cnkiOiJBVSIs + InBob25lXzEiOm51bGwsInBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1h + aWwiOm51bGwsIndlYiI6bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6 + IjUwIDEyMCAyNzYgNDMxIiwidmF0X251bWJlciI6IjkxMTM0OTk4MDIwIiwi + bGFuZ3VhZ2UiOiJFUyIsIm5vdGVzIjpudWxsLCJzZWN1cmVfaWQiOiIwMDc5 + ZGQ4ZmMxMWU5M2NiNzZhZmEzNmZmNWQ4ZTEwOGMyNzMyNjgyIiwicGVybWFs + aW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2aC5tZTozMDAwL2JpbGxpbmcvMDA3 + OWRkOGZjMTFlOTNjYjc2YWZhMzZmZjVkOGUxMDhjMjczMjY4MiIsInVybCI6 + Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAwMC9hcGkvY29udGFjdHMvNjc3 + In0seyJpZCI6Njc4LCJraW5kIjoicGVyc29uIiwiY3JlYXRlZF9hdCI6MTUx + MzU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oiZDJkYWQyZGEwNzQ0MGU2ZGNkMmRkNjRiOTE0ZGY1NGJhNTBkOGIyZSIs + InBlcm1hbGluayI6Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAwMC9iaWxs + aW5nL2QyZGFkMmRhMDc0NDBlNmRjZDJkZDY0YjkxNGRmNTRiYTUwZDhiMmUi + LCJ1cmwiOiJodHRwOi8vcXVhZGVybm8ubHZoLm1lOjMwMDAvYXBpL2NvbnRh + Y3RzLzY4NSJ9XQ== + http_version: + recorded_at: Thu, 21 Dec 2017 13:36:29 GMT +- request: + method: put + uri: http://quaderno.lvh.me:3000/api/contacts/680.json + body: + encoding: UTF-8 + string: '{"first_name":"Test_OCP","email":"dont@stop.believing"}' + headers: + Accept: + - application/json + Authorization: + - Bearer afa16c7478f0ba3be222e627c2571d4dd5dca47924996b13a3af377feca47ff0 + Content-Type: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '11' + X-Ratelimit-Remaining: + - '96' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"60ffd9085b6688ce4001867fe34e8333"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 4006124f-bfc6-494e-b38f-1b80e8f34ce7 + X-Runtime: + - '0.975398' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '{"id":680,"kind":"company","created_at":1513771564,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"FR","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"","vat_number":null,"language":"FR","notes":null,"secure_id":"07aad335ea4a28fece799c9594013e6c19023318","permalink":"http://quaderno.lvh.me:3000/billing/07aad335ea4a28fece799c9594013e6c19023318","url":"http://quaderno.lvh.me:3000/api/contacts/680"}' + http_version: + recorded_at: Thu, 21 Dec 2017 13:36:30 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/fixtures/quaderno_cassettes/updated_contact_by_authentication_token.yml b/spec/fixtures/quaderno_cassettes/updated_contact_by_authentication_token.yml new file mode 100644 index 0000000..8f8bde8 --- /dev/null +++ b/spec/fixtures/quaderno_cassettes/updated_contact_by_authentication_token.yml @@ -0,0 +1,254 @@ +--- +http_interactions: +- request: + method: get + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '14' + X-Ratelimit-Remaining: + - '96' + X-Pages-Currentpage: + - '1' + X-Pages-Totalpages: + - '1' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"eb0168984fcdc6c4a40c40893aed757d"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 7536bb9b-f75f-4d5e-889f-1cfba35fa0eb + X-Runtime: + - '0.287532' + Connection: + - close + Server: + - thin + body: + encoding: ASCII-8BIT + string: !binary |- + W3siaWQiOjY3Nywia2luZCI6InBlcnNvbiIsImNyZWF0ZWRfYXQiOjE1MTMw + NzgyNzgsImZpcnN0X25hbWUiOiJhc2Rhc2QiLCJsYXN0X25hbWUiOiJzZGFz + ZCIsImZ1bGxfbmFtZSI6ImFzZGFzZCBzZGFzZCIsInN0cmVldF9saW5lXzEi + Om51bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjoiMjIw + NiIsImNpdHkiOm51bGwsInJlZ2lvbiI6Ik5TVyIsImNvdW50cnkiOiJBVSIs + InBob25lXzEiOm51bGwsInBob25lXzIiOm51bGwsImZheCI6bnVsbCwiZW1h + aWwiOm51bGwsIndlYiI6bnVsbCwiZGlzY291bnQiOm51bGwsInRheF9pZCI6 + IjUwIDEyMCAyNzYgNDMxIiwidmF0X251bWJlciI6IjkxMTM0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J1cmwiOiJodHRwOi8vcXVhZGVybm8ubHZoLm1lOjMwMDAvYXBp + L2NvbnRhY3RzLzY3OCJ9LHsiaWQiOjY3OSwia2luZCI6InBlcnNvbiIsImNy + ZWF0ZWRfYXQiOjE1MTM3NzE1NDQsImZpcnN0X25hbWUiOiJFbCBDaWQgT3du + ZWFkb3IiLCJsYXN0X25hbWUiOm51bGwsImZ1bGxfbmFtZSI6IkVsIENpZCBP + d25lYWRvciIsInN0cmVldF9saW5lXzEiOm51bGwsInN0cmVldF9saW5lXzIi + Om51bGwsInBvc3RhbF9jb2RlIjpudWxsLCJjaXR5IjpudWxsLCJyZWdpb24i + Om51bGwsImNvdW50cnkiOiJFUyIsInBob25lXzEiOm51bGwsInBob25lXzIi + Om51bGwsImZheCI6bnVsbCwiZW1haWwiOm51bGwsIndlYiI6bnVsbCwiZGlz + Y291bnQiOm51bGwsInRheF9pZCI6IiIsInZhdF9udW1iZXIiOm51bGwsImJh + bmtfYWNjb3VudCI6bnVsbCwibGFuZ3VhZ2UiOiJFUyIsIm5vdGVzIjpudWxs + LCJzZWN1cmVfaWQiOiJjNWIzMTI5MzM3Njc0NjFhZWUwNTk2YjE1MTNjZTFl + ZDNmZTI1M2EwIiwicGVybWFsaW5rIjoiaHR0cDovL3F1YWRlcm5vLmx2aC5t + ZTozMDAwL2JpbGxpbmcvYzViMzEyOTMzNzY3NDYxYWVlMDU5NmIxNTEzY2Ux + ZWQzZmUyNTNhMCIsInVybCI6Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6MzAw + MC9hcGkvY29udGFjdHMvNjc5In0seyJpZCI6NjgwLCJraW5kIjoiY29tcGFu + eSIsImNyZWF0ZWRfYXQiOjE1MTM3NzE1NjQsImZ1bGxfbmFtZSI6IkZyYW7D + p29pc2UiLCJjb250YWN0X25hbWUiOm51bGwsInN0cmVldF9saW5lXzEiOm51 + bGwsInN0cmVldF9saW5lXzIiOm51bGwsInBvc3RhbF9jb2RlIjpudWxsLCJj + aXR5Ij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zI5MjY5ODM0NGMyY2RjY2Uz + ZmZjYTM1OWY1NzU0MSIsInVybCI6Imh0dHA6Ly9xdWFkZXJuby5sdmgubWU6 + MzAwMC9hcGkvY29udGFjdHMvNjgxIn0seyJpZCI6NjgzLCJraW5kIjoiY29t + cGFueSIsImNyZWF0ZWRfYXQiOjE1MTM4NTU5MjMsImZ1bGxfbmFtZSI6IlRl + c3RfU2t5bmV0IiwiY29udGFjdF9uYW1lIjpudWxsLCJzdHJlZXRfbGluZV8x + IjpudWxsLCJzdHJlZXRfbGluZV8yIjpudWxsLCJwb3N0YWxfY29kZSI6bnVs + bCwiY2l0eSI6bnVsbCwicmVnaW9uIjpudWxsLCJjb3VudHJ5IjoiRlIiLCJw + aG9uZV8xIjpudWxsLCJwaG9uZV8yIjpudWxsLCJmYXgiOm51bGwsImVtYWls + IjoibXlfbGl0dGxlQHBvLm55Iiwid2ViIjpudWxsLCJkaXNjb3VudCI6bnVs + bCwidGF4X2lkIjpudWxsLCJ2YXRfbnVtYmVyIjpudWxsLCJsYW5ndWFnZSI6 + IkVTIiwibm90ZXMiOm51bGwsInNlY3VyZV9pZCI6ImFjNTA0MWQ5N2E5MGQy + MzMzMjI3OGM1MTQ4NjIxNWI1YmNhNzg3YzEiLCJwZXJtYWxpbmsiOiJodHRw + Oi8vcXVhZGVybm8ubHZoLm1lOjMwMDAvYmlsbGluZy9hYzUwNDFkOTdhOTBk + MjMzMzIyNzhjNTE0ODYyMTViNWJjYTc4N2MxIiwidXJsIjoiaHR0cDovL3F1 + YWRlcm5vLmx2aC5tZTozMDAwL2FwaS9jb250YWN0cy82ODMifV0= + http_version: + recorded_at: Thu, 21 Dec 2017 11:32:04 GMT +- request: + method: put + uri: http://sk_test_bMz9mJJ5bZnWPwWGuV8y:@quaderno.lvh.me:3000/api/contacts/679.json + body: + encoding: UTF-8 + string: '{"first_name":"Test_OCP","email":"dont@stop.believing"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + response: + status: + code: 200 + message: OK + headers: + X-Frame-Options: + - ALLOWALL + X-Ratelimit-Limit: + - '2000' + X-Ratelimit-Reset: + - '14' + X-Ratelimit-Remaining: + - '95' + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"963258470af5e14ede5a0f60baff74ff"' + Cache-Control: + - max-age=0, private, must-revalidate + X-Request-Id: + - 54e1d5e0-690b-4066-a38a-f924646399e8 + X-Runtime: + - '0.271096' + Connection: + - close + Server: + - thin + body: + encoding: UTF-8 + string: '{"id":679,"kind":"person","created_at":1513771544,"first_name":"Test_OCP","last_name":null,"full_name":"Test_OCP","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"c5b312933767461aee0596b1513ce1ed3fe253a0","permalink":"http://quaderno.lvh.me:3000/billing/c5b312933767461aee0596b1513ce1ed3fe253a0","url":"http://quaderno.lvh.me:3000/api/contacts/679"}' + http_version: + recorded_at: Thu, 21 Dec 2017 11:32:04 GMT +recorded_with: VCR 4.0.0 diff --git a/spec/helper.rb b/spec/helper.rb new file mode 100644 index 0000000..d6802df --- /dev/null +++ b/spec/helper.rb @@ -0,0 +1,20 @@ +$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) +$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) +$LOAD_PATH.unshift(File.dirname(__FILE__)) + +require 'quaderno-ruby' +require 'vcr' +require 'webmock/rspec' + +VCR.configure do |c| + c.allow_http_connections_when_no_cassette = true + c.cassette_library_dir = 'spec/fixtures/quaderno_cassettes' + c.ignore_localhost = false + c.hook_into :webmock +end + +TEST_URL = 'http://quaderno.lvh.me:3000/api/' +TEST_KEY = 'sk_test_bMz9mJJ5bZnWPwWGuV8y' +TEST_OAUTH_ACCESS_TOKEN = 'afa16c7478f0ba3be222e627c2571d4dd5dca47924996b13a3af377feca47ff0' +OLDEST_SUPPORTED_API_VERSION = 20160602 + diff --git a/spec/unit/test_quaderno_contacts.rb b/spec/unit/test_quaderno_contacts.rb new file mode 100644 index 0000000..f22f0de --- /dev/null +++ b/spec/unit/test_quaderno_contacts.rb @@ -0,0 +1,166 @@ +require 'helper' + +describe Quaderno::Contact do + + context 'using the default configuration with an authentication token' do + before(:each) do + Quaderno::Base.configure do |config| + config.auth_token = TEST_KEY + config.url = TEST_URL + config.api_version = nil + end + end + + it 'should get all contacts (populated db)' do + VCR.use_cassette('all contacts') do + contacts = Quaderno::Contact.all + expect(contacts.empty?).to be false + expect(contacts.is_a? Array).to be true + contacts.each { |contact| expect(contact.is_a?(Quaderno::Contact)).to be true } + end + end + + it 'should find a contact' do + VCR.use_cassette('found contact') do + contacts = Quaderno::Contact.all + contact = Quaderno::Contact.find contacts[2].id + expect(contact.is_a?(Quaderno::Contact)).to be true + expect(contacts[2].id).to eq contact.id + end + end + + it 'should create a contact' do + VCR.use_cassette('new contact') do + contact = Quaderno::Contact.create(kind: 'company', first_name: 'Test_Skynet', email: 'my_little@po.ny') + expect(contact.is_a?(Quaderno::Contact)).to be true + expect(contact.kind).to eq 'company' + expect(contact.full_name).to eq 'Test_Skynet' + end + end + + it 'should update a contact' do + VCR.use_cassette('updated contact') do + contacts = Quaderno::Contact.all + contact = Quaderno::Contact.update(contacts[2].id, first_name: 'Test_OCP', email: 'dont@stop.believing') + expect(contact.is_a?(Quaderno::Contact)).to be true + expect(contact.first_name || contact.full_name).to eq 'Test_OCP' + end + end + + it 'should delete a contact' do + VCR.use_cassette('deleted contact') do + new_contact = Quaderno::Contact.create(kind: 'company', first_name: 'Z, Mazinger Z', email: 'koji@kabuto.ftw') + contacts_before = Quaderno::Contact.all + contact_id = contacts_before.last.id + Quaderno::Contact.delete contact_id + contacts_after = Quaderno::Contact.all + expect(contacts_after.last.id).not_to eq contact_id + end + end + + it 'should know the rate limit' do + VCR.use_cassette('rate limit') do + rate_limit_info = Quaderno::Base.rate_limit_info + expect(rate_limit_info[:remaining] < 2000).to be true + end + end + end + + context 'using the thread-safe configuration' do + context 'with an authentication token' do + it 'should get all contacts (populated db)' do + VCR.use_cassette('all contacts by authentication token') do + contacts = Quaderno::Contact.all(api_url: TEST_URL, auth_token: TEST_KEY) + expect(contacts.is_a? Array).to be true + contacts.each { |contact| expect(contact.is_a?(Quaderno::Contact)).to be true } + end + end + + it 'should find a contact' do + VCR.use_cassette('found contact by authentication token') do + contacts = Quaderno::Contact.all(api_url: TEST_URL, auth_token: TEST_KEY) + contact = Quaderno::Contact.find contacts[2].id, api_url: TEST_URL, auth_token: TEST_KEY + expect(contact.is_a?(Quaderno::Contact)).to be true + expect(contacts[2].id).to eq contact.id + end + end + + it 'should create a contact' do + VCR.use_cassette('new contact by authentication token') do + contact = Quaderno::Contact.create(kind: 'company', first_name: 'Test_Skynet', email: 'my_little@po.ny', api_url: TEST_URL, auth_token: TEST_KEY) + expect(contact.is_a?(Quaderno::Contact)).to be true + expect(contact.kind).to eq 'company' + expect(contact.full_name).to eq 'Test_Skynet' + end + end + + it 'should update a contact' do + VCR.use_cassette('updated contact by authentication token') do + contacts = Quaderno::Contact.all(api_url: TEST_URL, auth_token: TEST_KEY) + contact = Quaderno::Contact.update(contacts[2].id, first_name: 'Test_OCP', email: 'dont@stop.believing', api_url: TEST_URL, auth_token: TEST_KEY) + expect(contact.is_a?(Quaderno::Contact)).to be true + expect(contact.first_name || contact.full_name).to eq 'Test_OCP' + end + end + + it 'should delete a contact' do + VCR.use_cassette('deleted contact by authentication token') do + new_contact = Quaderno::Contact.create(kind: 'company', first_name: 'Z, Mazinger Z', email: 'koji@kabuto.ftw', api_url: TEST_URL, auth_token: TEST_KEY) + contacts_before = Quaderno::Contact.all(api_url: TEST_URL, auth_token: TEST_KEY) + contact_id = contacts_before.last.id + Quaderno::Contact.delete contact_id, api_url: TEST_URL, auth_token: TEST_KEY + contacts_after = Quaderno::Contact.all(api_url: TEST_URL, auth_token: TEST_KEY) + expect(contacts_after.last.id).not_to eq contact_id + end + end + end + + context 'with an OAuth 2.0 access token' do + it 'should get all contacts (populated db)' do + VCR.use_cassette('all contacts by access token') do + contacts = Quaderno::Contact.all(api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) + expect(contacts.is_a? Array).to be true + contacts.each { |contact| expect(contact.is_a?(Quaderno::Contact)).to be true } + end + end + + it 'should find a contact' do + VCR.use_cassette('found contact by access token') do + contacts = Quaderno::Contact.all(api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) + contact = Quaderno::Contact.find contacts[2].id, api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN + expect(contact.is_a? Quaderno::Contact).to be true + expect(contacts[2].id).to eq contact.id + end + end + + it 'should create a contact' do + VCR.use_cassette('new contact by access token') do + contact = Quaderno::Contact.create(kind: 'company', first_name: 'Test_Skynet', email: 'my_little@po.ny', api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) + expect(contact.is_a? Quaderno::Contact).to be true + expect(contact.kind).to eq 'company' + expect(contact.full_name).to eq 'Test_Skynet' + end + end + + it 'should update a contact' do + VCR.use_cassette('updated contact by access token') do + contacts = Quaderno::Contact.all(api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) + contact = Quaderno::Contact.update(contacts[2].id, first_name: 'Test_OCP', email: 'dont@stop.believing', api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) + expect(contact.is_a?(Quaderno::Contact)).to be true + expect(contact.first_name || contact.full_name).to eq 'Test_OCP' + end + end + + it 'should delete a contact' do + VCR.use_cassette('deleted contact by access token') do + new_contact = Quaderno::Contact.create(kind: 'company', first_name: 'Z, Mazinger Z', email: 'koji@kabuto.ftw', api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) + contacts_before = Quaderno::Contact.all(api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) + contact_id = contacts_before.last.id + Quaderno::Contact.delete contact_id, api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN + contacts_after = Quaderno::Contact.all(api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) + expect(contacts_after.last.id).not_to eq contact_id + end + end + end + end +end \ No newline at end of file diff --git a/test/unit/test_quaderno_estimates.rb b/spec/unit/test_quaderno_estimates.rb similarity index 100% rename from test/unit/test_quaderno_estimates.rb rename to spec/unit/test_quaderno_estimates.rb diff --git a/test/unit/test_quaderno_evidences.rb b/spec/unit/test_quaderno_evidences.rb similarity index 100% rename from test/unit/test_quaderno_evidences.rb rename to spec/unit/test_quaderno_evidences.rb diff --git a/test/unit/test_quaderno_expenses.rb b/spec/unit/test_quaderno_expenses.rb similarity index 100% rename from test/unit/test_quaderno_expenses.rb rename to spec/unit/test_quaderno_expenses.rb diff --git a/test/unit/test_quaderno_invoices.rb b/spec/unit/test_quaderno_invoices.rb similarity index 100% rename from test/unit/test_quaderno_invoices.rb rename to spec/unit/test_quaderno_invoices.rb diff --git a/test/unit/test_quaderno_items.rb b/spec/unit/test_quaderno_items.rb similarity index 100% rename from test/unit/test_quaderno_items.rb rename to spec/unit/test_quaderno_items.rb diff --git a/test/unit/test_quaderno_receipts.rb b/spec/unit/test_quaderno_receipts.rb similarity index 100% rename from test/unit/test_quaderno_receipts.rb rename to spec/unit/test_quaderno_receipts.rb diff --git a/test/unit/test_quaderno_tax.rb b/spec/unit/test_quaderno_tax.rb similarity index 100% rename from test/unit/test_quaderno_tax.rb rename to spec/unit/test_quaderno_tax.rb diff --git a/test/unit/test_quaderno_webhooks.rb b/spec/unit/test_quaderno_webhooks.rb similarity index 100% rename from test/unit/test_quaderno_webhooks.rb rename to spec/unit/test_quaderno_webhooks.rb diff --git a/test/fixtures/quaderno_cassettes/.DS_Store b/test/fixtures/quaderno_cassettes/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/test/fixtures/quaderno_cassettes/.DS_Store and /dev/null differ diff --git a/test/fixtures/quaderno_cassettes/all_contacts.yml b/test/fixtures/quaderno_cassettes/all_contacts.yml deleted file mode 100644 index f4d2ebd..0000000 --- a/test/fixtures/quaderno_cassettes/all_contacts.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '13' - x-ratelimit-remaining: - - '93' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 9979c39d-b922-48c7-a298-26cb6cb9d547 - x-runtime: - - '0.250093' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:00:57 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/all_contacts_by_access_token.yml b/test/fixtures/quaderno_cassettes/all_contacts_by_access_token.yml deleted file mode 100644 index 3db3514..0000000 --- a/test/fixtures/quaderno_cassettes/all_contacts_by_access_token.yml +++ /dev/null @@ -1,56 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Bearer 36b82411e6686581fe3d7d10fbe931a3fdc9265a353832f0e3ff6269bd319e12 - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '11' - x-ratelimit-remaining: - - '95' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"ce9bb93f9732d0d31bfba5e17089ac04"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - d55a13e9-7cde-45a2-b82a-9d4179e81ffe - x-runtime: - - '0.262389' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":50,"kind":"company","created_at":1497267993,"full_name":"Test_OCP","contact_name":null,"street_line_1":"asdasdas","street_line_2":"3rwerds","postal_code":"08080","city":"Sdasdasd","region":"sadasdasd","country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"ES78488057M","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"757312a30b02810e495ae18c312a50a1e4f4b713","permalink":"http://development.lvh.me:3000/billing/757312a30b02810e495ae18c312a50a1e4f4b713","url":"http://development.lvh.me:3000/api/contacts/50"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"},{"id":55,"kind":"company","created_at":1497269711,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","permalink":"http://development.lvh.me:3000/billing/42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","url":"http://development.lvh.me:3000/api/contacts/55"},{"id":56,"kind":"company","created_at":1497351006,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0685fa00c66ec752aacd5f3e1f81365831cd3d65","permalink":"http://development.lvh.me:3000/billing/0685fa00c66ec752aacd5f3e1f81365831cd3d65","url":"http://development.lvh.me:3000/api/contacts/56"},{"id":58,"kind":"company","created_at":1497351105,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8bebc09443c4f72ef4059058607c50447b2f3c16","permalink":"http://development.lvh.me:3000/billing/8bebc09443c4f72ef4059058607c50447b2f3c16","url":"http://development.lvh.me:3000/api/contacts/58"},{"id":60,"kind":"company","created_at":1497351108,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"45d4cccba293ef0da33c07a991c6081ec4179948","permalink":"http://development.lvh.me:3000/billing/45d4cccba293ef0da33c07a991c6081ec4179948","url":"http://development.lvh.me:3000/api/contacts/60"},{"id":62,"kind":"company","created_at":1497351487,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","permalink":"http://development.lvh.me:3000/billing/8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","url":"http://development.lvh.me:3000/api/contacts/62"},{"id":57,"kind":"company","created_at":1497351007,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","permalink":"http://development.lvh.me:3000/billing/cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","url":"http://development.lvh.me:3000/api/contacts/57"},{"id":59,"kind":"company","created_at":1497351105,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"f8bae1172828d0fdef3ac4598592ac45dc0d722f","permalink":"http://development.lvh.me:3000/billing/f8bae1172828d0fdef3ac4598592ac45dc0d722f","url":"http://development.lvh.me:3000/api/contacts/59"},{"id":61,"kind":"company","created_at":1497351108,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"391ba9b21d0da56429e44a5e7fd9ad89706285e2","permalink":"http://development.lvh.me:3000/billing/391ba9b21d0da56429e44a5e7fd9ad89706285e2","url":"http://development.lvh.me:3000/api/contacts/61"},{"id":63,"kind":"company","created_at":1497351487,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"93744b7e3b633da80c37441a724f0f335dd59fec","permalink":"http://development.lvh.me:3000/billing/93744b7e3b633da80c37441a724f0f335dd59fec","url":"http://development.lvh.me:3000/api/contacts/63"}]' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 10:58:09 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/all_contacts_by_authentication_token.yml b/test/fixtures/quaderno_cassettes/all_contacts_by_authentication_token.yml deleted file mode 100644 index 55defc5..0000000 --- a/test/fixtures/quaderno_cassettes/all_contacts_by_authentication_token.yml +++ /dev/null @@ -1,57 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '7' - x-ratelimit-remaining: - - '87' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"46aaea3ca58483c13bf81149f2a0a335"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - c2b7c92a-d094-4e07-ad42-163317065d3b - x-runtime: - - '0.567524' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":50,"kind":"company","created_at":1497267993,"full_name":"Test_OCP","contact_name":null,"street_line_1":"asdasdas","street_line_2":"3rwerds","postal_code":"08080","city":"Sdasdasd","region":"sadasdasd","country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"ES78488057M","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"757312a30b02810e495ae18c312a50a1e4f4b713","permalink":"http://development.lvh.me:3000/billing/757312a30b02810e495ae18c312a50a1e4f4b713","url":"http://development.lvh.me:3000/api/contacts/50"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"},{"id":55,"kind":"company","created_at":1497269711,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","permalink":"http://development.lvh.me:3000/billing/42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","url":"http://development.lvh.me:3000/api/contacts/55"},{"id":56,"kind":"company","created_at":1497351006,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0685fa00c66ec752aacd5f3e1f81365831cd3d65","permalink":"http://development.lvh.me:3000/billing/0685fa00c66ec752aacd5f3e1f81365831cd3d65","url":"http://development.lvh.me:3000/api/contacts/56"},{"id":58,"kind":"company","created_at":1497351105,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8bebc09443c4f72ef4059058607c50447b2f3c16","permalink":"http://development.lvh.me:3000/billing/8bebc09443c4f72ef4059058607c50447b2f3c16","url":"http://development.lvh.me:3000/api/contacts/58"},{"id":60,"kind":"company","created_at":1497351108,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"45d4cccba293ef0da33c07a991c6081ec4179948","permalink":"http://development.lvh.me:3000/billing/45d4cccba293ef0da33c07a991c6081ec4179948","url":"http://development.lvh.me:3000/api/contacts/60"},{"id":62,"kind":"company","created_at":1497351487,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","permalink":"http://development.lvh.me:3000/billing/8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","url":"http://development.lvh.me:3000/api/contacts/62"},{"id":64,"kind":"company","created_at":1497351490,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"08638259e35b5864ad37f6c5776113d794fa2ac2","permalink":"http://development.lvh.me:3000/billing/08638259e35b5864ad37f6c5776113d794fa2ac2","url":"http://development.lvh.me:3000/api/contacts/64"},{"id":57,"kind":"company","created_at":1497351007,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","permalink":"http://development.lvh.me:3000/billing/cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","url":"http://development.lvh.me:3000/api/contacts/57"},{"id":59,"kind":"company","created_at":1497351105,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"f8bae1172828d0fdef3ac4598592ac45dc0d722f","permalink":"http://development.lvh.me:3000/billing/f8bae1172828d0fdef3ac4598592ac45dc0d722f","url":"http://development.lvh.me:3000/api/contacts/59"},{"id":61,"kind":"company","created_at":1497351108,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"391ba9b21d0da56429e44a5e7fd9ad89706285e2","permalink":"http://development.lvh.me:3000/billing/391ba9b21d0da56429e44a5e7fd9ad89706285e2","url":"http://development.lvh.me:3000/api/contacts/61"},{"id":63,"kind":"company","created_at":1497351487,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"93744b7e3b633da80c37441a724f0f335dd59fec","permalink":"http://development.lvh.me:3000/billing/93744b7e3b633da80c37441a724f0f335dd59fec","url":"http://development.lvh.me:3000/api/contacts/63"},{"id":65,"kind":"company","created_at":1497351490,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"d29e9c5c9fa045456dd48bd4cf62d16c1f797268","permalink":"http://development.lvh.me:3000/billing/d29e9c5c9fa045456dd48bd4cf62d16c1f797268","url":"http://development.lvh.me:3000/api/contacts/65"}]' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 10:58:13 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/all_estimates.yml b/test/fixtures/quaderno_cassettes/all_estimates.yml deleted file mode 100644 index 9bde4ac..0000000 --- a/test/fixtures/quaderno_cassettes/all_estimates.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '11' - x-ratelimit-remaining: - - '89' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"b1aa095a3d37cb3a66bdf93f658ff2ee"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - ecf59722-faa8-4af1-a6b9-38c5c6887519 - x-runtime: - - '0.299503' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":175,"number":"0001","issue_date":"2017-06-09","created_at":1497013347,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":176,"description":"Something","quantity":"1.0","unit_price_cents":"2000.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"2000.0","discount_cents":"0.0","gross_amount":"2000.0"}],"subtotal_cents":"2000.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":420}],"total_cents":2420,"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","permalink":"http://development.lvh.me:3000/estimate/f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","url":"http://development.lvh.me:3000/api/estimates/175.json","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:43 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/all_expenses.yml b/test/fixtures/quaderno_cassettes/all_expenses.yml deleted file mode 100644 index c4668c0..0000000 --- a/test/fixtures/quaderno_cassettes/all_expenses.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '7' - x-ratelimit-remaining: - - '96' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"1096b389a8934c3608b59ed5c52ff5c1"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 1af456ab-b129-43e4-b149-73cb37deb0e9 - x-runtime: - - '3.273721' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":184,"blocked":false,"issue_date":"2017-06-12","created_at":1497266330,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":185,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[{"id":40,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/40.json"},{"id":41,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/41.json"},{"id":42,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/42.json"}],"notes":null,"state":"paid","tag_list":[],"url":"http://development.lvh.me:3000/api/expenses/184.json","custom_metadata":{}},{"id":137,"blocked":true,"issue_date":"2017-05-29","created_at":1496060112,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":138,"description":"asdasd","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[],"notes":null,"state":"paid","tag_list":["dundundugan","rap"],"url":"http://development.lvh.me:3000/api/expenses/137.json","custom_metadata":{}},{"id":135,"blocked":false,"issue_date":"2017-05-26","created_at":1495789529,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":136,"description":"Dreamhack - valencia","quantity":"1.0","unit_price_cents":"23000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"23000.0","discount_cents":"0.0","gross_amount_cents":"23000.0"}],"subtotal_cents":"23000.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":23000},"payments":[{"id":7,"date":"2017-05-31","payment_method":"credit_card","amount_cents":23000,"url":"http://development.lvh.me:3000/api/expenses/135/payments/7.json"}],"notes":null,"state":"paid","tag_list":["balls"],"url":"http://development.lvh.me:3000/api/expenses/135.json","custom_metadata":{}},{"id":134,"blocked":false,"issue_date":"2017-05-26","created_at":1495789490,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":135,"description":"Something","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount_cents":"1000.0"}],"subtotal_cents":"1000.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":1000},"payments":[{"id":4,"date":"2017-05-31","payment_method":"credit_card","amount_cents":1000,"url":"http://development.lvh.me:3000/api/expenses/134/payments/4.json"}],"notes":null,"state":"paid","tag_list":["rap","god"],"url":"http://development.lvh.me:3000/api/expenses/134.json","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:34 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/all_invoices.yml b/test/fixtures/quaderno_cassettes/all_invoices.yml deleted file mode 100644 index b51d43c..0000000 --- a/test/fixtures/quaderno_cassettes/all_invoices.yml +++ /dev/null @@ -1,56 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"47582ab138340fc16e49091c677bd6a5"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 82fe381a-3cae-4ff7-a618-f46e653233b4 - x-runtime: - - '4.063594' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":180,"blocked":false,"number":"0005","issue_date":"2017-06-09","created_at":1497013624,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":181,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[{"id":45,"date":"2017-06-12","payment_method":"cash","amount_cents":10000000000,"url":"http://development.lvh.me:3000/api/invoices/180/payments/45.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"8ba033c910a376319e4b383de66d6934abcfe6a4","permalink":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4","pdf":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4.pdf","url":"http://development.lvh.me:3000/api/invoices/180.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":167,"blocked":true,"number":"0004","issue_date":"2017-06-07","created_at":1496825417,"contact":{"id":43,"full_name":"Test_OCP"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":168,"description":"Something","quantity":"1.0","unit_price_cents":"1212.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"1212.0","discount_cents":"0.0","gross_amount_cents":"1212.0"}],"subtotal_cents":"1212.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":254}],"total_cents":1466,"payments":[{"id":36,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":1466,"url":"http://development.lvh.me:3000/api/invoices/167/payments/36.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"5ee4e6d22a4d8b6798a9df315395fe05a5efb80a","permalink":"http://development.lvh.me:3000/invoice/5ee4e6d22a4d8b6798a9df315395fe05a5efb80a","pdf":"http://development.lvh.me:3000/invoice/5ee4e6d22a4d8b6798a9df315395fe05a5efb80a.pdf","url":"http://development.lvh.me:3000/api/invoices/167.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":168,"blocked":false,"number":"0003","issue_date":"2017-06-07","created_at":1496825418,"contact":{"id":43,"full_name":"Test_OCP"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":169,"description":"Something","quantity":"1.0","unit_price_cents":"671.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"671.0","discount_cents":"0.0","gross_amount_cents":"671.0"}],"subtotal_cents":"671.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":141}],"total_cents":812,"payments":[],"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"e93f8543031ccee4aa6933b7418dbe8736ec4306","permalink":"http://development.lvh.me:3000/invoice/e93f8543031ccee4aa6933b7418dbe8736ec4306","pdf":"http://development.lvh.me:3000/invoice/e93f8543031ccee4aa6933b7418dbe8736ec4306.pdf","url":"http://development.lvh.me:3000/api/invoices/168.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":169,"blocked":false,"number":"0002","issue_date":"2017-06-07","created_at":1496825419,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":170,"description":"Something","quantity":"1.0","unit_price_cents":"2008.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"2008.0","discount_cents":"0.0","gross_amount_cents":"2008.0"}],"subtotal_cents":"2008.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":422}],"total_cents":2430,"payments":[{"id":38,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":2430,"url":"http://development.lvh.me:3000/api/invoices/169/payments/38.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"45652c45cc01d96ac603b0484e4e00754ba091c8","permalink":"http://development.lvh.me:3000/invoice/45652c45cc01d96ac603b0484e4e00754ba091c8","pdf":"http://development.lvh.me:3000/invoice/45652c45cc01d96ac603b0484e4e00754ba091c8.pdf","url":"http://development.lvh.me:3000/api/invoices/169.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":170,"blocked":false,"number":"0001","issue_date":"2017-06-07","created_at":1496825420,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":171,"description":"Something","quantity":"1.0","unit_price_cents":"1340.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"1340.0","discount_cents":"0.0","gross_amount_cents":"1340.0"}],"subtotal_cents":"1340.0","discount_cents":"0.0","taxes":[],"total_cents":1340,"payments":[{"id":39,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":1340,"url":"http://development.lvh.me:3000/api/invoices/170/payments/39.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"696d7d7e402f544a839e84f3328801547f6c7c12","permalink":"http://development.lvh.me:3000/invoice/696d7d7e402f544a839e84f3328801547f6c7c12","pdf":"http://development.lvh.me:3000/invoice/696d7d7e402f544a839e84f3328801547f6c7c12.pdf","url":"http://development.lvh.me:3000/api/invoices/170.json","processor":"stripe","processor_id":"ch_1234","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:48 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/all_items.yml b/test/fixtures/quaderno_cassettes/all_items.yml deleted file mode 100644 index 31530ad..0000000 --- a/test/fixtures/quaderno_cassettes/all_items.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '8' - x-ratelimit-remaining: - - '94' - content-type: - - application/json; charset=utf-8 - etag: - - '"a6d2a32ceeb05fdd7e0c640a2bd32a49"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - dbf86c8c-3405-4474-ae51-d9bc813b1659 - x-runtime: - - '1.009755' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":1,"code":"12345","name":"6","unit_cost":"10.0","stock":null,"tax_class":"standard","url":"http://development.lvh.me:3000/api/items/1"},{"id":3,"code":"1497267937","name":"Test_Skynet","unit_cost":"21.0","stock":null,"tax_class":"eservice","url":"http://development.lvh.me:3000/api/items/3"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:40 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/all_receipts.yml b/test/fixtures/quaderno_cassettes/all_receipts.yml deleted file mode 100644 index 7990932..0000000 --- a/test/fixtures/quaderno_cassettes/all_receipts.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '4' - x-ratelimit-remaining: - - '92' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"2fbe5b66d01a5d67afd7be37b64c395a"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 6e153524-3400-4e16-be33-08765cf43286 - x-runtime: - - '1.878753' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":200,"blocked":false,"number":"0002","issue_date":"2017-06-12","created_at":1497268132,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":201,"description":"Hey, - Liste!","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount_cents":"1000.0"}],"subtotal_cents":"1000.0","discount_cents":"0.0","taxes":[],"payments":[{"id":50,"date":"2017-06-12","payment_method":"other","amount_cents":1000}],"notes":null,"state":"paid","tag_list":[],"secure_id":"64649b40d7fc4bcc0b1a0493b87fa030789235d4","permalink":"http://development.lvh.me:3000/receipt/64649b40d7fc4bcc0b1a0493b87fa030789235d4","pdf":"http://development.lvh.me:3000/receipt/64649b40d7fc4bcc0b1a0493b87fa030789235d4.pdf","url":"http://development.lvh.me:3000/api/receipts/200.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":199,"blocked":false,"number":"0001","issue_date":"2017-06-12","created_at":1497267995,"contact":{"id":50,"full_name":"Test - customer"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":200,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"payments":[{"id":49,"date":"2017-06-12","payment_method":"cash","amount_cents":0}],"notes":null,"state":"paid","tag_list":[],"secure_id":"f62c1beb598394e6072fa18af8a3eed0ba05833b","permalink":"http://development.lvh.me:3000/receipt/f62c1beb598394e6072fa18af8a3eed0ba05833b","pdf":"http://development.lvh.me:3000/receipt/f62c1beb598394e6072fa18af8a3eed0ba05833b.pdf","url":"http://development.lvh.me:3000/api/receipts/199.json","processor":null,"processor_id":null,"custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:38 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/all_webhooks.yml b/test/fixtures/quaderno_cassettes/all_webhooks.yml deleted file mode 100644 index 5ec6682..0000000 --- a/test/fixtures/quaderno_cassettes/all_webhooks.yml +++ /dev/null @@ -1,214 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json - body: - encoding: UTF-8 - string: '{"url":"http://google.com","events_types":["invoice.created","invoice.updated"]}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '14' - x-ratelimit-remaining: - - '98' - content-type: - - application/json; charset=utf-8 - etag: - - '"4da7abb71bbd56b1a1a92b5cf3b53926"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 74e7c500-bc67-47bd-be2f-2732587a3da2 - x-runtime: - - '1.287195' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":6,"url":"http://google.com","auth_key":"ETE71RWTFL_cCSsRjvoM1g","events_types":["invoice.created","invoice.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:25.772Z","updated_at":"2017-06-12T11:54:25.772Z"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:26 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json - body: - encoding: UTF-8 - string: '{"url":"http://quadernoapp.com","events_types":["expense.created","expense.updated","contact.deleted"]}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '12' - x-ratelimit-remaining: - - '97' - content-type: - - application/json; charset=utf-8 - etag: - - '"3435ae635f7c840f5a48ebd3d54744af"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 080eed37-cef1-4eab-b4cb-a77e2f575d68 - x-runtime: - - '1.873604' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":7,"url":"http://quadernoapp.com","auth_key":"_z8eyeOmCcKYyxuf8KIS-A","events_types":["expense.created","expense.updated","contact.deleted"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:27.722Z","updated_at":"2017-06-12T11:54:27.722Z"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:27 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '96' - content-type: - - application/json; charset=utf-8 - etag: - - '"2aca0c5cf770d27fd29b6d93a5be476c"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 21f3b3e7-d4e5-430b-98a0-6e0a179ed467 - x-runtime: - - '0.972532' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":1,"url":"http://quadernoapp.com","auth_key":"Ze024XpO9CJ6Fy2frwWV4Q","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:53:54.000Z","updated_at":"2017-06-12T11:53:54.000Z"},{"id":6,"url":"http://google.com","auth_key":"ETE71RWTFL_cCSsRjvoM1g","events_types":["invoice.created","invoice.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:25.000Z","updated_at":"2017-06-12T11:54:25.000Z"},{"id":7,"url":"http://quadernoapp.com","auth_key":"_z8eyeOmCcKYyxuf8KIS-A","events_types":["expense.created","expense.updated","contact.deleted"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:27.000Z","updated_at":"2017-06-12T11:54:27.000Z"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:28 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/6.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '8' - x-ratelimit-remaining: - - '95' - cache-control: - - no-cache - x-request-id: - - bef9a96d-295f-4c3a-a9df-7ef83573b8bd - x-runtime: - - '2.112362' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:31 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/7.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '8' - x-ratelimit-remaining: - - '94' - cache-control: - - no-cache - x-request-id: - - 4ff5b60a-edf1-41ca-abef-efaf40eed570 - x-runtime: - - '0.919043' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:32 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/create_estimate_on_downgraded_API.yml b/test/fixtures/quaderno_cassettes/create_estimate_on_downgraded_API.yml deleted file mode 100644 index 147fd91..0000000 --- a/test/fixtures/quaderno_cassettes/create_estimate_on_downgraded_API.yml +++ /dev/null @@ -1,156 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json; api_version=20160602 - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '88' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - c96792d5-f611-46f0-881b-6aa1412fb4da - x-runtime: - - '0.249594' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:43 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates.json - body: - encoding: UTF-8 - string: '{"contact_id":44,"number":"test number 42","contact_name":"Albus Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}' - headers: - accept: - - application/json; api_version=20160602 - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '87' - content-type: - - application/json; charset=utf-8 - etag: - - '"dee9b5abe22ac47bad10957cf46848ed"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - bed99657-9533-438a-aa09-a873fb5f5f93 - x-runtime: - - '0.522703' - connection: - - close - server: - - thin - body: - encoding: ASCII-8BIT - string: !binary |- - eyJpZCI6MTc4LCJudW1iZXIiOiJ0ZXN0IG51bWJlciA0MiIsImlzc3VlX2Rh - dGUiOiIyMDE3LTA2LTA5IiwiY3JlYXRlZF9hdCI6MTQ5NzAxMzM2MywiY29u - dGFjdCI6eyJpZCI6NDQs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ri, 09 Jun 2017 13:02:44 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates/178.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json; api_version=20160602 - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '86' - cache-control: - - no-cache - x-request-id: - - 2a59e8b4-e8b4-4c15-889a-895d9c4c3a3a - x-runtime: - - '0.297087' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:44 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/create_expense_on_downgraded_API.yml b/test/fixtures/quaderno_cassettes/create_expense_on_downgraded_API.yml deleted file mode 100644 index 5c3c864..0000000 --- a/test/fixtures/quaderno_cassettes/create_expense_on_downgraded_API.yml +++ /dev/null @@ -1,278 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json; api_version=20160602 - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '3' - x-ratelimit-remaining: - - '95' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"0bcb5a8e26e047fdc3f287990448c95e"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 332be3c9-d0cf-4944-aeae-6dab2402ed90 - x-runtime: - - '3.612408' - connection: - - close - server: - - thin - body: - encoding: ASCII-8BIT - string: !binary |- - W3si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hbW91 - bnQiOiLigqwxMC4wMCJ9XSwic3VidG90YWwiOiLigqwxMC4wMCIsImRpc2Nv - dW50Ijoi4oKsMC4wMCIsInRheGVzIjpbXSwidG90YWwiOiLigqwxMC4wMCIs - InBheW1lbnRzIjpbeyJpZCI6NCwiZGF0ZSI6IjIwMTctMDUtMzEiLCJwYXlt - ZW50X21ldGhvZCI6ImNyZWRpdF9jYXJkIiwiYW1vdW50Ijoi4oKsMTAuMDAi - LCJ1cmwiOiJodHRwOi8vZGV2ZWxvcG1lbnQubHZoLm1lOjMwMDAvYXBpL2V4 - cGVuc2VzLzEzNC9wYXltZW50cy80Lmpzb24ifV0sIm5vdGVzIjpudWxsLCJz - dGF0ZSI6InBhaWQiLCJ0YWdfbGlzdCI6WyJyYXAiLCJnb2QiXSwidXJsIjoi - aHR0cDovL2RldmVsb3BtZW50Lmx2aC5tZTozMDAwL2FwaS9leHBlbnNlcy8x - MzQuanNvbiJ9XQ== - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:37 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json; api_version=20160602 - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 421fedec-3c47-4264-80e1-b5feaa8ce7de - x-runtime: - - '1.096637' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:38 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses.json - body: - encoding: UTF-8 - string: '{"contact_id":44,"contact_name":"Albus Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}' - headers: - accept: - - application/json; api_version=20160602 - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - content-type: - - application/json; charset=utf-8 - etag: - - '"d3489d01a1af59d72c5bb5d04f7927e0"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 70b52e17-d495-4d85-90e9-cb8e1129f3c2 - x-runtime: - - '3.987477' - connection: - - close - server: - - thin - body: - encoding: ASCII-8BIT - string: !binary |- - eyJpZCI6MTkwLCJpc3N1ZV9kYXRlIjoiMjAxNy0wNi0xMiIsImNyZWF0ZWRf - YXQiOjE0OTcyNjc1MjAsImNvbnRhY3QiOnsiaWQiOjQ0LCJmdWxsX25hbWUi - OiJBbGJ1cyBEdW1ibGVkb2dlIn0sInN0cmVldF9saW5lXzEiOm51bGwsInN0 - cmVldF9saW5lXzIiOm51bGwsImNpdHkiOm51bGwsInJlZ2lvbiI6bnVsbCwi - cG9zdGFsX2NvZGUiOm51bGwsInBvX251bWJlciI6bnVsbCwiY3VycmVuY3ki - OiJFVVIiLCJpdGVtcyI6W3siaWQiOjE5MSwiZGVzY3JpcHRpb24iOiJBaXJj - cmFmdCIsInF1YW50aXR5IjoiMS4wIiwidW5pdF9wcmljZSI6IjAuMCIsImRp - c2NvdW50X3JhdGUiOiIwLjAiLCJ0YXhfMV9uYW1lIjpudWxsLCJ0YXhfMV9y - YXRlIjpudWxsLCJ0YXhfMl9uYW1lIjpudWxsLCJ0YXhfMl9yYXRlIjpudWxs - LCJyZWZlcmVuY2UiOm51bGwsInN1YnRvdGFsIjoi4oKsMC4wMCIsImRpc2Nv - dW50Ijoi4oKsMC4wMCIsImdyb3NzX2Ftb3VudCI6IuKCrDAuMDAifV0sInN1 - YnRvdGFsIjoi4oKsMC4wMCIsImRpc2NvdW50Ijoi4oKsMC4wMCIsInRheGVz - IjpbXSwidG90YWwiOiLigqwwLjAwIiwicGF5bWVudHMiOltdLCJub3RlcyI6 - bnVsbCwic3RhdGUiOiJvdXRzdGFuZGluZyIsInRhZ19saXN0IjpbXSwidXJs - IjoiaHR0cDovL2RldmVsb3BtZW50Lmx2aC5tZTozMDAwL2FwaS9leHBlbnNl - cy8xOTAuanNvbiJ9 - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:43 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses/190.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json; api_version=20160602 - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '98' - cache-control: - - no-cache - x-request-id: - - 3da69e9d-f360-4cea-bf45-80d0f6628bad - x-runtime: - - '2.237649' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:45 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/create_invoice_on_downgraded_API.yml b/test/fixtures/quaderno_cassettes/create_invoice_on_downgraded_API.yml deleted file mode 100644 index 0f16390..0000000 --- a/test/fixtures/quaderno_cassettes/create_invoice_on_downgraded_API.yml +++ /dev/null @@ -1,159 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json; api_version=20160602 - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '98' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 32c4c07d-6222-471a-990e-bf332bf5f252 - x-runtime: - - '1.210230' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:49 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices.json - body: - encoding: UTF-8 - string: '{"contact_id":44,"contact_name":"Albus Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}' - headers: - accept: - - application/json; api_version=20160602 - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '9' - x-ratelimit-remaining: - - '97' - content-type: - - application/json; charset=utf-8 - etag: - - '"257dfe1ffb849ba20bc804912b98a192"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 6e19f9c0-72a6-4891-82b6-c60743721f77 - x-runtime: - - '6.047995' - connection: - - close - server: - - thin - body: - encoding: ASCII-8BIT - string: !binary |- - eyJpZCI6MTk1LCJudW1iZXIiOiIwMDA2IiwiaXNzdWVfZGF0ZSI6IjIwMTct - MDYtMTIiLCJjcmVhdGVkX2F0IjoxNDk3MjY3ODkxLCJjb250YWN0Ijp7Imlk - Ijo0NCwiZnVsbF9uYW1lIjoiQWxidXMgRHVtYmxlZG9nZSJ9LCJzdHJlZXRf - bGluZV8xIjpudWxsLCJzdHJlZXRfbGluZV8yIjpudWxsLCJjaXR5IjpudWxs - LCJyZWdpb24iOm51bGwsInBvc3RhbF9jb2RlIjpudWxsLCJwb19udW1iZXIi - Om51bGwsImR1ZV9kYXRlIjpudWxsLCJjdXJyZW5jeSI6IkVVUiIsIml0ZW1z - IjpbeyJpZCI6MTk2LCJkZXNjcmlwdGlvbiI6IkFpcmNyYWZ0IiwicXVhbnRp - dHkiOiIxLjAiLCJ1bml0X3ByaWNlIjoiMC4wIiwiZGlzY291bnRfcmF0ZSI6 - IjAuMCIsInRheF8xX25hbWUiOm51bGwsInRheF8xX3JhdGUiOm51bGwsInRh - eF8yX25hbWUiOm51bGwsInRheF8yX3JhdGUiOm51bGwsInJlZmVyZW5jZSI6 - bnVsbCwic3VidG90YWwiOiLigqwwLjAwIiwiZGlzY291bnQiOiLigqwwLjAw - IiwiZ3Jvc3NfYW1vdW50Ijoi4oKsMC4wMCJ9XSwic3VidG90YWwiOiLigqww - LjAwIiwiZGlzY291bnQiOiLigqwwLjAwIiwidGF4ZXMiOltdLCJ0b3RhbCI6 - IuKCrDAuMDAiLCJwYXltZW50cyI6W10sInBheW1lbnRfZGV0YWlscyI6bnVs - bCwibm90ZXMiOm51bGwsInN0YXRlIjoib3V0c3RhbmRpbmciLCJ0YWdfbGlz - dCI6W10sInNlY3VyZV9pZCI6IjM1ODQzNzZhNzg4OTRkYzBkZjI2MzZhMzI4 - ZDA0ZDNiMmU1MDcxZmUiLCJwZXJtYWxpbmsiOiJodHRwOi8vZGV2ZWxvcG1l - bnQubHZoLm1lOjMwMDAvaW52b2ljZS8zNTg0Mzc2YTc4ODk0ZGMwZGYyNjM2 - YTMyOGQwNGQzYjJlNTA3MWZlIiwicGRmIjoiaHR0cDovL2RldmVsb3BtZW50 - Lmx2aC5tZTozMDAwL2ludm9pY2UvMzU4NDM3NmE3ODg5NGRjMGRmMjYzNmEz - MjhkMDRkM2IyZTUwNzFmZS5wZGYiLCJ1cmwiOiJodHRwOi8vZGV2ZWxvcG1l - bnQubHZoLm1lOjMwMDAvYXBpL2ludm9pY2VzLzE5NS5qc29uIiwicHJvY2Vz - c29yIjpudWxsLCJwcm9jZXNzb3JfaWQiOm51bGx9 - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:55 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices/195.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json; api_version=20160602 - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '2' - x-ratelimit-remaining: - - '96' - cache-control: - - no-cache - x-request-id: - - 92099e25-7b01-411e-b810-8a8376eb19df - x-runtime: - - '2.429109' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:58 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/create_receipt_on_downgraded_API.yml b/test/fixtures/quaderno_cassettes/create_receipt_on_downgraded_API.yml deleted file mode 100644 index 1673f8d..0000000 --- a/test/fixtures/quaderno_cassettes/create_receipt_on_downgraded_API.yml +++ /dev/null @@ -1,196 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json - body: - encoding: UTF-8 - string: '{"first_name":"Test customer"}' - headers: - accept: - - application/json; api_version=20160602 - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '1' - x-ratelimit-remaining: - - '91' - content-type: - - application/json; charset=utf-8 - etag: - - '"f710d0238ce57e50b83b3da2b7ecfe0d"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 3170e289-db15-444c-a66a-c4f2a710b344 - x-runtime: - - '1.638696' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":53,"kind":"company","created_at":1497268179,"full_name":"Test - customer","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"658db8fdb0ae926ce37a239aab1619bf5f8fc4f4","permalink":"http://development.lvh.me:3000/billing/658db8fdb0ae926ce37a239aab1619bf5f8fc4f4","url":"http://development.lvh.me:3000/api/contacts/53"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:40 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts.json - body: - encoding: UTF-8 - string: '{"contact_id":53,"currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_method":"cash","notes":""}' - headers: - accept: - - application/json; api_version=20160602 - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '0' - x-ratelimit-remaining: - - '90' - content-type: - - application/json; charset=utf-8 - etag: - - '"f7bfc685efa964fc8fad6e84b042358c"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 923be158-1857-4184-8631-54001e3d8835 - x-runtime: - - '4.633702' - connection: - - close - server: - - thin - body: - encoding: ASCII-8BIT - string: !binary |- - eyJpZCI6MjAzLCJudW1iZXIiOiIwMDAzIiwiaXNzdWVfZGF0ZSI6IjIwMTct - MDYtMTIiLCJjcmVhdGVkX2F0IjoxNDk3MjY4MTgxLCJjb250YWN0Ijp7Imlk - Ijo1MywiZnVsbF9uYW1lIjoiVGVzdCBjdXN0b21lciJ9LCJzdHJlZXRfbGlu - ZV8xIjpudWxsLCJzdHJlZXRfbGluZV8yIjpudWxsLCJjaXR5IjpudWxsLCJy - ZWdpb24iOm51bGwsInBvc3RhbF9jb2RlIjpudWxsLCJwb19udW1iZXIiOm51 - b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zLmpzb24iLCJwcm9jZXNzb3IiOm51bGwsInByb2Nlc3Nvcl9p - ZCI6bnVsbH0= - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:45 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts/203.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json; api_version=20160602 - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - cache-control: - - no-cache - x-request-id: - - 804eb5ef-a74e-4e8c-85db-5955b07357d5 - x-runtime: - - '2.946196' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:48 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts/53.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json; api_version=20160602 - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - cache-control: - - no-cache - x-request-id: - - f85ce166-ddd4-4254-bd61-a877fefd13b9 - x-runtime: - - '1.077894' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:49 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/deleted_contact.yml b/test/fixtures/quaderno_cassettes/deleted_contact.yml deleted file mode 100644 index 947c0f3..0000000 --- a/test/fixtures/quaderno_cassettes/deleted_contact.yml +++ /dev/null @@ -1,187 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json - body: - encoding: UTF-8 - string: '{"kind":"company","first_name":"Z, Mazinger Z","email":"koji@kabuto.ftw"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - content-type: - - application/json; charset=utf-8 - etag: - - '"f91d98eb306ceab26e10411da065a848"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 68925492-4e9d-45de-9c9d-7597a558bc31 - x-runtime: - - '0.353759' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":48,"kind":"company","created_at":1497013255,"full_name":"Z, Mazinger - Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"fc1348ad62a1a70cd3a4e0316a20a2cfc69ea32b","permalink":"http://development.lvh.me:3000/billing/fc1348ad62a1a70cd3a4e0316a20a2cfc69ea32b","url":"http://development.lvh.me:3000/api/contacts/48"}' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:00:55 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '14' - x-ratelimit-remaining: - - '98' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"c9eb5006ee31c15bc32f3281041f65f5"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 58010a60-be63-4e25-a609-e255cb485064 - x-runtime: - - '0.377157' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"},{"id":48,"kind":"company","created_at":1497013255,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"fc1348ad62a1a70cd3a4e0316a20a2cfc69ea32b","permalink":"http://development.lvh.me:3000/billing/fc1348ad62a1a70cd3a4e0316a20a2cfc69ea32b","url":"http://development.lvh.me:3000/api/contacts/48"}]' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:00:56 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts/48.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '14' - x-ratelimit-remaining: - - '97' - cache-control: - - no-cache - x-request-id: - - 7fba948f-6c17-4b8c-b4f0-e39060029740 - x-runtime: - - '0.214950' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:00:56 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '13' - x-ratelimit-remaining: - - '96' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 5d903d58-2498-49ac-bf25-20cb941cd34f - x-runtime: - - '0.250481' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:00:56 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/deleted_contact_by_access_token.yml b/test/fixtures/quaderno_cassettes/deleted_contact_by_access_token.yml deleted file mode 100644 index 29f35b1..0000000 --- a/test/fixtures/quaderno_cassettes/deleted_contact_by_access_token.yml +++ /dev/null @@ -1,199 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://development.lvh.me:3000/api/contacts.json - body: - encoding: UTF-8 - string: '{"kind":"company","first_name":"Z, Mazinger Z","email":"koji@kabuto.ftw"}' - headers: - accept: - - application/json - authorization: - - Bearer 36b82411e6686581fe3d7d10fbe931a3fdc9265a353832f0e3ff6269bd319e12 - content-type: - - application/json - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - content-type: - - application/json; charset=utf-8 - etag: - - '"0487358c1642ab9eb6290e039b0509a6"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 38ed9e05-ea87-45c6-9f35-0c7fcc9f6131 - x-runtime: - - '0.325626' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":68,"kind":"company","created_at":1497351605,"full_name":"Z, Mazinger - Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"efd3bc7bd1d8b19334ac5396478a4e22d6a20c66","permalink":"http://development.lvh.me:3000/billing/efd3bc7bd1d8b19334ac5396478a4e22d6a20c66","url":"http://development.lvh.me:3000/api/contacts/68"}' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 11:00:05 GMT -- request: - method: get - uri: http://development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Bearer 36b82411e6686581fe3d7d10fbe931a3fdc9265a353832f0e3ff6269bd319e12 - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"d54d91f4990a7664ea7846e8457b23c0"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - ce7cba56-6f4d-4f50-8575-8ce861136a10 - x-runtime: - - '0.275728' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":50,"kind":"company","created_at":1497267993,"full_name":"Test_OCP","contact_name":null,"street_line_1":"asdasdas","street_line_2":"3rwerds","postal_code":"08080","city":"Sdasdasd","region":"sadasdasd","country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"ES78488057M","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"757312a30b02810e495ae18c312a50a1e4f4b713","permalink":"http://development.lvh.me:3000/billing/757312a30b02810e495ae18c312a50a1e4f4b713","url":"http://development.lvh.me:3000/api/contacts/50"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"},{"id":55,"kind":"company","created_at":1497269711,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","permalink":"http://development.lvh.me:3000/billing/42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","url":"http://development.lvh.me:3000/api/contacts/55"},{"id":56,"kind":"company","created_at":1497351006,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0685fa00c66ec752aacd5f3e1f81365831cd3d65","permalink":"http://development.lvh.me:3000/billing/0685fa00c66ec752aacd5f3e1f81365831cd3d65","url":"http://development.lvh.me:3000/api/contacts/56"},{"id":58,"kind":"company","created_at":1497351105,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8bebc09443c4f72ef4059058607c50447b2f3c16","permalink":"http://development.lvh.me:3000/billing/8bebc09443c4f72ef4059058607c50447b2f3c16","url":"http://development.lvh.me:3000/api/contacts/58"},{"id":60,"kind":"company","created_at":1497351108,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"45d4cccba293ef0da33c07a991c6081ec4179948","permalink":"http://development.lvh.me:3000/billing/45d4cccba293ef0da33c07a991c6081ec4179948","url":"http://development.lvh.me:3000/api/contacts/60"},{"id":62,"kind":"company","created_at":1497351487,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","permalink":"http://development.lvh.me:3000/billing/8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","url":"http://development.lvh.me:3000/api/contacts/62"},{"id":64,"kind":"company","created_at":1497351490,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"08638259e35b5864ad37f6c5776113d794fa2ac2","permalink":"http://development.lvh.me:3000/billing/08638259e35b5864ad37f6c5776113d794fa2ac2","url":"http://development.lvh.me:3000/api/contacts/64"},{"id":57,"kind":"company","created_at":1497351007,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","permalink":"http://development.lvh.me:3000/billing/cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","url":"http://development.lvh.me:3000/api/contacts/57"},{"id":59,"kind":"company","created_at":1497351105,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"f8bae1172828d0fdef3ac4598592ac45dc0d722f","permalink":"http://development.lvh.me:3000/billing/f8bae1172828d0fdef3ac4598592ac45dc0d722f","url":"http://development.lvh.me:3000/api/contacts/59"},{"id":61,"kind":"company","created_at":1497351108,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"391ba9b21d0da56429e44a5e7fd9ad89706285e2","permalink":"http://development.lvh.me:3000/billing/391ba9b21d0da56429e44a5e7fd9ad89706285e2","url":"http://development.lvh.me:3000/api/contacts/61"},{"id":63,"kind":"company","created_at":1497351487,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"93744b7e3b633da80c37441a724f0f335dd59fec","permalink":"http://development.lvh.me:3000/billing/93744b7e3b633da80c37441a724f0f335dd59fec","url":"http://development.lvh.me:3000/api/contacts/63"},{"id":65,"kind":"company","created_at":1497351490,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"d29e9c5c9fa045456dd48bd4cf62d16c1f797268","permalink":"http://development.lvh.me:3000/billing/d29e9c5c9fa045456dd48bd4cf62d16c1f797268","url":"http://development.lvh.me:3000/api/contacts/65"},{"id":67,"kind":"company","created_at":1497351539,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"f23f6fa2eba18d28864e92b49e4b0f3bcd3ec912","permalink":"http://development.lvh.me:3000/billing/f23f6fa2eba18d28864e92b49e4b0f3bcd3ec912","url":"http://development.lvh.me:3000/api/contacts/67"},{"id":68,"kind":"company","created_at":1497351605,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"efd3bc7bd1d8b19334ac5396478a4e22d6a20c66","permalink":"http://development.lvh.me:3000/billing/efd3bc7bd1d8b19334ac5396478a4e22d6a20c66","url":"http://development.lvh.me:3000/api/contacts/68"}]' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 11:00:05 GMT -- request: - method: delete - uri: http://development.lvh.me:3000/api/contacts/68.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Bearer 36b82411e6686581fe3d7d10fbe931a3fdc9265a353832f0e3ff6269bd319e12 - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '14' - x-ratelimit-remaining: - - '98' - cache-control: - - no-cache - x-request-id: - - e71d97b5-2121-4930-aee3-6a1b6bdced5d - x-runtime: - - '0.213828' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 11:00:05 GMT -- request: - method: get - uri: http://development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Bearer 36b82411e6686581fe3d7d10fbe931a3fdc9265a353832f0e3ff6269bd319e12 - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '14' - x-ratelimit-remaining: - - '97' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"3731bba773bbf693069d6380f5811c8f"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 928d7200-b9bf-475a-ac5b-7e59b1aa3569 - x-runtime: - - '0.969898' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":50,"kind":"company","created_at":1497267993,"full_name":"Test_OCP","contact_name":null,"street_line_1":"asdasdas","street_line_2":"3rwerds","postal_code":"08080","city":"Sdasdasd","region":"sadasdasd","country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"ES78488057M","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"757312a30b02810e495ae18c312a50a1e4f4b713","permalink":"http://development.lvh.me:3000/billing/757312a30b02810e495ae18c312a50a1e4f4b713","url":"http://development.lvh.me:3000/api/contacts/50"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"},{"id":55,"kind":"company","created_at":1497269711,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","permalink":"http://development.lvh.me:3000/billing/42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","url":"http://development.lvh.me:3000/api/contacts/55"},{"id":56,"kind":"company","created_at":1497351006,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0685fa00c66ec752aacd5f3e1f81365831cd3d65","permalink":"http://development.lvh.me:3000/billing/0685fa00c66ec752aacd5f3e1f81365831cd3d65","url":"http://development.lvh.me:3000/api/contacts/56"},{"id":58,"kind":"company","created_at":1497351105,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8bebc09443c4f72ef4059058607c50447b2f3c16","permalink":"http://development.lvh.me:3000/billing/8bebc09443c4f72ef4059058607c50447b2f3c16","url":"http://development.lvh.me:3000/api/contacts/58"},{"id":60,"kind":"company","created_at":1497351108,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"45d4cccba293ef0da33c07a991c6081ec4179948","permalink":"http://development.lvh.me:3000/billing/45d4cccba293ef0da33c07a991c6081ec4179948","url":"http://development.lvh.me:3000/api/contacts/60"},{"id":62,"kind":"company","created_at":1497351487,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","permalink":"http://development.lvh.me:3000/billing/8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","url":"http://development.lvh.me:3000/api/contacts/62"},{"id":64,"kind":"company","created_at":1497351490,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"08638259e35b5864ad37f6c5776113d794fa2ac2","permalink":"http://development.lvh.me:3000/billing/08638259e35b5864ad37f6c5776113d794fa2ac2","url":"http://development.lvh.me:3000/api/contacts/64"},{"id":57,"kind":"company","created_at":1497351007,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","permalink":"http://development.lvh.me:3000/billing/cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","url":"http://development.lvh.me:3000/api/contacts/57"},{"id":59,"kind":"company","created_at":1497351105,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"f8bae1172828d0fdef3ac4598592ac45dc0d722f","permalink":"http://development.lvh.me:3000/billing/f8bae1172828d0fdef3ac4598592ac45dc0d722f","url":"http://development.lvh.me:3000/api/contacts/59"},{"id":61,"kind":"company","created_at":1497351108,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"391ba9b21d0da56429e44a5e7fd9ad89706285e2","permalink":"http://development.lvh.me:3000/billing/391ba9b21d0da56429e44a5e7fd9ad89706285e2","url":"http://development.lvh.me:3000/api/contacts/61"},{"id":63,"kind":"company","created_at":1497351487,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"93744b7e3b633da80c37441a724f0f335dd59fec","permalink":"http://development.lvh.me:3000/billing/93744b7e3b633da80c37441a724f0f335dd59fec","url":"http://development.lvh.me:3000/api/contacts/63"},{"id":65,"kind":"company","created_at":1497351490,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"d29e9c5c9fa045456dd48bd4cf62d16c1f797268","permalink":"http://development.lvh.me:3000/billing/d29e9c5c9fa045456dd48bd4cf62d16c1f797268","url":"http://development.lvh.me:3000/api/contacts/65"},{"id":67,"kind":"company","created_at":1497351539,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"f23f6fa2eba18d28864e92b49e4b0f3bcd3ec912","permalink":"http://development.lvh.me:3000/billing/f23f6fa2eba18d28864e92b49e4b0f3bcd3ec912","url":"http://development.lvh.me:3000/api/contacts/67"}]' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 11:00:06 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/deleted_contact_by_authentication_token.yml b/test/fixtures/quaderno_cassettes/deleted_contact_by_authentication_token.yml deleted file mode 100644 index 2249679..0000000 --- a/test/fixtures/quaderno_cassettes/deleted_contact_by_authentication_token.yml +++ /dev/null @@ -1,199 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json - body: - encoding: UTF-8 - string: '{"kind":"company","first_name":"Z, Mazinger Z","email":"koji@kabuto.ftw"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '13' - x-ratelimit-remaining: - - '96' - content-type: - - application/json; charset=utf-8 - etag: - - '"50dcbb92c5946cf7c0ab6477608e1e15"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 577615d1-c9cc-40ff-a1a3-bcbca9f25119 - x-runtime: - - '0.287683' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":69,"kind":"company","created_at":1497351607,"full_name":"Z, Mazinger - Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"47affa993a2bc4ad5040ccb8a57cc20808776818","permalink":"http://development.lvh.me:3000/billing/47affa993a2bc4ad5040ccb8a57cc20808776818","url":"http://development.lvh.me:3000/api/contacts/69"}' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 11:00:07 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '13' - x-ratelimit-remaining: - - '95' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"e0b24269aa79d8ccb1b457ea94da6a29"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - c7a573b0-ed64-4323-9813-29680df96a77 - x-runtime: - - '0.264104' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":50,"kind":"company","created_at":1497267993,"full_name":"Test_OCP","contact_name":null,"street_line_1":"asdasdas","street_line_2":"3rwerds","postal_code":"08080","city":"Sdasdasd","region":"sadasdasd","country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"ES78488057M","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"757312a30b02810e495ae18c312a50a1e4f4b713","permalink":"http://development.lvh.me:3000/billing/757312a30b02810e495ae18c312a50a1e4f4b713","url":"http://development.lvh.me:3000/api/contacts/50"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"},{"id":55,"kind":"company","created_at":1497269711,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","permalink":"http://development.lvh.me:3000/billing/42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","url":"http://development.lvh.me:3000/api/contacts/55"},{"id":56,"kind":"company","created_at":1497351006,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0685fa00c66ec752aacd5f3e1f81365831cd3d65","permalink":"http://development.lvh.me:3000/billing/0685fa00c66ec752aacd5f3e1f81365831cd3d65","url":"http://development.lvh.me:3000/api/contacts/56"},{"id":58,"kind":"company","created_at":1497351105,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8bebc09443c4f72ef4059058607c50447b2f3c16","permalink":"http://development.lvh.me:3000/billing/8bebc09443c4f72ef4059058607c50447b2f3c16","url":"http://development.lvh.me:3000/api/contacts/58"},{"id":60,"kind":"company","created_at":1497351108,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"45d4cccba293ef0da33c07a991c6081ec4179948","permalink":"http://development.lvh.me:3000/billing/45d4cccba293ef0da33c07a991c6081ec4179948","url":"http://development.lvh.me:3000/api/contacts/60"},{"id":62,"kind":"company","created_at":1497351487,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","permalink":"http://development.lvh.me:3000/billing/8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","url":"http://development.lvh.me:3000/api/contacts/62"},{"id":64,"kind":"company","created_at":1497351490,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"08638259e35b5864ad37f6c5776113d794fa2ac2","permalink":"http://development.lvh.me:3000/billing/08638259e35b5864ad37f6c5776113d794fa2ac2","url":"http://development.lvh.me:3000/api/contacts/64"},{"id":57,"kind":"company","created_at":1497351007,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","permalink":"http://development.lvh.me:3000/billing/cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","url":"http://development.lvh.me:3000/api/contacts/57"},{"id":59,"kind":"company","created_at":1497351105,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"f8bae1172828d0fdef3ac4598592ac45dc0d722f","permalink":"http://development.lvh.me:3000/billing/f8bae1172828d0fdef3ac4598592ac45dc0d722f","url":"http://development.lvh.me:3000/api/contacts/59"},{"id":61,"kind":"company","created_at":1497351108,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"391ba9b21d0da56429e44a5e7fd9ad89706285e2","permalink":"http://development.lvh.me:3000/billing/391ba9b21d0da56429e44a5e7fd9ad89706285e2","url":"http://development.lvh.me:3000/api/contacts/61"},{"id":63,"kind":"company","created_at":1497351487,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"93744b7e3b633da80c37441a724f0f335dd59fec","permalink":"http://development.lvh.me:3000/billing/93744b7e3b633da80c37441a724f0f335dd59fec","url":"http://development.lvh.me:3000/api/contacts/63"},{"id":65,"kind":"company","created_at":1497351490,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"d29e9c5c9fa045456dd48bd4cf62d16c1f797268","permalink":"http://development.lvh.me:3000/billing/d29e9c5c9fa045456dd48bd4cf62d16c1f797268","url":"http://development.lvh.me:3000/api/contacts/65"},{"id":67,"kind":"company","created_at":1497351539,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"f23f6fa2eba18d28864e92b49e4b0f3bcd3ec912","permalink":"http://development.lvh.me:3000/billing/f23f6fa2eba18d28864e92b49e4b0f3bcd3ec912","url":"http://development.lvh.me:3000/api/contacts/67"},{"id":69,"kind":"company","created_at":1497351607,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"47affa993a2bc4ad5040ccb8a57cc20808776818","permalink":"http://development.lvh.me:3000/billing/47affa993a2bc4ad5040ccb8a57cc20808776818","url":"http://development.lvh.me:3000/api/contacts/69"}]' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 11:00:07 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts/69.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '12' - x-ratelimit-remaining: - - '94' - cache-control: - - no-cache - x-request-id: - - eb90a55b-eb02-4b47-bd70-d27b9501760f - x-runtime: - - '0.242202' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 11:00:07 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '12' - x-ratelimit-remaining: - - '93' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"3731bba773bbf693069d6380f5811c8f"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 92e0e72d-ff19-4240-bdff-f7c60f7d36ca - x-runtime: - - '0.307067' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":50,"kind":"company","created_at":1497267993,"full_name":"Test_OCP","contact_name":null,"street_line_1":"asdasdas","street_line_2":"3rwerds","postal_code":"08080","city":"Sdasdasd","region":"sadasdasd","country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"ES78488057M","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"757312a30b02810e495ae18c312a50a1e4f4b713","permalink":"http://development.lvh.me:3000/billing/757312a30b02810e495ae18c312a50a1e4f4b713","url":"http://development.lvh.me:3000/api/contacts/50"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"},{"id":55,"kind":"company","created_at":1497269711,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","permalink":"http://development.lvh.me:3000/billing/42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","url":"http://development.lvh.me:3000/api/contacts/55"},{"id":56,"kind":"company","created_at":1497351006,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0685fa00c66ec752aacd5f3e1f81365831cd3d65","permalink":"http://development.lvh.me:3000/billing/0685fa00c66ec752aacd5f3e1f81365831cd3d65","url":"http://development.lvh.me:3000/api/contacts/56"},{"id":58,"kind":"company","created_at":1497351105,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8bebc09443c4f72ef4059058607c50447b2f3c16","permalink":"http://development.lvh.me:3000/billing/8bebc09443c4f72ef4059058607c50447b2f3c16","url":"http://development.lvh.me:3000/api/contacts/58"},{"id":60,"kind":"company","created_at":1497351108,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"45d4cccba293ef0da33c07a991c6081ec4179948","permalink":"http://development.lvh.me:3000/billing/45d4cccba293ef0da33c07a991c6081ec4179948","url":"http://development.lvh.me:3000/api/contacts/60"},{"id":62,"kind":"company","created_at":1497351487,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","permalink":"http://development.lvh.me:3000/billing/8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","url":"http://development.lvh.me:3000/api/contacts/62"},{"id":64,"kind":"company","created_at":1497351490,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"08638259e35b5864ad37f6c5776113d794fa2ac2","permalink":"http://development.lvh.me:3000/billing/08638259e35b5864ad37f6c5776113d794fa2ac2","url":"http://development.lvh.me:3000/api/contacts/64"},{"id":57,"kind":"company","created_at":1497351007,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","permalink":"http://development.lvh.me:3000/billing/cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","url":"http://development.lvh.me:3000/api/contacts/57"},{"id":59,"kind":"company","created_at":1497351105,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"f8bae1172828d0fdef3ac4598592ac45dc0d722f","permalink":"http://development.lvh.me:3000/billing/f8bae1172828d0fdef3ac4598592ac45dc0d722f","url":"http://development.lvh.me:3000/api/contacts/59"},{"id":61,"kind":"company","created_at":1497351108,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"391ba9b21d0da56429e44a5e7fd9ad89706285e2","permalink":"http://development.lvh.me:3000/billing/391ba9b21d0da56429e44a5e7fd9ad89706285e2","url":"http://development.lvh.me:3000/api/contacts/61"},{"id":63,"kind":"company","created_at":1497351487,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"93744b7e3b633da80c37441a724f0f335dd59fec","permalink":"http://development.lvh.me:3000/billing/93744b7e3b633da80c37441a724f0f335dd59fec","url":"http://development.lvh.me:3000/api/contacts/63"},{"id":65,"kind":"company","created_at":1497351490,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"d29e9c5c9fa045456dd48bd4cf62d16c1f797268","permalink":"http://development.lvh.me:3000/billing/d29e9c5c9fa045456dd48bd4cf62d16c1f797268","url":"http://development.lvh.me:3000/api/contacts/65"},{"id":67,"kind":"company","created_at":1497351539,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"f23f6fa2eba18d28864e92b49e4b0f3bcd3ec912","permalink":"http://development.lvh.me:3000/billing/f23f6fa2eba18d28864e92b49e4b0f3bcd3ec912","url":"http://development.lvh.me:3000/api/contacts/67"}]' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 11:00:08 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/deleted_estimate.yml b/test/fixtures/quaderno_cassettes/deleted_estimate.yml deleted file mode 100644 index 134679c..0000000 --- a/test/fixtures/quaderno_cassettes/deleted_estimate.yml +++ /dev/null @@ -1,187 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '14' - x-ratelimit-remaining: - - '97' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - d423f68d-912a-4637-9e11-c6cf0ea7a93b - x-runtime: - - '0.379146' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:40 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates.json - body: - encoding: UTF-8 - string: '{"contact_id":44,"number":"test number 4400","contact_name":"Albus - Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '13' - x-ratelimit-remaining: - - '96' - content-type: - - application/json; charset=utf-8 - etag: - - '"04d750d6f4ddb6dd224bb0ca6d5f91ea"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 9ee24d23-b5a1-4bb9-a89d-13035170841f - x-runtime: - - '0.464657' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":177,"number":"test number 4400","issue_date":"2017-06-09","created_at":1497013360,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":178,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"ab6f8b06bad972cea811b424e3868502e2a1bbbc","permalink":"http://development.lvh.me:3000/estimate/ab6f8b06bad972cea811b424e3868502e2a1bbbc","url":"http://development.lvh.me:3000/api/estimates/177.json","custom_metadata":{}}' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:40 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates/177.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '13' - x-ratelimit-remaining: - - '95' - cache-control: - - no-cache - x-request-id: - - 4ae6d957-8b04-4e9d-80cd-02e6aede39a8 - x-runtime: - - '0.362274' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:41 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '13' - x-ratelimit-remaining: - - '94' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"b1aa095a3d37cb3a66bdf93f658ff2ee"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 022eebf6-7412-4b86-8aa3-97dc87195fbc - x-runtime: - - '0.455652' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":175,"number":"0001","issue_date":"2017-06-09","created_at":1497013347,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":176,"description":"Something","quantity":"1.0","unit_price_cents":"2000.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"2000.0","discount_cents":"0.0","gross_amount":"2000.0"}],"subtotal_cents":"2000.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":420}],"total_cents":2420,"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","permalink":"http://development.lvh.me:3000/estimate/f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","url":"http://development.lvh.me:3000/api/estimates/175.json","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:41 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/deleted_expense.yml b/test/fixtures/quaderno_cassettes/deleted_expense.yml deleted file mode 100644 index 782a952..0000000 --- a/test/fixtures/quaderno_cassettes/deleted_expense.yml +++ /dev/null @@ -1,189 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '1' - x-ratelimit-remaining: - - '94' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 53a9ce47-0b32-4fc7-b50d-d420299f6649 - x-runtime: - - '1.089348' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:16 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses.json - body: - encoding: UTF-8 - string: '{"contact_id":44,"contact_name":"Albus Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '0' - x-ratelimit-remaining: - - '93' - content-type: - - application/json; charset=utf-8 - etag: - - '"950abc714029cdae9b2cb4b0ef4db8c3"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 8be23e48-baa0-4c9d-863b-fdc42b6c0414 - x-runtime: - - '3.862263' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":189,"blocked":false,"issue_date":"2017-06-12","created_at":1497267497,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":190,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[],"notes":null,"state":"outstanding","tag_list":[],"url":"http://development.lvh.me:3000/api/expenses/189.json","custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:20 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses/189.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - cache-control: - - no-cache - x-request-id: - - 76aa60b4-285c-499a-89f1-0aa4b28c0aae - x-runtime: - - '2.204985' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:22 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"1096b389a8934c3608b59ed5c52ff5c1"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 9f5b3587-5b5b-45b3-b777-991d77f874b3 - x-runtime: - - '3.321785' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":184,"blocked":false,"issue_date":"2017-06-12","created_at":1497266330,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":185,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[{"id":40,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/40.json"},{"id":41,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/41.json"},{"id":42,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/42.json"}],"notes":null,"state":"paid","tag_list":[],"url":"http://development.lvh.me:3000/api/expenses/184.json","custom_metadata":{}},{"id":137,"blocked":true,"issue_date":"2017-05-29","created_at":1496060112,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":138,"description":"asdasd","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[],"notes":null,"state":"paid","tag_list":["dundundugan","rap"],"url":"http://development.lvh.me:3000/api/expenses/137.json","custom_metadata":{}},{"id":135,"blocked":false,"issue_date":"2017-05-26","created_at":1495789529,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":136,"description":"Dreamhack - valencia","quantity":"1.0","unit_price_cents":"23000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"23000.0","discount_cents":"0.0","gross_amount_cents":"23000.0"}],"subtotal_cents":"23000.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":23000},"payments":[{"id":7,"date":"2017-05-31","payment_method":"credit_card","amount_cents":23000,"url":"http://development.lvh.me:3000/api/expenses/135/payments/7.json"}],"notes":null,"state":"paid","tag_list":["balls"],"url":"http://development.lvh.me:3000/api/expenses/135.json","custom_metadata":{}},{"id":134,"blocked":false,"issue_date":"2017-05-26","created_at":1495789490,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":135,"description":"Something","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount_cents":"1000.0"}],"subtotal_cents":"1000.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":1000},"payments":[{"id":4,"date":"2017-05-31","payment_method":"credit_card","amount_cents":1000,"url":"http://development.lvh.me:3000/api/expenses/134/payments/4.json"}],"notes":null,"state":"paid","tag_list":["rap","god"],"url":"http://development.lvh.me:3000/api/expenses/134.json","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:25 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/deleted_invoice.yml b/test/fixtures/quaderno_cassettes/deleted_invoice.yml deleted file mode 100644 index ef941fb..0000000 --- a/test/fixtures/quaderno_cassettes/deleted_invoice.yml +++ /dev/null @@ -1,190 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '5' - x-ratelimit-remaining: - - '95' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 2402eba1-9697-4581-9d66-5dc7fd441502 - x-runtime: - - '1.062896' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:19 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices.json - body: - encoding: UTF-8 - string: '{"contact_id":44,"contact_name":"Albus Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '4' - x-ratelimit-remaining: - - '94' - content-type: - - application/json; charset=utf-8 - etag: - - '"0109060fb4cfe72d8e2fb9ae1c50a7a0"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 500064c3-abd3-4a25-af69-3e0d030f7261 - x-runtime: - - '4.699887' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":194,"blocked":false,"number":"0006","issue_date":"2017-06-12","created_at":1497267861,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":195,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[],"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"d1f58877c3e8565e812ede965de01143a8b65073","permalink":"http://development.lvh.me:3000/invoice/d1f58877c3e8565e812ede965de01143a8b65073","pdf":"http://development.lvh.me:3000/invoice/d1f58877c3e8565e812ede965de01143a8b65073.pdf","url":"http://development.lvh.me:3000/api/invoices/194.json","processor":null,"processor_id":null,"custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:24 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices/194.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - cache-control: - - no-cache - x-request-id: - - 9982304c-bf36-40c3-a550-f53b20ae4a45 - x-runtime: - - '2.314321' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:26 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"47582ab138340fc16e49091c677bd6a5"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 0cb31478-3919-4ec4-a334-5ebd9268bc48 - x-runtime: - - '4.189029' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":180,"blocked":false,"number":"0005","issue_date":"2017-06-09","created_at":1497013624,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":181,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[{"id":45,"date":"2017-06-12","payment_method":"cash","amount_cents":10000000000,"url":"http://development.lvh.me:3000/api/invoices/180/payments/45.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"8ba033c910a376319e4b383de66d6934abcfe6a4","permalink":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4","pdf":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4.pdf","url":"http://development.lvh.me:3000/api/invoices/180.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":167,"blocked":true,"number":"0004","issue_date":"2017-06-07","created_at":1496825417,"contact":{"id":43,"full_name":"Test_OCP"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":168,"description":"Something","quantity":"1.0","unit_price_cents":"1212.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"1212.0","discount_cents":"0.0","gross_amount_cents":"1212.0"}],"subtotal_cents":"1212.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":254}],"total_cents":1466,"payments":[{"id":36,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":1466,"url":"http://development.lvh.me:3000/api/invoices/167/payments/36.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"5ee4e6d22a4d8b6798a9df315395fe05a5efb80a","permalink":"http://development.lvh.me:3000/invoice/5ee4e6d22a4d8b6798a9df315395fe05a5efb80a","pdf":"http://development.lvh.me:3000/invoice/5ee4e6d22a4d8b6798a9df315395fe05a5efb80a.pdf","url":"http://development.lvh.me:3000/api/invoices/167.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":168,"blocked":false,"number":"0003","issue_date":"2017-06-07","created_at":1496825418,"contact":{"id":43,"full_name":"Test_OCP"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":169,"description":"Something","quantity":"1.0","unit_price_cents":"671.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"671.0","discount_cents":"0.0","gross_amount_cents":"671.0"}],"subtotal_cents":"671.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":141}],"total_cents":812,"payments":[],"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"e93f8543031ccee4aa6933b7418dbe8736ec4306","permalink":"http://development.lvh.me:3000/invoice/e93f8543031ccee4aa6933b7418dbe8736ec4306","pdf":"http://development.lvh.me:3000/invoice/e93f8543031ccee4aa6933b7418dbe8736ec4306.pdf","url":"http://development.lvh.me:3000/api/invoices/168.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":169,"blocked":false,"number":"0002","issue_date":"2017-06-07","created_at":1496825419,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":170,"description":"Something","quantity":"1.0","unit_price_cents":"2008.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"2008.0","discount_cents":"0.0","gross_amount_cents":"2008.0"}],"subtotal_cents":"2008.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":422}],"total_cents":2430,"payments":[{"id":38,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":2430,"url":"http://development.lvh.me:3000/api/invoices/169/payments/38.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"45652c45cc01d96ac603b0484e4e00754ba091c8","permalink":"http://development.lvh.me:3000/invoice/45652c45cc01d96ac603b0484e4e00754ba091c8","pdf":"http://development.lvh.me:3000/invoice/45652c45cc01d96ac603b0484e4e00754ba091c8.pdf","url":"http://development.lvh.me:3000/api/invoices/169.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":170,"blocked":false,"number":"0001","issue_date":"2017-06-07","created_at":1496825420,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":171,"description":"Something","quantity":"1.0","unit_price_cents":"1340.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"1340.0","discount_cents":"0.0","gross_amount_cents":"1340.0"}],"subtotal_cents":"1340.0","discount_cents":"0.0","taxes":[],"total_cents":1340,"payments":[{"id":39,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":1340,"url":"http://development.lvh.me:3000/api/invoices/170/payments/39.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"696d7d7e402f544a839e84f3328801547f6c7c12","permalink":"http://development.lvh.me:3000/invoice/696d7d7e402f544a839e84f3328801547f6c7c12","pdf":"http://development.lvh.me:3000/invoice/696d7d7e402f544a839e84f3328801547f6c7c12.pdf","url":"http://development.lvh.me:3000/api/invoices/170.json","processor":"stripe","processor_id":"ch_1234","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:31 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/deleted_item.yml b/test/fixtures/quaderno_cassettes/deleted_item.yml deleted file mode 100644 index c47d08f..0000000 --- a/test/fixtures/quaderno_cassettes/deleted_item.yml +++ /dev/null @@ -1,128 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - content-type: - - application/json; charset=utf-8 - etag: - - '"f91316e7f780493dafbffc5affac5ef5"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - e0541210-c4f1-4f14-a3bf-8d2db1b12f0f - x-runtime: - - '0.982967' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":1,"code":"12345","name":"6","unit_cost":"10.0","stock":null,"tax_class":"standard","url":"http://development.lvh.me:3000/api/items/1"},{"id":2,"code":"000000","name":"Test_Skynet","unit_cost":"21.0","stock":null,"tax_class":"eservice","url":"http://development.lvh.me:3000/api/items/2"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:34 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items/2.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '14' - x-ratelimit-remaining: - - '98' - cache-control: - - no-cache - x-request-id: - - b02b174b-6cef-42b9-9a03-125a496d48ad - x-runtime: - - '0.771036' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:34 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '11' - x-ratelimit-remaining: - - '97' - content-type: - - application/json; charset=utf-8 - etag: - - '"d5fb0568852b913d126a096f525890b5"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 66f021ff-bed9-41a6-a7e1-4c5593578ef7 - x-runtime: - - '2.202393' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":1,"code":"12345","name":"6","unit_cost":"10.0","stock":null,"tax_class":"standard","url":"http://development.lvh.me:3000/api/items/1"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:37 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/deleted_receipt.yml b/test/fixtures/quaderno_cassettes/deleted_receipt.yml deleted file mode 100644 index 9995a6b..0000000 --- a/test/fixtures/quaderno_cassettes/deleted_receipt.yml +++ /dev/null @@ -1,223 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json - body: - encoding: UTF-8 - string: '{"first_name":"Test customer"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '4' - x-ratelimit-remaining: - - '96' - content-type: - - application/json; charset=utf-8 - etag: - - '"00e9b556a65a3fe049e04c6e0cc45cf9"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 28d558d4-7134-4c59-9e8b-4144547b1c5b - x-runtime: - - '1.447786' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":52,"kind":"company","created_at":1497268157,"full_name":"Test - customer","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e72cf732a53d6cd1f45ad096edd602758b6691a3","permalink":"http://development.lvh.me:3000/billing/e72cf732a53d6cd1f45ad096edd602758b6691a3","url":"http://development.lvh.me:3000/api/contacts/52"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:17 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts.json - body: - encoding: UTF-8 - string: '{"contact_id":52,"currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_method":"cash","notes":""}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '3' - x-ratelimit-remaining: - - '95' - content-type: - - application/json; charset=utf-8 - etag: - - '"ec0b74f722f8e042fcdfdcb1d0699d14"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - b6fe3743-024e-4323-a44f-276e7ab4903b - x-runtime: - - '4.733173' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":202,"blocked":false,"number":"0003","issue_date":"2017-06-12","created_at":1497268159,"contact":{"id":52,"full_name":"Test - customer"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":203,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"payments":[{"id":52,"date":"2017-06-12","payment_method":"cash","amount_cents":0}],"notes":null,"state":"paid","tag_list":[],"secure_id":"f400dc836b1488441b69d084fb25a89403ffc5de","permalink":"http://development.lvh.me:3000/receipt/f400dc836b1488441b69d084fb25a89403ffc5de","pdf":"http://development.lvh.me:3000/receipt/f400dc836b1488441b69d084fb25a89403ffc5de.pdf","url":"http://development.lvh.me:3000/api/receipts/202.json","processor":null,"processor_id":null,"custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:22 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts/202.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - cache-control: - - no-cache - x-request-id: - - bbd75591-2904-4cdb-af4e-94c108e6b6ed - x-runtime: - - '2.767408' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:25 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts/52.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - cache-control: - - no-cache - x-request-id: - - 243f91d9-9aaa-4566-98c9-71f0c32e7eb4 - x-runtime: - - '1.163710' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:26 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '14' - x-ratelimit-remaining: - - '98' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"2fbe5b66d01a5d67afd7be37b64c395a"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - b98c0b87-40cd-4325-8714-a6d044edec8e - x-runtime: - - '2.125325' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":200,"blocked":false,"number":"0002","issue_date":"2017-06-12","created_at":1497268132,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":201,"description":"Hey, - Liste!","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount_cents":"1000.0"}],"subtotal_cents":"1000.0","discount_cents":"0.0","taxes":[],"payments":[{"id":50,"date":"2017-06-12","payment_method":"other","amount_cents":1000}],"notes":null,"state":"paid","tag_list":[],"secure_id":"64649b40d7fc4bcc0b1a0493b87fa030789235d4","permalink":"http://development.lvh.me:3000/receipt/64649b40d7fc4bcc0b1a0493b87fa030789235d4","pdf":"http://development.lvh.me:3000/receipt/64649b40d7fc4bcc0b1a0493b87fa030789235d4.pdf","url":"http://development.lvh.me:3000/api/receipts/200.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":199,"blocked":false,"number":"0001","issue_date":"2017-06-12","created_at":1497267995,"contact":{"id":50,"full_name":"Test - customer"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":200,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"payments":[{"id":49,"date":"2017-06-12","payment_method":"cash","amount_cents":0}],"notes":null,"state":"paid","tag_list":[],"secure_id":"f62c1beb598394e6072fa18af8a3eed0ba05833b","permalink":"http://development.lvh.me:3000/receipt/f62c1beb598394e6072fa18af8a3eed0ba05833b","pdf":"http://development.lvh.me:3000/receipt/f62c1beb598394e6072fa18af8a3eed0ba05833b.pdf","url":"http://development.lvh.me:3000/api/receipts/199.json","processor":null,"processor_id":null,"custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:28 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/deleted_webhook.yml b/test/fixtures/quaderno_cassettes/deleted_webhook.yml deleted file mode 100644 index b4bf7c3..0000000 --- a/test/fixtures/quaderno_cassettes/deleted_webhook.yml +++ /dev/null @@ -1,257 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json - body: - encoding: UTF-8 - string: '{"url":"http://google.com","events_types":["invoice.created","expense.updated"]}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '9' - x-ratelimit-remaining: - - '97' - content-type: - - application/json; charset=utf-8 - etag: - - '"9ed2c299de9bfb455be4f92f91a751bb"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 56b4d038-9c97-4faf-bcf1-c0146ed2282e - x-runtime: - - '1.133878' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":3,"url":"http://google.com","auth_key":"NGSLi-ewU_9MkUjNFA8H6g","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:14.841Z","updated_at":"2017-06-12T11:54:14.841Z"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:15 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json - body: - encoding: UTF-8 - string: '{"url":"http://quadernoapp.com","events_types":["invoice.created","expense.updated"]}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '7' - x-ratelimit-remaining: - - '96' - content-type: - - application/json; charset=utf-8 - etag: - - '"efc1e4c767dae7155fd7062f869b6864"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - fb379d20-89c7-4f44-b03a-8218e8ba6876 - x-runtime: - - '1.651680' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":4,"url":"http://quadernoapp.com","auth_key":"PPhqTNGnksKmkLIE-HN12w","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:16.816Z","updated_at":"2017-06-12T11:54:16.816Z"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:17 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '5' - x-ratelimit-remaining: - - '95' - content-type: - - application/json; charset=utf-8 - etag: - - '"7724af66c58f04bb8d43b34af89cbeb0"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - a83a42c7-1de0-4f2a-85ef-e98d38079d83 - x-runtime: - - '0.967519' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":1,"url":"http://quadernoapp.com","auth_key":"Ze024XpO9CJ6Fy2frwWV4Q","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:53:54.000Z","updated_at":"2017-06-12T11:53:54.000Z"},{"id":3,"url":"http://google.com","auth_key":"NGSLi-ewU_9MkUjNFA8H6g","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:14.000Z","updated_at":"2017-06-12T11:54:14.000Z"},{"id":4,"url":"http://quadernoapp.com","auth_key":"PPhqTNGnksKmkLIE-HN12w","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:16.000Z","updated_at":"2017-06-12T11:54:16.000Z"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:18 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/4.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '4' - x-ratelimit-remaining: - - '94' - cache-control: - - no-cache - x-request-id: - - d9d2a591-b3e2-4ba2-af85-e6d5fa634e46 - x-runtime: - - '0.969496' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:19 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '3' - x-ratelimit-remaining: - - '93' - content-type: - - application/json; charset=utf-8 - etag: - - '"49b2fb709af079dc34bb5ae479d17052"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - b43f132e-1500-4cfa-87cf-d76232257163 - x-runtime: - - '0.938838' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":1,"url":"http://quadernoapp.com","auth_key":"Ze024XpO9CJ6Fy2frwWV4Q","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:53:54.000Z","updated_at":"2017-06-12T11:53:54.000Z"},{"id":3,"url":"http://google.com","auth_key":"NGSLi-ewU_9MkUjNFA8H6g","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:14.000Z","updated_at":"2017-06-12T11:54:14.000Z"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:20 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/3.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '3' - x-ratelimit-remaining: - - '92' - cache-control: - - no-cache - x-request-id: - - 4ace2036-ebde-4c54-a6ba-92e9fe57c39c - x-runtime: - - '0.948995' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:21 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/delivered_estimate.yml b/test/fixtures/quaderno_cassettes/delivered_estimate.yml deleted file mode 100644 index 1f07bf0..0000000 --- a/test/fixtures/quaderno_cassettes/delivered_estimate.yml +++ /dev/null @@ -1,136 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"b1aa095a3d37cb3a66bdf93f658ff2ee"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 4b668b53-4776-45f0-b6f3-515e65e9a5d4 - x-runtime: - - '0.395275' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":175,"number":"0001","issue_date":"2017-06-09","created_at":1497013347,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":176,"description":"Something","quantity":"1.0","unit_price_cents":"2000.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"2000.0","discount_cents":"0.0","gross_amount":"2000.0"}],"subtotal_cents":"2000.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":420}],"total_cents":2420,"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","permalink":"http://development.lvh.me:3000/estimate/f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","url":"http://development.lvh.me:3000/api/estimates/175.json","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:06:24 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/ping.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - content-type: - - application/json; charset=utf-8 - etag: - - '"0c776997933eb60833b37beaf43814c8"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 90fc57c3-a86a-48e5-8045-5b7024ff5a67 - x-runtime: - - '0.166282' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"status":"OK"}' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:06:24 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates/175/deliver.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 422 - message: Unprocessable Entity - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '14' - x-ratelimit-remaining: - - '98' - content-type: - - application/json; charset=utf-8 - cache-control: - - no-cache - x-request-id: - - 69f5b9c7-d537-4660-97a4-bbd07df6f0eb - x-runtime: - - '0.308794' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"delivery_recipients":["can''t be blank","is invalid"]}' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:06:24 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/delivered_invoice.yml b/test/fixtures/quaderno_cassettes/delivered_invoice.yml deleted file mode 100644 index f3f6568..0000000 --- a/test/fixtures/quaderno_cassettes/delivered_invoice.yml +++ /dev/null @@ -1,143 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '98' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"47582ab138340fc16e49091c677bd6a5"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 532d6271-81fe-42c4-b773-42c0a857f764 - x-runtime: - - '4.151245' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":180,"blocked":false,"number":"0005","issue_date":"2017-06-09","created_at":1497013624,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":181,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[{"id":45,"date":"2017-06-12","payment_method":"cash","amount_cents":10000000000,"url":"http://development.lvh.me:3000/api/invoices/180/payments/45.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"8ba033c910a376319e4b383de66d6934abcfe6a4","permalink":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4","pdf":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4.pdf","url":"http://development.lvh.me:3000/api/invoices/180.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":167,"blocked":true,"number":"0004","issue_date":"2017-06-07","created_at":1496825417,"contact":{"id":43,"full_name":"Test_OCP"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":168,"description":"Something","quantity":"1.0","unit_price_cents":"1212.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"1212.0","discount_cents":"0.0","gross_amount_cents":"1212.0"}],"subtotal_cents":"1212.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":254}],"total_cents":1466,"payments":[{"id":36,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":1466,"url":"http://development.lvh.me:3000/api/invoices/167/payments/36.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"5ee4e6d22a4d8b6798a9df315395fe05a5efb80a","permalink":"http://development.lvh.me:3000/invoice/5ee4e6d22a4d8b6798a9df315395fe05a5efb80a","pdf":"http://development.lvh.me:3000/invoice/5ee4e6d22a4d8b6798a9df315395fe05a5efb80a.pdf","url":"http://development.lvh.me:3000/api/invoices/167.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":168,"blocked":false,"number":"0003","issue_date":"2017-06-07","created_at":1496825418,"contact":{"id":43,"full_name":"Test_OCP"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":169,"description":"Something","quantity":"1.0","unit_price_cents":"671.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"671.0","discount_cents":"0.0","gross_amount_cents":"671.0"}],"subtotal_cents":"671.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":141}],"total_cents":812,"payments":[],"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"e93f8543031ccee4aa6933b7418dbe8736ec4306","permalink":"http://development.lvh.me:3000/invoice/e93f8543031ccee4aa6933b7418dbe8736ec4306","pdf":"http://development.lvh.me:3000/invoice/e93f8543031ccee4aa6933b7418dbe8736ec4306.pdf","url":"http://development.lvh.me:3000/api/invoices/168.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":169,"blocked":false,"number":"0002","issue_date":"2017-06-07","created_at":1496825419,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":170,"description":"Something","quantity":"1.0","unit_price_cents":"2008.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"2008.0","discount_cents":"0.0","gross_amount_cents":"2008.0"}],"subtotal_cents":"2008.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":422}],"total_cents":2430,"payments":[{"id":38,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":2430,"url":"http://development.lvh.me:3000/api/invoices/169/payments/38.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"45652c45cc01d96ac603b0484e4e00754ba091c8","permalink":"http://development.lvh.me:3000/invoice/45652c45cc01d96ac603b0484e4e00754ba091c8","pdf":"http://development.lvh.me:3000/invoice/45652c45cc01d96ac603b0484e4e00754ba091c8.pdf","url":"http://development.lvh.me:3000/api/invoices/169.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":170,"blocked":false,"number":"0001","issue_date":"2017-06-07","created_at":1496825420,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":171,"description":"Something","quantity":"1.0","unit_price_cents":"1340.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"1340.0","discount_cents":"0.0","gross_amount_cents":"1340.0"}],"subtotal_cents":"1340.0","discount_cents":"0.0","taxes":[],"total_cents":1340,"payments":[{"id":39,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":1340,"url":"http://development.lvh.me:3000/api/invoices/170/payments/39.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"696d7d7e402f544a839e84f3328801547f6c7c12","permalink":"http://development.lvh.me:3000/invoice/696d7d7e402f544a839e84f3328801547f6c7c12","pdf":"http://development.lvh.me:3000/invoice/696d7d7e402f544a839e84f3328801547f6c7c12.pdf","url":"http://development.lvh.me:3000/api/invoices/170.json","processor":"stripe","processor_id":"ch_1234","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:35 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/ping.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '6' - x-ratelimit-remaining: - - '97' - content-type: - - application/json; charset=utf-8 - etag: - - '"0c776997933eb60833b37beaf43814c8"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 3f3848ed-e7b0-4d1e-b816-3de7870a1b85 - x-runtime: - - '0.841116' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"status":"OK"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:36 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices/180/deliver.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '5' - x-ratelimit-remaining: - - '96' - content-type: - - application/json; charset=utf-8 - etag: - - '"074a3d2686ff1d99dbf981e8328f05ae"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - bc4d1421-eaf5-44ba-b068-729c7f663b92 - x-runtime: - - '2.232292' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":180,"account_id":9,"contact_id":44,"document_id":null,"number":"0005","issue_date":"2017-06-09","contact_name":"Albus - Dumbledoge","currency":"EUR","gross_amount_cents":0,"total_cents":0,"amount_paid_cents":10000000000,"exchange_rate":"1.0","exchange_cents":null,"po_number":null,"due_days":null,"due_date":null,"valid_until":null,"payment_details":null,"notes":null,"permalink":"8ba033c910a376319e4b383de66d6934abcfe6a4","recurring_document":null,"start_date":null,"end_date":null,"renewal_date":null,"frequency":null,"delivery":null,"state":"paid","created_at":"2017-06-09T13:07:04.000Z","updated_at":"2017-06-12T11:44:38.213Z","attachments_count":0,"processor_id":null,"subject":null,"transaction_id":null,"street_line_1":null,"street_line_2":null,"city":null,"postal_code":null,"region":null,"country":"BE","processor":null,"processor_fee_cents":null,"interval_count":0,"delivery_state":"delivered","vat_number":null,"tax_id":null,"metadata":{},"blocked":false}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:38 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/delivered_receipt.yml b/test/fixtures/quaderno_cassettes/delivered_receipt.yml deleted file mode 100644 index 629ca5a..0000000 --- a/test/fixtures/quaderno_cassettes/delivered_receipt.yml +++ /dev/null @@ -1,140 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '12' - x-ratelimit-remaining: - - '97' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"2fbe5b66d01a5d67afd7be37b64c395a"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 49c9cbce-9946-4c82-85d1-867e02a37eab - x-runtime: - - '2.123997' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":200,"blocked":false,"number":"0002","issue_date":"2017-06-12","created_at":1497268132,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":201,"description":"Hey, - Liste!","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount_cents":"1000.0"}],"subtotal_cents":"1000.0","discount_cents":"0.0","taxes":[],"payments":[{"id":50,"date":"2017-06-12","payment_method":"other","amount_cents":1000}],"notes":null,"state":"paid","tag_list":[],"secure_id":"64649b40d7fc4bcc0b1a0493b87fa030789235d4","permalink":"http://development.lvh.me:3000/receipt/64649b40d7fc4bcc0b1a0493b87fa030789235d4","pdf":"http://development.lvh.me:3000/receipt/64649b40d7fc4bcc0b1a0493b87fa030789235d4.pdf","url":"http://development.lvh.me:3000/api/receipts/200.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":199,"blocked":false,"number":"0001","issue_date":"2017-06-12","created_at":1497267995,"contact":{"id":50,"full_name":"Test - customer"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":200,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"payments":[{"id":49,"date":"2017-06-12","payment_method":"cash","amount_cents":0}],"notes":null,"state":"paid","tag_list":[],"secure_id":"f62c1beb598394e6072fa18af8a3eed0ba05833b","permalink":"http://development.lvh.me:3000/receipt/f62c1beb598394e6072fa18af8a3eed0ba05833b","pdf":"http://development.lvh.me:3000/receipt/f62c1beb598394e6072fa18af8a3eed0ba05833b.pdf","url":"http://development.lvh.me:3000/api/receipts/199.json","processor":null,"processor_id":null,"custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:30 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/ping.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '96' - content-type: - - application/json; charset=utf-8 - etag: - - '"0c776997933eb60833b37beaf43814c8"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 135bafe4-45a9-4acb-b6a1-3d26f5d8432b - x-runtime: - - '0.501923' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"status":"OK"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:31 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts/200/deliver.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '9' - x-ratelimit-remaining: - - '95' - content-type: - - application/json; charset=utf-8 - etag: - - '"e750aaba03eb7eb3639f8684e5465fc7"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 0c756416-5973-4ab2-a638-7fd7df96839c - x-runtime: - - '1.825039' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":200,"account_id":9,"contact_id":44,"document_id":null,"number":"0002","issue_date":"2017-06-12","contact_name":"Albus - Dumbledoge","currency":"EUR","gross_amount_cents":1000,"total_cents":1000,"amount_paid_cents":1000,"exchange_rate":"1.0","exchange_cents":null,"po_number":null,"due_days":null,"due_date":null,"valid_until":null,"payment_details":null,"notes":null,"permalink":"64649b40d7fc4bcc0b1a0493b87fa030789235d4","recurring_document":null,"start_date":null,"end_date":null,"renewal_date":null,"frequency":null,"delivery":null,"state":"paid","created_at":"2017-06-12T11:48:52.000Z","updated_at":"2017-06-12T11:49:32.728Z","attachments_count":0,"processor_id":null,"subject":null,"transaction_id":null,"street_line_1":null,"street_line_2":null,"city":null,"postal_code":null,"region":null,"country":"BE","processor":null,"processor_fee_cents":null,"interval_count":0,"delivery_state":"delivered","vat_number":null,"tax_id":null,"metadata":{},"blocked":false}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:33 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/evidence_invoice.yml b/test/fixtures/quaderno_cassettes/evidence_invoice.yml deleted file mode 100644 index fa9b86d..0000000 --- a/test/fixtures/quaderno_cassettes/evidence_invoice.yml +++ /dev/null @@ -1,98 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 722d2bf8-1215-4998-9759-8fc073d47352 - x-runtime: - - '0.320278' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:07:03 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices.json - body: - encoding: UTF-8 - string: '{"contact_id":44,"contact_name":"Albus Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - content-type: - - application/json; charset=utf-8 - etag: - - '"ac4541b1070edae1af15b6002a78bb2f"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 8175b611-d7fd-4104-a4d0-85714db17957 - x-runtime: - - '1.002273' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":180,"number":"0005","issue_date":"2017-06-09","created_at":1497013624,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":181,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[],"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"8ba033c910a376319e4b383de66d6934abcfe6a4","permalink":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4","pdf":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4.pdf","url":"http://development.lvh.me:3000/api/invoices/180.json","processor":null,"processor_id":null,"custom_metadata":{}}' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:07:05 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/found_contact.yml b/test/fixtures/quaderno_cassettes/found_contact.yml deleted file mode 100644 index 83f3d8e..0000000 --- a/test/fixtures/quaderno_cassettes/found_contact.yml +++ /dev/null @@ -1,95 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '13' - x-ratelimit-remaining: - - '95' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 167079c6-cdcd-4df0-b921-766e4856d5c3 - x-runtime: - - '0.352385' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:00:57 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts/43.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '13' - x-ratelimit-remaining: - - '94' - content-type: - - application/json; charset=utf-8 - etag: - - '"2b9954582990f83a961c36960d435f7d"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 1f30c374-db45-48fc-894b-b4a2c27ba358 - x-runtime: - - '0.212848' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"}' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:00:57 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/found_contact_by_access_token.yml b/test/fixtures/quaderno_cassettes/found_contact_by_access_token.yml deleted file mode 100644 index 21b944f..0000000 --- a/test/fixtures/quaderno_cassettes/found_contact_by_access_token.yml +++ /dev/null @@ -1,99 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Bearer 36b82411e6686581fe3d7d10fbe931a3fdc9265a353832f0e3ff6269bd319e12 - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '11' - x-ratelimit-remaining: - - '97' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"ce9bb93f9732d0d31bfba5e17089ac04"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 251e682c-46d8-45ee-930f-c6ba0d7545e7 - x-runtime: - - '0.316774' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":50,"kind":"company","created_at":1497267993,"full_name":"Test_OCP","contact_name":null,"street_line_1":"asdasdas","street_line_2":"3rwerds","postal_code":"08080","city":"Sdasdasd","region":"sadasdasd","country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"ES78488057M","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"757312a30b02810e495ae18c312a50a1e4f4b713","permalink":"http://development.lvh.me:3000/billing/757312a30b02810e495ae18c312a50a1e4f4b713","url":"http://development.lvh.me:3000/api/contacts/50"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"},{"id":55,"kind":"company","created_at":1497269711,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","permalink":"http://development.lvh.me:3000/billing/42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","url":"http://development.lvh.me:3000/api/contacts/55"},{"id":56,"kind":"company","created_at":1497351006,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0685fa00c66ec752aacd5f3e1f81365831cd3d65","permalink":"http://development.lvh.me:3000/billing/0685fa00c66ec752aacd5f3e1f81365831cd3d65","url":"http://development.lvh.me:3000/api/contacts/56"},{"id":58,"kind":"company","created_at":1497351105,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8bebc09443c4f72ef4059058607c50447b2f3c16","permalink":"http://development.lvh.me:3000/billing/8bebc09443c4f72ef4059058607c50447b2f3c16","url":"http://development.lvh.me:3000/api/contacts/58"},{"id":60,"kind":"company","created_at":1497351108,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"45d4cccba293ef0da33c07a991c6081ec4179948","permalink":"http://development.lvh.me:3000/billing/45d4cccba293ef0da33c07a991c6081ec4179948","url":"http://development.lvh.me:3000/api/contacts/60"},{"id":62,"kind":"company","created_at":1497351487,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","permalink":"http://development.lvh.me:3000/billing/8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","url":"http://development.lvh.me:3000/api/contacts/62"},{"id":57,"kind":"company","created_at":1497351007,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","permalink":"http://development.lvh.me:3000/billing/cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","url":"http://development.lvh.me:3000/api/contacts/57"},{"id":59,"kind":"company","created_at":1497351105,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"f8bae1172828d0fdef3ac4598592ac45dc0d722f","permalink":"http://development.lvh.me:3000/billing/f8bae1172828d0fdef3ac4598592ac45dc0d722f","url":"http://development.lvh.me:3000/api/contacts/59"},{"id":61,"kind":"company","created_at":1497351108,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"391ba9b21d0da56429e44a5e7fd9ad89706285e2","permalink":"http://development.lvh.me:3000/billing/391ba9b21d0da56429e44a5e7fd9ad89706285e2","url":"http://development.lvh.me:3000/api/contacts/61"},{"id":63,"kind":"company","created_at":1497351487,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"93744b7e3b633da80c37441a724f0f335dd59fec","permalink":"http://development.lvh.me:3000/billing/93744b7e3b633da80c37441a724f0f335dd59fec","url":"http://development.lvh.me:3000/api/contacts/63"}]' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 10:58:08 GMT -- request: - method: get - uri: http://development.lvh.me:3000/api/contacts/43.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Bearer 36b82411e6686581fe3d7d10fbe931a3fdc9265a353832f0e3ff6269bd319e12 - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '11' - x-ratelimit-remaining: - - '96' - content-type: - - application/json; charset=utf-8 - etag: - - '"2b9954582990f83a961c36960d435f7d"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 2c57d29b-2d7b-4e04-b1d5-c53cdf5c1b2f - x-runtime: - - '0.200240' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"}' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 10:58:09 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/found_contact_by_authentication_token.yml b/test/fixtures/quaderno_cassettes/found_contact_by_authentication_token.yml deleted file mode 100644 index e521a0f..0000000 --- a/test/fixtures/quaderno_cassettes/found_contact_by_authentication_token.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '8' - x-ratelimit-remaining: - - '89' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"46aaea3ca58483c13bf81149f2a0a335"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 2405fdeb-f7e5-4489-a7f3-ce21a49cf2e8 - x-runtime: - - '0.467746' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":50,"kind":"company","created_at":1497267993,"full_name":"Test_OCP","contact_name":null,"street_line_1":"asdasdas","street_line_2":"3rwerds","postal_code":"08080","city":"Sdasdasd","region":"sadasdasd","country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"ES78488057M","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"757312a30b02810e495ae18c312a50a1e4f4b713","permalink":"http://development.lvh.me:3000/billing/757312a30b02810e495ae18c312a50a1e4f4b713","url":"http://development.lvh.me:3000/api/contacts/50"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"},{"id":55,"kind":"company","created_at":1497269711,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","permalink":"http://development.lvh.me:3000/billing/42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","url":"http://development.lvh.me:3000/api/contacts/55"},{"id":56,"kind":"company","created_at":1497351006,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0685fa00c66ec752aacd5f3e1f81365831cd3d65","permalink":"http://development.lvh.me:3000/billing/0685fa00c66ec752aacd5f3e1f81365831cd3d65","url":"http://development.lvh.me:3000/api/contacts/56"},{"id":58,"kind":"company","created_at":1497351105,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8bebc09443c4f72ef4059058607c50447b2f3c16","permalink":"http://development.lvh.me:3000/billing/8bebc09443c4f72ef4059058607c50447b2f3c16","url":"http://development.lvh.me:3000/api/contacts/58"},{"id":60,"kind":"company","created_at":1497351108,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"45d4cccba293ef0da33c07a991c6081ec4179948","permalink":"http://development.lvh.me:3000/billing/45d4cccba293ef0da33c07a991c6081ec4179948","url":"http://development.lvh.me:3000/api/contacts/60"},{"id":62,"kind":"company","created_at":1497351487,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","permalink":"http://development.lvh.me:3000/billing/8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","url":"http://development.lvh.me:3000/api/contacts/62"},{"id":64,"kind":"company","created_at":1497351490,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"08638259e35b5864ad37f6c5776113d794fa2ac2","permalink":"http://development.lvh.me:3000/billing/08638259e35b5864ad37f6c5776113d794fa2ac2","url":"http://development.lvh.me:3000/api/contacts/64"},{"id":57,"kind":"company","created_at":1497351007,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","permalink":"http://development.lvh.me:3000/billing/cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","url":"http://development.lvh.me:3000/api/contacts/57"},{"id":59,"kind":"company","created_at":1497351105,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"f8bae1172828d0fdef3ac4598592ac45dc0d722f","permalink":"http://development.lvh.me:3000/billing/f8bae1172828d0fdef3ac4598592ac45dc0d722f","url":"http://development.lvh.me:3000/api/contacts/59"},{"id":61,"kind":"company","created_at":1497351108,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"391ba9b21d0da56429e44a5e7fd9ad89706285e2","permalink":"http://development.lvh.me:3000/billing/391ba9b21d0da56429e44a5e7fd9ad89706285e2","url":"http://development.lvh.me:3000/api/contacts/61"},{"id":63,"kind":"company","created_at":1497351487,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"93744b7e3b633da80c37441a724f0f335dd59fec","permalink":"http://development.lvh.me:3000/billing/93744b7e3b633da80c37441a724f0f335dd59fec","url":"http://development.lvh.me:3000/api/contacts/63"},{"id":65,"kind":"company","created_at":1497351490,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"d29e9c5c9fa045456dd48bd4cf62d16c1f797268","permalink":"http://development.lvh.me:3000/billing/d29e9c5c9fa045456dd48bd4cf62d16c1f797268","url":"http://development.lvh.me:3000/api/contacts/65"}]' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 10:58:12 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts/43.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '8' - x-ratelimit-remaining: - - '88' - content-type: - - application/json; charset=utf-8 - etag: - - '"2b9954582990f83a961c36960d435f7d"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 0f34e2ec-c637-49a3-8d14-4aaf6edff485 - x-runtime: - - '0.491800' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"}' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 10:58:12 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/found_estimate.yml b/test/fixtures/quaderno_cassettes/found_estimate.yml deleted file mode 100644 index b1b7271..0000000 --- a/test/fixtures/quaderno_cassettes/found_estimate.yml +++ /dev/null @@ -1,97 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '11' - x-ratelimit-remaining: - - '91' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"b1aa095a3d37cb3a66bdf93f658ff2ee"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - b218a3b4-227d-4501-adf2-83397e2f16af - x-runtime: - - '0.357928' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":175,"number":"0001","issue_date":"2017-06-09","created_at":1497013347,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":176,"description":"Something","quantity":"1.0","unit_price_cents":"2000.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"2000.0","discount_cents":"0.0","gross_amount":"2000.0"}],"subtotal_cents":"2000.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":420}],"total_cents":2420,"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","permalink":"http://development.lvh.me:3000/estimate/f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","url":"http://development.lvh.me:3000/api/estimates/175.json","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:42 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates/175.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '11' - x-ratelimit-remaining: - - '90' - content-type: - - application/json; charset=utf-8 - etag: - - '"1a7031a245f247b2890d7e65631f4522"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 558e9b5b-b600-4e65-9a22-a5a80d97e4eb - x-runtime: - - '0.396195' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":175,"number":"0001","issue_date":"2017-06-09","created_at":1497013347,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":176,"description":"Something","quantity":"1.0","unit_price_cents":"2000.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"2000.0","discount_cents":"0.0","gross_amount":"2000.0"}],"subtotal_cents":"2000.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":420}],"total_cents":2420,"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","permalink":"http://development.lvh.me:3000/estimate/f2f35a037263fe1d78a94ca62ffa1b768e8e16c6","url":"http://development.lvh.me:3000/api/estimates/175.json","custom_metadata":{}}' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:43 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/found_expense.yml b/test/fixtures/quaderno_cassettes/found_expense.yml deleted file mode 100644 index 00eacd5..0000000 --- a/test/fixtures/quaderno_cassettes/found_expense.yml +++ /dev/null @@ -1,99 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '11' - x-ratelimit-remaining: - - '98' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"1096b389a8934c3608b59ed5c52ff5c1"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 30dec817-cd9a-4d08-bd39-3ff3431cdea7 - x-runtime: - - '3.485057' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":184,"blocked":false,"issue_date":"2017-06-12","created_at":1497266330,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":185,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[{"id":40,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/40.json"},{"id":41,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/41.json"},{"id":42,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/42.json"}],"notes":null,"state":"paid","tag_list":[],"url":"http://development.lvh.me:3000/api/expenses/184.json","custom_metadata":{}},{"id":137,"blocked":true,"issue_date":"2017-05-29","created_at":1496060112,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":138,"description":"asdasd","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[],"notes":null,"state":"paid","tag_list":["dundundugan","rap"],"url":"http://development.lvh.me:3000/api/expenses/137.json","custom_metadata":{}},{"id":135,"blocked":false,"issue_date":"2017-05-26","created_at":1495789529,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":136,"description":"Dreamhack - valencia","quantity":"1.0","unit_price_cents":"23000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"23000.0","discount_cents":"0.0","gross_amount_cents":"23000.0"}],"subtotal_cents":"23000.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":23000},"payments":[{"id":7,"date":"2017-05-31","payment_method":"credit_card","amount_cents":23000,"url":"http://development.lvh.me:3000/api/expenses/135/payments/7.json"}],"notes":null,"state":"paid","tag_list":["balls"],"url":"http://development.lvh.me:3000/api/expenses/135.json","custom_metadata":{}},{"id":134,"blocked":false,"issue_date":"2017-05-26","created_at":1495789490,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":135,"description":"Something","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount_cents":"1000.0"}],"subtotal_cents":"1000.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":1000},"payments":[{"id":4,"date":"2017-05-31","payment_method":"credit_card","amount_cents":1000,"url":"http://development.lvh.me:3000/api/expenses/134/payments/4.json"}],"notes":null,"state":"paid","tag_list":["rap","god"],"url":"http://development.lvh.me:3000/api/expenses/134.json","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:29 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses/184.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '8' - x-ratelimit-remaining: - - '97' - content-type: - - application/json; charset=utf-8 - etag: - - '"37b5f9d49ed3d5abfd0c53251866ed35"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - bdeddee1-f073-461e-bffe-c66c380f0979 - x-runtime: - - '1.381088' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":184,"blocked":false,"issue_date":"2017-06-12","created_at":1497266330,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":185,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[{"id":40,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/40.json"},{"id":41,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/41.json"},{"id":42,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/42.json"}],"notes":null,"state":"paid","tag_list":[],"url":"http://development.lvh.me:3000/api/expenses/184.json","custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:30 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/found_invoice.yml b/test/fixtures/quaderno_cassettes/found_invoice.yml deleted file mode 100644 index 75b233e..0000000 --- a/test/fixtures/quaderno_cassettes/found_invoice.yml +++ /dev/null @@ -1,100 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '3' - x-ratelimit-remaining: - - '95' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"47582ab138340fc16e49091c677bd6a5"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 0e21e522-6dff-4b48-a9c8-ea5ca8892665 - x-runtime: - - '4.109292' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":180,"blocked":false,"number":"0005","issue_date":"2017-06-09","created_at":1497013624,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":181,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[{"id":45,"date":"2017-06-12","payment_method":"cash","amount_cents":10000000000,"url":"http://development.lvh.me:3000/api/invoices/180/payments/45.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"8ba033c910a376319e4b383de66d6934abcfe6a4","permalink":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4","pdf":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4.pdf","url":"http://development.lvh.me:3000/api/invoices/180.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":167,"blocked":true,"number":"0004","issue_date":"2017-06-07","created_at":1496825417,"contact":{"id":43,"full_name":"Test_OCP"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":168,"description":"Something","quantity":"1.0","unit_price_cents":"1212.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"1212.0","discount_cents":"0.0","gross_amount_cents":"1212.0"}],"subtotal_cents":"1212.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":254}],"total_cents":1466,"payments":[{"id":36,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":1466,"url":"http://development.lvh.me:3000/api/invoices/167/payments/36.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"5ee4e6d22a4d8b6798a9df315395fe05a5efb80a","permalink":"http://development.lvh.me:3000/invoice/5ee4e6d22a4d8b6798a9df315395fe05a5efb80a","pdf":"http://development.lvh.me:3000/invoice/5ee4e6d22a4d8b6798a9df315395fe05a5efb80a.pdf","url":"http://development.lvh.me:3000/api/invoices/167.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":168,"blocked":false,"number":"0003","issue_date":"2017-06-07","created_at":1496825418,"contact":{"id":43,"full_name":"Test_OCP"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":169,"description":"Something","quantity":"1.0","unit_price_cents":"671.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"671.0","discount_cents":"0.0","gross_amount_cents":"671.0"}],"subtotal_cents":"671.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":141}],"total_cents":812,"payments":[],"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"e93f8543031ccee4aa6933b7418dbe8736ec4306","permalink":"http://development.lvh.me:3000/invoice/e93f8543031ccee4aa6933b7418dbe8736ec4306","pdf":"http://development.lvh.me:3000/invoice/e93f8543031ccee4aa6933b7418dbe8736ec4306.pdf","url":"http://development.lvh.me:3000/api/invoices/168.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":169,"blocked":false,"number":"0002","issue_date":"2017-06-07","created_at":1496825419,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":170,"description":"Something","quantity":"1.0","unit_price_cents":"2008.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"2008.0","discount_cents":"0.0","gross_amount_cents":"2008.0"}],"subtotal_cents":"2008.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":422}],"total_cents":2430,"payments":[{"id":38,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":2430,"url":"http://development.lvh.me:3000/api/invoices/169/payments/38.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"45652c45cc01d96ac603b0484e4e00754ba091c8","permalink":"http://development.lvh.me:3000/invoice/45652c45cc01d96ac603b0484e4e00754ba091c8","pdf":"http://development.lvh.me:3000/invoice/45652c45cc01d96ac603b0484e4e00754ba091c8.pdf","url":"http://development.lvh.me:3000/api/invoices/169.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":170,"blocked":false,"number":"0001","issue_date":"2017-06-07","created_at":1496825420,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":171,"description":"Something","quantity":"1.0","unit_price_cents":"1340.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"1340.0","discount_cents":"0.0","gross_amount_cents":"1340.0"}],"subtotal_cents":"1340.0","discount_cents":"0.0","taxes":[],"total_cents":1340,"payments":[{"id":39,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":1340,"url":"http://development.lvh.me:3000/api/invoices/170/payments/39.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"696d7d7e402f544a839e84f3328801547f6c7c12","permalink":"http://development.lvh.me:3000/invoice/696d7d7e402f544a839e84f3328801547f6c7c12","pdf":"http://development.lvh.me:3000/invoice/696d7d7e402f544a839e84f3328801547f6c7c12.pdf","url":"http://development.lvh.me:3000/api/invoices/170.json","processor":"stripe","processor_id":"ch_1234","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:42 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices/180.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - content-type: - - application/json; charset=utf-8 - etag: - - '"5daf47fd631ec017d01994e9bd20c9d3"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - ce18c9f1-62e5-45ab-a25d-0a838c4c8e6e - x-runtime: - - '1.585165' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":180,"blocked":false,"number":"0005","issue_date":"2017-06-09","created_at":1497013624,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":181,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[{"id":45,"date":"2017-06-12","payment_method":"cash","amount_cents":10000000000,"url":"http://development.lvh.me:3000/api/invoices/180/payments/45.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"8ba033c910a376319e4b383de66d6934abcfe6a4","permalink":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4","pdf":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4.pdf","url":"http://development.lvh.me:3000/api/invoices/180.json","processor":null,"processor_id":null,"custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:44 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/found_item.yml b/test/fixtures/quaderno_cassettes/found_item.yml deleted file mode 100644 index 587546b..0000000 --- a/test/fixtures/quaderno_cassettes/found_item.yml +++ /dev/null @@ -1,91 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items.json - body: - encoding: UTF-8 - string: '{"code":"1497267937","name":"Test_Skynet","unit_cost":21.0}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '96' - content-type: - - application/json; charset=utf-8 - etag: - - '"732b61bb67f0464d5c743410b75b9dd5"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - c9a3bfda-f822-4d1f-81ff-9709765b7b16 - x-runtime: - - '1.152317' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":3,"code":"1497267937","name":"Test_Skynet","unit_cost":"21.0","stock":null,"tax_class":"eservice","url":"http://development.lvh.me:3000/api/items/3"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:38 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items/3.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '9' - x-ratelimit-remaining: - - '95' - content-type: - - application/json; charset=utf-8 - etag: - - '"732b61bb67f0464d5c743410b75b9dd5"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - d80f54ce-3adc-49be-a916-df534626a43f - x-runtime: - - '0.665111' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":3,"code":"1497267937","name":"Test_Skynet","unit_cost":"21.0","stock":null,"tax_class":"eservice","url":"http://development.lvh.me:3000/api/items/3"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:39 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/found_receipt.yml b/test/fixtures/quaderno_cassettes/found_receipt.yml deleted file mode 100644 index 651c5d6..0000000 --- a/test/fixtures/quaderno_cassettes/found_receipt.yml +++ /dev/null @@ -1,98 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '7' - x-ratelimit-remaining: - - '94' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"2fbe5b66d01a5d67afd7be37b64c395a"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 3897044f-91f2-45e8-9f36-6180cc75a606 - x-runtime: - - '1.841290' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":200,"blocked":false,"number":"0002","issue_date":"2017-06-12","created_at":1497268132,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":201,"description":"Hey, - Liste!","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount_cents":"1000.0"}],"subtotal_cents":"1000.0","discount_cents":"0.0","taxes":[],"payments":[{"id":50,"date":"2017-06-12","payment_method":"other","amount_cents":1000}],"notes":null,"state":"paid","tag_list":[],"secure_id":"64649b40d7fc4bcc0b1a0493b87fa030789235d4","permalink":"http://development.lvh.me:3000/receipt/64649b40d7fc4bcc0b1a0493b87fa030789235d4","pdf":"http://development.lvh.me:3000/receipt/64649b40d7fc4bcc0b1a0493b87fa030789235d4.pdf","url":"http://development.lvh.me:3000/api/receipts/200.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":199,"blocked":false,"number":"0001","issue_date":"2017-06-12","created_at":1497267995,"contact":{"id":50,"full_name":"Test - customer"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":200,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"payments":[{"id":49,"date":"2017-06-12","payment_method":"cash","amount_cents":0}],"notes":null,"state":"paid","tag_list":[],"secure_id":"f62c1beb598394e6072fa18af8a3eed0ba05833b","permalink":"http://development.lvh.me:3000/receipt/f62c1beb598394e6072fa18af8a3eed0ba05833b","pdf":"http://development.lvh.me:3000/receipt/f62c1beb598394e6072fa18af8a3eed0ba05833b.pdf","url":"http://development.lvh.me:3000/api/receipts/199.json","processor":null,"processor_id":null,"custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:35 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts/200.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '5' - x-ratelimit-remaining: - - '93' - content-type: - - application/json; charset=utf-8 - etag: - - '"4884e54cccfe170b4e81103fcc5c0db3"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 33b86780-0d44-48b4-83cb-d4a508e045e9 - x-runtime: - - '1.387477' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":200,"blocked":false,"number":"0002","issue_date":"2017-06-12","created_at":1497268132,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":201,"description":"Hey, - Liste!","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount_cents":"1000.0"}],"subtotal_cents":"1000.0","discount_cents":"0.0","taxes":[],"payments":[{"id":50,"date":"2017-06-12","payment_method":"other","amount_cents":1000}],"notes":null,"state":"paid","tag_list":[],"secure_id":"64649b40d7fc4bcc0b1a0493b87fa030789235d4","permalink":"http://development.lvh.me:3000/receipt/64649b40d7fc4bcc0b1a0493b87fa030789235d4","pdf":"http://development.lvh.me:3000/receipt/64649b40d7fc4bcc0b1a0493b87fa030789235d4.pdf","url":"http://development.lvh.me:3000/api/receipts/200.json","processor":null,"processor_id":null,"custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:36 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/found_webhook.yml b/test/fixtures/quaderno_cassettes/found_webhook.yml deleted file mode 100644 index 52879ed..0000000 --- a/test/fixtures/quaderno_cassettes/found_webhook.yml +++ /dev/null @@ -1,130 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json - body: - encoding: UTF-8 - string: '{"url":"http://quadernoapp.com","events_types":["invoice.created","expense.updated"]}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '2' - x-ratelimit-remaining: - - '91' - content-type: - - application/json; charset=utf-8 - etag: - - '"ad33abb0a26086d6366cb6faf2f99e3d"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 8caa8d6e-2624-47ab-8c4d-0ddeabad142c - x-runtime: - - '1.901922' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":5,"url":"http://quadernoapp.com","auth_key":"YcKz3CdhV2mJjE80RwIhfg","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:22.409Z","updated_at":"2017-06-12T11:54:22.409Z"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:22 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - content-type: - - application/json; charset=utf-8 - etag: - - '"567dcc587054d62ddc6cbb37fb0442ec"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 55d2f917-bd93-4ddd-8e98-5c29b783c5a0 - x-runtime: - - '0.732996' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":1,"url":"http://quadernoapp.com","auth_key":"Ze024XpO9CJ6Fy2frwWV4Q","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:53:54.000Z","updated_at":"2017-06-12T11:53:54.000Z"},{"id":5,"url":"http://quadernoapp.com","auth_key":"YcKz3CdhV2mJjE80RwIhfg","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:22.000Z","updated_at":"2017-06-12T11:54:22.000Z"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:23 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/5.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - cache-control: - - no-cache - x-request-id: - - 06ebae54-e672-4161-b319-24edf0db1289 - x-runtime: - - '0.711711' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:24 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/new_contact.yml b/test/fixtures/quaderno_cassettes/new_contact.yml deleted file mode 100644 index 80e3d9d..0000000 --- a/test/fixtures/quaderno_cassettes/new_contact.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json - body: - encoding: UTF-8 - string: '{"kind":"company","first_name":"Test_Skynet","email":"my_little@po.ny"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - content-type: - - application/json; charset=utf-8 - etag: - - '"cc86da182178ec31d29ca5ac67e1651f"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 9dedb072-e441-4d2d-ab84-3fd828a650e6 - x-runtime: - - '0.730536' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:00:55 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/new_contact_by_access_token.yml b/test/fixtures/quaderno_cassettes/new_contact_by_access_token.yml deleted file mode 100644 index c3bb849..0000000 --- a/test/fixtures/quaderno_cassettes/new_contact_by_access_token.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://development.lvh.me:3000/api/contacts.json - body: - encoding: UTF-8 - string: '{"kind":"company","first_name":"Test_Skynet","email":"my_little@po.ny"}' - headers: - accept: - - application/json - authorization: - - Bearer 36b82411e6686581fe3d7d10fbe931a3fdc9265a353832f0e3ff6269bd319e12 - content-type: - - application/json - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - content-type: - - application/json; charset=utf-8 - etag: - - '"a795161241ec36c1573a97839c8d403f"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - ffea69d5-d081-408f-ab71-e4af487833c5 - x-runtime: - - '1.645313' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":62,"kind":"company","created_at":1497351487,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","permalink":"http://development.lvh.me:3000/billing/8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","url":"http://development.lvh.me:3000/api/contacts/62"}' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 10:58:07 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/new_contact_by_authentication_token.yml b/test/fixtures/quaderno_cassettes/new_contact_by_authentication_token.yml deleted file mode 100644 index 84b2ff6..0000000 --- a/test/fixtures/quaderno_cassettes/new_contact_by_authentication_token.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json - body: - encoding: UTF-8 - string: '{"kind":"company","first_name":"Test_Skynet","email":"my_little@po.ny"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '92' - content-type: - - application/json; charset=utf-8 - etag: - - '"32908f591a2c9a94a4b012544403fb8f"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 75135e5f-6461-4a39-a30d-54a10791c43d - x-runtime: - - '0.278524' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":64,"kind":"company","created_at":1497351490,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"08638259e35b5864ad37f6c5776113d794fa2ac2","permalink":"http://development.lvh.me:3000/billing/08638259e35b5864ad37f6c5776113d794fa2ac2","url":"http://development.lvh.me:3000/api/contacts/64"}' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 10:58:10 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/new_estimate.yml b/test/fixtures/quaderno_cassettes/new_estimate.yml deleted file mode 100644 index 095c063..0000000 --- a/test/fixtures/quaderno_cassettes/new_estimate.yml +++ /dev/null @@ -1,137 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 12584b39-67b8-461a-9a8b-7cf0ceca23b9 - x-runtime: - - '0.271814' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:38 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates.json - body: - encoding: UTF-8 - string: '{"contact_id":44,"number":"test number 42","contact_name":"Albus Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - content-type: - - application/json; charset=utf-8 - etag: - - '"5a741a1e031dbceb847c6193d1621a5e"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - c0cc429f-2c4b-4b45-a323-d25b3330cecf - x-runtime: - - '0.680277' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":176,"number":"test number 42","issue_date":"2017-06-09","created_at":1497013359,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":177,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"c554f9d8cc38cc0ef577322db3b0930ef5374886","permalink":"http://development.lvh.me:3000/estimate/c554f9d8cc38cc0ef577322db3b0930ef5374886","url":"http://development.lvh.me:3000/api/estimates/176.json","custom_metadata":{}}' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:39 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates/176.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '14' - x-ratelimit-remaining: - - '98' - cache-control: - - no-cache - x-request-id: - - dbc450fb-bbda-4630-ae93-1cea91fdcacb - x-runtime: - - '0.353439' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:40 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/new_evidence.yml b/test/fixtures/quaderno_cassettes/new_evidence.yml deleted file mode 100644 index 1b4666d..0000000 --- a/test/fixtures/quaderno_cassettes/new_evidence.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/evidences.json - body: - encoding: UTF-8 - string: '{"document_id":180,"billing_country":"BE","bank_country":"BE"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '14' - x-ratelimit-remaining: - - '98' - content-type: - - application/json; charset=utf-8 - etag: - - '"a0ac8e0c9afd5e7ae14cd5d9c0091b98"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 7eaaa626-cb31-43db-8b5d-019ec34079e5 - x-runtime: - - '0.840152' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":1,"document_id":180,"state":"confirmed","billing_country":"BE","ip_address":null,"ip_country":null,"bank_country":"BE","vat_number":null,"notes":null}' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:07:05 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/new_expense.yml b/test/fixtures/quaderno_cassettes/new_expense.yml deleted file mode 100644 index 7f8ad5f..0000000 --- a/test/fixtures/quaderno_cassettes/new_expense.yml +++ /dev/null @@ -1,189 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '12' - x-ratelimit-remaining: - - '98' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"1096b389a8934c3608b59ed5c52ff5c1"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 036af7f9-9bf8-49de-b84d-33f2c8420f75 - x-runtime: - - '3.312077' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":184,"blocked":false,"issue_date":"2017-06-12","created_at":1497266330,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":185,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[{"id":40,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/40.json"},{"id":41,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/41.json"},{"id":42,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/42.json"}],"notes":null,"state":"paid","tag_list":[],"url":"http://development.lvh.me:3000/api/expenses/184.json","custom_metadata":{}},{"id":137,"blocked":true,"issue_date":"2017-05-29","created_at":1496060112,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":138,"description":"asdasd","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[],"notes":null,"state":"paid","tag_list":["dundundugan","rap"],"url":"http://development.lvh.me:3000/api/expenses/137.json","custom_metadata":{}},{"id":135,"blocked":false,"issue_date":"2017-05-26","created_at":1495789529,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":136,"description":"Dreamhack - valencia","quantity":"1.0","unit_price_cents":"23000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"23000.0","discount_cents":"0.0","gross_amount_cents":"23000.0"}],"subtotal_cents":"23000.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":23000},"payments":[{"id":7,"date":"2017-05-31","payment_method":"credit_card","amount_cents":23000,"url":"http://development.lvh.me:3000/api/expenses/135/payments/7.json"}],"notes":null,"state":"paid","tag_list":["balls"],"url":"http://development.lvh.me:3000/api/expenses/135.json","custom_metadata":{}},{"id":134,"blocked":false,"issue_date":"2017-05-26","created_at":1495789490,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":135,"description":"Something","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount_cents":"1000.0"}],"subtotal_cents":"1000.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":1000},"payments":[{"id":4,"date":"2017-05-31","payment_method":"credit_card","amount_cents":1000,"url":"http://development.lvh.me:3000/api/expenses/134/payments/4.json"}],"notes":null,"state":"paid","tag_list":["rap","god"],"url":"http://development.lvh.me:3000/api/expenses/134.json","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:07 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '9' - x-ratelimit-remaining: - - '97' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 025f7093-5b0b-4f38-a042-5360ab1115cf - x-runtime: - - '1.104037' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:09 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses.json - body: - encoding: UTF-8 - string: '{"contact_id":44,"contact_name":"Albus Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '7' - x-ratelimit-remaining: - - '96' - content-type: - - application/json; charset=utf-8 - etag: - - '"c76a50620433ffd549726ae999c4bf09"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - b0648fd4-850e-4f6b-9e53-b335690ca665 - x-runtime: - - '3.761056' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":188,"blocked":false,"issue_date":"2017-06-12","created_at":1497267490,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":189,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[],"notes":null,"state":"outstanding","tag_list":[],"url":"http://development.lvh.me:3000/api/expenses/188.json","custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:12 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses/188.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '4' - x-ratelimit-remaining: - - '95' - cache-control: - - no-cache - x-request-id: - - 1b0b9663-f40f-4f7d-abd6-45a946d52ba8 - x-runtime: - - '2.399572' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:15 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/new_invoice.yml b/test/fixtures/quaderno_cassettes/new_invoice.yml deleted file mode 100644 index 51b5935..0000000 --- a/test/fixtures/quaderno_cassettes/new_invoice.yml +++ /dev/null @@ -1,137 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '13' - x-ratelimit-remaining: - - '98' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 5f55939e-dff8-4bca-b69b-f845ed448083 - x-runtime: - - '1.159593' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:11 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices.json - body: - encoding: UTF-8 - string: '{"contact_id":44,"contact_name":"Albus Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '12' - x-ratelimit-remaining: - - '97' - content-type: - - application/json; charset=utf-8 - etag: - - '"4d338c88d5eac57d13d211099c4c8954"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 716a7db7-82ac-4ec0-8df5-369bcc704733 - x-runtime: - - '4.541294' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":193,"blocked":false,"number":"0006","issue_date":"2017-06-12","created_at":1497267853,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":194,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[],"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"a87a9a9fb8fb5e4ee724175556480167798377cf","permalink":"http://development.lvh.me:3000/invoice/a87a9a9fb8fb5e4ee724175556480167798377cf","pdf":"http://development.lvh.me:3000/invoice/a87a9a9fb8fb5e4ee724175556480167798377cf.pdf","url":"http://development.lvh.me:3000/api/invoices/193.json","processor":null,"processor_id":null,"custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:16 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices/193.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '7' - x-ratelimit-remaining: - - '96' - cache-control: - - no-cache - x-request-id: - - 838bf07f-794d-43e2-bcd9-07f00cc7d948 - x-runtime: - - '2.274649' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:18 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/new_item.yml b/test/fixtures/quaderno_cassettes/new_item.yml deleted file mode 100644 index fa31bbe..0000000 --- a/test/fixtures/quaderno_cassettes/new_item.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items.json - body: - encoding: UTF-8 - string: '{"code":"000000","name":"Test_Skynet","unit_cost":21.0}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - content-type: - - application/json; charset=utf-8 - etag: - - '"b67748dbc7a4b108905719a11ac088b2"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 89015e0b-0035-42a9-96f0-55ac879cdc6d - x-runtime: - - '1.702892' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":2,"code":"000000","name":"Test_Skynet","unit_cost":"21.0","stock":null,"tax_class":"eservice","url":"http://development.lvh.me:3000/api/items/2"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:33 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/new_receipt.yml b/test/fixtures/quaderno_cassettes/new_receipt.yml deleted file mode 100644 index 515a03b..0000000 --- a/test/fixtures/quaderno_cassettes/new_receipt.yml +++ /dev/null @@ -1,173 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json - body: - encoding: UTF-8 - string: '{"first_name":"Test customer"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - content-type: - - application/json; charset=utf-8 - etag: - - '"a7a06d6ea36e5b87a92a79c5d10e8a7f"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - ea7fcbd2-73bc-4540-9d37-120b98a767f9 - x-runtime: - - '5.209221' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":51,"kind":"company","created_at":1497268145,"full_name":"Test - customer","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"ca8beeb0198d77c285b368c6283bba7cee19eb7b","permalink":"http://development.lvh.me:3000/billing/ca8beeb0198d77c285b368c6283bba7cee19eb7b","url":"http://development.lvh.me:3000/api/contacts/51"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:05 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts.json - body: - encoding: UTF-8 - string: '{"contact_id":51,"currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_method":"cash","notes":""}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - content-type: - - application/json; charset=utf-8 - etag: - - '"95debeefc46c3c2ee8c67ae0c31b63e3"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 4d1a56cc-30ec-489e-81b1-b332c074228b - x-runtime: - - '5.086502' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":201,"blocked":false,"number":"0003","issue_date":"2017-06-12","created_at":1497268147,"contact":{"id":51,"full_name":"Test - customer"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":202,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"payments":[{"id":51,"date":"2017-06-12","payment_method":"cash","amount_cents":0}],"notes":null,"state":"paid","tag_list":[],"secure_id":"5a9831bd31d5fb6dfa2f253c6a96c3e65f443146","permalink":"http://development.lvh.me:3000/receipt/5a9831bd31d5fb6dfa2f253c6a96c3e65f443146","pdf":"http://development.lvh.me:3000/receipt/5a9831bd31d5fb6dfa2f253c6a96c3e65f443146.pdf","url":"http://development.lvh.me:3000/api/receipts/201.json","processor":null,"processor_id":null,"custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:10 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts/201.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '9' - x-ratelimit-remaining: - - '98' - cache-control: - - no-cache - x-request-id: - - fc02265d-a576-48d2-a6bd-53b7b57a5a3b - x-runtime: - - '4.080019' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:14 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts/51.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '6' - x-ratelimit-remaining: - - '97' - cache-control: - - no-cache - x-request-id: - - 8fe818c8-b018-4c97-9762-40cc274070fd - x-runtime: - - '1.543748' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:16 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/new_webhook.yml b/test/fixtures/quaderno_cassettes/new_webhook.yml deleted file mode 100644 index ccaa7ff..0000000 --- a/test/fixtures/quaderno_cassettes/new_webhook.yml +++ /dev/null @@ -1,87 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json - body: - encoding: UTF-8 - string: '{"url":"http://quadernoapp.com","events_types":["invoice.created","expense.updated"]}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - content-type: - - application/json; charset=utf-8 - etag: - - '"91b6be83c4e4a2d47fb90561fe7c4f2f"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 8073f345-66c4-466c-821c-7215445b37d5 - x-runtime: - - '4.655960' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":2,"url":"http://quadernoapp.com","auth_key":"YbgPZCXR-7M5Y3sN5SI9qg","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:12.622Z","updated_at":"2017-06-12T11:54:12.622Z"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:12 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/2.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '98' - cache-control: - - no-cache - x-request-id: - - b61a6386-ff61-4ad8-82a8-72473f13889e - x-runtime: - - '0.977874' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:13 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/paid_expense.yml b/test/fixtures/quaderno_cassettes/paid_expense.yml deleted file mode 100644 index 18f5b8a..0000000 --- a/test/fixtures/quaderno_cassettes/paid_expense.yml +++ /dev/null @@ -1,98 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"04eba45c4062d412570b79904d65d4c7"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 3a8c1ecc-a2a8-46e1-a8fa-09a26b1f7833 - x-runtime: - - '4.103498' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":184,"blocked":false,"issue_date":"2017-06-12","created_at":1497266330,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":185,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[{"id":40,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/40.json"},{"id":41,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/41.json"}],"notes":null,"state":"paid","tag_list":[],"url":"http://development.lvh.me:3000/api/expenses/184.json","custom_metadata":{}},{"id":137,"blocked":true,"issue_date":"2017-05-29","created_at":1496060112,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":138,"description":"asdasd","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[],"notes":null,"state":"paid","tag_list":["dundundugan","rap"],"url":"http://development.lvh.me:3000/api/expenses/137.json","custom_metadata":{}},{"id":135,"blocked":false,"issue_date":"2017-05-26","created_at":1495789529,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":136,"description":"Dreamhack - valencia","quantity":"1.0","unit_price_cents":"23000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"23000.0","discount_cents":"0.0","gross_amount_cents":"23000.0"}],"subtotal_cents":"23000.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":23000},"payments":[{"id":7,"date":"2017-05-31","payment_method":"credit_card","amount_cents":23000,"url":"http://development.lvh.me:3000/api/expenses/135/payments/7.json"}],"notes":null,"state":"paid","tag_list":["balls"],"url":"http://development.lvh.me:3000/api/expenses/135.json","custom_metadata":{}},{"id":134,"blocked":false,"issue_date":"2017-05-26","created_at":1495789490,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":135,"description":"Something","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount_cents":"1000.0"}],"subtotal_cents":"1000.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":1000},"payments":[{"id":4,"date":"2017-05-31","payment_method":"credit_card","amount_cents":1000,"url":"http://development.lvh.me:3000/api/expenses/134/payments/4.json"}],"notes":null,"state":"paid","tag_list":["rap","god"],"url":"http://development.lvh.me:3000/api/expenses/134.json","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:02 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses/184/payments.json - body: - encoding: UTF-8 - string: payment_method=cash&amount=10000 - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - content-type: - - application/json; charset=utf-8 - etag: - - '"cdd717fecdd357b86d86cc70298657c1"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - e3ae0b07-2a32-4dab-962c-554209c21bc9 - x-runtime: - - '2.063114' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":42,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/42.json"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:38:04 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/paid_invoice.yml b/test/fixtures/quaderno_cassettes/paid_invoice.yml deleted file mode 100644 index 8805ef9..0000000 --- a/test/fixtures/quaderno_cassettes/paid_invoice.yml +++ /dev/null @@ -1,99 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"3cd4ba7e403513911f62f769100ce2a4"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 37acbab5-57a6-4514-aeba-d48ae8cb08d0 - x-runtime: - - '5.111632' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":180,"blocked":false,"number":"0005","issue_date":"2017-06-09","created_at":1497013624,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":181,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[],"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"8ba033c910a376319e4b383de66d6934abcfe6a4","permalink":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4","pdf":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4.pdf","url":"http://development.lvh.me:3000/api/invoices/180.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":167,"blocked":true,"number":"0004","issue_date":"2017-06-07","created_at":1496825417,"contact":{"id":43,"full_name":"Test_OCP"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":168,"description":"Something","quantity":"1.0","unit_price_cents":"1212.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"1212.0","discount_cents":"0.0","gross_amount_cents":"1212.0"}],"subtotal_cents":"1212.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":254}],"total_cents":1466,"payments":[{"id":36,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":1466,"url":"http://development.lvh.me:3000/api/invoices/167/payments/36.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"5ee4e6d22a4d8b6798a9df315395fe05a5efb80a","permalink":"http://development.lvh.me:3000/invoice/5ee4e6d22a4d8b6798a9df315395fe05a5efb80a","pdf":"http://development.lvh.me:3000/invoice/5ee4e6d22a4d8b6798a9df315395fe05a5efb80a.pdf","url":"http://development.lvh.me:3000/api/invoices/167.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":168,"blocked":false,"number":"0003","issue_date":"2017-06-07","created_at":1496825418,"contact":{"id":43,"full_name":"Test_OCP"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":169,"description":"Something","quantity":"1.0","unit_price_cents":"671.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"671.0","discount_cents":"0.0","gross_amount_cents":"671.0"}],"subtotal_cents":"671.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":141}],"total_cents":812,"payments":[],"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"e93f8543031ccee4aa6933b7418dbe8736ec4306","permalink":"http://development.lvh.me:3000/invoice/e93f8543031ccee4aa6933b7418dbe8736ec4306","pdf":"http://development.lvh.me:3000/invoice/e93f8543031ccee4aa6933b7418dbe8736ec4306.pdf","url":"http://development.lvh.me:3000/api/invoices/168.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":169,"blocked":false,"number":"0002","issue_date":"2017-06-07","created_at":1496825419,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":170,"description":"Something","quantity":"1.0","unit_price_cents":"2008.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"2008.0","discount_cents":"0.0","gross_amount_cents":"2008.0"}],"subtotal_cents":"2008.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":422}],"total_cents":2430,"payments":[{"id":38,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":2430,"url":"http://development.lvh.me:3000/api/invoices/169/payments/38.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"45652c45cc01d96ac603b0484e4e00754ba091c8","permalink":"http://development.lvh.me:3000/invoice/45652c45cc01d96ac603b0484e4e00754ba091c8","pdf":"http://development.lvh.me:3000/invoice/45652c45cc01d96ac603b0484e4e00754ba091c8.pdf","url":"http://development.lvh.me:3000/api/invoices/169.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":170,"blocked":false,"number":"0001","issue_date":"2017-06-07","created_at":1496825420,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":171,"description":"Something","quantity":"1.0","unit_price_cents":"1340.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"1340.0","discount_cents":"0.0","gross_amount_cents":"1340.0"}],"subtotal_cents":"1340.0","discount_cents":"0.0","taxes":[],"total_cents":1340,"payments":[{"id":39,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":1340,"url":"http://development.lvh.me:3000/api/invoices/170/payments/39.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"696d7d7e402f544a839e84f3328801547f6c7c12","permalink":"http://development.lvh.me:3000/invoice/696d7d7e402f544a839e84f3328801547f6c7c12","pdf":"http://development.lvh.me:3000/invoice/696d7d7e402f544a839e84f3328801547f6c7c12.pdf","url":"http://development.lvh.me:3000/api/invoices/170.json","processor":"stripe","processor_id":"ch_1234","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:08 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices/180/payments.json - body: - encoding: UTF-8 - string: payment_method=cash&amount=100000000 - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - content-type: - - application/json; charset=utf-8 - etag: - - '"be8d12f04e29f28f66ecbf7a3a425eb5"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 4cce96c2-8414-438b-8d6b-20ccfd55c037 - x-runtime: - - '1.699217' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":45,"date":"2017-06-12","payment_method":"cash","amount_cents":10000000000,"url":"http://development.lvh.me:3000/api/invoices/180/payments/45.json"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:44:10 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/rate_limit.yml b/test/fixtures/quaderno_cassettes/rate_limit.yml deleted file mode 100644 index 4a81bec..0000000 --- a/test/fixtures/quaderno_cassettes/rate_limit.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/ping.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '12' - x-ratelimit-remaining: - - '92' - content-type: - - application/json; charset=utf-8 - etag: - - '"0c776997933eb60833b37beaf43814c8"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 0a65fb49-4bc3-44d0-8361-5d494574bcbf - x-runtime: - - '0.169790' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"status":"OK"}' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:00:57 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/unpay_an_expense.yml b/test/fixtures/quaderno_cassettes/unpay_an_expense.yml deleted file mode 100644 index a60b92b..0000000 --- a/test/fixtures/quaderno_cassettes/unpay_an_expense.yml +++ /dev/null @@ -1,138 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"f1c6b75cdd65aed7489f119573a47592"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - d9056371-f011-476f-a9cd-2142555c49e9 - x-runtime: - - '4.767592' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":191,"blocked":false,"issue_date":"2017-06-12","created_at":1497267534,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":192,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[],"notes":null,"state":"outstanding","tag_list":[],"url":"http://development.lvh.me:3000/api/expenses/191.json","custom_metadata":{}},{"id":184,"blocked":false,"issue_date":"2017-06-12","created_at":1497266330,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":185,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[{"id":40,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/40.json"},{"id":41,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/41.json"},{"id":42,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/42.json"},{"id":43,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/184/payments/43.json"}],"notes":null,"state":"paid","tag_list":[],"url":"http://development.lvh.me:3000/api/expenses/184.json","custom_metadata":{}},{"id":137,"blocked":true,"issue_date":"2017-05-29","created_at":1496060112,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":138,"description":"asdasd","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[],"notes":null,"state":"paid","tag_list":["dundundugan","rap"],"url":"http://development.lvh.me:3000/api/expenses/137.json","custom_metadata":{}},{"id":135,"blocked":false,"issue_date":"2017-05-26","created_at":1495789529,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":136,"description":"Dreamhack - valencia","quantity":"1.0","unit_price_cents":"23000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"23000.0","discount_cents":"0.0","gross_amount_cents":"23000.0"}],"subtotal_cents":"23000.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":23000},"payments":[{"id":7,"date":"2017-05-31","payment_method":"credit_card","amount_cents":23000,"url":"http://development.lvh.me:3000/api/expenses/135/payments/7.json"}],"notes":null,"state":"paid","tag_list":["balls"],"url":"http://development.lvh.me:3000/api/expenses/135.json","custom_metadata":{}},{"id":134,"blocked":false,"issue_date":"2017-05-26","created_at":1495789490,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":135,"description":"Something","quantity":"1.0","unit_price_cents":"1000.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":"","subtotal_cents":"1000.0","discount_cents":"0.0","gross_amount_cents":"1000.0"}],"subtotal_cents":"1000.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":1000},"payments":[{"id":4,"date":"2017-05-31","payment_method":"credit_card","amount_cents":1000,"url":"http://development.lvh.me:3000/api/expenses/134/payments/4.json"}],"notes":null,"state":"paid","tag_list":["rap","god"],"url":"http://development.lvh.me:3000/api/expenses/134.json","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:40:45 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses/191/payments.json - body: - encoding: UTF-8 - string: payment_method=cash&amount=10000 - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '11' - x-ratelimit-remaining: - - '98' - content-type: - - application/json; charset=utf-8 - etag: - - '"e128a5cd88d56beafeb08fa7dc3e0f0c"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 975589c8-f973-47a7-ba33-47904846cdf3 - x-runtime: - - '1.601460' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":44,"date":"2017-06-12","payment_method":"cash","amount_cents":1000000,"url":"http://development.lvh.me:3000/api/expenses/191/payments/44.json"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:40:47 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses/191/payments/44.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '9' - x-ratelimit-remaining: - - '97' - cache-control: - - no-cache - x-request-id: - - 15fca226-5468-4fe3-9834-da3078e59105 - x-runtime: - - '1.416175' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:40:48 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml b/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml deleted file mode 100644 index b71fe12..0000000 --- a/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml +++ /dev/null @@ -1,138 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"47582ab138340fc16e49091c677bd6a5"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 109d4762-9cd9-4261-a6fd-7b80767fcbed - x-runtime: - - '4.801554' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":180,"blocked":false,"number":"0005","issue_date":"2017-06-09","created_at":1497013624,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":181,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[{"id":45,"date":"2017-06-12","payment_method":"cash","amount_cents":10000000000,"url":"http://development.lvh.me:3000/api/invoices/180/payments/45.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"8ba033c910a376319e4b383de66d6934abcfe6a4","permalink":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4","pdf":"http://development.lvh.me:3000/invoice/8ba033c910a376319e4b383de66d6934abcfe6a4.pdf","url":"http://development.lvh.me:3000/api/invoices/180.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":167,"blocked":true,"number":"0004","issue_date":"2017-06-07","created_at":1496825417,"contact":{"id":43,"full_name":"Test_OCP"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":168,"description":"Something","quantity":"1.0","unit_price_cents":"1212.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"1212.0","discount_cents":"0.0","gross_amount_cents":"1212.0"}],"subtotal_cents":"1212.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":254}],"total_cents":1466,"payments":[{"id":36,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":1466,"url":"http://development.lvh.me:3000/api/invoices/167/payments/36.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"5ee4e6d22a4d8b6798a9df315395fe05a5efb80a","permalink":"http://development.lvh.me:3000/invoice/5ee4e6d22a4d8b6798a9df315395fe05a5efb80a","pdf":"http://development.lvh.me:3000/invoice/5ee4e6d22a4d8b6798a9df315395fe05a5efb80a.pdf","url":"http://development.lvh.me:3000/api/invoices/167.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":168,"blocked":false,"number":"0003","issue_date":"2017-06-07","created_at":1496825418,"contact":{"id":43,"full_name":"Test_OCP"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":169,"description":"Something","quantity":"1.0","unit_price_cents":"671.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"671.0","discount_cents":"0.0","gross_amount_cents":"671.0"}],"subtotal_cents":"671.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":141}],"total_cents":812,"payments":[],"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"e93f8543031ccee4aa6933b7418dbe8736ec4306","permalink":"http://development.lvh.me:3000/invoice/e93f8543031ccee4aa6933b7418dbe8736ec4306","pdf":"http://development.lvh.me:3000/invoice/e93f8543031ccee4aa6933b7418dbe8736ec4306.pdf","url":"http://development.lvh.me:3000/api/invoices/168.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":169,"blocked":false,"number":"0002","issue_date":"2017-06-07","created_at":1496825419,"contact":{"id":42,"full_name":"Cidi - Campidocti"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":170,"description":"Something","quantity":"1.0","unit_price_cents":"2008.0","discount_rate":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"2008.0","discount_cents":"0.0","gross_amount_cents":"2008.0"}],"subtotal_cents":"2008.0","discount_cents":"0.0","taxes":[{"label":"IVA - (21.00%)","amount_cents":422}],"total_cents":2430,"payments":[{"id":38,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":2430,"url":"http://development.lvh.me:3000/api/invoices/169/payments/38.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"45652c45cc01d96ac603b0484e4e00754ba091c8","permalink":"http://development.lvh.me:3000/invoice/45652c45cc01d96ac603b0484e4e00754ba091c8","pdf":"http://development.lvh.me:3000/invoice/45652c45cc01d96ac603b0484e4e00754ba091c8.pdf","url":"http://development.lvh.me:3000/api/invoices/169.json","processor":null,"processor_id":null,"custom_metadata":{}},{"id":170,"blocked":false,"number":"0001","issue_date":"2017-06-07","created_at":1496825420,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":171,"description":"Something","quantity":"1.0","unit_price_cents":"1340.0","discount_rate":"0.0","tax_1_name":"","tax_1_rate":null,"tax_2_name":"","tax_2_rate":null,"reference":null,"subtotal_cents":"1340.0","discount_cents":"0.0","gross_amount_cents":"1340.0"}],"subtotal_cents":"1340.0","discount_cents":"0.0","taxes":[],"total_cents":1340,"payments":[{"id":39,"date":"2017-06-07","payment_method":"wire_transfer","amount_cents":1340,"url":"http://development.lvh.me:3000/api/invoices/170/payments/39.json"}],"payment_details":null,"notes":null,"state":"paid","tag_list":[],"secure_id":"696d7d7e402f544a839e84f3328801547f6c7c12","permalink":"http://development.lvh.me:3000/invoice/696d7d7e402f544a839e84f3328801547f6c7c12","pdf":"http://development.lvh.me:3000/invoice/696d7d7e402f544a839e84f3328801547f6c7c12.pdf","url":"http://development.lvh.me:3000/api/invoices/170.json","processor":"stripe","processor_id":"ch_1234","custom_metadata":{}}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:03 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices/180/payments.json - body: - encoding: UTF-8 - string: payment_method=cash&amount=100000000 - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - content-type: - - application/json; charset=utf-8 - etag: - - '"e901e7ec05bf77a2367b47352fccb933"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - ef133970-0afc-4547-a724-ae7b56da9f46 - x-runtime: - - '1.864064' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":46,"date":"2017-06-12","payment_method":"cash","amount_cents":10000000000,"url":"http://development.lvh.me:3000/api/invoices/180/payments/46.json"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:05 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices/180/payments/46.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '13' - x-ratelimit-remaining: - - '98' - cache-control: - - no-cache - x-request-id: - - f450ada9-a81f-4e2c-ac1a-c688105fe1fb - x-runtime: - - '1.474748' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:06 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/updated_contact.yml b/test/fixtures/quaderno_cassettes/updated_contact.yml deleted file mode 100644 index 06ca0e4..0000000 --- a/test/fixtures/quaderno_cassettes/updated_contact.yml +++ /dev/null @@ -1,97 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '12' - x-ratelimit-remaining: - - '91' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 5387e3e2-d7a4-449c-91fd-819a6f43bb3d - x-runtime: - - '0.253794' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:00:58 GMT -- request: - method: put - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts/43.json - body: - encoding: UTF-8 - string: '{"first_name":"Test_OCP","email":"dont@stop.believing"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '12' - x-ratelimit-remaining: - - '90' - content-type: - - application/json; charset=utf-8 - etag: - - '"2b9954582990f83a961c36960d435f7d"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 0a75ca99-7ed9-4c91-8fd9-d1a21f088f70 - x-runtime: - - '0.234680' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"}' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:00:58 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/updated_contact_by_access_token.yml b/test/fixtures/quaderno_cassettes/updated_contact_by_access_token.yml deleted file mode 100644 index c4a91ab..0000000 --- a/test/fixtures/quaderno_cassettes/updated_contact_by_access_token.yml +++ /dev/null @@ -1,101 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Bearer 36b82411e6686581fe3d7d10fbe931a3fdc9265a353832f0e3ff6269bd319e12 - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '94' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"ce9bb93f9732d0d31bfba5e17089ac04"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - c3bc2ecf-db0b-4ad2-a9de-679cc1dd9bec - x-runtime: - - '0.287831' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":50,"kind":"company","created_at":1497267993,"full_name":"Test_OCP","contact_name":null,"street_line_1":"asdasdas","street_line_2":"3rwerds","postal_code":"08080","city":"Sdasdasd","region":"sadasdasd","country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"ES78488057M","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"757312a30b02810e495ae18c312a50a1e4f4b713","permalink":"http://development.lvh.me:3000/billing/757312a30b02810e495ae18c312a50a1e4f4b713","url":"http://development.lvh.me:3000/api/contacts/50"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"},{"id":55,"kind":"company","created_at":1497269711,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","permalink":"http://development.lvh.me:3000/billing/42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","url":"http://development.lvh.me:3000/api/contacts/55"},{"id":56,"kind":"company","created_at":1497351006,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0685fa00c66ec752aacd5f3e1f81365831cd3d65","permalink":"http://development.lvh.me:3000/billing/0685fa00c66ec752aacd5f3e1f81365831cd3d65","url":"http://development.lvh.me:3000/api/contacts/56"},{"id":58,"kind":"company","created_at":1497351105,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8bebc09443c4f72ef4059058607c50447b2f3c16","permalink":"http://development.lvh.me:3000/billing/8bebc09443c4f72ef4059058607c50447b2f3c16","url":"http://development.lvh.me:3000/api/contacts/58"},{"id":60,"kind":"company","created_at":1497351108,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"45d4cccba293ef0da33c07a991c6081ec4179948","permalink":"http://development.lvh.me:3000/billing/45d4cccba293ef0da33c07a991c6081ec4179948","url":"http://development.lvh.me:3000/api/contacts/60"},{"id":62,"kind":"company","created_at":1497351487,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","permalink":"http://development.lvh.me:3000/billing/8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","url":"http://development.lvh.me:3000/api/contacts/62"},{"id":57,"kind":"company","created_at":1497351007,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","permalink":"http://development.lvh.me:3000/billing/cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","url":"http://development.lvh.me:3000/api/contacts/57"},{"id":59,"kind":"company","created_at":1497351105,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"f8bae1172828d0fdef3ac4598592ac45dc0d722f","permalink":"http://development.lvh.me:3000/billing/f8bae1172828d0fdef3ac4598592ac45dc0d722f","url":"http://development.lvh.me:3000/api/contacts/59"},{"id":61,"kind":"company","created_at":1497351108,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"391ba9b21d0da56429e44a5e7fd9ad89706285e2","permalink":"http://development.lvh.me:3000/billing/391ba9b21d0da56429e44a5e7fd9ad89706285e2","url":"http://development.lvh.me:3000/api/contacts/61"},{"id":63,"kind":"company","created_at":1497351487,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"93744b7e3b633da80c37441a724f0f335dd59fec","permalink":"http://development.lvh.me:3000/billing/93744b7e3b633da80c37441a724f0f335dd59fec","url":"http://development.lvh.me:3000/api/contacts/63"}]' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 10:58:09 GMT -- request: - method: put - uri: http://development.lvh.me:3000/api/contacts/43.json - body: - encoding: UTF-8 - string: '{"first_name":"Test_OCP","email":"dont@stop.believing"}' - headers: - accept: - - application/json - authorization: - - Bearer 36b82411e6686581fe3d7d10fbe931a3fdc9265a353832f0e3ff6269bd319e12 - content-type: - - application/json - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '93' - content-type: - - application/json; charset=utf-8 - etag: - - '"2b9954582990f83a961c36960d435f7d"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - a3af093b-798f-4a72-a6b7-5664ed17b29a - x-runtime: - - '0.456251' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"}' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 10:58:10 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/updated_contact_by_authentication_token.yml b/test/fixtures/quaderno_cassettes/updated_contact_by_authentication_token.yml deleted file mode 100644 index 87098f9..0000000 --- a/test/fixtures/quaderno_cassettes/updated_contact_by_authentication_token.yml +++ /dev/null @@ -1,102 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '7' - x-ratelimit-remaining: - - '86' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"46aaea3ca58483c13bf81149f2a0a335"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 61badc58-ad5a-4c63-abe8-b5c4ffb56e11 - x-runtime: - - '0.284843' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":50,"kind":"company","created_at":1497267993,"full_name":"Test_OCP","contact_name":null,"street_line_1":"asdasdas","street_line_2":"3rwerds","postal_code":"08080","city":"Sdasdasd","region":"sadasdasd","country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":"ES78488057M","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"757312a30b02810e495ae18c312a50a1e4f4b713","permalink":"http://development.lvh.me:3000/billing/757312a30b02810e495ae18c312a50a1e4f4b713","url":"http://development.lvh.me:3000/api/contacts/50"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"},{"id":55,"kind":"company","created_at":1497269711,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","permalink":"http://development.lvh.me:3000/billing/42e59fd208fd654dbfd7d61fa9bfbb1706a7bba3","url":"http://development.lvh.me:3000/api/contacts/55"},{"id":56,"kind":"company","created_at":1497351006,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0685fa00c66ec752aacd5f3e1f81365831cd3d65","permalink":"http://development.lvh.me:3000/billing/0685fa00c66ec752aacd5f3e1f81365831cd3d65","url":"http://development.lvh.me:3000/api/contacts/56"},{"id":58,"kind":"company","created_at":1497351105,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8bebc09443c4f72ef4059058607c50447b2f3c16","permalink":"http://development.lvh.me:3000/billing/8bebc09443c4f72ef4059058607c50447b2f3c16","url":"http://development.lvh.me:3000/api/contacts/58"},{"id":60,"kind":"company","created_at":1497351108,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"45d4cccba293ef0da33c07a991c6081ec4179948","permalink":"http://development.lvh.me:3000/billing/45d4cccba293ef0da33c07a991c6081ec4179948","url":"http://development.lvh.me:3000/api/contacts/60"},{"id":62,"kind":"company","created_at":1497351487,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","permalink":"http://development.lvh.me:3000/billing/8fec8de80f2ec765bf8471a2d9e259f63cbf06e4","url":"http://development.lvh.me:3000/api/contacts/62"},{"id":64,"kind":"company","created_at":1497351490,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"08638259e35b5864ad37f6c5776113d794fa2ac2","permalink":"http://development.lvh.me:3000/billing/08638259e35b5864ad37f6c5776113d794fa2ac2","url":"http://development.lvh.me:3000/api/contacts/64"},{"id":57,"kind":"company","created_at":1497351007,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","permalink":"http://development.lvh.me:3000/billing/cab10fea456a6ca8fe5a00fe1cbcb5273aa05546","url":"http://development.lvh.me:3000/api/contacts/57"},{"id":59,"kind":"company","created_at":1497351105,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"f8bae1172828d0fdef3ac4598592ac45dc0d722f","permalink":"http://development.lvh.me:3000/billing/f8bae1172828d0fdef3ac4598592ac45dc0d722f","url":"http://development.lvh.me:3000/api/contacts/59"},{"id":61,"kind":"company","created_at":1497351108,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"391ba9b21d0da56429e44a5e7fd9ad89706285e2","permalink":"http://development.lvh.me:3000/billing/391ba9b21d0da56429e44a5e7fd9ad89706285e2","url":"http://development.lvh.me:3000/api/contacts/61"},{"id":63,"kind":"company","created_at":1497351487,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"93744b7e3b633da80c37441a724f0f335dd59fec","permalink":"http://development.lvh.me:3000/billing/93744b7e3b633da80c37441a724f0f335dd59fec","url":"http://development.lvh.me:3000/api/contacts/63"},{"id":65,"kind":"company","created_at":1497351490,"full_name":"Z, - Mazinger Z","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"koji@kabuto.ftw","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"d29e9c5c9fa045456dd48bd4cf62d16c1f797268","permalink":"http://development.lvh.me:3000/billing/d29e9c5c9fa045456dd48bd4cf62d16c1f797268","url":"http://development.lvh.me:3000/api/contacts/65"}]' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 10:58:13 GMT -- request: - method: put - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts/43.json - body: - encoding: UTF-8 - string: '{"first_name":"Test_OCP","email":"dont@stop.believing"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '6' - x-ratelimit-remaining: - - '85' - content-type: - - application/json; charset=utf-8 - etag: - - '"2b9954582990f83a961c36960d435f7d"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 6259e90e-e6f0-481a-b35d-0188c557463f - x-runtime: - - '0.247214' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"}' - http_version: '1.1' - recorded_at: Tue, 13 Jun 2017 10:58:13 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/updated_estimate.yml b/test/fixtures/quaderno_cassettes/updated_estimate.yml deleted file mode 100644 index d15eebc..0000000 --- a/test/fixtures/quaderno_cassettes/updated_estimate.yml +++ /dev/null @@ -1,185 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '9' - x-ratelimit-remaining: - - '85' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 69b864b7-f8c5-4a91-bf81-a9dafdd828c7 - x-runtime: - - '0.254135' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:44 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates.json - body: - encoding: UTF-8 - string: '{"contact_id":44,"number":"test number 4400","contact_name":"Albus - Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '9' - x-ratelimit-remaining: - - '84' - content-type: - - application/json; charset=utf-8 - etag: - - '"871e08d5652d45f932b23d2b5aaee59c"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - abab859c-411f-41da-b94a-e9a2bd19df6f - x-runtime: - - '0.451599' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":179,"number":"test number 4400","issue_date":"2017-06-09","created_at":1497013365,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":180,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"67742fe9c7242658535368994496c14e0c8b091a","permalink":"http://development.lvh.me:3000/estimate/67742fe9c7242658535368994496c14e0c8b091a","url":"http://development.lvh.me:3000/api/estimates/179.json","custom_metadata":{}}' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:45 GMT -- request: - method: put - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates/179.json - body: - encoding: UTF-8 - string: '{"payment_details":"Show me the moneeeeeeeyy!!!!"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '9' - x-ratelimit-remaining: - - '83' - content-type: - - application/json; charset=utf-8 - etag: - - '"df4f55eb083ea3df5fdf83cd6222a4e6"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - dfc7df6a-8754-4fc6-8e0b-004fe8be7f16 - x-runtime: - - '0.632777' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":179,"number":"test number 4400","issue_date":"2017-06-09","created_at":1497013365,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","items":[{"id":180,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payment_details":"Show - me the moneeeeeeeyy!!!!","notes":null,"state":"outstanding","tag_list":[],"secure_id":"67742fe9c7242658535368994496c14e0c8b091a","permalink":"http://development.lvh.me:3000/estimate/67742fe9c7242658535368994496c14e0c8b091a","url":"http://development.lvh.me:3000/api/estimates/179.json","custom_metadata":{}}' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:46 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/estimates/179.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '8' - x-ratelimit-remaining: - - '82' - cache-control: - - no-cache - x-request-id: - - c9739064-c3c8-4ff0-bcad-69fb12dd710c - x-runtime: - - '0.349808' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Fri, 09 Jun 2017 13:02:46 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/updated_expense.yml b/test/fixtures/quaderno_cassettes/updated_expense.yml deleted file mode 100644 index 3530210..0000000 --- a/test/fixtures/quaderno_cassettes/updated_expense.yml +++ /dev/null @@ -1,184 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '100' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 6215b120-4a17-434e-95e1-e86648ed4964 - x-runtime: - - '2.076399' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:42:39 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses.json - body: - encoding: UTF-8 - string: '{"contact_id":44,"contact_name":"Albus Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - content-type: - - application/json; charset=utf-8 - etag: - - '"49b4e8fd4454ecf22f126a1ec9f6dea9"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 217b4a76-8c9f-4a83-a09c-15efee7922a8 - x-runtime: - - '3.995275' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":192,"blocked":false,"issue_date":"2017-06-12","created_at":1497267760,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":193,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[],"notes":null,"state":"outstanding","tag_list":[],"url":"http://development.lvh.me:3000/api/expenses/192.json","custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:42:43 GMT -- request: - method: put - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses/192.json - body: - encoding: UTF-8 - string: '{"po_number":"Updated expense!"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '98' - content-type: - - application/json; charset=utf-8 - etag: - - '"d80e1d62ac2dbbc9ed1da5fe7c3ebcc0"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - ade84aa7-79d7-45dd-a43f-e28a6f9f875e - x-runtime: - - '3.664228' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":192,"blocked":false,"issue_date":"2017-06-12","created_at":1497267760,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":"Updated - expense!","currency":"EUR","subject":null,"items":[{"id":193,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"extract":{"total_cents":0},"payments":[],"notes":null,"state":"outstanding","tag_list":[],"url":"http://development.lvh.me:3000/api/expenses/192.json","custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:42:47 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/expenses/192.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '6' - x-ratelimit-remaining: - - '97' - cache-control: - - no-cache - x-request-id: - - ed3ec2f7-6b4b-4924-a0ed-de989a998a71 - x-runtime: - - '2.294779' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:42:49 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/updated_invoice.yml b/test/fixtures/quaderno_cassettes/updated_invoice.yml deleted file mode 100644 index 99e69a8..0000000 --- a/test/fixtures/quaderno_cassettes/updated_invoice.yml +++ /dev/null @@ -1,184 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '11' - x-ratelimit-remaining: - - '97' - x-pages-currentpage: - - '1' - x-pages-totalpages: - - '1' - content-type: - - application/json; charset=utf-8 - etag: - - '"9f61db3c521dbbd6fa0aec27f6813410"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 637b763a-581b-4fea-ae95-59a028349b1f - x-runtime: - - '1.119884' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":44,"kind":"company","created_at":1496660076,"full_name":"Albus - Dumbledoge","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"BE","phone_1":null,"phone_2":null,"fax":null,"email":"john@recrea.es","web":null,"discount":null,"tax_id":null,"vat_number":null,"language":"DE","notes":null,"processor_id":"cst_yBHtjcSFhR","secure_id":"51ed8dd564d46a3e8f6550686dea84750c5d4b80","permalink":"http://development.lvh.me:3000/billing/51ed8dd564d46a3e8f6550686dea84750c5d4b80","url":"http://development.lvh.me:3000/api/contacts/44"},{"id":42,"kind":"person","created_at":1495535760,"first_name":"Cidi","last_name":"Campidocti","full_name":"Cidi - Campidocti","street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":"","vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"7e17fe690137a91f7d1b8c1602fb7667ab981b00","permalink":"http://development.lvh.me:3000/billing/7e17fe690137a91f7d1b8c1602fb7667ab981b00","url":"http://development.lvh.me:3000/api/contacts/42"},{"id":43,"kind":"company","created_at":1496653655,"full_name":"Test_OCP","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"dont@stop.believing","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"processor_id":"tr_VpKBExBQxU","secure_id":"240d872343b09c0e4f095cfd6484c6eabc74c6eb","permalink":"http://development.lvh.me:3000/billing/240d872343b09c0e4f095cfd6484c6eabc74c6eb","url":"http://development.lvh.me:3000/api/contacts/43"},{"id":45,"kind":"company","created_at":1497013162,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"0c102e324af99ba80911b5040f8c3ac253c76890","permalink":"http://development.lvh.me:3000/billing/0c102e324af99ba80911b5040f8c3ac253c76890","url":"http://development.lvh.me:3000/api/contacts/45"},{"id":47,"kind":"company","created_at":1497013255,"full_name":"Test_Skynet","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":"my_little@po.ny","web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","permalink":"http://development.lvh.me:3000/billing/e09d2dd3b8781a417a0ee1b43bdb5499a8e925a7","url":"http://development.lvh.me:3000/api/contacts/47"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:07 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices.json - body: - encoding: UTF-8 - string: '{"contact_id":44,"contact_name":"Albus Dumbledoge","currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_details":"","notes":""}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '10' - x-ratelimit-remaining: - - '96' - content-type: - - application/json; charset=utf-8 - etag: - - '"11a621bfca2de15c4e58e7e14f3f52e4"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 9e6c269d-7dba-4843-b517-fe27840f6de9 - x-runtime: - - '4.330467' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":196,"blocked":false,"number":"0006","issue_date":"2017-06-12","created_at":1497267909,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":197,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[],"payment_details":null,"notes":null,"state":"outstanding","tag_list":[],"secure_id":"aee0abf34bbb9f171d7316ccbfe08263ccd911a4","permalink":"http://development.lvh.me:3000/invoice/aee0abf34bbb9f171d7316ccbfe08263ccd911a4","pdf":"http://development.lvh.me:3000/invoice/aee0abf34bbb9f171d7316ccbfe08263ccd911a4.pdf","url":"http://development.lvh.me:3000/api/invoices/196.json","processor":null,"processor_id":null,"custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:12 GMT -- request: - method: put - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices/196.json - body: - encoding: UTF-8 - string: '{"payment_details":"Show me the moneeeeeeeyy!!!!"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '5' - x-ratelimit-remaining: - - '95' - content-type: - - application/json; charset=utf-8 - etag: - - '"aec0501a82149518f0bb800b24f2120b"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 468b1faa-27a4-492f-8fa0-7a6f5d75719d - x-runtime: - - '3.842501' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":196,"blocked":false,"number":"0006","issue_date":"2017-06-12","created_at":1497267909,"contact":{"id":44,"full_name":"Albus - Dumbledoge"},"country":"BE","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"due_date":null,"currency":"EUR","subject":null,"items":[{"id":197,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"total_cents":0,"payments":[],"payment_details":"Show - me the moneeeeeeeyy!!!!","notes":null,"state":"outstanding","tag_list":[],"secure_id":"aee0abf34bbb9f171d7316ccbfe08263ccd911a4","permalink":"http://development.lvh.me:3000/invoice/aee0abf34bbb9f171d7316ccbfe08263ccd911a4","pdf":"http://development.lvh.me:3000/invoice/aee0abf34bbb9f171d7316ccbfe08263ccd911a4.pdf","url":"http://development.lvh.me:3000/api/invoices/196.json","processor":null,"processor_id":null,"custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:16 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/invoices/196.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '2' - x-ratelimit-remaining: - - '94' - cache-control: - - no-cache - x-request-id: - - a409f609-b43a-4065-9808-b23a631d8435 - x-runtime: - - '2.185361' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:18 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/updated_item.yml b/test/fixtures/quaderno_cassettes/updated_item.yml deleted file mode 100644 index 8b9a687..0000000 --- a/test/fixtures/quaderno_cassettes/updated_item.yml +++ /dev/null @@ -1,93 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items.json - body: - encoding: UTF-8 - string: '{"code":"1497267940","name":"Test_Skynet","unit_cost":21.0}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '8' - x-ratelimit-remaining: - - '93' - content-type: - - application/json; charset=utf-8 - etag: - - '"e736479a9364217c3573d19fbe170c7b"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - a8da756e-1c83-4aec-bd31-443c2c70c4d1 - x-runtime: - - '1.080966' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":4,"code":"1497267940","name":"Test_Skynet","unit_cost":"21.0","stock":null,"tax_class":"eservice","url":"http://development.lvh.me:3000/api/items/4"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:41 GMT -- request: - method: put - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/items/4.json - body: - encoding: UTF-8 - string: '{"name":"Test_OCP"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '6' - x-ratelimit-remaining: - - '92' - content-type: - - application/json; charset=utf-8 - etag: - - '"7184607322676bd93ea3da539be685ee"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - b72a5725-a134-458e-841f-3509c681095a - x-runtime: - - '0.800370' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":4,"code":"1497267940","name":"Test_OCP","unit_cost":"21.0","stock":null,"tax_class":"eservice","url":"http://development.lvh.me:3000/api/items/4"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:45:42 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/updated_receipt.yml b/test/fixtures/quaderno_cassettes/updated_receipt.yml deleted file mode 100644 index af4d555..0000000 --- a/test/fixtures/quaderno_cassettes/updated_receipt.yml +++ /dev/null @@ -1,220 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts.json - body: - encoding: UTF-8 - string: '{"first_name":"Test customer"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '13' - x-ratelimit-remaining: - - '98' - content-type: - - application/json; charset=utf-8 - etag: - - '"9add49064c7cdbb7075d7041400a4793"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 2febc61d-7841-42a5-910b-fc4b7a801a0f - x-runtime: - - '1.382284' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":54,"kind":"company","created_at":1497268190,"full_name":"Test - customer","contact_name":null,"street_line_1":null,"street_line_2":null,"postal_code":null,"city":null,"region":null,"country":"ES","phone_1":null,"phone_2":null,"fax":null,"email":null,"web":null,"discount":null,"tax_id":null,"vat_number":null,"bank_account":null,"language":"ES","notes":null,"secure_id":"60bdc026b6e7315ebc4a520c729333ce73465abd","permalink":"http://development.lvh.me:3000/billing/60bdc026b6e7315ebc4a520c729333ce73465abd","url":"http://development.lvh.me:3000/api/contacts/54"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:50 GMT -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts.json - body: - encoding: UTF-8 - string: '{"contact_id":54,"currency":"EUR","items_attributes":[{"description":"Aircraft","quantity":"1.0","unit_price":"0.0"}],"tags":"tnt","payment_method":"cash","notes":""}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '12' - x-ratelimit-remaining: - - '97' - content-type: - - application/json; charset=utf-8 - etag: - - '"91cf83bc0d595ace3687a1b2e122958c"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 2646602d-8a60-408d-849f-22aa435aa465 - x-runtime: - - '4.620237' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":204,"blocked":false,"number":"0003","issue_date":"2017-06-12","created_at":1497268191,"contact":{"id":54,"full_name":"Test - customer"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":205,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"payments":[{"id":54,"date":"2017-06-12","payment_method":"cash","amount_cents":0}],"notes":null,"state":"paid","tag_list":[],"secure_id":"64687022590db95fa97a32ac967b24cb88bad958","permalink":"http://development.lvh.me:3000/receipt/64687022590db95fa97a32ac967b24cb88bad958","pdf":"http://development.lvh.me:3000/receipt/64687022590db95fa97a32ac967b24cb88bad958.pdf","url":"http://development.lvh.me:3000/api/receipts/204.json","processor":null,"processor_id":null,"custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:55 GMT -- request: - method: put - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts/204.json - body: - encoding: UTF-8 - string: '{"notes":"Show me the moneeeeeeeyy!!!!"}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '7' - x-ratelimit-remaining: - - '96' - content-type: - - application/json; charset=utf-8 - etag: - - '"4d11c125cf46e28ca6ed2994d9665b32"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - ec358ced-cca9-4a6a-9bf9-aa7c25050997 - x-runtime: - - '3.640285' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":204,"blocked":false,"number":"0003","issue_date":"2017-06-12","created_at":1497268191,"contact":{"id":54,"full_name":"Test - customer"},"country":"ES","street_line_1":null,"street_line_2":null,"city":null,"region":null,"postal_code":null,"po_number":null,"currency":"EUR","subject":null,"items":[{"id":205,"description":"Aircraft","quantity":"1.0","unit_price_cents":"0.0","discount_rate":"0.0","tax_1_name":null,"tax_1_rate":null,"tax_2_name":null,"tax_2_rate":null,"reference":null,"subtotal_cents":"0.0","discount_cents":"0.0","gross_amount_cents":"0.0"}],"subtotal_cents":"0.0","discount_cents":"0.0","taxes":[],"payments":[{"id":54,"date":"2017-06-12","payment_method":"cash","amount_cents":0}],"notes":"Show - me the moneeeeeeeyy!!!!","state":"paid","tag_list":[],"secure_id":"64687022590db95fa97a32ac967b24cb88bad958","permalink":"http://development.lvh.me:3000/receipt/64687022590db95fa97a32ac967b24cb88bad958","pdf":"http://development.lvh.me:3000/receipt/64687022590db95fa97a32ac967b24cb88bad958.pdf","url":"http://development.lvh.me:3000/api/receipts/204.json","processor":null,"processor_id":null,"custom_metadata":{}}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:49:59 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/receipts/204.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '3' - x-ratelimit-remaining: - - '95' - cache-control: - - no-cache - x-request-id: - - eef2ba83-87a9-45b8-9493-f0606805b64c - x-runtime: - - '2.957383' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:50:02 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/contacts/54.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '1' - x-ratelimit-remaining: - - '94' - cache-control: - - no-cache - x-request-id: - - cab0ead8-c00f-4179-81e7-5816ef7c81b5 - x-runtime: - - '1.099096' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:50:03 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/updated_webhook.yml b/test/fixtures/quaderno_cassettes/updated_webhook.yml deleted file mode 100644 index d189de1..0000000 --- a/test/fixtures/quaderno_cassettes/updated_webhook.yml +++ /dev/null @@ -1,175 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json - body: - encoding: UTF-8 - string: '{"url":"http://quadernoapp.com","events_types":["invoice.created","expense.updated"]}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 201 - message: Created - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '7' - x-ratelimit-remaining: - - '93' - content-type: - - application/json; charset=utf-8 - etag: - - '"50272ad49799cb72cebe932d58808877"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - c057b4fb-bdd8-49a4-8fd6-ef2e6eceb20f - x-runtime: - - '1.872855' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":8,"url":"http://quadernoapp.com","auth_key":"JL-KguI89KWWPQfx-j_jVQ","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:33.493Z","updated_at":"2017-06-12T11:54:33.493Z"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:33 GMT -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks.json? - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '5' - x-ratelimit-remaining: - - '92' - content-type: - - application/json; charset=utf-8 - etag: - - '"5096b6af7b77b2a57d706dd1434b3970"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 81b27380-7fc2-42dd-b974-e2c93f9d2315 - x-runtime: - - '0.645302' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '[{"id":1,"url":"http://quadernoapp.com","auth_key":"Ze024XpO9CJ6Fy2frwWV4Q","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:53:54.000Z","updated_at":"2017-06-12T11:53:54.000Z"},{"id":8,"url":"http://quadernoapp.com","auth_key":"JL-KguI89KWWPQfx-j_jVQ","events_types":["invoice.created","expense.updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:33.000Z","updated_at":"2017-06-12T11:54:33.000Z"}]' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:34 GMT -- request: - method: put - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/8.json - body: - encoding: UTF-8 - string: '{"events_types":["invoice.created","invoice.updated","contact.deleted"]}' - headers: - accept: - - application/json - content-type: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '4' - x-ratelimit-remaining: - - '91' - content-type: - - application/json; charset=utf-8 - etag: - - '"926cdf82d9b90ab6c43e3b76c7cbb096"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 4ac6d2cf-c1e5-48fc-81e8-20f745a84040 - x-runtime: - - '1.871170' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"id":8,"url":"http://quadernoapp.com","auth_key":"JL-KguI89KWWPQfx-j_jVQ","events_types":["invoice.created","invoice.updated","contact.deleted"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2017-06-12T11:54:33.000Z","updated_at":"2017-06-12T11:54:36.369Z"}' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:36 GMT -- request: - method: delete - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/webhooks/8.json - body: - encoding: US-ASCII - string: '' - headers: - accept: - - application/json - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 204 - message: No Content - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '2' - x-ratelimit-remaining: - - '90' - cache-control: - - no-cache - x-request-id: - - 70e6bc87-63f8-456a-a42f-3ac79d407e94 - x-runtime: - - '0.936896' - connection: - - close - server: - - thin - body: - encoding: US-ASCII - string: '' - http_version: '1.1' - recorded_at: Mon, 12 Jun 2017 11:54:37 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/validate_invalid_VAT_number.yml b/test/fixtures/quaderno_cassettes/validate_invalid_VAT_number.yml deleted file mode 100644 index 346ac89..0000000 --- a/test/fixtures/quaderno_cassettes/validate_invalid_VAT_number.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/taxes/validate.json?country=IE&vat_number=IE6388047X - body: - encoding: US-ASCII - string: '' - headers: - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '14' - x-ratelimit-remaining: - - '98' - content-type: - - application/json; charset=utf-8 - etag: - - '"fe2f663bfba92bdd59b4bd0190a146b7"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 21922ced-169f-4a23-ac48-94b3c86d47d7 - x-runtime: - - '0.444012' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"valid":false}' - http_version: '1.1' - recorded_at: Tue, 30 Aug 2016 10:38:15 GMT -recorded_with: VCR 2.9.2 diff --git a/test/fixtures/quaderno_cassettes/validate_valid_VAT_number.yml b/test/fixtures/quaderno_cassettes/validate_valid_VAT_number.yml deleted file mode 100644 index 57119bd..0000000 --- a/test/fixtures/quaderno_cassettes/validate_valid_VAT_number.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://sk_test_B7xXrTspfeGukQqGN1pK@development.lvh.me:3000/api/taxes/validate.json?country=IE&vat_number=IE6388047V - body: - encoding: US-ASCII - string: '' - headers: - authorization: - - Basic c2tfdGVzdF9CN3hYclRzcGZlR3VrUXFHTjFwSzo= - response: - status: - code: 200 - message: OK - headers: - x-frame-options: - - ALLOWALL - x-ratelimit-limit: - - '2000' - x-ratelimit-reset: - - '15' - x-ratelimit-remaining: - - '99' - content-type: - - application/json; charset=utf-8 - etag: - - '"39837b2fcec9d416bda32e66244da470"' - cache-control: - - max-age=0, private, must-revalidate - x-request-id: - - 2153abc6-2f6e-47da-9f37-f4edb50b16a9 - x-runtime: - - '2.047779' - connection: - - close - server: - - thin - body: - encoding: UTF-8 - string: '{"valid":true}' - http_version: '1.1' - recorded_at: Tue, 30 Aug 2016 10:38:15 GMT -recorded_with: VCR 2.9.2 diff --git a/test/helper.rb b/test/helper.rb deleted file mode 100644 index a537056..0000000 --- a/test/helper.rb +++ /dev/null @@ -1,32 +0,0 @@ -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) -$LOAD_PATH.unshift(File.dirname(__FILE__)) - -require 'rubygems' -require 'bundler' - -begin - Bundler.setup(:default, :test) -rescue Bundler::BundlerError => e - $stderr.puts e.message - $stderr.puts "Run `bundle install` to install missing gems" - exit e.status_code -end - -require 'vcr' -require 'test/unit' -require 'shoulda-context' -require 'quaderno-ruby' - -VCR.configure do |c| - c.cassette_library_dir = 'test/fixtures/quaderno_cassettes' - c.ignore_localhost = false - c.hook_into :fakeweb -end - -TEST_URL = 'http://development.lvh.me:3000/api/' -TEST_KEY = 'sk_test_B7xXrTspfeGukQqGN1pK' -TEST_OAUTH_ACCESS_TOKEN = '36b82411e6686581fe3d7d10fbe931a3fdc9265a353832f0e3ff6269bd319e12' -OLDEST_SUPPORTED_API_VERSION = 20160602 - -class Test::Unit::TestCase -end diff --git a/test/unit/test_quaderno_contacts.rb b/test/unit/test_quaderno_contacts.rb deleted file mode 100644 index 0f4f41c..0000000 --- a/test/unit/test_quaderno_contacts.rb +++ /dev/null @@ -1,83 +0,0 @@ -require 'helper' - -class TestQuadernoContact < Test::Unit::TestCase - - context 'using the default configuration with an authentication token' do - setup do - Quaderno::Base.configure do |config| - config.auth_token = TEST_KEY - config.url = TEST_URL - config.api_version = nil - end - end - - should 'get exception if pass wrong arguments' do - assert_raise ArgumentError do - VCR.use_cassette('all contacts') do - Quaderno::Contact.all 1, 2, 3 - end - end - assert_raise ArgumentError do - VCR.use_cassette('found contact') do - Quaderno::Contact.find - end - end - end - - should 'get all contacts (populated db)' do - VCR.use_cassette('all contacts') do - contacts = Quaderno::Contact.all - assert_not_nil contacts - assert_kind_of Array, contacts - contacts.each do |contact| - assert_kind_of Quaderno::Contact, contact - end - end - end - - should 'find a contact' do - VCR.use_cassette('found contact') do - contacts = Quaderno::Contact.all - contact = Quaderno::Contact.find contacts[2].id - assert_kind_of Quaderno::Contact, contact - assert_equal contacts[2].id, contact.id - end - end - - should 'create a contact' do - VCR.use_cassette('new contact') do - contact = Quaderno::Contact.create(kind: 'company', first_name: 'Test_Skynet', email: 'my_little@po.ny') - assert_kind_of Quaderno::Contact, contact - assert_equal 'company', contact.kind - assert_equal 'Test_Skynet', contact.full_name - end - end - - should 'update a contact' do - VCR.use_cassette('updated contact') do - contacts = Quaderno::Contact.all - contact = Quaderno::Contact.update(contacts[2].id, first_name: 'Test_OCP', email: 'dont@stop.believing') - assert_kind_of Quaderno::Contact, contact - assert_equal 'Test_OCP', contact.first_name || contact.full_name - end - end - - should 'delete a contact' do - VCR.use_cassette('deleted contact') do - new_contact = Quaderno::Contact.create(kind: 'company', first_name: 'Z, Mazinger Z', email: 'koji@kabuto.ftw') - contacts_before = Quaderno::Contact.all - contact_id = contacts_before.last.id - Quaderno::Contact.delete contact_id - contacts_after = Quaderno::Contact.all - assert_not_equal contacts_after.last.id, contact_id - end - end - - should 'know the rate limit' do - VCR.use_cassette('rate limit') do - rate_limit_info = Quaderno::Base.rate_limit_info - assert_operator rate_limit_info[:remaining], :< ,2000 - end - end - end -end \ No newline at end of file diff --git a/test/unit/test_quaderno_contacts_thread_safe.rb b/test/unit/test_quaderno_contacts_thread_safe.rb deleted file mode 100644 index f12f70a..0000000 --- a/test/unit/test_quaderno_contacts_thread_safe.rb +++ /dev/null @@ -1,104 +0,0 @@ -require 'helper' - -class TestQuadernoContactThreadSafe < Test::Unit::TestCase - context 'using the thread-safe configuration' do - context 'with an authentication token' do - should 'get all contacts (populated db)' do - VCR.use_cassette('all contacts by authentication token') do - puts Quaderno::Base.url - contacts = Quaderno::Contact.all(api_url: TEST_URL, auth_token: TEST_KEY) - assert_not_nil contacts - assert_kind_of Array, contacts - contacts.each { |contact| assert_kind_of Quaderno::Contact, contact } - end - end - - should 'find a contact' do - VCR.use_cassette('found contact by authentication token') do - contacts = Quaderno::Contact.all(api_url: TEST_URL, auth_token: TEST_KEY) - contact = Quaderno::Contact.find contacts[2].id, api_url: TEST_URL, auth_token: TEST_KEY - assert_kind_of Quaderno::Contact, contact - assert_equal contacts[2].id, contact.id - end - end - - should 'create a contact' do - VCR.use_cassette('new contact by authentication token') do - contact = Quaderno::Contact.create(kind: 'company', first_name: 'Test_Skynet', email: 'my_little@po.ny', api_url: TEST_URL, auth_token: TEST_KEY) - assert_kind_of Quaderno::Contact, contact - assert_equal 'company', contact.kind - assert_equal 'Test_Skynet', contact.full_name - end - end - - should 'update a contact' do - VCR.use_cassette('updated contact by authentication token') do - contacts = Quaderno::Contact.all(api_url: TEST_URL, auth_token: TEST_KEY) - contact = Quaderno::Contact.update(contacts[2].id, first_name: 'Test_OCP', email: 'dont@stop.believing', api_url: TEST_URL, auth_token: TEST_KEY) - assert_kind_of Quaderno::Contact, contact - assert_equal 'Test_OCP', contact.first_name || contact.full_name - end - end - - should 'delete a contact' do - VCR.use_cassette('deleted contact by authentication token') do - new_contact = Quaderno::Contact.create(kind: 'company', first_name: 'Z, Mazinger Z', email: 'koji@kabuto.ftw', api_url: TEST_URL, auth_token: TEST_KEY) - contacts_before = Quaderno::Contact.all(api_url: TEST_URL, auth_token: TEST_KEY) - contact_id = contacts_before.last.id - Quaderno::Contact.delete contact_id, api_url: TEST_URL, auth_token: TEST_KEY - contacts_after = Quaderno::Contact.all(api_url: TEST_URL, auth_token: TEST_KEY) - assert_not_equal contacts_after.last.id, contact_id - end - end - end - - context 'with an OAuth 2.0 access token' do - should 'get all contacts (populated db)' do - VCR.use_cassette('all contacts by access token') do - contacts = Quaderno::Contact.all(api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) - assert_not_nil contacts - assert_kind_of Array, contacts - contacts.each { |contact| assert_kind_of Quaderno::Contact, contact } - end - end - - should 'find a contact' do - VCR.use_cassette('found contact by access token') do - contacts = Quaderno::Contact.all(api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) - contact = Quaderno::Contact.find contacts[2].id, api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN - assert_kind_of Quaderno::Contact, contact - assert_equal contacts[2].id, contact.id - end - end - - should 'create a contact' do - VCR.use_cassette('new contact by access token') do - contact = Quaderno::Contact.create(kind: 'company', first_name: 'Test_Skynet', email: 'my_little@po.ny', api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) - assert_kind_of Quaderno::Contact, contact - assert_equal 'company', contact.kind - assert_equal 'Test_Skynet', contact.full_name - end - end - - should 'update a contact' do - VCR.use_cassette('updated contact by access token') do - contacts = Quaderno::Contact.all(api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) - contact = Quaderno::Contact.update(contacts[2].id, first_name: 'Test_OCP', email: 'dont@stop.believing', api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) - assert_kind_of Quaderno::Contact, contact - assert_equal 'Test_OCP', contact.first_name || contact.full_name - end - end - - should 'delete a contact' do - VCR.use_cassette('deleted contact by access token') do - new_contact = Quaderno::Contact.create(kind: 'company', first_name: 'Z, Mazinger Z', email: 'koji@kabuto.ftw', api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) - contacts_before = Quaderno::Contact.all(api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) - contact_id = contacts_before.last.id - Quaderno::Contact.delete contact_id, api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN - contacts_after = Quaderno::Contact.all(api_url: TEST_URL, access_token: TEST_OAUTH_ACCESS_TOKEN) - assert_not_equal contacts_after.last.id, contact_id - end - end - end - end -end \ No newline at end of file