creditario-client 0.0.1.alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.DS_Store +0 -0
- data/.gitignore +14 -0
- data/.gitlab-ci.yml +23 -0
- data/.rubocop.yml +155 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Dockerfile +3 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +21 -0
- data/README.md +241 -0
- data/Rakefile +21 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/creditario-client.gemspec +35 -0
- data/lib/creditario/api/create.rb +29 -0
- data/lib/creditario/api/delete.rb +25 -0
- data/lib/creditario/api/list.rb +27 -0
- data/lib/creditario/api/multipart.rb +29 -0
- data/lib/creditario/api/request.rb +101 -0
- data/lib/creditario/api/retrieve.rb +32 -0
- data/lib/creditario/api/update.rb +32 -0
- data/lib/creditario/client.rb +183 -0
- data/lib/creditario/client/railtie.rb +14 -0
- data/lib/creditario/client/version.rb +9 -0
- data/lib/creditario/exceptions.rb +121 -0
- data/lib/creditario/repositories/applications.rb +50 -0
- data/lib/creditario/repositories/attachments.rb +50 -0
- data/lib/creditario/repositories/catalogs.rb +59 -0
- data/lib/creditario/repositories/contracts.rb +29 -0
- data/lib/creditario/repositories/credit_estimates.rb +29 -0
- data/lib/creditario/repositories/credits.rb +35 -0
- data/lib/creditario/repositories/customers.rb +50 -0
- data/lib/creditario/repositories/expenses.rb +41 -0
- data/lib/creditario/repositories/incomes.rb +41 -0
- data/lib/creditario/repositories/payments.rb +34 -0
- data/lib/creditario/repositories/products.rb +38 -0
- data/lib/creditario/repositories/references.rb +41 -0
- data/lib/creditario/resources/application.rb +27 -0
- data/lib/creditario/resources/attachment.rb +19 -0
- data/lib/creditario/resources/catalog.rb +35 -0
- data/lib/creditario/resources/contract.rb +21 -0
- data/lib/creditario/resources/credit.rb +19 -0
- data/lib/creditario/resources/credit_estimate.rb +19 -0
- data/lib/creditario/resources/customer.rb +25 -0
- data/lib/creditario/resources/expense.rb +19 -0
- data/lib/creditario/resources/income.rb +19 -0
- data/lib/creditario/resources/payment.rb +21 -0
- data/lib/creditario/resources/product.rb +21 -0
- data/lib/creditario/resources/reference.rb +19 -0
- data/lib/creditario/resources/resource.rb +96 -0
- data/lib/creditario/utils/paginated_collection.rb +45 -0
- data/lib/creditario/utils/resources_collection.rb +35 -0
- data/lib/generators/creditario/USAGE +13 -0
- data/lib/generators/creditario/install_generator.rb +17 -0
- data/lib/generators/creditario/templates/creditario.yml +12 -0
- data/lib/generators/creditario/templates/initializer.rb +4 -0
- data/rakelib/fixture_api_response.rake +10 -0
- data/rakelib/fixture_api_response.rb +114 -0
- metadata +214 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Creditario # :nodoc:
|
|
4
|
+
###
|
|
5
|
+
# == Creditario::Product
|
|
6
|
+
#
|
|
7
|
+
# Representa un Producto del sistema creditar.io
|
|
8
|
+
#
|
|
9
|
+
# === Ejemplo
|
|
10
|
+
#
|
|
11
|
+
# => product = Creditario::Product.new({"id": "6313ac69-dc0d-45a8-8804-4ac451e1db5c", "short_name": "un-pago", "name": "Crédito a un sólo pago"})
|
|
12
|
+
# => product.id
|
|
13
|
+
# => "6313ac69-dc0d-45a8-8804-4ac451e1db5c"
|
|
14
|
+
# => product.short_name = "dos-pagos"
|
|
15
|
+
# => "dos-pagos"
|
|
16
|
+
# => product[:name]
|
|
17
|
+
# => "Crédito a un sólo pago"
|
|
18
|
+
class Product
|
|
19
|
+
include Resource
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Creditario
|
|
4
|
+
###
|
|
5
|
+
# == Creditario::Reference
|
|
6
|
+
#
|
|
7
|
+
# Representa una Referencia del sistema creditar.io
|
|
8
|
+
#
|
|
9
|
+
# === Ejemplo
|
|
10
|
+
#
|
|
11
|
+
# => reference = Creditario::Reference.new({"id": "1b38ab7d-4c3e-4f39-99e8-57b099c86d45", "classification": "Familiar", "name": "Diane Nguyen", "phone": "3123100045"})
|
|
12
|
+
# => reference.id
|
|
13
|
+
# => 1b38ab7d-4c3e-4f39-99e8-57b099c86d45
|
|
14
|
+
# => reference[:phone]
|
|
15
|
+
# => 312100045
|
|
16
|
+
class Reference
|
|
17
|
+
include Resource
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Creditario # :nodoc:
|
|
4
|
+
###
|
|
5
|
+
# == Creditario::Resource
|
|
6
|
+
#
|
|
7
|
+
# Modulo que se encarga de establecer el mecanismo de inicialización de las siguientes clases:
|
|
8
|
+
#
|
|
9
|
+
# - Creditario::Customer
|
|
10
|
+
# - Creditario::Application
|
|
11
|
+
# - Creditario::Product
|
|
12
|
+
#
|
|
13
|
+
module Resource
|
|
14
|
+
def self.included(klass) # :nodoc:
|
|
15
|
+
klass.extend ClassMethods
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
###
|
|
19
|
+
# Hash que representa los attributos de un recurso.
|
|
20
|
+
attr_reader :attributes
|
|
21
|
+
|
|
22
|
+
###
|
|
23
|
+
# Colección de links relaccionados al recurso.
|
|
24
|
+
attr_reader :links
|
|
25
|
+
|
|
26
|
+
###
|
|
27
|
+
# Recibe parametro +attributes+ de tipo Hash y genera los métodos de escritura y
|
|
28
|
+
# lectura para cada elemento del Hash.
|
|
29
|
+
def initialize(attributes, links = [])
|
|
30
|
+
@attributes = attributes
|
|
31
|
+
@links = links
|
|
32
|
+
define_attributes_setters_and_getters
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
###
|
|
36
|
+
# Método para acceder con llave al elemento del Hash +attributes+
|
|
37
|
+
def [](key)
|
|
38
|
+
attributes[key]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
###
|
|
42
|
+
# Método para acceder con llave y sobreescribir el elemento del Hash +attributes+
|
|
43
|
+
def []=(key, value)
|
|
44
|
+
attributes[key] = value
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
private
|
|
48
|
+
|
|
49
|
+
def define_attributes_setters_and_getters
|
|
50
|
+
attributes.each do |attribute, value|
|
|
51
|
+
if self.class.class_variable_defined?(:@@associations)
|
|
52
|
+
association = self.class.class_variable_get(:@@associations).find { |association| association[:name] == attribute.to_sym }
|
|
53
|
+
unless association.nil?
|
|
54
|
+
attributes[attribute] = build_associations(association[:class], value)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
define_attribute_setter_and_getter(attribute, value)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def define_attribute_setter_and_getter(attribute, value)
|
|
63
|
+
self.class.define_method(attribute) do
|
|
64
|
+
attributes[attribute]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
self.class.define_method("#{attribute}=") do |new_value|
|
|
68
|
+
attributes[attribute] = new_value
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def build_associations(klass, collection_or_attributes)
|
|
73
|
+
return klass.new(collection_or_attributes) if collection_or_attributes.is_a?(Hash)
|
|
74
|
+
|
|
75
|
+
collection_or_attributes.map do |attributes|
|
|
76
|
+
klass.new(attributes)
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
module ClassMethods # :nodoc:
|
|
81
|
+
###
|
|
82
|
+
# Define una relación de uno a muchos con otro recurso.
|
|
83
|
+
def has_many(*association)
|
|
84
|
+
self.class_variable_set(:@@associations, []) unless self.class_variable_defined?(:@@associations)
|
|
85
|
+
self.class_variable_get(:@@associations) << { name: association.first }.merge(association.last)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
###
|
|
89
|
+
# Define una relacion de uno a uno con otro recurso.
|
|
90
|
+
def has_one(*association)
|
|
91
|
+
self.class_variable_set(:@@associations, []) unless self.class_variable_defined?(:@@associations)
|
|
92
|
+
self.class_variable_get(:@@associations) << { name: association.first }.merge(association.last)
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Creditario # :nodoc:
|
|
4
|
+
###
|
|
5
|
+
# == Creditario::PaginatedCollection
|
|
6
|
+
#
|
|
7
|
+
# Representa una colección de recursos paginados, a los cuales se puede acceder mediante
|
|
8
|
+
# el atributo +items+.
|
|
9
|
+
#
|
|
10
|
+
# También contiene información relacionada a los recursos relacionados mediante
|
|
11
|
+
# el atributo +links+.
|
|
12
|
+
#
|
|
13
|
+
# Así como los cursores de la paginación, encontados en el atributo +cursors+
|
|
14
|
+
class PaginatedCollection
|
|
15
|
+
###
|
|
16
|
+
# Arreglo de todos los recursos obtenidos de la API
|
|
17
|
+
attr_reader :items
|
|
18
|
+
|
|
19
|
+
###
|
|
20
|
+
# Links relacionados a la llamada realizada a la API
|
|
21
|
+
attr_reader :links
|
|
22
|
+
|
|
23
|
+
###
|
|
24
|
+
# Información sobre el siguiente cursor utilizado en la paginación
|
|
25
|
+
attr_reader :cursors
|
|
26
|
+
|
|
27
|
+
###
|
|
28
|
+
# Recibe el JSON parseado de la llamada ejecutada a la API y lo procesa
|
|
29
|
+
# obteniendo así la colección de items de la clase específica a la que pertenecen,
|
|
30
|
+
# los links y los cursores de paginación.
|
|
31
|
+
def initialize(json_response = {}, item_class)
|
|
32
|
+
@items = build_items(json_response.dig("data"), item_class)
|
|
33
|
+
@links = json_response.dig("links")
|
|
34
|
+
@cursors = json_response.dig("pagination", "cursors")
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
private
|
|
38
|
+
|
|
39
|
+
def build_items(array, item_class)
|
|
40
|
+
array.map do |item|
|
|
41
|
+
item_class.new(item)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Creditario # :nodoc:
|
|
4
|
+
###
|
|
5
|
+
# == Creditario::ResourcesCollection
|
|
6
|
+
#
|
|
7
|
+
# Representa una colección de recursos, a los cuales se puede acceder mediante
|
|
8
|
+
# el atributo +items+.
|
|
9
|
+
class ResourcesCollection
|
|
10
|
+
###
|
|
11
|
+
# Arreglo de todos los recursos obtenidos de la API
|
|
12
|
+
attr_reader :items
|
|
13
|
+
|
|
14
|
+
###
|
|
15
|
+
# Links relacionados a la llamada realizada a la API
|
|
16
|
+
attr_reader :links
|
|
17
|
+
|
|
18
|
+
###
|
|
19
|
+
# Recibe el JSON parseado de la llamada ejecutada a la API y lo procesa
|
|
20
|
+
# obteniendo así la colección de items de la clase específica a la que pertenecen
|
|
21
|
+
# y sus links.
|
|
22
|
+
def initialize(json_response = {}, item_class)
|
|
23
|
+
@items = build_items(json_response.dig("data"), item_class)
|
|
24
|
+
@links = json_response.dig("links")
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
private
|
|
28
|
+
|
|
29
|
+
def build_items(array, item_class)
|
|
30
|
+
array.map do |item|
|
|
31
|
+
item_class.new(item)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Description:
|
|
2
|
+
Crea el initializer de Creditario::Client y además añade un archivo YAML de configuración
|
|
3
|
+
para poder tener `api_key` y `api_base` diferentes por entorno.
|
|
4
|
+
|
|
5
|
+
Example:
|
|
6
|
+
rails generate creditario:install
|
|
7
|
+
|
|
8
|
+
Va a crear lo siguiente:
|
|
9
|
+
- config/initializers/creditario.rb
|
|
10
|
+
- config/creditario.yml
|
|
11
|
+
|
|
12
|
+
Va a modificar:
|
|
13
|
+
- config/application.rb
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Creditario # :nodoc:
|
|
4
|
+
module Generators # :nodoc:
|
|
5
|
+
class InstallGenerator < Rails::Generators::Base # :nodoc:
|
|
6
|
+
source_root File.expand_path("templates", __dir__)
|
|
7
|
+
|
|
8
|
+
desc "Instala Creditario"
|
|
9
|
+
|
|
10
|
+
def install
|
|
11
|
+
copy_file "initializer.rb", "config/initializers/creditario.rb"
|
|
12
|
+
copy_file "creditario.yml", "config/creditario.yml"
|
|
13
|
+
insert_into_file "config/application.rb", " config.creditario = config_for(:creditario)\n", before: " end\n"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
default: &default
|
|
2
|
+
api_base: <%= ENV["CREDITARIO_API_URL"] || "http://localhost:3000" %>
|
|
3
|
+
api_key: <%= Rails.application.credentials.dig(:creditario, Rails.env.to_sym, :api_key) %>
|
|
4
|
+
|
|
5
|
+
development:
|
|
6
|
+
<<: *default
|
|
7
|
+
|
|
8
|
+
test:
|
|
9
|
+
<<: *default
|
|
10
|
+
|
|
11
|
+
production:
|
|
12
|
+
<<: *default
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class FixtureAPIResponse # :nodoc:
|
|
4
|
+
attr_reader :method, :port, :path, :params, :api_token, :name
|
|
5
|
+
|
|
6
|
+
REQUESTS = %w(get post patch delete multipart)
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
@method, @port, @path, @params, @api_token, @name = ""
|
|
10
|
+
build_request_and_save_fixture
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_request_and_save_fixture
|
|
14
|
+
method_gets
|
|
15
|
+
port_gets
|
|
16
|
+
path_gets
|
|
17
|
+
params_gets
|
|
18
|
+
api_token_gets
|
|
19
|
+
name_gets
|
|
20
|
+
execute_request
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
private
|
|
24
|
+
|
|
25
|
+
def execute_request
|
|
26
|
+
puts "Generando..."
|
|
27
|
+
system(send(method) + path_to_save_fixture)
|
|
28
|
+
puts "Fixture generado! > #{path_to_save_fixture.split(" ").last}"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def method_gets
|
|
32
|
+
loop do
|
|
33
|
+
puts "Qué tipo de petición desea hacer? (1) GET (2) POST (3) PATCH/PUT (4) DELETE (5) MULTIPART"
|
|
34
|
+
@method = STDIN.gets.chomp.to_i
|
|
35
|
+
|
|
36
|
+
if method >= 1 && !REQUESTS[method - 1].nil?
|
|
37
|
+
@method = REQUESTS[method - 1]
|
|
38
|
+
break
|
|
39
|
+
else
|
|
40
|
+
puts "Seleccione una opción correcta!"
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def port_gets
|
|
46
|
+
puts "Cuál es el puerto?"
|
|
47
|
+
@port = STDIN.gets.chomp
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def path_gets
|
|
51
|
+
puts "Cuál es la ruta?"
|
|
52
|
+
@path = STDIN.gets.chomp
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def params_gets
|
|
56
|
+
return if method == "get" || method == "delete"
|
|
57
|
+
|
|
58
|
+
puts "Proporcione los datos a enviar:"
|
|
59
|
+
@params = STDIN.gets.chomp
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def api_token_gets
|
|
63
|
+
puts "Proporcione un token_token válido:"
|
|
64
|
+
@api_token = STDIN.gets.chomp
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def name_gets
|
|
68
|
+
puts "Qué nombre tendra el archivo fixture?"
|
|
69
|
+
@name = STDIN.gets.chomp
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def request_url
|
|
73
|
+
"'localhost:#{port}#{path}'"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def headers
|
|
77
|
+
"-H 'Content-Type: application/json' " \
|
|
78
|
+
"#{header_api_token}" \
|
|
79
|
+
"-H 'Accept: application/vnd.creditar.v1+json'"
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def header_api_token
|
|
83
|
+
"-H 'Authorization: Token token=#{api_token}' "
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def path_to_save_fixture
|
|
87
|
+
filename = name.empty? ? DateTime.now.to_s(:number) : name
|
|
88
|
+
" > ./test/fixtures/#{filename}.txt"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def body
|
|
92
|
+
"-d '#{params}'"
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def get
|
|
96
|
+
"curl -X GET -is #{request_url} #{headers}"
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def post
|
|
100
|
+
"curl -X POST -is #{request_url} #{headers} #{body}"
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def patch
|
|
104
|
+
"curl -X PATCH -is #{request_url} #{headers} #{body}"
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def delete
|
|
108
|
+
"curl -X DELETE -is #{request_url} #{headers}"
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def multipart
|
|
112
|
+
"curl #{params} #{header_api_token} -is #{request_url}"
|
|
113
|
+
end
|
|
114
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: creditario-client
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1.alpha
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- michelada.io
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2019-03-25 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: oj
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 3.0.0
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 3.0.0
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: multipart-post
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - '='
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: 2.0.0
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - '='
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: 2.0.0
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: bundler
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: 2.0.1
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: 2.0.1
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rake
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '10.0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '10.0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: minitest
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - "~>"
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '5.0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - "~>"
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '5.0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: sdoc
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - "~>"
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '1.0'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - "~>"
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '1.0'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: rubocop
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - "~>"
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: 0.57.2
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - "~>"
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: 0.57.2
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: webmock
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - "~>"
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: 3.4.2
|
|
118
|
+
type: :development
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - "~>"
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: 3.4.2
|
|
125
|
+
description:
|
|
126
|
+
email:
|
|
127
|
+
- info@michelada.io
|
|
128
|
+
executables: []
|
|
129
|
+
extensions: []
|
|
130
|
+
extra_rdoc_files: []
|
|
131
|
+
files:
|
|
132
|
+
- ".DS_Store"
|
|
133
|
+
- ".gitignore"
|
|
134
|
+
- ".gitlab-ci.yml"
|
|
135
|
+
- ".rubocop.yml"
|
|
136
|
+
- ".travis.yml"
|
|
137
|
+
- CODE_OF_CONDUCT.md
|
|
138
|
+
- Dockerfile
|
|
139
|
+
- Gemfile
|
|
140
|
+
- LICENSE.txt
|
|
141
|
+
- README.md
|
|
142
|
+
- Rakefile
|
|
143
|
+
- bin/console
|
|
144
|
+
- bin/setup
|
|
145
|
+
- creditario-client.gemspec
|
|
146
|
+
- lib/creditario/api/create.rb
|
|
147
|
+
- lib/creditario/api/delete.rb
|
|
148
|
+
- lib/creditario/api/list.rb
|
|
149
|
+
- lib/creditario/api/multipart.rb
|
|
150
|
+
- lib/creditario/api/request.rb
|
|
151
|
+
- lib/creditario/api/retrieve.rb
|
|
152
|
+
- lib/creditario/api/update.rb
|
|
153
|
+
- lib/creditario/client.rb
|
|
154
|
+
- lib/creditario/client/railtie.rb
|
|
155
|
+
- lib/creditario/client/version.rb
|
|
156
|
+
- lib/creditario/exceptions.rb
|
|
157
|
+
- lib/creditario/repositories/applications.rb
|
|
158
|
+
- lib/creditario/repositories/attachments.rb
|
|
159
|
+
- lib/creditario/repositories/catalogs.rb
|
|
160
|
+
- lib/creditario/repositories/contracts.rb
|
|
161
|
+
- lib/creditario/repositories/credit_estimates.rb
|
|
162
|
+
- lib/creditario/repositories/credits.rb
|
|
163
|
+
- lib/creditario/repositories/customers.rb
|
|
164
|
+
- lib/creditario/repositories/expenses.rb
|
|
165
|
+
- lib/creditario/repositories/incomes.rb
|
|
166
|
+
- lib/creditario/repositories/payments.rb
|
|
167
|
+
- lib/creditario/repositories/products.rb
|
|
168
|
+
- lib/creditario/repositories/references.rb
|
|
169
|
+
- lib/creditario/resources/application.rb
|
|
170
|
+
- lib/creditario/resources/attachment.rb
|
|
171
|
+
- lib/creditario/resources/catalog.rb
|
|
172
|
+
- lib/creditario/resources/contract.rb
|
|
173
|
+
- lib/creditario/resources/credit.rb
|
|
174
|
+
- lib/creditario/resources/credit_estimate.rb
|
|
175
|
+
- lib/creditario/resources/customer.rb
|
|
176
|
+
- lib/creditario/resources/expense.rb
|
|
177
|
+
- lib/creditario/resources/income.rb
|
|
178
|
+
- lib/creditario/resources/payment.rb
|
|
179
|
+
- lib/creditario/resources/product.rb
|
|
180
|
+
- lib/creditario/resources/reference.rb
|
|
181
|
+
- lib/creditario/resources/resource.rb
|
|
182
|
+
- lib/creditario/utils/paginated_collection.rb
|
|
183
|
+
- lib/creditario/utils/resources_collection.rb
|
|
184
|
+
- lib/generators/creditario/USAGE
|
|
185
|
+
- lib/generators/creditario/install_generator.rb
|
|
186
|
+
- lib/generators/creditario/templates/creditario.yml
|
|
187
|
+
- lib/generators/creditario/templates/initializer.rb
|
|
188
|
+
- rakelib/fixture_api_response.rake
|
|
189
|
+
- rakelib/fixture_api_response.rb
|
|
190
|
+
homepage: https://www.creditar.io
|
|
191
|
+
licenses:
|
|
192
|
+
- MIT
|
|
193
|
+
metadata: {}
|
|
194
|
+
post_install_message:
|
|
195
|
+
rdoc_options: []
|
|
196
|
+
require_paths:
|
|
197
|
+
- lib
|
|
198
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
199
|
+
requirements:
|
|
200
|
+
- - ">="
|
|
201
|
+
- !ruby/object:Gem::Version
|
|
202
|
+
version: '0'
|
|
203
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
|
+
requirements:
|
|
205
|
+
- - ">"
|
|
206
|
+
- !ruby/object:Gem::Version
|
|
207
|
+
version: 1.3.1
|
|
208
|
+
requirements: []
|
|
209
|
+
rubyforge_project:
|
|
210
|
+
rubygems_version: 2.6.14.3
|
|
211
|
+
signing_key:
|
|
212
|
+
specification_version: 4
|
|
213
|
+
summary: Ruby Client for the creditar.io API
|
|
214
|
+
test_files: []
|