paid_ruby 0.1.2 → 0.5.0.pre.alpha1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b2054795e06be38ede1daa5465842367cfef452cd91ecc6b1122a66a8942d99
4
- data.tar.gz: ba513d072353748c62740300308ce64102e215441123d037891dae820f000231
3
+ metadata.gz: a2dcc5d043c51e405cbfaf7218d192091d7ee650616596eef5c26ed790b52a78
4
+ data.tar.gz: 8e0462f0215cbdb94d810ed7c04309a4d1581bcba0efd02d9d49220451625ebc
5
5
  SHA512:
6
- metadata.gz: '0792683c410f927576c39efef7549ce4dc88b2730f681142f4556620af55bd283e391ce501adc85ba453555cafb7a1bbabf11c1e2c45613b74adbff4700d0828'
7
- data.tar.gz: 6f6f145c2f60fa277a67bf8ff983de8f0ae5877fd2dcf3519afb8756805e5323d8ee373ddcbdcfaafc511121622b7f978ca5a281c3e13797de5196f71dd89a48
6
+ metadata.gz: 5f493692e13c4a3db9295e66268aa7e982a26425608f86306eca53fa3ad9e667ac389a93aab6292e16bd15686e6b947cc6df9861e387250172b245f6ad27094b
7
+ data.tar.gz: 36d9a998cc9813589c53842cb8293141df47625c8b6b3a84c2867ed08720bf9cecd2533d53e87e412ce7a4c85056e9daf7c1f5aa29b6daf08c8c11d9aa303340
data/lib/gemconfig.rb CHANGED
@@ -9,6 +9,5 @@ module Paid
9
9
  HOMEPAGE = "https://github.com/paid-ai/paid-ruby"
10
10
  SOURCE_CODE_URI = "https://github.com/paid-ai/paid-ruby"
11
11
  CHANGELOG_URI = "https://github.com/paid-ai/paid-ruby/blob/master/CHANGELOG.md"
12
- RUBY_VERSION = ">= 3.4.4"
13
12
  end
14
13
  end
@@ -60,7 +60,6 @@ end
60
60
  # @param description [String]
61
61
  # @param agent_code [String]
62
62
  # @param external_id [String]
63
- # @param active [Boolean]
64
63
  # @param request_options [Paid::RequestOptions]
65
64
  # @return [Paid::Agent]
66
65
  # @example
@@ -69,12 +68,8 @@ end
69
68
  # environment: Paid::Environment::PRODUCTION,
70
69
  # token: "YOUR_AUTH_TOKEN"
71
70
  # )
72
- # api.agents.create(
73
- # name: "Acme Agent",
74
- # description: "Acme Agent is an AI agent that does things.",
75
- # external_id: "acme-agent"
76
- # )
77
- def create(name:, description:, agent_code: nil, external_id: nil, active: nil, request_options: nil)
71
+ # api.agents.create(name: "name", description: "description")
72
+ def create(name:, description:, agent_code: nil, external_id: nil, request_options: nil)
78
73
  response = @request_client.conn.post do | req |
79
74
  unless request_options&.timeout_in_seconds.nil?
80
75
  req.options.timeout = request_options.timeout_in_seconds
@@ -86,7 +81,7 @@ end
86
81
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
87
82
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
88
83
  end
89
- req.body = { **(request_options&.additional_body_parameters || {}), name: name, description: description, agentCode: agent_code, externalId: external_id, active: active }.compact
84
+ req.body = { **(request_options&.additional_body_parameters || {}), name: name, description: description, agentCode: agent_code, externalId: external_id }.compact
90
85
  req.url "#{@request_client.get_url(request_options: request_options)}/agents"
91
86
  end
92
87
  Paid::Agent.from_json(json_object: response.body)
@@ -136,7 +131,7 @@ end
136
131
  # environment: Paid::Environment::PRODUCTION,
137
132
  # token: "YOUR_AUTH_TOKEN"
138
133
  # )
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 }] } } } }] })
134
+ # api.agents.update(agent_id: "agentId", request: { })
140
135
  def update(agent_id:, request:, request_options: nil)
141
136
  response = @request_client.conn.put do | req |
142
137
  unless request_options&.timeout_in_seconds.nil?
@@ -227,7 +222,7 @@ end
227
222
  # environment: Paid::Environment::PRODUCTION,
228
223
  # token: "YOUR_AUTH_TOKEN"
229
224
  # )
230
- # api.agents.update_by_external_id(external_id: "externalId", 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": { unit_price: 150 } } } }] })
225
+ # api.agents.update_by_external_id(external_id: "externalId", request: { })
231
226
  def update_by_external_id(external_id:, request:, request_options: nil)
232
227
  response = @request_client.conn.put do | req |
233
228
  unless request_options&.timeout_in_seconds.nil?
@@ -322,7 +317,6 @@ end
322
317
  # @param description [String]
323
318
  # @param agent_code [String]
324
319
  # @param external_id [String]
325
- # @param active [Boolean]
326
320
  # @param request_options [Paid::RequestOptions]
327
321
  # @return [Paid::Agent]
328
322
  # @example
@@ -331,12 +325,8 @@ end
331
325
  # environment: Paid::Environment::PRODUCTION,
332
326
  # token: "YOUR_AUTH_TOKEN"
333
327
  # )
334
- # api.agents.create(
335
- # name: "Acme Agent",
336
- # description: "Acme Agent is an AI agent that does things.",
337
- # external_id: "acme-agent"
338
- # )
339
- def create(name:, description:, agent_code: nil, external_id: nil, active: nil, request_options: nil)
328
+ # api.agents.create(name: "name", description: "description")
329
+ def create(name:, description:, agent_code: nil, external_id: nil, request_options: nil)
340
330
  Async do
341
331
  response = @request_client.conn.post do | req |
342
332
  unless request_options&.timeout_in_seconds.nil?
@@ -349,7 +339,7 @@ end
349
339
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
350
340
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
351
341
  end
352
- req.body = { **(request_options&.additional_body_parameters || {}), name: name, description: description, agentCode: agent_code, externalId: external_id, active: active }.compact
342
+ req.body = { **(request_options&.additional_body_parameters || {}), name: name, description: description, agentCode: agent_code, externalId: external_id }.compact
353
343
  req.url "#{@request_client.get_url(request_options: request_options)}/agents"
354
344
  end
355
345
  Paid::Agent.from_json(json_object: response.body)
@@ -402,7 +392,7 @@ end
402
392
  # environment: Paid::Environment::PRODUCTION,
403
393
  # token: "YOUR_AUTH_TOKEN"
404
394
  # )
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 }] } } } }] })
395
+ # api.agents.update(agent_id: "agentId", request: { })
406
396
  def update(agent_id:, request:, request_options: nil)
407
397
  Async do
408
398
  response = @request_client.conn.put do | req |
@@ -499,7 +489,7 @@ end
499
489
  # environment: Paid::Environment::PRODUCTION,
500
490
  # token: "YOUR_AUTH_TOKEN"
501
491
  # )
502
- # api.agents.update_by_external_id(external_id: "externalId", 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": { unit_price: 150 } } } }] })
492
+ # api.agents.update_by_external_id(external_id: "externalId", request: { })
503
493
  def update_by_external_id(external_id:, request:, request_options: nil)
504
494
  Async do
505
495
  response = @request_client.conn.put do | req |
@@ -76,13 +76,16 @@ end
76
76
  # token: "YOUR_AUTH_TOKEN"
77
77
  # )
78
78
  # api.contacts.create(
79
- # customer_external_id: "acme-inc",
80
79
  # salutation: MR,
81
- # first_name: "John",
82
- # last_name: "Doe",
83
- # email: "john.doe@example.com"
80
+ # first_name: "firstName",
81
+ # last_name: "lastName",
82
+ # email: "email",
83
+ # billing_street: "billingStreet",
84
+ # billing_city: "billingCity",
85
+ # billing_country: "billingCountry",
86
+ # billing_postal_code: "billingPostalCode"
84
87
  # )
85
- def create(external_id: nil, customer_id: nil, customer_external_id: nil, salutation:, first_name:, last_name:, email:, phone: nil, billing_street: nil, billing_city: nil, billing_state_province: nil, billing_country: nil, billing_postal_code: nil, request_options: nil)
88
+ def create(external_id: nil, customer_id: nil, customer_external_id: nil, salutation:, first_name:, last_name:, email:, phone: nil, billing_street:, billing_city:, billing_state_province: nil, billing_country:, billing_postal_code:, request_options: nil)
86
89
  response = @request_client.conn.post do | req |
87
90
  unless request_options&.timeout_in_seconds.nil?
88
91
  req.options.timeout = request_options.timeout_in_seconds
@@ -280,13 +283,16 @@ end
280
283
  # token: "YOUR_AUTH_TOKEN"
281
284
  # )
282
285
  # api.contacts.create(
283
- # customer_external_id: "acme-inc",
284
286
  # salutation: MR,
285
- # first_name: "John",
286
- # last_name: "Doe",
287
- # email: "john.doe@example.com"
287
+ # first_name: "firstName",
288
+ # last_name: "lastName",
289
+ # email: "email",
290
+ # billing_street: "billingStreet",
291
+ # billing_city: "billingCity",
292
+ # billing_country: "billingCountry",
293
+ # billing_postal_code: "billingPostalCode"
288
294
  # )
289
- def create(external_id: nil, customer_id: nil, customer_external_id: nil, salutation:, first_name:, last_name:, email:, phone: nil, billing_street: nil, billing_city: nil, billing_state_province: nil, billing_country: nil, billing_postal_code: nil, request_options: nil)
295
+ def create(external_id: nil, customer_id: nil, customer_external_id: nil, salutation:, first_name:, last_name:, email:, phone: nil, billing_street:, billing_city:, billing_state_province: nil, billing_country:, billing_postal_code:, request_options: nil)
290
296
  Async do
291
297
  response = @request_client.conn.post do | req |
292
298
  unless request_options&.timeout_in_seconds.nil?
@@ -82,7 +82,7 @@ end
82
82
  # environment: Paid::Environment::PRODUCTION,
83
83
  # token: "YOUR_AUTH_TOKEN"
84
84
  # )
85
- # api.customers.create(name: "Acme, Inc.", external_id: "acme-inc")
85
+ # api.customers.create(name: "name")
86
86
  def create(name:, external_id: nil, phone: nil, employee_count: nil, annual_revenue: nil, tax_exempt_status: nil, creation_source: nil, website: nil, billing_address: nil, request_options: nil)
87
87
  response = @request_client.conn.post do | req |
88
88
  unless request_options&.timeout_in_seconds.nil?
@@ -154,7 +154,7 @@ end
154
154
  # environment: Paid::Environment::PRODUCTION,
155
155
  # token: "YOUR_AUTH_TOKEN"
156
156
  # )
157
- # api.customers.update(customer_id: "customerId", request: { name: "Acme, Inc. (Updated)", phone: "123-456-7890", employee_count: 101, annual_revenue: 1000001 })
157
+ # api.customers.update(customer_id: "customerId", request: { })
158
158
  def update(customer_id:, request:, request_options: nil)
159
159
  response = @request_client.conn.put do | req |
160
160
  unless request_options&.timeout_in_seconds.nil?
@@ -368,7 +368,7 @@ end
368
368
  # environment: Paid::Environment::PRODUCTION,
369
369
  # token: "YOUR_AUTH_TOKEN"
370
370
  # )
371
- # api.customers.create(name: "Acme, Inc.", external_id: "acme-inc")
371
+ # api.customers.create(name: "name")
372
372
  def create(name:, external_id: nil, phone: nil, employee_count: nil, annual_revenue: nil, tax_exempt_status: nil, creation_source: nil, website: nil, billing_address: nil, request_options: nil)
373
373
  Async do
374
374
  response = @request_client.conn.post do | req |
@@ -444,7 +444,7 @@ end
444
444
  # environment: Paid::Environment::PRODUCTION,
445
445
  # token: "YOUR_AUTH_TOKEN"
446
446
  # )
447
- # api.customers.update(customer_id: "customerId", request: { name: "Acme, Inc. (Updated)", phone: "123-456-7890", employee_count: 101, annual_revenue: 1000001 })
447
+ # api.customers.update(customer_id: "customerId", request: { })
448
448
  def update(customer_id:, request:, request_options: nil)
449
449
  Async do
450
450
  response = @request_client.conn.put do | req |
@@ -79,14 +79,13 @@ end
79
79
  # token: "YOUR_AUTH_TOKEN"
80
80
  # )
81
81
  # api.orders.create(
82
- # customer_external_id: "acme-inc",
83
- # name: "Acme Order",
84
- # description: "Acme Order is an order for Acme, Inc.",
85
- # start_date: "2025-01-01",
86
- # end_date: "2026-01-01",
87
- # currency: "USD"
82
+ # customer_id: "customerId",
83
+ # billing_contact_id: "billingContactId",
84
+ # name: "name",
85
+ # start_date: "startDate",
86
+ # currency: "currency"
88
87
  # )
89
- def create(customer_id: nil, customer_external_id: nil, billing_contact_id: nil, name:, description: nil, start_date:, end_date: nil, currency:, order_lines: nil, request_options: nil)
88
+ def create(customer_id:, customer_external_id: nil, billing_contact_id:, name:, description: nil, start_date:, end_date: nil, currency:, order_lines: nil, request_options: nil)
90
89
  response = @request_client.conn.post do | req |
91
90
  unless request_options&.timeout_in_seconds.nil?
92
91
  req.options.timeout = request_options.timeout_in_seconds
@@ -259,14 +258,13 @@ end
259
258
  # token: "YOUR_AUTH_TOKEN"
260
259
  # )
261
260
  # api.orders.create(
262
- # customer_external_id: "acme-inc",
263
- # name: "Acme Order",
264
- # description: "Acme Order is an order for Acme, Inc.",
265
- # start_date: "2025-01-01",
266
- # end_date: "2026-01-01",
267
- # currency: "USD"
261
+ # customer_id: "customerId",
262
+ # billing_contact_id: "billingContactId",
263
+ # name: "name",
264
+ # start_date: "startDate",
265
+ # currency: "currency"
268
266
  # )
269
- def create(customer_id: nil, customer_external_id: nil, billing_contact_id: nil, name:, description: nil, start_date:, end_date: nil, currency:, order_lines: nil, request_options: nil)
267
+ def create(customer_id:, customer_external_id: nil, billing_contact_id:, name:, description: nil, start_date:, end_date: nil, currency:, order_lines: nil, request_options: nil)
270
268
  Async do
271
269
  response = @request_client.conn.post do | req |
272
270
  unless request_options&.timeout_in_seconds.nil?
@@ -31,7 +31,7 @@ module Paid
31
31
  # environment: Paid::Environment::PRODUCTION,
32
32
  # token: "YOUR_AUTH_TOKEN"
33
33
  # )
34
- # api.orders.lines.update(order_id: "orderId", lines: [{ agent_external_id: "acme-agent", name: "Order Line One", description: "Order Line One is an order line for Acme, Inc." }, { agent_external_id: "acme-agent-2", name: "Order Line Two", description: "Order Line Two is an order line for Acme, Inc." }])
34
+ # api.orders.lines.update(order_id: "orderId")
35
35
  def update(order_id:, lines: nil, request_options: nil)
36
36
  response = @request_client.conn.put do | req |
37
37
  unless request_options&.timeout_in_seconds.nil?
@@ -74,7 +74,7 @@ end
74
74
  # environment: Paid::Environment::PRODUCTION,
75
75
  # token: "YOUR_AUTH_TOKEN"
76
76
  # )
77
- # api.orders.lines.update(order_id: "orderId", lines: [{ agent_external_id: "acme-agent", name: "Order Line One", description: "Order Line One is an order line for Acme, Inc." }, { agent_external_id: "acme-agent-2", name: "Order Line Two", description: "Order Line Two is an order line for Acme, Inc." }])
77
+ # api.orders.lines.update(order_id: "orderId")
78
78
  def update(order_id:, lines: nil, request_options: nil)
79
79
  Async do
80
80
  response = @request_client.conn.put do | req |
@@ -3,9 +3,9 @@
3
3
  module Paid
4
4
  class BillingFrequency
5
5
 
6
- MONTHLY = "monthly"
7
- QUARTERLY = "quarterly"
8
- ANNUAL = "annual"
6
+ MONTHLY = "Monthly"
7
+ QUARTERLY = "Quarterly"
8
+ ANNUAL = "Annual"
9
9
 
10
10
  end
11
11
  end
@@ -11,8 +11,6 @@ module Paid
11
11
  attr_reader :event_name
12
12
  # @return [Boolean]
13
13
  attr_reader :taxable
14
- # @return [Float]
15
- attr_reader :credit_cost
16
14
  # @return [Paid::ChargeType]
17
15
  attr_reader :charge_type
18
16
  # @return [Paid::PricingModelType]
@@ -31,23 +29,21 @@ module Paid
31
29
 
32
30
  # @param event_name [String]
33
31
  # @param taxable [Boolean]
34
- # @param credit_cost [Float]
35
32
  # @param charge_type [Paid::ChargeType]
36
33
  # @param pricing_model [Paid::PricingModelType]
37
34
  # @param billing_frequency [Paid::BillingFrequency]
38
35
  # @param price_points [Hash{String => Paid::AgentPricePoint}]
39
36
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
40
37
  # @return [Paid::Pricing]
41
- def initialize(event_name: OMIT, taxable:, credit_cost: OMIT, charge_type:, pricing_model:, billing_frequency:, price_points:, additional_properties: nil)
38
+ def initialize(event_name: OMIT, taxable:, charge_type:, pricing_model:, billing_frequency:, price_points:, additional_properties: nil)
42
39
  @event_name = event_name if event_name != OMIT
43
40
  @taxable = taxable
44
- @credit_cost = credit_cost if credit_cost != OMIT
45
41
  @charge_type = charge_type
46
42
  @pricing_model = pricing_model
47
43
  @billing_frequency = billing_frequency
48
44
  @price_points = price_points
49
45
  @additional_properties = additional_properties
50
- @_field_set = { "eventName": event_name, "taxable": taxable, "creditCost": credit_cost, "chargeType": charge_type, "pricingModel": pricing_model, "billingFrequency": billing_frequency, "pricePoints": price_points }.reject do | _k, v |
46
+ @_field_set = { "eventName": event_name, "taxable": taxable, "chargeType": charge_type, "pricingModel": pricing_model, "billingFrequency": billing_frequency, "pricePoints": price_points }.reject do | _k, v |
51
47
  v == OMIT
52
48
  end
53
49
  end
@@ -60,7 +56,6 @@ end
60
56
  parsed_json = JSON.parse(json_object)
61
57
  event_name = parsed_json["eventName"]
62
58
  taxable = parsed_json["taxable"]
63
- credit_cost = parsed_json["creditCost"]
64
59
  charge_type = parsed_json["chargeType"]
65
60
  pricing_model = parsed_json["pricingModel"]
66
61
  billing_frequency = parsed_json["billingFrequency"]
@@ -71,7 +66,6 @@ end
71
66
  new(
72
67
  event_name: event_name,
73
68
  taxable: taxable,
74
- credit_cost: credit_cost,
75
69
  charge_type: charge_type,
76
70
  pricing_model: pricing_model,
77
71
  billing_frequency: billing_frequency,
@@ -94,7 +88,6 @@ end
94
88
  def self.validate_raw(obj:)
95
89
  obj.event_name&.is_a?(String) != false || raise("Passed value for field obj.event_name is not the expected type, validation failed.")
96
90
  obj.taxable.is_a?(Boolean) != false || raise("Passed value for field obj.taxable is not the expected type, validation failed.")
97
- obj.credit_cost&.is_a?(Float) != false || raise("Passed value for field obj.credit_cost is not the expected type, validation failed.")
98
91
  obj.charge_type.is_a?(Paid::ChargeType) != false || raise("Passed value for field obj.charge_type is not the expected type, validation failed.")
99
92
  obj.pricing_model.is_a?(Paid::PricingModelType) != false || raise("Passed value for field obj.pricing_model is not the expected type, validation failed.")
100
93
  obj.billing_frequency.is_a?(Paid::BillingFrequency) != false || raise("Passed value for field obj.billing_frequency is not the expected type, validation failed.")
@@ -6,7 +6,6 @@ module Paid
6
6
  PER_UNIT = "PerUnit"
7
7
  VOLUME_PRICING = "VolumePricing"
8
8
  GRADUATED_PRICING = "GraduatedPricing"
9
- PREPAID_CREDITS = "PrepaidCredits"
10
9
 
11
10
  end
12
11
  end
@@ -8,8 +8,6 @@ module Paid
8
8
  attr_reader :event_name
9
9
  # @return [String]
10
10
  attr_reader :agent_id
11
- # @return [String]
12
- attr_reader :external_agent_id
13
11
  # @return [String]
14
12
  attr_reader :customer_id
15
13
  # @return [Hash{String => Object}]
@@ -24,19 +22,17 @@ module Paid
24
22
 
25
23
  # @param event_name [String]
26
24
  # @param agent_id [String]
27
- # @param external_agent_id [String]
28
25
  # @param customer_id [String]
29
26
  # @param data [Hash{String => Object}]
30
27
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
31
28
  # @return [Paid::Signal]
32
- def initialize(event_name: OMIT, agent_id: OMIT, external_agent_id: OMIT, customer_id: OMIT, data: OMIT, additional_properties: nil)
29
+ def initialize(event_name: OMIT, agent_id: OMIT, customer_id: OMIT, data: OMIT, additional_properties: nil)
33
30
  @event_name = event_name if event_name != OMIT
34
31
  @agent_id = agent_id if agent_id != OMIT
35
- @external_agent_id = external_agent_id if external_agent_id != OMIT
36
32
  @customer_id = customer_id if customer_id != OMIT
37
33
  @data = data if data != OMIT
38
34
  @additional_properties = additional_properties
39
- @_field_set = { "event_name": event_name, "agent_id": agent_id, "external_agent_id": external_agent_id, "customer_id": customer_id, "data": data }.reject do | _k, v |
35
+ @_field_set = { "event_name": event_name, "agent_id": agent_id, "customer_id": customer_id, "data": data }.reject do | _k, v |
40
36
  v == OMIT
41
37
  end
42
38
  end
@@ -49,13 +45,11 @@ end
49
45
  parsed_json = JSON.parse(json_object)
50
46
  event_name = parsed_json["event_name"]
51
47
  agent_id = parsed_json["agent_id"]
52
- external_agent_id = parsed_json["external_agent_id"]
53
48
  customer_id = parsed_json["customer_id"]
54
49
  data = parsed_json["data"]
55
50
  new(
56
51
  event_name: event_name,
57
52
  agent_id: agent_id,
58
- external_agent_id: external_agent_id,
59
53
  customer_id: customer_id,
60
54
  data: data,
61
55
  additional_properties: struct
@@ -76,7 +70,6 @@ end
76
70
  def self.validate_raw(obj:)
77
71
  obj.event_name&.is_a?(String) != false || raise("Passed value for field obj.event_name is not the expected type, validation failed.")
78
72
  obj.agent_id&.is_a?(String) != false || raise("Passed value for field obj.agent_id is not the expected type, validation failed.")
79
- obj.external_agent_id&.is_a?(String) != false || raise("Passed value for field obj.external_agent_id is not the expected type, validation failed.")
80
73
  obj.customer_id&.is_a?(String) != false || raise("Passed value for field obj.customer_id is not the expected type, validation failed.")
81
74
  obj.data&.is_a?(Hash) != false || raise("Passed value for field obj.data is not the expected type, validation failed.")
82
75
  end
@@ -19,7 +19,6 @@ module Paid
19
19
  # @param signals [Array<Hash>] Request of type Array<Paid::Signal>, as a Hash
20
20
  # * :event_name (String)
21
21
  # * :agent_id (String)
22
- # * :external_agent_id (String)
23
22
  # * :customer_id (String)
24
23
  # * :data (Hash{String => Object})
25
24
  # @param request_options [Paid::RequestOptions]
@@ -30,7 +29,7 @@ module Paid
30
29
  # environment: Paid::Environment::PRODUCTION,
31
30
  # token: "YOUR_AUTH_TOKEN"
32
31
  # )
33
- # api.usage.record_bulk(signals: [{ }, { }, { }])
32
+ # api.usage.record_bulk
34
33
  def record_bulk(signals: nil, request_options: nil)
35
34
  response = @request_client.conn.post do | req |
36
35
  unless request_options&.timeout_in_seconds.nil?
@@ -63,7 +62,6 @@ end
63
62
  # @param signals [Array<Hash>] Request of type Array<Paid::Signal>, as a Hash
64
63
  # * :event_name (String)
65
64
  # * :agent_id (String)
66
- # * :external_agent_id (String)
67
65
  # * :customer_id (String)
68
66
  # * :data (Hash{String => Object})
69
67
  # @param request_options [Paid::RequestOptions]
@@ -74,7 +72,7 @@ end
74
72
  # environment: Paid::Environment::PRODUCTION,
75
73
  # token: "YOUR_AUTH_TOKEN"
76
74
  # )
77
- # api.usage.record_bulk(signals: [{ }, { }, { }])
75
+ # api.usage.record_bulk
78
76
  def record_bulk(signals: nil, request_options: nil)
79
77
  Async do
80
78
  response = @request_client.conn.post do | req |
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.2' }
50
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'paid_ruby', "X-Fern-SDK-Version": '0.1.1' }
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.2' }
95
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'paid_ruby', "X-Fern-SDK-Version": '0.1.1' }
96
96
  headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil?
97
97
  headers
98
98
  end
metadata CHANGED
@@ -1,70 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paid_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.5.0.pre.alpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
+ autorequire:
8
9
  bindir: exe
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2025-06-19 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
- name: opentelemetry-api
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - "~>"
17
- - !ruby/object:Gem::Version
18
- version: '1.5'
19
- type: :runtime
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - "~>"
24
- - !ruby/object:Gem::Version
25
- version: '1.5'
26
- - !ruby/object:Gem::Dependency
27
- name: opentelemetry-exporter-otlp
14
+ name: async-http-faraday
28
15
  requirement: !ruby/object:Gem::Requirement
29
16
  requirements:
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: 0.30.0
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
17
+ - - ">="
38
18
  - !ruby/object:Gem::Version
39
- version: 0.30.0
40
- - !ruby/object:Gem::Dependency
41
- name: opentelemetry-sdk
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
19
+ version: '0.0'
20
+ - - "<"
45
21
  - !ruby/object:Gem::Version
46
- version: '1.8'
22
+ version: '1.0'
47
23
  type: :runtime
48
24
  prerelease: false
49
25
  version_requirements: !ruby/object:Gem::Requirement
50
26
  requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '1.8'
54
- - !ruby/object:Gem::Dependency
55
- name: ruby-openai
56
- requirement: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
27
+ - - ">="
59
28
  - !ruby/object:Gem::Version
60
- version: '8.1'
61
- type: :runtime
62
- prerelease: false
63
- version_requirements: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
29
+ version: '0.0'
30
+ - - "<"
66
31
  - !ruby/object:Gem::Version
67
- version: '8.1'
32
+ version: '1.0'
68
33
  - !ruby/object:Gem::Dependency
69
34
  name: faraday
70
35
  requirement: !ruby/object:Gem::Requirement
@@ -126,25 +91,89 @@ dependencies:
126
91
  - !ruby/object:Gem::Version
127
92
  version: '3.0'
128
93
  - !ruby/object:Gem::Dependency
129
- name: async-http-faraday
94
+ name: opentelemetry-api
130
95
  requirement: !ruby/object:Gem::Requirement
131
96
  requirements:
132
- - - ">="
97
+ - - "~>"
133
98
  - !ruby/object:Gem::Version
134
- version: '0.0'
135
- - - "<"
99
+ version: '1.5'
100
+ type: :runtime
101
+ prerelease: false
102
+ version_requirements: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - "~>"
136
105
  - !ruby/object:Gem::Version
137
- version: '1.0'
106
+ version: '1.5'
107
+ - !ruby/object:Gem::Dependency
108
+ name: opentelemetry-exporter-otlp
109
+ requirement: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - "~>"
112
+ - !ruby/object:Gem::Version
113
+ version: 0.30.0
114
+ type: :runtime
115
+ prerelease: false
116
+ version_requirements: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - "~>"
119
+ - !ruby/object:Gem::Version
120
+ version: 0.30.0
121
+ - !ruby/object:Gem::Dependency
122
+ name: opentelemetry-sdk
123
+ requirement: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - "~>"
126
+ - !ruby/object:Gem::Version
127
+ version: '1.8'
138
128
  type: :runtime
139
129
  prerelease: false
140
130
  version_requirements: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - "~>"
133
+ - !ruby/object:Gem::Version
134
+ version: '1.8'
135
+ - !ruby/object:Gem::Dependency
136
+ name: ostruct
137
+ requirement: !ruby/object:Gem::Requirement
141
138
  requirements:
142
139
  - - ">="
143
140
  - !ruby/object:Gem::Version
144
- version: '0.0'
145
- - - "<"
141
+ version: '0'
142
+ type: :runtime
143
+ prerelease: false
144
+ version_requirements: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ">="
146
147
  - !ruby/object:Gem::Version
147
- version: '1.0'
148
+ version: '0'
149
+ - !ruby/object:Gem::Dependency
150
+ name: rake
151
+ requirement: !ruby/object:Gem::Requirement
152
+ requirements:
153
+ - - "~>"
154
+ - !ruby/object:Gem::Version
155
+ version: '13.0'
156
+ type: :runtime
157
+ prerelease: false
158
+ version_requirements: !ruby/object:Gem::Requirement
159
+ requirements:
160
+ - - "~>"
161
+ - !ruby/object:Gem::Version
162
+ version: '13.0'
163
+ - !ruby/object:Gem::Dependency
164
+ name: ruby-openai
165
+ requirement: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - "~>"
168
+ - !ruby/object:Gem::Version
169
+ version: '8.1'
170
+ type: :runtime
171
+ prerelease: false
172
+ version_requirements: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - "~>"
175
+ - !ruby/object:Gem::Version
176
+ version: '8.1'
148
177
  description: ''
149
178
  email: ''
150
179
  executables: []
@@ -199,6 +228,7 @@ metadata:
199
228
  homepage_uri: https://github.com/paid-ai/paid-ruby
200
229
  source_code_uri: https://github.com/paid-ai/paid-ruby
201
230
  changelog_uri: https://github.com/paid-ai/paid-ruby/blob/master/CHANGELOG.md
231
+ post_install_message:
202
232
  rdoc_options: []
203
233
  require_paths:
204
234
  - lib
@@ -206,14 +236,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
206
236
  requirements:
207
237
  - - ">="
208
238
  - !ruby/object:Gem::Version
209
- version: 2.7.0
239
+ version: 3.1.0
210
240
  required_rubygems_version: !ruby/object:Gem::Requirement
211
241
  requirements:
212
- - - ">="
242
+ - - ">"
213
243
  - !ruby/object:Gem::Version
214
- version: '0'
244
+ version: 1.3.1
215
245
  requirements: []
216
- rubygems_version: 3.6.7
246
+ rubygems_version: 3.3.27
247
+ signing_key:
217
248
  specification_version: 4
218
249
  summary: ''
219
250
  test_files: []