attio-ruby 0.1.0 → 0.1.1

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: 30aee8e467a33e359480e61fbf740b7351fd63ebf985f32aa64108f4f5637617
4
- data.tar.gz: 3c2ef27394c6d153233e43305ea1a2b714d8986194a966bd59fe755b1174321f
3
+ metadata.gz: 84a54ed9baf9d0656cb14f49fc0209bad919cce78efe67de8b5b02ba56eac3bc
4
+ data.tar.gz: e3813aeea763037d5764d580b1074c18e82f6fa71eb1d1f8a9ab45adb0642b2c
5
5
  SHA512:
6
- metadata.gz: bfb3bc04b4af46085f49a4852a049df7f61cb30c69d8689eed8d9e41f860650350eeb64409673be1c316c8131fefc54ee9ae00e48ef81c8481bce67f53e450d5
7
- data.tar.gz: 2cac10e8790c90c75dac806f1e8575bc782c2c490acc185c51d31ff17bbaa055f6bf43faf1d3415b4d75bdf470de125d12b039dd03107d7702868b10391254ff
6
+ metadata.gz: e0eba5da5d484ff911e6c37893b043504cccb6e87e188ca0a60edd867579936ff49ac3b47715e60ee8d91a15dccbb3eaa3bb5e8accbd1883e12a803b1563a100
7
+ data.tar.gz: c95586cbc9a9e5e6d78ed417fec243409f359edc98a221aaf8316d96163a8de2f2eff0a4439fb2850571cf547f979d5f031f02f55ec0a4c538b107b485ddfeb8
data/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.1] - 2025-08-07
9
+
10
+ ### Fixed
11
+ - Minor bug fixes and improvements
12
+
8
13
  ## [0.1.0] - 2025-07-27
9
14
 
10
15
  ### Added
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Attio Ruby SDK
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/attio-ruby.svg)](https://badge.fury.io/rb/attio-ruby)
4
- [![Build Status](https://github.com/rbeene/attio_ruby/workflows/CI/badge.svg)](https://github.com/rbeene/attio_ruby/actions)
4
+ [![Build Status](https://github.com/rbeene/attio_ruby/actions/workflows/ci.yml/badge.svg)](https://github.com/rbeene/attio_ruby/actions/workflows/ci.yml)
5
5
  [![Documentation](https://img.shields.io/badge/docs-YARD-blue.svg)](https://rubydoc.info/gems/attio-ruby)
6
6
 
7
7
  A Ruby SDK for the [Attio API](https://attio.com/docs). This gem provides a simple and intuitive interface for interacting with Attio's CRM platform.
@@ -65,9 +65,7 @@ person = Attio::Person.create(
65
65
  )
66
66
 
67
67
  # Search for companies
68
- companies = Attio::Company.list(
69
- params: { q: "tech", limit: 10 }
70
- )
68
+ companies = Attio::Company.search("tech")
71
69
  ```
72
70
 
73
71
  ## Configuration
@@ -351,9 +349,11 @@ person.set_name(first: "Jane", last: "Doe")
351
349
  person.add_email("jane.doe@example.com")
352
350
  person.add_phone("+14155551234", country_code: "US")
353
351
 
354
- # Search methods
355
- jane = Attio::Person.find_by_email("jane@example.com")
356
- john = Attio::Person.find_by_name("John Smith")
352
+ # Search methods - Rails-style find_by
353
+ jane = Attio::Person.find_by(email: "jane@example.com")
354
+ john = Attio::Person.find_by(name: "John Smith")
355
+ # Can combine multiple conditions (uses AND logic)
356
+ exec = Attio::Person.find_by(email: "exec@company.com", job_title: "CEO")
357
357
  ```
358
358
 
359
359
  #### Company Methods
@@ -371,10 +371,53 @@ company.name = "New Company Name"
371
371
  company.add_domain("newdomain.com")
372
372
  company.add_team_member(person) # Associate a person with the company
373
373
 
374
+ # Search methods - Rails-style find_by
375
+ acme = Attio::Company.find_by(name: "Acme Corp")
376
+ tech_co = Attio::Company.find_by(domain: "techcompany.com")
377
+ # Can combine multiple conditions
378
+ big_tech = Attio::Company.find_by(domain: "tech.com", employee_count: "100-500")
379
+ ```
380
+
381
+ #### Deal Methods
382
+
383
+ ```ruby
384
+ # Create a deal (requires name, stage, and owner)
385
+ deal = Attio::Deal.create(
386
+ name: "Enterprise Deal",
387
+ value: 50000,
388
+ stage: "In Progress", # Options: "Lead", "In Progress", "Won 🎉", "Lost"
389
+ owner: "sales@company.com" # Must be a workspace member email
390
+ )
391
+
392
+ # Access methods
393
+ deal.name # Returns deal name
394
+ deal.value # Returns currency object with currency_value
395
+ deal.stage # Returns status object with nested title
396
+ deal.status # Alias for stage
397
+
398
+ # Update methods
399
+ deal.update_stage("Won 🎉")
400
+ deal.update_value(75000)
401
+
374
402
  # Search methods
375
- acme = Attio::Company.find_by_name("Acme Corp")
376
- tech_co = Attio::Company.find_by_domain("techcompany.com")
377
- large_cos = Attio::Company.find_by_size(min: 100)
403
+ big_deals = Attio::Deal.find_by_value_range(min: 100000)
404
+ mid_deals = Attio::Deal.find_by_value_range(min: 50000, max: 100000)
405
+ won_deals = Attio::Deal.find_by(stage: "Won 🎉")
406
+
407
+ # Check deal status
408
+ deal.open? # true if not won or lost
409
+ deal.won? # true if stage includes "won"
410
+ deal.lost? # true if stage is "lost"
411
+
412
+ # Associate with companies and people
413
+ deal = Attio::Deal.create(
414
+ name: "Partnership Deal",
415
+ value: 100000,
416
+ stage: "Lead",
417
+ owner: "sales@company.com",
418
+ associated_people: ["contact@partner.com"],
419
+ associated_company: ["partner.com"] # Uses domain
420
+ )
378
421
  ```
379
422
 
380
423
  #### TypedRecord Methods
@@ -385,8 +428,10 @@ All typed records (Person, Company, and custom objects) support:
385
428
  # Search with query string
386
429
  results = Attio::Person.search("john")
387
430
 
388
- # Find by any attribute
389
- person = Attio::Person.find_by(:job_title, "CEO")
431
+ # Find by any attribute using Rails-style syntax
432
+ person = Attio::Person.find_by(job_title: "CEO")
433
+ # Or find by multiple attributes (AND logic)
434
+ person = Attio::Person.find_by(job_title: "CEO", company: "Acme Corp")
390
435
 
391
436
  # Aliases for common methods
392
437
  Attio::Person.all == Attio::Person.list