bill_forward 1.2015.217.1 → 1.2015.299
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/lib/bill_forward/billing_entity.rb +27 -6
- data/lib/bill_forward/client.rb +1 -1
- data/lib/bill_forward/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA512:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b6186a0858cafc36662c6fcb761f1a350c17a01cd3a049ea6bae070771e926bf7b4e46a50492665699a32fda6312e70489a9cfb16c83c81b2b2410b7d6cc5ef
|
|
4
|
+
data.tar.gz: d5ad4c99fe1425d16304f73ac9e9c0d60ce561b7e85e65639202be1304615a2f5ad0e652c3f91eb619bfb86858e836aef2e5976d860c20938db228753c058bf0
|
|
5
5
|
SHA1:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dedb74886895df84e04ab95723ecbd9e9fd17f02
|
|
7
|
+
data.tar.gz: 32b95e265d1fe4c801591d0342525970b1dca7a3
|
data/.gitignore
CHANGED
|
@@ -173,19 +173,40 @@ module BillForward
|
|
|
173
173
|
method_missing(set_key, value)
|
|
174
174
|
end
|
|
175
175
|
|
|
176
|
+
def state_params
|
|
177
|
+
@_state_params
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
def serialize_field(field)
|
|
181
|
+
if field.is_a? BillingEntity
|
|
182
|
+
serialize_field field.state_params
|
|
183
|
+
elsif field.is_a? Array
|
|
184
|
+
# return a transformed array, where each field has been serialized
|
|
185
|
+
field.map do |iterand|
|
|
186
|
+
serialize_field iterand
|
|
187
|
+
end
|
|
188
|
+
elsif field.is_a? Hash
|
|
189
|
+
# the lengths I have to go to achieve immutability in Ruby 1.8.7
|
|
190
|
+
clone = hash_with_type_at_top field
|
|
191
|
+
clone.each do |key, value|
|
|
192
|
+
clone[key] = serialize_field value
|
|
193
|
+
end
|
|
194
|
+
clone
|
|
195
|
+
else
|
|
196
|
+
field
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
|
|
176
200
|
def to_ordered_hash
|
|
177
|
-
|
|
178
|
-
ordered_hash
|
|
201
|
+
serialize_field self
|
|
179
202
|
end
|
|
180
203
|
|
|
181
204
|
def to_json(*a)
|
|
182
|
-
|
|
183
|
-
ordered_hash.to_json
|
|
184
|
-
# @_state_params.to_json
|
|
205
|
+
to_ordered_hash.to_json
|
|
185
206
|
end
|
|
186
207
|
|
|
187
208
|
def to_unordered_hash
|
|
188
|
-
json_string = to_json
|
|
209
|
+
json_string = to_json.to_s
|
|
189
210
|
JSON.parse(json_string)
|
|
190
211
|
end
|
|
191
212
|
|
data/lib/bill_forward/client.rb
CHANGED
|
@@ -295,7 +295,7 @@ module BillForward
|
|
|
295
295
|
error = split.first.split('=').last
|
|
296
296
|
description = split.last.split('=').last
|
|
297
297
|
|
|
298
|
-
raise_message = "\n====\n#{rcode} Authorization failed.\nType: #{
|
|
298
|
+
raise_message = "\n====\n#{rcode} Authorization failed.\nType: #{errorType}\nError: #{error}\nDescription: #{description}\n====\n"
|
|
299
299
|
|
|
300
300
|
raise ApiAuthorizationError.new(error, rbody), raise_message
|
|
301
301
|
else
|
data/lib/bill_forward/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bill_forward
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2015.
|
|
4
|
+
version: 1.2015.299
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- BillForward
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2015-
|
|
12
|
+
date: 2015-10-27 00:00:00 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rest-client
|