Giter Club home page Giter Club logo

Comments (4)

it-can avatar it-can commented on July 19, 2024

aah when I assign it to a variable it works...

// Example: Create a new contact
$contact = $moneybird->contact();

$contact->firstname = 'Test';
$contact->lastname = 'Test';
$contact->email = '[email protected]';
$test = $contact->save();

var_dump($test);

Contact {#446 ▼
  +"id": "140744062628005371"
  +"company_name": ""
  +"firstname": "Test"
  +"lastname": "Test"
  +"attention": ""
  +"address1": ""
  +"address2": ""
  +"zipcode": ""
  +"city": ""
  +"country": "NL"
  +"email": "[email protected]"
  +"phone": ""
  +"delivery_method": "Email"
  +"customer_id": "11"
  +"tax_number": ""
  +"chamber_of_commerce": ""
  +"bank_account": ""
  +"send_invoices_to_attention": ""
  +"send_invoices_to_email": "[email protected]"
  +"send_estimates_to_attention": ""
  +"send_estimates_to_email": "[email protected]"
  +"sepa_active": false
  +"sepa_iban": ""
  +"sepa_iban_account_name": ""
  +"sepa_bic": ""
  +"sepa_mandate_id": ""
  +"sepa_mandate_date": null
  +"sepa_sequence_type": "FRST"
  +"credit_card_number": ""
  +"credit_card_reference": ""
  +"credit_card_type": null
  +"tax_number_validated_at": null
  +"created_at": "2015-11-25T09:33:39.431Z"
  +"updated_at": "2015-11-25T09:33:39.431Z"
  +"notes": []
  +"custom_fields": []
  +"version": null
}

from moneybird-php-client.

stephangroen avatar stephangroen commented on July 19, 2024

Yep, that is still a bit counter-intuitive. Was still thinking of changing that before release.

from moneybird-php-client.

stephangroen avatar stephangroen commented on July 19, 2024

Hi @it-can, the first release (0.1.0) will save the returned values in the same object. So $contact->save() will have the ID in $contact.

from moneybird-php-client.

it-can avatar it-can commented on July 19, 2024

cool! Thanks

from moneybird-php-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.