starkinfra 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pixbalance/pixbalance.rb +2 -2
- data/lib/pixstatement/pixstatement.rb +2 -2
- data/lib/starkinfra.rb +0 -1
- data/lib/utils/request.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fbb86892e3ea59c31a82ffcffac58475963325ffae8af8fce5214c3a63600c3
|
4
|
+
data.tar.gz: 7919e49ab49dcbb1f1ea2487563e7ca25e9ff84ede33cb73d35132099d8799a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb74731c1f7fb3a4f94a26b4d3d55dc7a0cf6bf0edea08bd41ba98df965785d36415d13e5dbc07b410dc7ae1ca5e7cbdc2ac4bfff9f9bbd645f554185a58860a
|
7
|
+
data.tar.gz: cabce3e0129abd42c15b38d521107da0cf21d1742c3b945f9ed3c0b8d845dc747882ed8356615b23d21a932f69a7e3956781393dc0ef841f10c43fd935477d8b
|
@@ -36,7 +36,7 @@ module StarkInfra
|
|
36
36
|
# ## Return:
|
37
37
|
# - PixBalance object with updated attributes
|
38
38
|
def self.get(user: nil)
|
39
|
-
StarkInfra::Utils::Rest.get_stream(user: user, **resource)
|
39
|
+
StarkInfra::Utils::Rest.get_stream(user: user, **resource).next
|
40
40
|
end
|
41
41
|
|
42
42
|
def self.resource
|
@@ -47,7 +47,7 @@ module StarkInfra
|
|
47
47
|
amount: json['amount'],
|
48
48
|
currency: json['currency'],
|
49
49
|
updated: json['updated'],
|
50
|
-
id: json['id']
|
50
|
+
id: json['id']
|
51
51
|
)
|
52
52
|
}
|
53
53
|
}
|
@@ -125,7 +125,7 @@ module StarkInfra
|
|
125
125
|
# ## Return:
|
126
126
|
# - PixStatement .csv file
|
127
127
|
def self.csv(id, user: nil)
|
128
|
-
|
128
|
+
StarkInfra::Utils::Rest.get_content(id: id, user: user, sub_resource_name: 'csv', **resource)
|
129
129
|
end
|
130
130
|
|
131
131
|
def self.resource
|
@@ -140,7 +140,7 @@ module StarkInfra
|
|
140
140
|
status: json['status'],
|
141
141
|
transaction_count: json['transaction_count'],
|
142
142
|
created: json['created'],
|
143
|
-
updated: json['updated']
|
143
|
+
updated: json['updated']
|
144
144
|
)
|
145
145
|
}
|
146
146
|
}
|
data/lib/starkinfra.rb
CHANGED
data/lib/utils/request.rb
CHANGED
@@ -28,7 +28,7 @@ module StarkInfra
|
|
28
28
|
|
29
29
|
base_url = {
|
30
30
|
Environment::PRODUCTION => 'https://api.starkinfra.com/',
|
31
|
-
Environment::SANDBOX => 'https://sandbox.api.starkinfra.com/'
|
31
|
+
Environment::SANDBOX => 'https://sandbox.api.starkinfra.com/'
|
32
32
|
}[user.environment] + 'v2'
|
33
33
|
|
34
34
|
url = "#{base_url}/#{path}#{StarkInfra::Utils::URL.urlencode(query)}"
|
@@ -61,7 +61,7 @@ module StarkInfra
|
|
61
61
|
req['Access-Time'] = access_time
|
62
62
|
req['Access-Signature'] = signature
|
63
63
|
req['Content-Type'] = 'application/json'
|
64
|
-
req['User-Agent'] = "Ruby-#{RUBY_VERSION}-SDK-
|
64
|
+
req['User-Agent'] = "Ruby-#{RUBY_VERSION}-SDK-infra-0.0.2"
|
65
65
|
req['Accept-Language'] = language
|
66
66
|
|
67
67
|
request = Net::HTTP.start(uri.hostname, use_ssl: true) { |http| http.request(req) }
|