paid_ruby 0.1.1.pre.rc4 → 0.1.1.pre.rc5
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/paid_ruby/agents/client.rb +2 -2
- data/lib/paid_ruby/types/pricing_model_type.rb +4 -4
- data/lib/requests.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: 6f5fd3f258651c6fcbc104ccb8f04ad0ed5ed46062542cdfb78e256b852a6050
|
4
|
+
data.tar.gz: fddebf19044b8972da342ff75de44a477de184e83ed245d059cd15eb57990edf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d02d7883423a408e7e1ac4ce2b696aa2b3b505e53c4240ee91bf3d2ebaf9689c20af937f295db9e596b026a35fa63ebcd8a31786f91bfc3245726ec360cc7248
|
7
|
+
data.tar.gz: ca0acbe775e1647c6b204aa2c64e90bd0a082106b48f6dc39fba291d8d6fc39037dc413821c29935fac5c8af1f8bb02d6420993b61a99a84dcb9d1c42e56323c
|
@@ -136,7 +136,7 @@ end
|
|
136
136
|
# environment: Paid::Environment::PRODUCTION,
|
137
137
|
# token: "YOUR_AUTH_TOKEN"
|
138
138
|
# )
|
139
|
-
# api.agents.update(agent_id: "agentId", request: { name: "Acme Agent (Updated)", agent_attributes: [{ name: "Emails sent signal", active: true, pricing: { event_name: "emails_sent", taxable: true, charge_type: USAGE, pricing_model:
|
139
|
+
# api.agents.update(agent_id: "agentId", request: { name: "Acme Agent (Updated)", agent_attributes: [{ name: "Emails sent signal", active: true, pricing: { event_name: "emails_sent", taxable: true, charge_type: USAGE, pricing_model: PER_UNIT, billing_frequency: MONTHLY, price_points: { "USD": { tiers: [{ min_quantity: 0, max_quantity: 10, unit_price: 100 }, { min_quantity: 11, max_quantity: 100, unit_price: 90 }, { min_quantity: 101, unit_price: 80 }] } } } }] })
|
140
140
|
def update(agent_id:, request:, request_options: nil)
|
141
141
|
response = @request_client.conn.put do | req |
|
142
142
|
unless request_options&.timeout_in_seconds.nil?
|
@@ -402,7 +402,7 @@ end
|
|
402
402
|
# environment: Paid::Environment::PRODUCTION,
|
403
403
|
# token: "YOUR_AUTH_TOKEN"
|
404
404
|
# )
|
405
|
-
# api.agents.update(agent_id: "agentId", request: { name: "Acme Agent (Updated)", agent_attributes: [{ name: "Emails sent signal", active: true, pricing: { event_name: "emails_sent", taxable: true, charge_type: USAGE, pricing_model:
|
405
|
+
# api.agents.update(agent_id: "agentId", request: { name: "Acme Agent (Updated)", agent_attributes: [{ name: "Emails sent signal", active: true, pricing: { event_name: "emails_sent", taxable: true, charge_type: USAGE, pricing_model: PER_UNIT, billing_frequency: MONTHLY, price_points: { "USD": { tiers: [{ min_quantity: 0, max_quantity: 10, unit_price: 100 }, { min_quantity: 11, max_quantity: 100, unit_price: 90 }, { min_quantity: 101, unit_price: 80 }] } } } }] })
|
406
406
|
def update(agent_id:, request:, request_options: nil)
|
407
407
|
Async do
|
408
408
|
response = @request_client.conn.put do | req |
|
@@ -3,10 +3,10 @@
|
|
3
3
|
module Paid
|
4
4
|
class PricingModelType
|
5
5
|
|
6
|
-
PER_UNIT = "
|
7
|
-
VOLUME_PRICING = "
|
8
|
-
GRADUATED_PRICING = "
|
9
|
-
PREPAID_CREDITS = "
|
6
|
+
PER_UNIT = "PerUnit"
|
7
|
+
VOLUME_PRICING = "VolumePricing"
|
8
|
+
GRADUATED_PRICING = "GraduatedPricing"
|
9
|
+
PREPAID_CREDITS = "PrepaidCredits"
|
10
10
|
|
11
11
|
end
|
12
12
|
end
|
data/lib/requests.rb
CHANGED
@@ -47,7 +47,7 @@ end
|
|
47
47
|
end
|
48
48
|
# @return [Hash{String => String}]
|
49
49
|
def get_headers
|
50
|
-
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'paid_ruby', "X-Fern-SDK-Version": '0.1.1-
|
50
|
+
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'paid_ruby', "X-Fern-SDK-Version": '0.1.1-rc5' }
|
51
51
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil?
|
52
52
|
headers
|
53
53
|
end
|
@@ -92,7 +92,7 @@ end
|
|
92
92
|
end
|
93
93
|
# @return [Hash{String => String}]
|
94
94
|
def get_headers
|
95
|
-
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'paid_ruby', "X-Fern-SDK-Version": '0.1.1-
|
95
|
+
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'paid_ruby', "X-Fern-SDK-Version": '0.1.1-rc5' }
|
96
96
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil?
|
97
97
|
headers
|
98
98
|
end
|