Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
Seller examples (#64)
Browse files Browse the repository at this point in the history
* fix imports

* fix seller errors

* add seller examples

* retrieve & list examples

* remove example

* doc ok

* pass instance to wrapper methods

* search methods example

* search examples

* fix imports

* update seller examples

* black.reformat

* removed version from index

* replace ' for "
  • Loading branch information
rodrigondec authored Apr 27, 2020
1 parent 43da2dc commit ccc17f3
Show file tree
Hide file tree
Showing 31 changed files with 768 additions and 79 deletions.
34 changes: 34 additions & 0 deletions docs/examples/sellers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Exemplos de vendedores
========================================

Criar vendedor empresa
-----------------------------------------
.. literalinclude:: ../../examples/seller/add_business_seller.py

Criar vendedor PF
-----------------------------------------
.. literalinclude:: ../../examples/seller/add_individual_seller.py

Listar vendedores
-----------------------------------------
.. literalinclude:: ../../examples/seller/list_sellers.py

Pegar vendedor
-----------------------------------------
.. literalinclude:: ../../examples/seller/retrieve_seller.py

Atualizar vendedor
-----------------------------------------
.. literalinclude:: ../../examples/seller/update_seller.py

Remover vendedor
-----------------------------------------
.. literalinclude:: ../../examples/seller/remove_seller.py

Buscar vendedor empresa
-----------------------------------------
.. literalinclude:: ../../examples/seller/search_business_seller.py

Buscar vendedor PF
-----------------------------------------
.. literalinclude:: ../../examples/seller/search_individual_seller.py
2 changes: 1 addition & 1 deletion docs/examples/transactions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Listar transações de um seller

.. literalinclude:: ../../examples/transaction/list_transactions_for_seller.py

Recuperar detalhes da transação
Pegar detalhes da transação
-----------------------------------------

.. literalinclude:: ../../examples/transaction/retrieve_transaction.py
2 changes: 0 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Documentação do zoop-wrapper
========================================

Release v\ |version|

.. include:: ../README.rst

.. toctree::
Expand Down
63 changes: 63 additions & 0 deletions examples/data/add_business_seller.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"id": "4561671d9276495b8edb2d2688c2a685",
"status": "pending",
"resource": "seller",
"type": "business",
"description": null,
"account_balance": "0.00",
"current_balance": "0.00",
"business_name": "foo",
"business_phone": "foo",
"business_email": "foo",
"business_website": "foo",
"business_description": null,
"business_opening_date": "0000-00-00",
"business_facebook": null,
"business_twitter": null,
"ein": "44431904079819",
"statement_descriptor": null,
"mcc": null,
"business_address": {
"line1": "foo",
"line2": "123",
"line3": "barbar",
"neighborhood": "fooofoo",
"city": "Natal",
"state": "RN",
"postal_code": "59152250",
"country_code": "BR"
},
"owner": {
"first_name": "foo",
"last_name": "foo",
"email": "foo",
"phone_number": "foo",
"taxpayer_id": "98936283421",
"birthdate": "0000-00-00",
"address": {
"line1": null,
"line2": null,
"line3": null,
"neighborhood": null,
"city": null,
"state": null,
"postal_code": null,
"country_code": null
}
},
"show_profile_online": false,
"is_mobile": false,
"decline_on_fail_security_code": false,
"decline_on_fail_zipcode": false,
"delinquent": false,
"payment_methods": null,
"default_debit": null,
"default_credit": null,
"merchant_code": null,
"terminal_code": null,
"uri": "/v1/marketplaces/foo/sellers/businesses/",
"marketplace_id": "foo",
"metadata": {},
"created_at": "2020-04-27T19:47:16+00:00",
"updated_at": "2020-04-27T19:47:16+00:00"
}
45 changes: 45 additions & 0 deletions examples/data/add_individual_seller.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"id": "0e084bb6a60f47e8ac45949d5040eb92",
"status": "pending",
"resource": "seller",
"type": "individual",
"account_balance": "0.00",
"current_balance": "0.00",
"first_name": "foo",
"last_name": "foo",
"email": "foo@bar.com",
"description": null,
"taxpayer_id": "13543402480",
"phone_number": "+55 84 99999-9999",
"birthdate": "1994-12-27",
"website": null,
"facebook": null,
"twitter": null,
"address": {
"line1": "foo",
"line2": "123",
"line3": "barbar",
"neighborhood": "fooofoo",
"city": "Natal",
"state": "RN",
"postal_code": "59152250",
"country_code": "BR"
},
"statement_descriptor": null,
"mcc": null,
"show_profile_online": false,
"is_mobile": false,
"decline_on_fail_security_code": false,
"decline_on_fail_zipcode": false,
"delinquent": false,
"payment_methods": null,
"default_debit": null,
"default_credit": null,
"merchant_code": null,
"terminal_code": null,
"uri": "/v1/marketplaces/foo/sellers/individuals/0e084bb6a60f47e8ac45949d5040eb92",
"marketplace_id": "foo",
"metadata": {},
"created_at": "2020-04-27T19:35:55+00:00",
"updated_at": "2020-04-27T19:35:55+00:00"
}
121 changes: 121 additions & 0 deletions examples/data/list_sellers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"resource": "list",
"uri": "/v1/marketplaces/foo/sellers",
"items": [
{
"id": "0e084bb6a60f47e8ac45949d5040eb92",
"status": "pending",
"resource": "seller",
"type": "individual",
"account_balance": "0.00",
"current_balance": "0.00",
"first_name": "foo",
"last_name": "foo",
"email": "foo@bar.com",
"description": null,
"taxpayer_id": "13543402480",
"phone_number": "+55 84 99999-9999",
"birthdate": null,
"website": null,
"facebook": null,
"twitter": null,
"address": {
"line1": "foo",
"line2": "123",
"line3": "barbar",
"neighborhood": "fooofoo",
"city": "Natal",
"state": "RN",
"postal_code": "59152250",
"country_code": "BR"
},
"statement_descriptor": null,
"mcc": null,
"show_profile_online": false,
"is_mobile": false,
"decline_on_fail_security_code": false,
"decline_on_fail_zipcode": false,
"delinquent": false,
"payment_methods": null,
"default_debit": null,
"default_credit": null,
"merchant_code": null,
"terminal_code": null,
"uri": "/v1/marketplaces/foo/sellers/individuals/0e084bb6a60f47e8ac45949d5040eb92",
"marketplace_id": "foo",
"metadata": {},
"created_at": "2020-04-27T19:35:55+00:00",
"updated_at": "2020-04-27T19:35:55+00:00"
},
{
"id": "4561671d9276495b8edb2d2688c2a685",
"status": "pending",
"resource": "seller",
"type": "business",
"description": null,
"account_balance": "0.00",
"current_balance": "0.00",
"business_name": "foo",
"business_phone": "foo",
"business_email": "foo",
"business_website": "foo",
"business_description": null,
"business_opening_date": "0000-00-00",
"business_facebook": null,
"business_twitter": null,
"ein": "44431904079819",
"statement_descriptor": null,
"mcc": null,
"business_address": {
"line1": "foo",
"line2": "123",
"line3": "barbar",
"neighborhood": "fooofoo",
"city": "Natal",
"state": "RN",
"postal_code": "59152250",
"country_code": "BR"
},
"owner": {
"first_name": "foo",
"last_name": "foo",
"email": "foo",
"phone_number": "foo",
"taxpayer_id": "98936283421",
"birthdate": "0000-00-00",
"address": {
"line1": null,
"line2": null,
"line3": null,
"neighborhood": null,
"city": null,
"state": null,
"postal_code": null,
"country_code": null
}
},
"show_profile_online": false,
"is_mobile": false,
"decline_on_fail_security_code": false,
"decline_on_fail_zipcode": false,
"delinquent": false,
"payment_methods": null,
"default_debit": null,
"default_credit": null,
"merchant_code": null,
"terminal_code": null,
"uri": "/v1/marketplaces/foo/sellers/businesses/def9b60b9e7d4f9f8618176b0f55f3dd",
"marketplace_id": "foo",
"metadata": {},
"created_at": "2020-04-27T19:47:16+00:00",
"updated_at": "2020-04-27T19:47:16+00:00"
}
],
"has_more": false,
"limit": 100,
"total_pages": 1,
"page": 1,
"offset": 0,
"total": 48,
"query_count": 48
}
6 changes: 6 additions & 0 deletions examples/data/remove_seller.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"id": "79bb6be6ac8a477cbc1d8f79236a0f75",
"resource": "seller",
"type": "individual",
"deleted": true
}
45 changes: 45 additions & 0 deletions examples/data/retrieve_seller.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"id": "0e084bb6a60f47e8ac45949d5040eb92",
"status": "pending",
"resource": "seller",
"type": "individual",
"account_balance": "0.00",
"current_balance": "0.00",
"first_name": "foo",
"last_name": "foo",
"email": "foo@bar.com",
"description": null,
"taxpayer_id": "13543402480",
"phone_number": "+55 84 99999-9999",
"birthdate": "1994-12-27",
"website": null,
"facebook": null,
"twitter": null,
"address": {
"line1": "foo",
"line2": "123",
"line3": "barbar",
"neighborhood": "fooofoo",
"city": "Natal",
"state": "RN",
"postal_code": "59152250",
"country_code": "BR"
},
"statement_descriptor": null,
"mcc": null,
"show_profile_online": false,
"is_mobile": false,
"decline_on_fail_security_code": false,
"decline_on_fail_zipcode": false,
"delinquent": false,
"payment_methods": null,
"default_debit": null,
"default_credit": null,
"merchant_code": null,
"terminal_code": null,
"uri": "/v1/marketplaces/foo/sellers/individuals/0e084bb6a60f47e8ac45949d5040eb92",
"marketplace_id": "foo",
"metadata": {},
"created_at": "2020-04-27T19:35:55+00:00",
"updated_at": "2020-04-27T19:35:55+00:00"
}
Loading

0 comments on commit ccc17f3

Please sign in to comment.